Electrical – BJT Constant current LED driver

bjtconstant-currentledmicrocontrollerpower-dissipation

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:

schematic

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):

enter image description here

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?

Best Answer

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.

schematic

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.