# BJT Constant current LED driver

I need to build a constant current driver for a LED with a forward voltage of 3.4V and 350mA maximum current. The driver will be controlled by a PWM signal from a 3.3V MCU.

Reading this post and doing the calculations using my system specs, I came up with the following circuit:

simulate this circuit – Schematic created using CircuitLab

I had to choose a 12V power supply due to the high forward voltage of the LED, which resulted in a minimum power supply voltage of 6.5V. Therefore I couldn't use a 5V power supply.

However, I'm concerned about the power dissipation on the transistor. If my calculations are right, the power dissipated across it would be (neglecting base current and considering Vbe=0.7V):

And the BCP56 can only dissipate a maximum of 1.35W with properly sized mounting pad in the PCB.

First of all I would like to know if the my calculations are right and, in case they are, what would be a good solution.

The only two options I can think of are either picking a beefier transistor that can dissipate more power or reducing the power supply voltage, although I like the idea of using as 12V power supply since it's easier to find locally.

Furthermore, is BJT a good solution for this type of driver or changing for a MOSFET based driver a more suitable option?

• I would recommend you use a Darlington power transistor, like the TIP series. Mosfets are recommended only for High power LEDs like 5-10W and above. Jan 31, 2018 at 17:52
• It sounds like you want the transistor either fully on or fully off, so I would use a FET. I find them simpler to understand and they have lower power loss at high current. For the circuit you have, I believe you want R1 on the collector, not the emitter, otherwise the current through the resistor will raise the emitter voltage, and change your base-emitter voltage. Most of the power will be dissipated by R1, not the transistor, that might be more obvious when you move R1. EDIT: I may have misunderstood your intention, are you trying to use the BJT to control current instead of a resistor? Jan 31, 2018 at 17:53
• Also, I highly recommend simulating all transistor circuits. LTSpice has good features and is free. Jan 31, 2018 at 17:58
• @pscheidler Yes, I'm trying to use the BJT to control the current and therefore R1 needs to be on the emitter side. I simulated it in LTSpice, and it seems that my power dissipation calculation is right. Just wanted to check if anyone can recommend a better circuit than mine. Thanks! Jan 31, 2018 at 18:12
• Do you prefer using MOSFETs? If so, Trevor's circuit is a very standard approach combining a small signal BJT with an NMOS. Another approach that is almost identical replaces the NMOS with another BJT. They both work just fine. So it really is a matter of what you can get and want to pay for, I think. There are other approaches, too, of course. In fact, I can think of at least 5 or 6 different basic approaches where all of them are about the same cost but have various advantages and disadvantages.
– jonk
Jan 31, 2018 at 19:00

I'd be using 5V and a MOSFET here to limit the current required from the GPIO and coupling it in a typical current limiter as shown below.

R1 and Vbe or Q1 roughly set the current limit. If you need it more accurate than that you either need a pot in there or a more active circuit.

simulate this circuit – Schematic created using CircuitLab

The gate threshold of the MOSFET needs to be under or close to 1V. Power lost to the MOSFET is about 300mW and R1 is 215mW.

• I've seen this circuit in other threads but I was reluctant of using it due to its higher component count since I intend to replicate the circuit to control several LEDs individually. However, after a second look I realised this approach is much more efficient than the one I posted and I would be able to use components with smaller footprints due to lower power dissipation. Thanks! Jan 31, 2018 at 19:43

Your design wastes too much voltage on R1. Here is a design that only drops 0.6V across R1, allowing you to use a 5V supply, which means less power wasted in the transistor.

simulate this circuit – Schematic created using CircuitLab

However this design is too dependent on the characteristics of the transistor. Better to use a more sophisticated circuit.

If your goal is to minimize power wasted, better to use a switching current regulator. You will find many sold as LED drivers.

• Pretty sure that wont supply enough base current to run 350mA through Q1. Jan 31, 2018 at 18:17
• @Trevor_G The BCP56 datasheet gives a minimum beta of 40.
– τεκ
Jan 31, 2018 at 18:18
• True, still a pretty heavy load on a GPIO though. Jan 31, 2018 at 18:24
• That is true. I figure OP hasn't thought about that either.
– τεκ
Jan 31, 2018 at 18:35