I was thinking of using my Raspberry Pi to control a switch (control a lamp, for instance). I have a traditional (electromechanical) relay, but I know I will need to use an external transistor and power source to drive the relay. My question is, does the Pi have enough power to directly drive a Solid State Relay?
4 Answers
I used a PiFace to connect to my Solid State Relays in the end. When measured, the relays I had were drawing about 14mA, I have 5 (relays) so was over the 50mA total GPIO limit. At the end of a cable run, I was also only just getting above the necessary 3v to switch them.
That said, it did seem to work fine from the GPIO, even with all relays engaged. I guess there is margin in the 50mA limit.
I wasn't comfortable though, and had a PiFace anyway, so hooked up to that. My relays seem to draw slightly less (12mA) at 5v from the PiFace, and work perfectly. Also, when connected to the GPIO, a couple of the relays would switch at boot-up, they do not do that from the PiFace.
Pi can drive a solid state relay directly without any issues.They are made to be operated directly from the pins.They are completely isolated and so won't damage the pi.
Most solid state relays I have seen work on input voltages of 3-30V and so should be fine.
Hope it helps.
-
Do you know what the current draw on a solid state relay is? Keep in mind that the GPIO of the Pi is only really rated for like 16 mA.– FredMar 7, 2014 at 7:51
That should be fine.
A word of caution: If you drive physical world things like lamps, heaters, door locks and such, you'll take great care to avoid software errors, system shut down, power-ups etc. to inadvertently switch on these this.
Or you may find a (big|bad) surprise coming home.
You can. HOWEVER this makes your Pi a critical system so you need to program it very carefully. If possible, use a secondary manual switch to engage the relays to the Pi after it booted up. Also, you may want to read about programming critical system software before actually doing that.