Within the Hydrosys4 app Settings page in the actuators test section I can set the app to pulse the GPIO and I get the LED indicator on the relay board and the relay engagement but the relay does not disengage after the specified on period.

I have verified via the command line that I can turn on and off the relay board using the wiringpi GPIO interface library commands. The command gpio mode 7 in turns off the relay and the command gpio mode 7 out turns on the relay.

Below shows the current wiring setup between the Pi and the 16 channel relay board. Power is coming from a 3000Ma 12vdc adapter to the relay board and then supplying 5vdc to the Pi. Wiring Diagram

The below shows the HardwareSetting page within the hydrosys4 app and the arrows point to the line where I have set GPIO 4 to trigger as the water2 output type. Hydrosys4 HardwareSetting page

The below screenshot shows the actuators test page where I can trigger the assigned water2 output for 10 seconds but the relay does not disengage after 10 seconds. Hydrosys4 Settings page

To reiterate my question: I can trigger via command line the relay to turn on and off but within the Hydrosys4 App I can get the relay to turn on but not off. I'm asking if anyone has any experience with Hydrosys4 and this issue of the relay NOT turning off? How did you fix this issue?

  • Do NOT post illegible pictures of text - post text. The same comment "The module is unsuitable" applies, and you risk destroying your Pi is you connect 5V to GPIO.
    – Milliways
    Commented Jun 14, 2021 at 1:18
  • I apologize if the text is unreadable, when I click on the image within this post I can clearly see the text. The 5v connection is not attached to a GPIO pin.
    – D A
    Commented Jun 14, 2021 at 11:24

2 Answers 2


"The command gpio mode 7 in turns off the relay" - maybe but it then puts 5V on the GPIO input.

This is a kludge! No software would switch a GPIO between input and output to control a device.

  • The statement showing the commands from the wiringpi library are only to illustrate that the relay board is working with the current wiring setup!
    – D A
    Commented Jun 14, 2021 at 11:20
  • This does not demonstrate that it is working. If you leave as output but set HIGH it will not turn off. If you measure the voltage you will see it exceeds 3.3V.
    – Milliways
    Commented Jun 14, 2021 at 11:41
  • I understand and have tested as you suggested. The voltage does exceed 3.3v. I have decided to use a transistor to switch the relay pin which is now working as it should.
    – D A
    Commented Jun 19, 2021 at 16:35
  • You will measure 3.3V (or close to this) because the substrate diode is conducting and allowing sufficient current to pull the voltage down, effectively clamping it. This is undesirable and risks destroying the Pi.
    – Milliways
    Commented Jun 20, 2021 at 7:37

To fix my issue I have added an external transistor to the circuit and changed the logic in the hydrosys4 app to positive logic. enter image description here Now I can use the wiringpi command 'gpio -g write 4 1' to trigger and it turns on, then with the command 'gpio -g write 4 0' to turn off.

enter image description here

  • You appear to have copied from my answer Can you use a 5V Relay Module with the Pi? BUT ignored "Connect VCC to the Pi 5V power pin and the relay input to the collector of the transistor. The transistor emitter should be to connected to the Pi GND but NOT the GND of the relay module." and are missing vital connections. If it works it is only by good luck and some undefined interconnection between the devices.
    – Milliways
    Commented Jun 20, 2021 at 7:33
  • The transistor emitter is connected to pi GND. The only connection between the relay board and the pi is through the transistor collector. The pi is powered from a separate power supply.
    – D A
    Commented Jun 20, 2021 at 8:30
  • You do not have any complete circuits. One wire does not a connection make.
    – Milliways
    Commented Jun 20, 2021 at 9:19
  • But this is triggering the relay and working for this project at the moment. I do want to move this into production where 15 relays will be triggered. What do you see as a potential issue?
    – D A
    Commented Jun 21, 2021 at 12:15
  • I can't make it any clearer than the Answer you referenced. There is still much detail missing - who knows what the circuitry is on the relay board you are using. You haven't provided a link, and most of these poorly documented modules provide minimal information. I usually am forced to trace the circuitry on the board to work out what they have. One thing is absolutely clear you cannot control ANYTHING from the Pi or anything else with a single wire. Electric circuits are called that for a reason they NEED a complete circuit.
    – Milliways
    Commented Jun 21, 2021 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.