Controlling plurality of small solenoid valves

Thread Starter

iidolevy

Joined Dec 20, 2013
10
Hi,
I want to build the following project:
A system with plurality of small solenoid valves ,for irrigation. Micro controller is assigned to each of those solenoids, so each controller controls its solenoid.
I need some help with finding the required components for this project:
  • Micro controller
  • Solenoid valves (should be small, driving ~0.5L/H)
  • Resistors, Diodes, Capacitors , etc (to build the circuit)
Full system description:
Computer connected to all of those micro controllers, assigning device_id for each, and giving command for each (one should be open for 1m, second for 3m, third shouldn't open, etc)

Thanks in advanced!
Ido
 

ericgibbs

Joined Jan 29, 2010
18,766
hi,
OK.
In order to suggest a suitable MCU, it would help us if you say which programming language you are familiar with and which MCU.?
E
 

Thread Starter

iidolevy

Joined Dec 20, 2013
10
hi,
OK.
In order to suggest a suitable MCU, it would help us if you say which programming language you are familiar with and which MCU.?
E
Hi,
I'm familiar with C/C++, but I can learn by myself any programming language. I have no experience with MCU, but I think I'll manage.
 

ericgibbs

Joined Jan 29, 2010
18,766
hi,
Thanks for the information.
As you may know the Arduino series programming is close to 'C' and it is a free IDE and compiler.
The Arduino UNO and MEGA should have enough pins for your project.
Thats what I would consider as one option.
E
 

LesJones

Joined Jan 8, 2017
4,174
I think your first task is to find a suitable source of the solenoid valves. Google solenoid valve manufacturers and suppliers and then look through their online catalogues. I don't think it is reasonable to expect someone else to do that for you. What is the nature of the hardware type of communication and the protocol for the communication from the main computer to the microcontrollers ? (If you need ethernet or Wi Fi you will need more complex microcontrollers. If it is just serial line communication most of the 8 pin PIC or Atmel devices should do the job.) Am I correct in assuming the nature of the commands will be open for one minute or open for 3 minutes. I don't understand needing a command to not open at all. About how many solenoids will need to be addressed ? (tens, hundreds, thousands etc.)

Les.
 

Thread Starter

iidolevy

Joined Dec 20, 2013
10
hi,
Thanks for the information.
As you may know the Arduino series programming is close to 'C' and it is a free IDE and compiler.
The Arduino UNO and MEGA should have enough pins for your project.
Thats what I would consider as one option.
E
Hi,
Thanks but I don't think so.
In my system two controller types should be used:
Main controller (=computer), and many micro controllers, all of them on connected to the same control line (output from main controller).
The main controller assigns kind of "device_id" to each of micro controllers, and gives different command to each of them, all on same control line. Each of micro controllers repsonds to it's specific command, and opens/closes the solenoid. This is why device_id is needed, as Main controller assigns different comamnds to each of micro controllers.
Home I'm clear.
 

ericgibbs

Joined Jan 29, 2010
18,766
Why do you think a PC could not talk to a number of Arduino NANO' s using the PC's serial port, with a unique ID+CMD for each NANO.?
 

ericgibbs

Joined Jan 29, 2010
18,766
hi,
The method I have used in the past, is for sending data to a number of receivers.
Note there will be no hardware handshaking.
The simplest TXD message would be for example 'SAdata1,data2,crlf or 'SBdata1,data2,crlf ....
You could send an error check code after the data2 parameter, so that the receiver could check for errors.

The remote MCU would use a serial interrupt and check for its own ID code.

What is the longest distance from the PC to the Remote MCU's.?
E
 

Thread Starter

iidolevy

Joined Dec 20, 2013
10
hi,
The method I have used in the past, is for sending data to a number of receivers.
Note there will be no hardware handshaking.
The simplest TXD message would be for example 'SAdata1,data2,crlf or 'SBdata1,data2,crlf ....
You could send an error check code after the data2 parameter, so that the receiver could check for errors.

The remote MCU would use a serial interrupt and check for its own ID code.

What is the longest distance from the PC to the Remote MCU's.?
E
I could be ~100 meters. But for now we can assume < 5 meters.
 

Thread Starter

iidolevy

Joined Dec 20, 2013
10
I think your first task is to find a suitable source of the solenoid valves. Google solenoid valve manufacturers and suppliers and then look through their online catalogues. I don't think it is reasonable to expect someone else to do that for you. What is the nature of the hardware type of communication and the protocol for the communication from the main computer to the microcontrollers ? (If you need ethernet or Wi Fi you will need more complex microcontrollers. If it is just serial line communication most of the 8 pin PIC or Atmel devices should do the job.) Am I correct in assuming the nature of the commands will be open for one minute or open for 3 minutes. I don't understand needing a command to not open at all. About how many solenoids will need to be addressed ? (tens, hundreds, thousands etc.)

Les.
Indeed, it's just a serial line communication, not wireless. Hundreds of solenoids need to be addressed.
 

MrChips

Joined Oct 2, 2009
30,714
This ought to be a simple system design exercise.

First step is to choose the solenoid. We will assume 12VDC, low current. Better yet would be a self latching mechanism such as a rotary motorized valve. There is one on my water timer.

Next step, how to supply power to the valve. With hundreds on devices in parallel this is where the rotary valve helps to reduce amerage requirements. You only need to power one valve at a time.

Next step, the communications hardware layer - RF, fibreoptic, or wired?
Fibreoptic is the most exotic and reliable. Wired would be the least expensive.
Wired can be one-wire, RS-422 or two-wire RS-485.

Next step, the communications transmission protocol. This is relatively simple, usually a self clocking phase-encoded signal. Baud is not an issue.

Finally, the MCU choice. This is the easiest part. Just about any 8-pin MCU will work. With 16-bit device address you can control >65000 devices. Need more than that?
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
As others suggested, I would look at magnetically latching solenoids, often used in battery applications.
There is industrial protocols such as Modbus that is used extensively, but often a limit on No. of slave stations.
Max.
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
Network protocol I think crucial. Should be able to wake
up network, and it self assigns its ID. You could even
consider using GPS to physically ID a location and map
them into a GUI. Maybe a Raspberry Pi to handle all
management running Python for interface app, host
duties. Low end micro for some analog and client side.
PSOC 4......

Then of course a buss for long distances. How far do you
have to go, in the thousand meters range ?

Swarm networking approach.....Wireless, Solar/battery powered ?

Interesting problem.

Regards, Dana,
 

Thread Starter

iidolevy

Joined Dec 20, 2013
10
Network protocol I think crucial. Should be able to wake
up network, and it self assigns its ID. You could even
consider using GPS to physically ID a location and map
them into a GUI. Maybe a Raspberry Pi to handle all
management running Python for interface app, host
duties. Low end micro for some analog and client side.
PSOC 4......

Then of course a buss for long distances. How far do you
have to go, in the thousand meters range ?

Swarm networking approach.....Wireless, Solar/battery powered ?

Interesting problem.

Regards, Dana,
Around 200 meters.
The dripping device (micro controller, solenoid etc) should be cheap (less than 2$).
 
Top