The GPIO can't control my relay switch



Were you able to follow my short description?

Have you got your relay to work?




I notice from the images posted, you’re using a cell phone app. Have you tried using a web browser and the Cayenne webpage?
Something that seems to be missing from the phone app image is the OUT/IN button controls that are in the webpage version.
Go to the webpage with a browser and try and change the OUT/IN status of a GPIO by clicking on the gray OUT/IN box. See if Cayenne will let you change the state. If yes, then try and set the GPIO high and low.

On a separate matter, I’ve used, both 5vdc and 3.3vdc for VDD with no difference.
I have an eight channel relay card. On the one I’m using, there is a jumper to alter the power supply system. Some users suggest using the 3,3vdc for the relay input circuit and the 5vdc for the relay output circuit. Input and output circuits are separated by the optoisolators on the relay coils. This allows separate supplies to be used in case something on the relay contacts side (output circuit) blows. No damage will be done to the Pi. If the Pi is used to supply 5vdc and 3.3vdc for the card, there will be no protection in that case. A separate 5vdc supply would be necessary.
WebIOPi sets the default states on power up. The OUT/IN state of a pin has to be changed before the GPIO state (On/Off) can be changed.

Hope this helps.


On the Pi3, Pi2, B+ and Zero-
Pin 17 is POWER OUT pin, 3.3 volts.
It is NOT a GPIO “controlled” pin.
It cannot be switched.
Try using pin 15, GPIO 22


Hello everyone,

I’m experiencing the same issue where the GPIOs connected to the 8 port relay-module is always on/high.
@stefanspanberg provided a work-around with using a resistor and diode but this no a solution; my same Pi B+ works fine with the same wiring and relay-module but it doesn’t with Cayenne.
Isn’t there a solution in software available?

Now I would like very much to make use of Cayenne because of the awesome interface and app.


btw: connecting it to the 3.3V does not work at all


Can you post some pictures of your wiring and a screenshot of your dashboard for us to review?


Hello Adam,

Thank you for replying to my call for help :wink:

Below the requested pictures, like I stated above; the same setup works with a normal Raspbian build, simple Python scripts and a cronjob but I wanted to make use of the awesome GUI Cayenne offers.

RaspberryPi Model B, PiHeader and a prefabricated rainbow cable connecting to the 8-port SRD-05VDC-SL-C relay module. It’s currently powered by the 5V PIN, when I tried connecting to the 3.3V PIN the relay LEDs were very fade and IN8 was flashing contineouslty. Currently only 6 relays (IN1 to IN6) are connected.

Next, screenshots from the Dashboard as requested. Note that currently the Relay is set up as a General actuator but I tried the available relay widget before.

I’m available to provide more info if requested, I would really like to get this working.



I have the same relay board and I removed the jumper and everything worked fine even at 3.3v input. Power the relay board from 5v at the Rpi and ground or an external 5v power supply ensuring that ground is tied also to Rpi ground and relay board(common ground).

The jumper gave me the same symptoms as I see in yours.



Along the same lines of @wmontg5988 I too have used similar relays and don’t use the jumper. This video does a good job explaining what all the pins do and why he hooked up everything the way he did. It’s weird to me that it works without Cayenne. I would think it either works or it doesn’t…