0

I have relay that requires 20mA to operate, which is a bit more than the pi can give from one pin. I as wondering if t was safe to connect 2 GPIO pins together to power the relay. I would use a diode on each pin so I don't short anything out, but do I need to do anything else to protect it or should I just get a transistor?

EDIT-

I am using trying to use a JZC-11F relay.

1 Answers1

4

I would recommend a transistor - not only does it reduce the current required but it isolates the Pi from the relay which helps to ensure that the Pi is less likely to suffer damage.

Is this just a relay that you plan to drive directly? Don't forget about the reverse EMF that occurs when the relay is de-energised - it will generate a high enough voltage to destory sensitive components. Appropriate precautions need to be taken. It may be easier to buy a PCB with relay and logic level drive.

PeteC
  • 341
  • 1
  • 4