ESP8266 transistor switching circuit issue

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 dimmer comparing to directly hook up to 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?

The maximum continuous Collector current (Ic) of the S9013 is listed as being 500ma.
My guess is that your 12v LED strip draws more than this.

Personally, I’d be using a MOSFET for this.


Thanks for replying. Should I use IRF540N MOSFET or something else? Care to shed the light on a workable circuit?

If you’re wanting to switch the MOSFET using a 3.3v logic signal then a Logic Level MOSFET like the FQP30N06L is probably your best bet.
I wouldn’t want to suggest a circuit without knowing the full design parameters, but if you do a google search you’ll find plenty of circuits using this particular device.

If you’re aiming for a dimmable solution, using PWM and AnalogWrite commands, then be aware that code written for the Arduino (which has 255 PWM levels) will only light the LED strip at around 25% brightness. The ESP8266 has 1024 PWM levels, so 1023 will be maximum brightness and any Arduino code would need to be adjusted to account for this.


You’re connecting the transistor not correctly:

The GPIO must be connected to BASE(N=channel MOSFET GATE), GND to EMITTER(SOURCE) and COLLECTOR(DRAIN) to LOAD then LOAD to POWER (5/12VDC).



There is a guide for such things you can save it.

Take a look at our website for different interesting big data projects

[External website link removed by moderator]