I am trying to toggle an SRD-03VDC-SL-C (3V rated) relay with a Raspberry Pi GPIO.

When I put a wire to the Raspberry Pi 2B ground pin and the other to a 3.3V power pin the relay works (it clicks). I measured 3.28V with my multimeter.

Now, as the relay is confirmed to be working I want to toggle it via software by switching a GPIO pin. I confirmed that the GPIO switching is working with my multimeter: It shows 3.28 V when high and 0 V when low.

But when I connect the wire with the GPIO in high state it does not toggle the relay. How is this possible when both pins have the same voltage and how can I fix this?

Experimenting with the Raspberry I also observed the situation that I could set the voltage to 0 but disconnecting then made a difference. I would assume that in this case disconnecting would not make a difference.

  • 3
    \$\begingroup\$ A I/O pin cannot deliver the amount of current required to drive a relay coil (trying to do so can damage the device). Buffer the signal with a transistor. \$\endgroup\$ Commented Jan 1, 2021 at 17:49
  • 1
    \$\begingroup\$ Are you using a bare relay or a relay module? \$\endgroup\$
    – ocrdu
    Commented Jan 1, 2021 at 17:49
  • 1
    \$\begingroup\$ Currently using a bare relay. \$\endgroup\$ Commented Jan 1, 2021 at 17:58
  • \$\begingroup\$ Measure the GPIO output while the relay is connected and add that to the question. \$\endgroup\$
    – user16324
    Commented Jan 1, 2021 at 19:34

1 Answer 1


A GPIO pin cannot provide enough current to a relay directly. Use the GPIO pin to drive a transistor, and use the transistor to drive the relay.

  • 1
    \$\begingroup\$ Thank you. This explains it. I will try that and if it works, accept your answer. \$\endgroup\$ Commented Jan 1, 2021 at 17:59

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.