• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

sequential control for micro solenoid valves

Hi all

I am an absolute newbie when it comes to electronics but I would appreciate your help in regards to a hydroponic system for schools.

I want to sequentially switch on and switch off micro solenoid valves delivering water from a header tank by gravity.

The header tank would be 1 m above the level of the trays delivering water sequentially to several (maybe 6 or 12) trays at ground level.

I want to use a small solar panel to do this.

I want the valves (normally closed) to open one after the other for something like 10 - 20 minutes each, opening and closing one after the other whilst the sun shines.

I want to do this as cheaply as possible. Maybe 3 dollars AUD per valve, 20 Aud for the solar panel, and say $ 50. for a control system..

Preferable if the control electronics is in some kind of weatherproof box

1620523937501.png 1620526764346.png
Any recommendations in regard to sourcing suitable valves, sourcing some kid of controller would be greatly appreciated.

Solar Panel -> Controller -> Solenoid valve 1
Solenoid valve 2
Solenoid valve 3 Valves turn on and off, one after the other for 10 to 20 minutes during sunshine
Solenoid valve 4
Solenoid valve 5
Solenoid valve 6

Many Thanks

John
 

augustinetez

Active Member
I don't think you will get anything to do what you want off the shelf for your mentioned budget.

A quick squizz through Bunnings shows a solar powered watering controller was $349, everything else is mains powered.

They used to do a cheap ($49) 4 outlet battery powered unit, but I don't see it listed anymore.

A question, why do you want to run multiple lines to different trays, rather than arrange the trays in a stepped fashion - each tray drains in to the next one etc - and just use one valve?

I've done that and our local school has also done it, works fine.
 
Oh,,

If a cloud passes over it would be nice if the system continues from where it stopped ie. continues the sequence rather than stops completely or restarts from the beginning of a cycle.

I currently run 4 trays (one system) using one small pump and one tiny solar panel. Water is pumped to the rectangular bucket from the garbage bin where is flows by gravity to the trays that the plants are sitting on. The plants are sat in pots of cocopeat and bottom watered. Water drains back from the trays back into the garbage bin.

My plan was to build several more systems and have the water feed each system one after the other. (One pump feeds all)
This would keep cost low for schools, One small pump, one controller, one small solar panel servicing several systems and just one solenoid valve fitted to the rectangular bucket for each 4-tray system rather than one pump and one solar panel per system.

1620527874909.png 1620528168021.png 1620529196895.png


Thanks again

Your advice is appreciated.

John
 

Attachments

AnalogKid

Well-Known Member
Most Helpful Member
If you know someone who can wire up a relatively simple circuit, it will cost around $5-$10 for the controller. The circuit uses two CMOS digital ICs. A CE4060 can generate a clock with a period of 20 minutes without large timing components. That drives a CD4017 Johnson counter, which makes the sequential outputs you need to drive the solenoids. If the current per solenoid is less than about 300 mA, then you get 7 solenoid drivers in one package, a ULN2004. If the solenoids are more hungry than that, you will need 7 small power MOSFET transistors.

If this sounds like something you can handle or arrange, I'll whip up a schematic.

ak
 

augustinetez

Active Member
If a cloud passes over it would be nice if the system continues from where it stopped ie. continues the sequence rather than stops completely or restarts from the beginning of a cycle.
Thats easy, a small rechargeable battery would solve that (powered by the solar panel).

The only extra you would need for that other than the battery would be a solar charge controller, under $10 on Ebay.

Battery is going to be ~$35 from Jaycar (12v 7Ah SLA/Gell), but could be cheaper with a bit of shopping round.

While on Ebay, I did look at water timers and there is a fair selection under $50 that 'may' be able to be modified, but AK's offer is probably a better way to go based on it will be customised as you want it to operate and very cheap to do.
 

Pommie

Well-Known Member
Most Helpful Member
I think you'll find 12V pumps cheaper than 12V solenoid valves. Pumps may be the way to go. I built a flood and drain system about 5 years ago for a school I work at. It used a wemos board to control and monitor everything. If pumps are used be aware that siphoning is a problem.

Mike.
Edit, BTW, if you find valves for AU$3 let me know. I need some of those.
 
Last edited:

AnalogKid

Well-Known Member
Most Helpful Member
Or ULN2803 or 2804 - 8 outputs and 500mA, will also need a voltage sense input to detect when the solar panel is generating voltage so the system shuts down at night.
Only 6 outputs are shown. Also, in my experience (industrial controls and automotive) the ULN200x/280x chips are not reliable at 500 mA output currents.

ak
 

AnalogKid

Well-Known Member
Most Helpful Member
Battery is going to be ~$35 from Jaycar (12v 7Ah SLA/Gell), but could be cheaper with a bit of shopping round.
That's a lot of battery. If you use it to maintain the control circuit state but *not* power the valves, a 9 V radio battery will last years with no charger needed.

ak
 

gary350

Well-Known Member
Buy an 8 channel controller for lawn irrigation. If you live in Arizona, NM, CA or any of the desert states you can buy these at local Lowes & Home Depot. I built a system for my 35'x60' garden using 2 liter per hour water sprayers. I have timer set to come on at 8:30 pm for 12 minutes this gives every plant about 1 quart of water in 12 minutes. Plants like corn need lots of water, they get 20 minutes of water. Plants take in sun all day when it gets dark plants switch to growing mode they need water to do all their growing after dark. I use city water but you can use solar to charge a battery to run a pump. Each of the 8 channels can be set to come on at a different time if you need that. Each channel can be set to stay on for as long as it takes for each plant to get the water it needs. 8 channel irrigation can be set for 8 different crops, corn, tomatoes, onions, garlic, beans, potatoes, peppers, chilies, melons, squash, okra, etc. The main water line is 3/4" black plastic tubing. Small 1/4" tubing to each plant. 2 liter sprayer on each 1/4" line. Sprayers smaller than 2 liter tend to get stopped up very easy water needs to be very very clean. Last year I plant 400 corn plants = 400 ears of corn, 40 ft row of green beans = 38 lbs of beans, 18 tomato plants = 30 lbs of tomatoes from each plant, 80 potato plants = 80 lbs of new potatoes, 4 sweet big bertha bell pepper plants = 150 peppers, 4 New Mexico chili plants = 280 chilies = 8 qts of enchilada sauce, 2 lbs of chili powder, 3 water melon plants = 28 water melons, 3 cantaloupe plants = 25 melons, 1 sweet potato plants = 25 lbs of sweet potatoes, more. Several crops need same amount of water, tomatoes, pepper, chilies can be on channel 1, corn channel 2 & 3 etc. Plants need more water in 100 degree weather than 70 degree weather change your timers according to the weather. Our rain basically stops from June to Oct it is dry as desert about 1" of rain per month. Plant things like, onions, garlic, carrots, 32" wide beds 35 ft long. I NEVER plant RAISED beds, waste of time, waste of money, too much extra work, raised beds are very dry they need extra water, I put boards around beds of a dam to hold in water I call them beds. You can hill soil up like a dam they you save money not buying boards for dam. This year we have 150 onions, 100 garlic, 650 corn, 180 potatoes, 12 tomatoes, 4 sweet bell peppers. We have a lot left over from years past don't need beans or cucumbers this year. We still have 5 gallons of bread & butter pickles. Not growing melons this year we can't eat 28 melons, 1 from farmers market is all we want. We still have 30 quarts of tomatoes in mason jars from last year. This year we have 9 rows of corn I need to set water up on 3 channels. Each water line is only capable of a certain amount of gallons per minute do the math to calculate how many 2 liter sprayers you can have per water line. We are still having flash flood rain every day I won't have my irrigation system in the garden until about June 7th.

100_4333.JPG

000_0036.JPG

100_6969.JPG

100_6895.JPG
 
Last edited:

augustinetez

Active Member
That's a lot of battery. If you use it to maintain the control circuit state but *not* power the valves, a 9 V radio battery will last years with no charger needed.

ak
That is based on being able to run the system including valves/solenoids/pump for a few of cloudy days.

The problem with solar powered (no battery back-up) flood and drain systems is that if you get a few cloudy days, the system may not run and it could kill everything from lack of nutrients.
 
I think you'll find 12V pumps cheaper than 12V solenoid valves. Pumps may be the way to go. I built a flood and drain system about 5 years ago for a school I work at. It used a wemos board to control and monitor everything. If pumps are used be aware that siphoning is a problem.

Mike.
Edit, BTW, if you find valves for AU$3 let me know. I need some of those.
Mike,


Sorry

My guess on price was wrong

Perhaps something like this would do the job?

Low pressure hydroponic nutrient solution. (gravity fed from say 1 m height)


$ 8.35 AUD


Specification:

100% Brand new and high quality.

Name: Miniature Electricity Magnetic Valve

Material: Metal+Plastic

Rated Voltage: DC 12V

Current: <150mA

Power: <2W

Pressure: 0-450mmHg

Fluid Used: Water/Air

Service Life: >50000 Times

Working Mode: Normally Closed

Color: White

Line Length: Approx.20cm

Size: Approx.3.9cm*2cm*1.62cm

Conversion: 1cm=0.39inch, 1inch=2.54cm

1620601219196.png

 

danadak

Member
For future projects getting started with a micro might be easier than you think.

mBlock is a GUI programming tool for Arduino. You create a graphical structure of blocks
and when complete mBlock generates the code for you.

Using a Nano or Uno board, PC, mBlock 5.0 which is free, here is a first cut at your project -

1621338806577.png


Basically the blocks determine if its sunrise of sunset, and act accordingly. You can read what the blocks
say and the comments and sort of follow on.

A simpler example, the above may seem over whelming, control an LED brightness proportional
to a V looks like this -

1621339572102.png

Note here I clicked the code tab to see the Arduino code mBlock generated. That
gives you a feel for what C code looks like, should you choose to learn C at a later
time. So you can see with 5 blocks dragged out of the block catalog, second window
from left, a fairly complicated design was done in a couple of minutes. Lots of fun.

Note Arduino code is not 100% same as C code, but close enough to look at.

So think of this for future designs. and cost of entry is < that of a hamburger.

1621339806271.png

Above is a Nano board, ~ < $ 3. Note usb connector a tad fragile, so don't do the gorilla thing
with plugin and removal. Another thing I recommend is new users always use a 1K resistor
in series with a pin connection, in case you short a pin or reverse polarity connect it to a
source, you won't generally fry the Nano board. When you confidence rises thru use eliminate
the R, no longer needed because you are an expert. Hint order board with pins already soldered,
makes life easy to plug into a solderless breadboard. Also order a board with included cable
to match the connector. Ebay, Banggood, alliexpress.....

Lastly there are variant of mBlock, like Ardublock, Visuino, Flow code, Scratch for Arduino, all
with similar and specific capabilities. Once you learn one the rest are trivial to start using.
One of them its trivial to hang a Nano off a PC and measure a V and speak its value via the PC.
All with a half dozen blocks. Not too shabby.....



Regards, Dana.
 
Last edited:

Pommie

Well-Known Member
Most Helpful Member
For future projects getting started with a micro might be easier than you think.

Personally, I dislike that kind of interface. I call it lego programming. If the programmer that wrote it didn't imagine what you want to do then the brick isn't available. I work in a school and they use lego (actual lego) robotics and think they're teaching programming. Learn a real language, it's not that hard. Unless, it's javascript and then you'll just pull all your hair out.

Mike.
 

Latest threads

EE World Online Articles

Loading
Top