4 wires only: to extend digital pins and drive solenoid valves at 9V

Hello,
My challenge to solve:

  • 6 solenoid valves working at 9V which I need to switch on and off based a schedule.
  • 4 wires to reach the valves

Assumptions:

  • Use an old Core or an Argon which cannot be placed near the valves
  • Somehow need to extend the digital outputs only using the 4 wires
  • The 4 wires should carry also the 9V power for the solenoid valves to run

My initial idea was to extend the output of the Core via I2C with an MCP23017 (4 wires): 9V and GND
with a step-down to 3.3V and than the SCL and SDA.
Maybe using a step-down like this

Would this work, or is conceptually wrong?

How long max can the 4 wires be teoretically: 5m, 10m, 20m?
KR,
dk

While you may be able to reach distances around 25m with I2C, I think for your application you would be better served with a serial-in parallel-out shift register, because you could shift bits in at much lower speeds. For each output pin of the shift register you could attach a transistor to drive the solenoids.

For your code you could use the shiftOut() function which works for any two IO pins.

This arduino tutorial might help:
https://www.arduino.cc/en/Tutorial/ShiftOut

I have been using 1-wire to do remote IO and have developed some hardware that can daisy chain multiple IO nodes using 1-wire over 3 wires:

With 1-wire, you could easily run 20m. With twisted pair, possibly 1000ft or more.

2 Likes

Thank you both for your suggestions. Probably I2C is not the best option given the distance.

I’m considering now to have an argon and communicate via Bluetooth data back but this means having a second device to listen in the range of both bluetooth and wifi.

If this option is valid, I could use 2 wires only to carry the 9V and GND and to use for the activation of the solenoid valves and the power of the Argon (to activate the relays for the valves and sensors). This would require a step down, would this work?
1484 Stepup Stepdown Buck Converter
The connection would be with the “Li+ PIN” and the “GND” at 3.3V correct?