i want to activate a 5v relay(SRD-05VDC-SL-C) using esp8266 (3.3v)
i found those 2 ways:(check image)
can u tell me do they both works so i can choose which one i like or just one of them is correct
why not use one of many relay modules available?
for example
I use circuit No.1 in my garage door opener.
Works everyday.
Both circuits are incorrect. You need a current limiting resistor in series with the Opto LED. By not doing this you are stressing the LED. #2 is border line with a 5V relay. What are you trying to switch, I prefer solid state relays although I have used the mechanical ones. OOPS wrong drawing.
1 should work, 2 should damage your Arduino.
What am I missing? I would go with the 1st image but I don't see an opto or LED in either drawing? Anyway my choice is #1 which looks fine to me.
Ron
Correct , there is no led only a fly back diode .
My volt goes for the left hand one which will work fine .
Number 2 will not work
Number 1 will work if you make R5 equal to 470 ohms
You can not power a relay from an output pin (the same for an Arduino which delivers 5V on the output pins), they need far more current than an output pin can supply.
Schematic #1 is the correct solution. Or indeed a relay module which has this driver part built in.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.