Search code examples
raspberry-pigpio

RPi GPIO needing to bee grounded?


I have made a simple relay board using a 12vdc Bosch automotive relay. The relay works great, Comm/NO being successfully controlled with RPi GPIO(25) using a 3+ RPi. However, the only wire from RPi to relay board is the GPIO (initiated as GPIO.out) with no ground from RPi to relay board. So, is the grounding necessary? I have researched and found multiple threads saying GPIO's do not need a ground return; others saying the opposite. Here is the diagram: Relay board diagram


Solution

  • The grounding happens indirectly over the power supply of the RPi and the power supply of the relay. While this may work, it is dangerous and may fry either part.

    As there is no guarantee that the two PSUs generate a common ground, you may have undesired current flowing through the GPIO wire. The resistor there gives some protection, but this might not be enough to prevent frying your Pi. You might get a more detailed answer on the possible problems on https://electronics.stackexchange.com.