0

In Node-Red, whenever I put a single status type for reading the GPIO status or GPIO in/out in the flow, it turns on the relay. I cannot turn of it by injecting 0 value as string. When I delete all types that relates GPIO, the relays turns off.

My relay is http://www.circuitbasics.com/wp-content/uploads/2015/11/SRD-05VDC-SL-C-Datasheet.pdf

And the flow is:

{[{"id":"8b7dff4.351fe","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"cf51fbe9.097e28","type":"status","z":"8b7dff4.351fe","name":"","scope":["453e7f43.ea0a1"],"x":218.5,"y":227,"wires":[[]]},{"id":"453e7f43.ea0a1","type":"rpi-gpio out","z":"8b7dff4.351fe","name":"","pin":"11","set":"","level":"0","freq":"","out":"out","x":343.5,"y":296,"wires":[]}]}    

1 Answers1

2

I don't think it is safe to drive that relay directly from the Pi.

There is no back EMF protection. You could destroy the GPIO and the Pi.

Also the coils require 5V to energise. The Pi GPIO are all 3V3.

Furthermore a Pi GPIO can only supply about 20ma at 3V3, that relay requires about 140ma to energise the coil.

I strongly suggest you ask this question on electronics stack exchange rather than here.

joan
  • 71,852
  • 5
  • 76
  • 108