I have a relay that I can activate it with a PIN to GND.

I have connected that relay to a separate power supply, different from the used for the raspberry. As I have read, I can't supply GND using GPIO due to LOW is not the same as GND.

How can I activate that relay that only is activated by GND?

EDIT: Event I would able to supply GND from RPI, the relay doesn't work. In order to work I need to join the GND from external power supply and RPI but this causes false positives in some GPIOs when reading from them

  • 1
    We need to know the specs of the relay. Without that it is guess work as to how to operate the relay.
    – joan
    Oct 25, 2017 at 10:50
  • It's hard to know because it's a chinese relay with chinese labels ^_^ but I have connect the power supply to 5v and the activation pin when it goes to GND the relay get activated
    – RuBiCK
    Oct 25, 2017 at 10:53
  • the relay is similiar to [this one] (aliexpress.com/item/…), with no specs :(
    – RuBiCK
    Oct 25, 2017 at 11:03

1 Answer 1


Connect Pi ground (say pin 6) to relay ground, Pi 5V (say pin 2) to relay VCC. Connect relay IN carefully to alternately pin 1 (3V3) and pin 6 (ground). If the relay operates you are good to go using a GPIO. If it doesn't operate it is incompatible with the Pi.

  • It gets activated with 3v3 and GND (I don't know if it's normal) it's better activate it with vcc or gnd?. I don't like to connect a relay directly to the GPIO due to power consumption...
    – RuBiCK
    Oct 25, 2017 at 19:03
  • That should mean you can connect a GPIO to the relay IN pin (leave relay ground and VCC connected to Pi ground and 5V). Then switch the GPIO low to activate the relay or high to deactivate the relay. The relay should need only a few milliamps from the GPIO.
    – joan
    Oct 25, 2017 at 19:38
  • If I read the OP's question correctly: 'I have a relay that I can activate it with a PIN to GND.', this implies that one side of the coil is connected to 5V and grounding the other side (the INPUT) energizes the relay. If this is true, it follows that the INPUT would have 5V on it, and connecting it to pin 1 (3V3) would short pin 1 to 5V. Am I missing something?
    – Seamus
    Feb 13, 2020 at 21:18

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.