Apr 30, 2020

A Board for the Farm

I own and operate a small farm in Maryland, USA. We grow spring annuals in our one acre commercial greenhouse and produce about 200,000 broiler chickens per year in our commercial poultry house. I occasionally put my hobby knowledge to use on the farm. I have been known to cobble together a proto board or an Arduino with a proto shield for a project now and then, but they always looked less than professional. This may all change with this new found skill. I recently needed a way to control 3 dosing pumps with the pulse from one water meter. This seemed the perfect opportunity to make a professional level Arduino project. I am a big fan of plug-able headers and terminal connectors. Making the wire connections is so much easier when you can hold the connector in your hand. The board is rather simple with just an Arduino Nano socket along with 4 relays and an ULN2003A relay driver along with plug-able terminals for inputs and outputs. I brought out some of the unused I/O pins in case I find another use for the extra boards. Here are the boards.



The code for the project is straight forward. The water meter closes a circuit once per 10 gallons. With one dosing pump that closure would signal it to start a dose cycle. With 3 pumps I needed 3 closure circuits (3 relays). So the code just waits for the input from the water meter circuit to go high and when it does it triggers the outputs for the 3 relays through the ULN2003A. The ULN2003A takes the logic level signal from the Arduino as input and outputs the higher current needed to activate the relay coils.

The code worked great. Now to 3D print an enclosure for it....

OK so I 3D printed a box I designed in Fusion 360. It turned out alright but it did not look as professional as I wanted and would not have been sealed. 



So I decided to get this enclosure off Amazon. Here is a close-up of the board installed in the box.



The photo below shows the 3 dosing pumps that the board controls.




I mounted the board in the box with some brass hex standoffs I had sitting in a drawer. I just put a slit in a few of the 10 rubber plugs to pass the wires through. My code has the on-board pin 13 LED light when it activates the solenoids. The solid cover prevents monitoring that so I may change the code and bring out a LED wired to one of the spare I/O pins. With buying 10 boards and enough components to make 2 working boards along with the case the project cost under $50. The best part is it is open source and I can fix it if something goes wrong. By comparison I just had a technician repair the main controller for the chicken house. A power surge from a lightning strike fried 2 small PCBs. They cost $600 (no markup there!) and the labor for troubleshooting and reprogramming was $750.

No comments:

Post a Comment