What Equipment Needed/How Many?

Because I'm stuck at home at the moment, I figured I'd make life a little easier for myself on my little Texas ranch. So, allow me to explain my desired operation, equipment that I've found I think will work, and ask some questions afterwards. This will be my first time doing this with an actual use that'll be permanent, with a PCB board, etc. Also, trying to do this as cost effective (ie. cheap) as possible.

So, I have 3 areas where livestock are housed on my property, and fresh/clean water becomes an issue, with multiple trips with water pails several times a day for 2 areas, which house various chicken stock. My 3rd area houses goats, and this presents 2 different issues. First, chickens will climb all over anything in their coops, and make the water dirty, but heating the water only becomes an issue when it's sub-freezing. Second, the goats, being picky, like water around lukewarm our warmer, no matter the temperature , which equals to 95°F-100°F or warmer. They also go through a LOT if water while browsing through the roughage they like, like briars, saplings, and grassy areas.

My desired operations is for the chickens, to have water level sensor an a trough for them that when it hits a lower mark, will empty out the trough through an electronically controlled drain valve, flush the sides, and then refill to the top of the sensor. Frequency and amount that will be optimal will he determined through testing once it's operational. As far as heating, I'm in Texas, so that won't be an issue until later on in the year.

The goat side operation, I would like to have the same water level/drain idea, although it'll differ somewhat. I have an added issue of keeping the water warmer. Most devices I see available are for keeping water thawed out, and won't work for a goats particular picky needs. Also noted, is that these devices have a tendency to have electrical issues, resulting in a shock to the livestock over time. The available devices typically sit int the livestock water. I don't wish to shock them. I should point out that these goats are also extremely young, and the warmer water helps keep their temperature regulated.

So, I am understanding that I am probably missing some key things with where I'm thinking this through. I have found the point of use water heaters, which I think will work well for the warming part of the goat water. I have found solenoid valves that will work (1/2" connection) for controlling water flow, although they seem to either run on 110VAC our 12VDC-24VDC. Seeing as I never controlled in AC circuit from a DC circuit, I found some solid state relays on sparky, and again on Amazon that fit the power requirements for the components I have picked out so far. I have a pack of divided, transitors, opamps, darlingtons, and some things available at this moment. I kind of halfway have an idea for a servo motor on the drains for faster drain times.

Simply, I am thinking the best way to do this is used an Arduino to monitor the water sensor, and when it reaches a specific level, drain the water on a timer, then use a valve to spray the sides down, close the spray, close the drain, refill the troughs. I'm thinking the same thing for the goats, but I think a low volume circulation pump to keep the water warmed would/should be added to accomplish this. I believe using a temperature sensor to aid the circulation times would be effective.

My questions are, is this something that is plausible, or might there be issues creating it? Mains power isn't an issue, I have plenty of experience with staying safe with it. Having never considered controlling an AC circuit from DC control circuit, I have found that these solid state relays seem to be the way to do it. So, given that, my plan is to use some transistors, NPN to PNP to get the control voltage/amperage to the required setting for the SSR's to control the AC circuit. This means either a rectifier and then a voltage regulator, or a transformer then to a voltage regulator. I'm not sure which would be more cost effective/better to use in this particular instance. Also, the solenoid valves to control water flow, the cheaper ones are the low voltage, DC ones, but mains power is more readily accessible with less wiring required. But, if a solution for using the DC is already presented with the control circuit, eliminating the requirement for an SSR, using the DC valves would be more effective.

  1. Will Arduino work for this? Will it require multiple boards, or can I control it all off one board?

  2. Beefing up the voltage/amperage on control circuit, should I stay on a DC circuit or use mains power for the "working" circuit and buy accordingly?

  3. Either way, should I be using a rectifier with a voltage regulator or a transformer and then a rectifier to accomplish AC to DC conversation? I would imagine that I'm looking at a desired output of 12VDC to 18VDC around 5A-10A max. I think.

Thanks for reading and help

Thank for describing your requirement reasonably clearly - many people don't.

An Arduino should be well able to control the system you describe. One Arduino would probably be able to control both the goat and chicken systems but, for the small extra cost, it may simplify matters to have the systems on two separate Arduinos.

The chicken system seems somewhat simpler as it does not need the water heater so I suggest you start with that and when it is working you will then have a design (and software) for 80% (or more) of the goat system.

I am not well equipped to advise you about DC vs AC as I am in the UK and not familiar with US equipment. I think if it was my problem I would choose common-place and reliable equipment (valves, pumps, heaters etc).

If low voltage DC versions are readily available (I know that 12v pumps are widely used in boats and motorhomes) then they have the advantage of being safe for humans and animals. However DC power devices need high currents and a reliable (24/7) mains to DC converter for high currents may be expensive.

Controlling mains power with relays is not generally a problem as long as you know how to identify suitable devices - or get advice from a professional electrician. However you should be aware that Arduino I/O pins may not be able to provide enough voltage or current for relay coils (I don't know the current or voltage requirements for SSRs) so you may need an intermediate transistor circuit.

I'm afraid I got a bit lost when you started writing about rectifiers and voltage regulators - I don't know what you have in mind to use them for. If it is just to power an Arduino then buy an off-the-shelf mains power supply that produces the required regulated 5v output.

...R

I was thinking rectifiers and voltage regulators in between the Arduino and state relay to boost the voltage/amperage output to the relay. I know the Arduino boards do not put out much amperage and 5V. The relay says 3VDC-36VDC, but I very seriously doubt that the few milliamps would be enough to power at to close a 120VAC circuit. So, I was brainstorming ways to create 12VDC-18VDC with some amps to push into that relay.

Thank you for the compliment. I noticed searching the forums before that some questions required much more information to figure out the answers, and figured if I described my problem, desired solution, and where I am on thought processes, it would greatly help out the idea. Also, thought it'd help to expose any areas where my understanding of these things are lacking, as I know there are many… just not sure what/where they are yet, lol

Thank you for responding

Welcome to the Arduino forum. I believe a single Arduino would work fine for either of your projects. How well do you do soldering of wires, etc for electronic projects? Will likely be necessary.

I grew up on a farm with animals, and my wife is from similar background. We live in the Central Oregon desert with small farms all around. Our place has a deep well for all water and the previous owner set up an irrigation system using a pond to store well water for irrigation. Not a good idea because of the wind always blowing trash into the water. I changed to storage tanks with an Arduino nano watching water level float switches and controlling the solenoid valve from the well water.

Do not try to pump water that animals drink from if it is open to dirt and trash.

Use individual float switches to indicate low water and high water. Very cheap on Ebay. I used PVC plumbing and put the float switches in an EL and a T. You will need to buy a metric tap to match the switch housing thread.

To quickly drain a water tank, look at the inside your toilet tank. A solenoid pulling the chain for 1 second can open a large drain hole and the floating flapper can close it when the water is gone.

To heat the goat water, investigate the wire used to heat the soil in greenhouses. Place the wire inside a 1/2 inch PVC pipe and place in the bottom of the goat water. Control the AC to the heater with a SSR directly off an Arduino pin. Probably add a water temperature sensor( water proof).

The AC solenoid valves will work just fine on DC. Use a lower voltage than the AC voltage. They won't be turned on for very long.

Hope my thoughts help a bit.

Good luck.

Paul

outtaluck:
I was thinking rectifiers and voltage regulators in between the Arduino and state relay to boost the voltage/amperage output to the relay. I know the Arduino boards do not put out much amperage and 5V. The relay says 3VDC-36VDC, but I very seriously doubt that the few milliamps would be enough to power at to close a 120VAC circuit. So, I was brainstorming ways to create 12VDC-18VDC with some amps to push into that relay.

If possible, post a link to the specific relay that you are planning to use. If you need higher voltage for the SSR, the arduino can drive a transistor to control the relay. You can use a single power supply for the SSRs and the arduino, with a regulator to drop the voltage of the power supply down to the 5v needed for the arduino.

I would probably consider using a board with WiFi capability if everything is close enough to communicate reliably, then you could monitor the operation remotely and be informed of any problems.

You wrote:" The relay says 3VDC-36VDC, but I very seriously doubt that the few milliamps would be enough to power at to close a 120VAC circuit. ".

Wake up ! that is used to light a LED in the relay circuit which turns on a transistor which turns on a solid state device that turns on the AC!!!!

Paul

I use an SSR to handle 230 Volt RMS. That means a top voltage of some 325 volts. No problem at all. The control of the SSR is directly connected to an Arduino UNO. Amperage? Some 10 Amps I think. (I use only 1-2 Amps)

As a thought to the future when you will need to maintain the system and try to figure out why it has begun to work differently, may I suggest a 2 or possibly 4 line LCD display to show you the status and the operation the Arduino thinks it's doing right now. Might also show the current temperature of the water for your goats.

Paul

Specific relay I was looking at is here. I found the same thing, well, at first glance, at any rate, here. At any rate, appears that it wants 12V/750mA to trigger it, which is more than an Arduino board can generate.

I like the flapper idea, I was looking for a servo type motor to open a valve, that seemed expensive. I started looking at washer pumps, since they are cheaper, but I like that solenoid operating a toilet bowl tank hardware setup.

Supply water is coming from our well. We do have 3 stock ponds, not a lot of trash gets blown in, except leaves and natural things. They are too far away for me to consider running piping to, and a pump for it, as well as, I don't even want to think about dirt/leaves/amphibians/fish clogging up the intake pipes, LOL. It's just easier to pipe into the well water lines, and I'll always have 70psi (i adjusted it up some), as long as the house gets power.

As far as driving the relay, I know I'll have to use transistors to get to the relays. I was more looking for a decent way to get that higher voltage power supply to it, without using batteries, which would be off of the power mains. I just don't know whether I should go a transformer or rectifier route. A rectifier seems like an easier option, but there's a better than average chance that I'm missing something, or haven't learned about something that might be a much better solution to do.

Paul, I have been thinking about adding in some LED light indicators, as I have a metric ton of common anode and common cathode RGB LED's. I can't be left to my own devices on Amazon, ask my wife. Wireless communication is an option, and a probable one for status communication on an LCD screen. I was also thinking of keypad controls to fine tune/adjust some things. But, for right now, due to my complete lack of confidence/skills/etc, I'm focusing on getting the basics to work, then moving on from there.

I'm currently looking into the greenhouse wire as we speak as well, :slight_smile:

What about the communication distance between the different watering places and the "Control center"? Feet, miles?

Railroader, I'm probably looking at around 300ft-400ft total distance in between communication points...with a reinforced cinder block wall in between. The power pole sits about halfway in between the house and the watering areas.

outtaluck:
Specific relay I was looking at is here. I found the same thing, well, at first glance, at any rate, here. At any rate, appears that it wants 12V/750mA to trigger it, which is more than an Arduino board can generate.

The data sheet states 7.5mA at 12V, not 750mA. The specs look well within the normal range for driving directly from an arduino at 5V. Might be a bit close with 3.3V logic, the minimum HIGH voltage is 2.4V.

Yes, indeed it does say 7.5mA. I completely misread that. Okay, so, I can theoretically just plug the relay right to the board… would there be any harm in connecting it to, say, a PN2222 transistor to bump up current/voltage a little before firing the SSR?

A coil supplied by 12 volt will apply 12 volt to the controller output when the output is off. That violates the specs.
To "bump up" current use N-channel logic MOSFETs. Silicon transistors often come out short due to bas emitter voltage drop, base resistor voltage drop.

outtaluck:
Yes, indeed it does say 7.5mA. I completely misread that. Okay, so, I can theoretically just plug the relay right to the board… would there be any harm in connecting it to, say, a PN2222 transistor to bump up current/voltage a little before firing the SSR?

There is no need to, the input of an SSR is basically an optocoupler, so as long as you meet the specs (at least 2.4V for a HIGH while supplying the needed current), you will not gain anything by using a higher voltage. The SSR states it is CMOS and TTL compatible, so it should not have any reliability problems at the low end of the input voltage range.

I spent some time going through my things available, and found a bunch of ULN2803APG Darlington arrays in my little toolbox. Looking on Amazon, I found some solenoid valves that operate at 12V/33W to actuate. So, if I parallel the Darlington chips, I can create a 12V/4A output on each, which would power the valves, and use a 12V/30A power supply the output on the Darlington arrays. The specs say each of the 8 channels have an output capacity of 50V/500mA max, thinking that 12V/500mA per channel/output pin will do just fine… I think. My thoughts say that if it's based on wattage, I might be able to do 12V/2A per pin, but I may be incorrect, so I'll stick with 500mA idea, for now. At the most, I'll add $10 to the idea and have extra capacity, which always seems to work well as far as longevity is concerned…

I think I'm going to look into some HC-12 communication chips to see if I can communicate/monitor remotely, as that would reduce my wiring requirements, especially with underground direct burial feeder lines, after calculating voltage drop and required sizes. All said, I think this idea is a go, and I'll start figuring out the schematic, working on it, and the coding for it.

Guys, thank you exceedingly for the help and ideas! I'll return as I run into roadblocks. Y'all have been excellent in helping me understand what should be done!

You can't parallell silikon transistors. They are not that exactly the same and will not share the current equaly. One transistor will "try" to grab more current and get hot.
Some kinds of MOSFET transistors can be connected inparallell.

Railroader, I can see how that would work. I figured I could connect them in parallel, according to the spec sheet I was reading from TI, here. It's a PDF file, but the text is in the upper right of 1st page, under "Description." Am I misunderstanding what it's saying, or would using a single MOSFET be a better choice/idea?

The best choice is to use one single logic N-channel MOSFET that handles the voltage and the current. I worked with a 20 kW inverter that used 20 -25 MOSFETs in parallell. Silokon diodes, drop the idea what so ever.

Just read the PDF. Maybe, maybe it can work acceptably for transistors made on the same cilikon chip. But generally, don't try it.
A MOSFET transistor has a resistive out put. The resistance is low, very low, and that creates a balancing effect between paralelled FETs. The cilikon transistors don't.
Also, Darlington transistors have some 2 voltage drop between base and emitter. That doesn't leave much voltage for the base current using a 5 volt Arduino.