Automated watering system for orchard

Hi,

I’m looking to set up an automatic watering system for my avocado orchard. I have commercial sized irrigation taps that run on 24v solenoids and want to build a controller system that is run by a raspberry pico. Ideally the system will be able to tell the tap to turn on for 2 hours twice a week, as well as have a manual override button when you want to switch the tap on manually. The system should ideally use as little power as possible because it is not close to a source of mains power so the solenoid and the raspberry pico will run on battery.

The system will also live outdoors so needs a weatherproof box.

Cheers,
Chris

2 Likes

Hi Chris, welcome to the forum!

This problem reminds me of James’ Smart Watering System project, but with a smaller and more approachable set of requirements.

I’ll start with a couple quick questions to make sure I’m on the right page:

Just checking, I’m assuming these are the usual “sprung” kind that require DC current in a particular direction to open, and return to closed when current is removed?

The only reason I mention this is that your solenoids will probably use hundreds of times the current of the Pico and accessories if they are set up like this, so low power programming won’t be too imperative.

This won’t be too hard, at first glance I think all you will need is a main loop in your code that just repeats forever, checking which “state” the system is in (on, off, auto), and acting accordingly, with changes in state triggered by a check of the 3 buttons.

Are you comfortable with soldering? That changes the options available for hardware choices - no worries if you’re not.

1 Like

Hi James,

I’ve just been and checked the solenoids, they are actually 9-12v ‘latching’ solenoids, so they only require a pulse to turn on and a pulse to turn off. They also have a manual override built into them so the manual button isn’t a must but I would still like to add it.

Yes I have done a fair amount of soldering in the past so that’s not a problem.

Cheers,
Chris.

1 Like

Hey Chris,

Excellent! No worries, should be easy enough to use a latching solenoid for that purpose, the only major problem now is the power supply (I’d suggest looking into using some SLABs or Sealed Lead Acid Batteries) as well as being able to both power the Pico/Solenoids and finally being able to drive the solenoids from the Pico.

The two main options in this case are a couple buck voltage regulators or two separate power supplies (likely one for the Pico and another for the solenoids unless the solenoids can all happily run on 12V and you just regulate it down for the board) as well as some MOSFETs or relays for the Pico to be able to drive those solenoids without turning into a smoke machine.

What’re the specs on those solenoids? Do you know how much power you need to drive them or the max-current draw?

Hi Chris,

Glad to hear those solenoids are latching! That should greatly reduce the power consumption of this system.

Do you have any info on how the latching operates, or a part number so we can go have a look for that info?

I’m mainly wondering whether the pulse on and pulse off are the same polarity, or whether they need to be opposite. This decides whether simple relays or MOSFETS are enough, or whether repurposing a small motor driver is appropriate.

Do you know the current draw of the solenoids when engaged?

1 Like

Hi James,

Sorry for the delay getting back to you. The part number is 458200, I’ve attached the spec sheet I could find.

But to answer your questions, yes the on and off cycle have reversed polarities and the max current draw is 6v.

Thanks,
Chris.

hunter_industries_-solenoids-_2021-09-08.pdf|attachment (126 KB)

Hi Chris

A small point but current (A) is amps, voltage (V) is volts. 6V is not current.
Just to point you in the right direction, not being critical. James should get the info he needs from the data sheet once the operating voltage (6V) is known.
Cheers Bob

Hi Bob,

Yeah my mistake. The ohms is 4.8 so the amps is 1.25 to 1.875 depending on whether we run 6 or 9V batteries? Is that correct?

Cheers,
Chris.

Hi Chris
Yes, that looks better. Looks like you may have actually measured the resistance, as good as or possibly better than finding your way around a data sheet which probably caters for several different solenoid models.
Cheers Bob

Hi Chris,

Great, that gives us the specs we need to pick drivers for those solenoids.

Since they have to be driven in reverse as well, motor drivers seem to be more appropriate.

Since the manufacturer specifies a 4.8 Ohm nominal resistance, you’re looking at a current draw of ~1.8A per solenoid at 9V (I = V/R), likely with a big spike when first turned on.

Our Makerverse Motor Driver is capable of 2A in short bursts, or longer if you add a heatsink, and features current limits to make sure nothing is blown due to inrush current. You could control 2 solenoids from each driver. It even comes with a basic 5V regulator to power the Pico (so you only need one supply for this whole project.

We stock quite a few Pololu regulators that can generate 6 or 9V, Are you able to supply 6V or 9V directly? Or do you need to step down?

Hi Bob,

Thats just read off the data sheet but i have a multi-meter and know my way around it so can get the measured resistance too.

Cheers,
Chris.

Hi James,

Yes I planned to just run the system on a couple of 9V batteries in parallel, enough so the system only needee replacing every year. So having a regulator included to run the Pico would be great.

Cheers,
Chris.

Hi Chris,

Excellent. In that case I’ve got everything I need to start suggesting specific parts:

And of course the number of motor drivers depends on how many solenoids you need to control, how many is that in your case?

P.S. Forgot the enclosure, buttons and LEDs! The enclosure depends on how many solenoids you’re looking to control, I’ll suggest one once I’ve got that info

Hi James, Chris.
James. That motor driver you suggest, while the idea is good, does not leave any headroom for 9V operation. Personally for me it is sailing a bit too close for comfort. I think a bit more robust H bridge would be better. But that is me. At the end of the day it is up to the user. I would tend to use a DPDT relay for solenoid direction and a single Mosfet and 1 schottky diode for flywheel suppression. 2 signals would be required. One for direction and one to operate the solenoid.
Cheers Bob

1 Like

Hi James,

Each system will be running just a single solenoid as they are quite far apart except 2 systems which will gave 2 solenoids.

For the buttons i was thinking it would be nice to have 3 buttons, a manual run button, a button which gives a 2 hour run time and a button which givew a 4 hour run time.

Also how much power will the led’s pull. I like the idea of them but dont want to have to chanfe the batteries very often.

Cheers,
Chris.

Hi Chris

What sort of batteries were you considering. 9V seems an odd value for the larger ones you will probably required and I wondered if you were thinking of the small 9V units as used in things like multimeters, smoke alarms etc. I don’t think that type would have a very long life even if they actually worked.
Cheers Bob

Yeah i was thinking of using a little 9v like the ones a multimeter takes but if i need larger ill use that. What do you recommend?

Great! This means only one driver per unit, meaning you could probably fit everything on that pico proto board.
Here are the other bits I meant to stick in my last post:

Your standard 9V batteries are probably not up to the task:

Perhaps a small 6V lead acid cell that gets charged with a small solar cell?

Let me know your thoughts on the above.

Hi Chris

Probably would not supply the current for 1 operation.
James’ idea has merit. I would go for a 12V solar system and massage down from there. If you need to distribute voltage over some distance the higher voltage would be preferred as there will be less power lost in the distribution wire. It boils down to whichever is most convenient under the conditions prevailing. Only you will know that.

Tip for selecting battery and charging capacity… Work out what you will need then DOUBLE it. Start from there. That way you should have plenty of head room.
Cheers Bob

1 Like

Folks - those solenoids are AC. I have the same ones… Arduino, pico, pi can drive them but I think (at least the way I do it) a relay or relay module. Signals are usually 5VDC to those relay modules and then you need to switch on/off 24VAC with the relay(s) to turn on/off the solenoid valves.