Is it safe to use transistor to switch 12v LED how to protect ESP8266 GPIO

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
markmora
New user
Posts: 1
Joined: 27 Oct 2019, 10:24

Is it safe to use transistor to switch 12v LED how to protect ESP8266 GPIO

#1 Post by markmora » 27 Oct 2019, 10:28

I have a circuit related issue. I intend to use S9013 instead of relay to switch 12V LED strip. I tried this circuit below and found out the brightness of the 12V LED is much lower comparing to directly hook up the 12V DC. I tried to replace the 10K resistor with 1K resistor and the LED seems brighter than the 10K resistor setting. The ESP8266 GPIO sends 3.3V signal. Should I hook up the GPIO directly to R1? How to calculate the suitable resistor of this circuit?
Image

Patou
Normal user
Posts: 106
Joined: 21 May 2018, 10:33

Re: Is it safe to use transistor to switch 12v LED how to protect ESP8266 GPIO

#2 Post by Patou » 27 Oct 2019, 15:51

Max output current gpio is 12 mA
Let,s take 6 mA to be safe for our calculation
With 6 mA base/emitter current and transistor gain of 60 to 300 collector/emitter current could be 360 ... 1800 mA . Max c/e current of transistor is 500 mA
Output gpio 3.3 v voltage drop b/e 0.6 v = 2.7 v
Resistor value 2.7/0.006 = 450 ohms
So choice 390 ... 470 ohm for base resistor
Have a good day

Post Reply

Who is online

Users browsing this forum: No registered users and 118 guests