How can I minimize amount of wiring needed for solenoid valves?

My setup to the image above with a few exceptions:

Currently it looks like the furthest wires I'll need are 40ft(20ft x2) just for the solenoid and I'll need slightly less for each solenoid closer to the breadboard. I'm also looking to add some capacitive moisture sensors which will add more than double the amount of wiring required. For just 6 solenoid valves and moisture sensors the wiring doesn't seem too daunting but I am hoping to expand up to 24 valves and sensors within the coming months and I can't imagine how much wiring will be necessary to accomplish that.

The use of the setup is automate the watering process of my vanilla orchids. I have 6 now but pretty soon I will be able to cut their pieces of them and grow new orchids from them to fill my garden.

The best solution I can think of is positioning the system in the middle to reduce distance from the controller to the nodes. I was hoping there were some possible solutions I am not privy to as I am more programming oriented than engineering and had only every taken a single circuits course.

rather than attempting to control so many devices using one microcontroller have several microcontrollers around the site controlling a small number of valves and sensors. You then just need to run a power supply and multidrop the micros off it.
You could even go as far has having a single microcontroller, e.g. Arduino nano, controlling each valve and sensor

You WILL need to distribute the ground and (even with multiple controllers) the +12V.
The control signal only adds 1 wire.

The simplest solution (least wire) I can see is to just run a switched +V and ground from the relay box to each valve - say using 2 core 5A mains cable for neatness.

(OK you could use them in pairs with diodes, and apply a +V or -V to each, but they would then be mutually exclusive, and need an additional -12V supply)

Minimizing wiring run would then be a case of locating the relay box and 12V psu centrally.

Interesting question.

Since you cannot power a 5 V relay module from the Arduino board if supplied with 12 V, you would be better to use a 12 V relay module.

horace:
rather than attempting to control so many devices using one microcontroller have several microcontrollers around the site controlling a small number of valves and sensors. You then just need to run a power supply and multidrop the micros off it.
You could even go as far has having a single microcontroller, e.g. Arduino nano, controlling each valve and sensor

If I was running hundreds it would make sense to partition them into zones and have a micro controller per zone but in this case it's very cost ineffective. It's cheaper to run longer wiring than multiple power sources.

johnerrington:
You WILL need to distribute the ground and (even with multiple controllers) the +12V.
The control signal only adds 1 wire.

The simplest solution (least wire) I can see is to just run a switched +V and ground from the relay box to each valve - say using 2 core 5A mains cable for neatness.

(OK you could use them in pairs with diodes, and apply a +V or -V to each, but they would then be mutually exclusive, and need an additional -12V supply)

Minimizing wiring run would then be a case of locating the relay box and 12V psu centrally.

Interesting question.

I'm sorry, I don't follow. Is the +12V not properly grounded?

I'm not familiar with the concept of running a switched +V and ground from the relay box to valve. Can you share a Pspice schematic or an example?

The power sources I am using are AC/DC adapter 12V 10A with splitters that are then adapter to the plug like in the picture.

Paul__B:
Since you cannot power a 5 V relay module from the Arduino board if supplied with 12 V, you would be better to use a 12 V relay module.

I am using a 16-ch 12v relay linked in the post. It is powered externally from a 12V 10A with splitter and only the signal is connected to the arduino. The arduino is powered externally from 5V adapter. Unless I am unclear on something?

Sounds reasonable, but better to cite the actual devices you are using by way of Web links, than attempt to describe them. :grinning:

Just curious...
If the solenoids are the ‘right’ size, you don’t need the relays at all.
A solenoid is electrically the same as a relay.
Rethink your design.

projectobsessed:
I am using a 16-ch 12v relay linked in the post. It is powered externally from a 12V 10A with splitter and only the signal is connected to the arduino. The arduino is powered externally from 5V adapter. Unless I am unclear on something?

This 16-channel Sainsmart relay board has a design fault.
You can’t separate relay supply from Arduino supply.
Leo…

Paul__B:
Sounds reasonable, but better to cite the actual devices you are using by way of Web links, than attempt to describe them. :grinning:

I did mention the relay with a link to the amazon page in the original post.

lastchancename:
Just curious...
If the solenoids are the ‘right’ size, you don’t need the relays at all.
A solenoid is electrically the same as a relay.
Rethink your design.

What do you mean by "right" size? The original post has a link to the valves I am using and I am not sure but wouldn't the arduino which generally doesn't deal with more than 5V burn up dealing with 12V? I'm not aware of any better alternatives to toggling the valves besides with a relay unless it's a makeshift relay.

Wawa:
This 16-channel Sainsmart relay board has a design fault.
You can't separate relay supply from Arduino supply.
Leo..

Is it specifically Sainsmart or most of the 16ch 12v relays? I have other spares with slightly altered design, one made with Songle(Similar to my Sainsmart) and one made with Tongling relays. Can you also clarify what you mean by not being able to separate the relay supply from Arduino supply? I had an instance where I unplugged all power source and USB from the arduino but it was still powered on whilst connected to the relay which was powered but I didn't dig deeper as I was logging off.

Did you read the comments on that Amazon page.
All 16-channel relay boards have that design fault. Opto couplers, but no user selectable opto isolation.

If you have the version with buck converter in one corner (12volt supply and 5volt relays),
then the Arduino should also be powered from that relay board.

No opto isolation could be ok if your wiring is ok and you use kickback diodes,
but don't be too surprised if the Arduino has reset issues when the solenoids kick in.
Leo..

What do you mean by "right" size? The original post has a link to the valves I am using and I am not sure but wouldn't the arduino which generally doesn't deal with more than 5V burn up dealing with 12V? I'm not aware of any better alternatives to toggling the valves besides with a relay unless it's a makeshift relay.

If the solenoids need heaps of current - like a starter motor solenoid or similar, you //might// want to use a relay to switch the coil current.

Otherwise for most common coils, just use a logic level MOSFET to drive the solenoid coil instead of the relay coil. If you want, you can buy a bigger FET, and skip the relay, but most likely you can use any rated FET to drive the coil directly for 90% of hobby solenoids. Remember the snubber diode is still required!

projectobsessed:
I did mention the relay with a link to the amazon page in the original post.

Ah yes, I actually meant the solenoid but had not tracked it down adequately from that post.

So it apparently requires 1.6 Amps at 12 V to operate. That can be directly controlled with a FET. These modules would do that perfectly well (one per solenoid, but not a great deal more expensive than the relay module and arguably simpler) :

And you do need to mount a "kickback" diode across the "load" terminals of the module and take other matters of care in the wiring.

Why don't you simply put the processor in the garden area and use WiFi to connect to it? Then, all you need is a reliable power source. If you don't want to use WiFi, then use RS485 between the remote and the local Arduino. RS485 is designed for long distances.