I just learned about measuring the base resistor of a transistor but I think I did something wrong.

I wired everything up like this, but when I measure it I only get around 2.7V out of my device. Is my resistor calculation wrong?

Transistor is a S8050 or similar - datasheet

enter image description here

P.S.: Yes I also have a diode for not overloading the transistor but I think my calculations are wrong.

  • 1
    \$\begingroup\$ Your calcs use 5V but the circuit says ‘3.3V esp gpio’. You should measure your base current - that would’ve alerted you to the mistake. \$\endgroup\$
    – Kartman
    Commented Sep 15, 2022 at 10:12
  • 4
    \$\begingroup\$ You don't want the transistor "just barely" saturated. You want it fully saturated under all conditions, so cut the resistor value in half relative to your calculated value, and make sure that the MCU I/O pin can supply that much current. \$\endgroup\$
    – Dave Tweed
    Commented Sep 15, 2022 at 10:56
  • 1
    \$\begingroup\$ Look at the datasheet of an S8050 transistor and see that for a 500mA collector SATURATED current then the base current must be 50mA. At such high currents the base-emitter voltage could be 1.2V then your current in the 750 ohms base resistor is only (3.3V - 1.2V)/750 ohms= 2.8mA which is over 17 times too low. \$\endgroup\$
    – Audioguru
    Commented Sep 15, 2022 at 15:33
  • 1
    \$\begingroup\$ @dessi It's good that you found what was wrong - but it would be a good idea if you tiried up the question by noting the comments and adding whatever extra information that you may have. Also, understanding the point that each comment is making will help you learn more rapidly. Noting the ground path is important as while it may seem obvious, the ESP, the transistor emitter and the 5V supply also must share the same ground for proper operation - some people qho have problems do not do this and operation is by stray ground paths. \$\endgroup\$
    – Russell McMahon
    Commented Sep 19, 2022 at 10:19
  • 1
    \$\begingroup\$ @dessi As Kartman says, you used 5V in your calculations, but show ESP Vhi as 3V3. Providing a link the the datasheet of the components you use is also a very good idea. \$\endgroup\$
    – Russell McMahon
    Commented Sep 19, 2022 at 10:26

1 Answer 1


Thanks all for your insight on this topic. I also struggled with this circuit with my ESP 12F attempting to drive a 5v Laser from GPIO4. What I come to find out was that NPN was "above" the laser load, where as it should have been "below". Connecting the Emmitter (above) to the load input does work but you will only get 2.7vdc, instead of 5vdc. No base resistance is needed between the transistor base and 12mah GPIO pin output

  • \$\begingroup\$ Also want to note a little more background of the circuit. I'm using a dc-dc charge pump #LTC1754-5#TRMPBF (inductorless) to convert 3.7 battery to 5vdc. The transistor is a 863-BCWLT1G rated at 32vdc @ 100mA (MAX) the ESP12f @12ma max can fully saturate the NPN base without an RB! \$\endgroup\$ Commented Nov 13, 2023 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.