Hi Guys!
I´m trying to actuate a relay with an esp8266 (3.3v), but I have some questions..
The relay module I have, is rated for 5v input.
It seems to have a crude driving circuit + a flyback diode.
I've tested it connecting the module to +5v, gnd, and Signal to an output pin of the esp8266, and the relay activates just fine.
Question:
1) It's ok to use it this way? Or do I still need a 2n2222 (for example) to drive the module in a safe way for the esp?
2) It's ok to drive the relay module with a high state GPIO? I've seen several youtube videos where they say it's better to set the GPIO as input and "drain" the current through the pin. I am not able to fully understand how this method works.
3) If I measure current between the active GPIO pin and the Signal pin of the relay module, I get roughly 3.5 mA. Is it safe to draw this amount of current from a "data" pin?
This is how I have them connected..
ESP8266 + 5v relayRelay Module images..
R1, smc value "151", what does it even mean?
Q1, smc value "J3Y"
(Apparently the traces show that Signal goes first through the LED, then through R1 and the to Q1, not sure though..)
Relay 1Relay 2This is the post where it shows how to add the 2n222 and other componets to drive the module, BUT on a 5v arduino, instead of a 3.3v esp8266)
https://forum.arduino.cc/index.php?topic=493559.0Thanks guys for shinning a light..
Cheers!
Marc