Electronic – Constant current source gets heated

constant-currentheatledled-drivertransistors

I am trying to control some power LEDs using a microcontroller. For this I plan to use a transistor based constant current source to protect the LEDs from getting damaged and PWM on the base of the transistor to control the brightness.

enter image description here

The circuit is set to obtain 300mA across the LED. The transistor is 2n2222 NPN.

Problem:
The Vin is 12V. The LED consumes only 3V. This leaves about 9V that drops across the transistor and the resistance in series. The power consumed by the transistor is high enough to burnt it. After a few seconds of working it gives up and the current in the circuit increases to about 1A before it burns out.

I want to understand what can be done to stop this from happening. I also tried using a 5V zener in series to consume 5V before the transistor. This did the job somewhat but the zener got extremely hot (enough to melt plastic) and that can't b good for the life of product.

Some help here will be highly appreciated.

Limitations-

  • I cannot use a voltage regulator to decrease voltage as there is absolutely no space left on the PCB.
  • I cannot change the power source from 12V to something less.

Update:

So inspired by @indraneel answer down below, I understood I had to either utilize the remaining voltages in an efficient way or make sure the extra wattage was dissipated in a dafe manner.

What @indraneel suggests is very efficient as you get to actually make use of the extra wattage you have after the first LED and this also won't give too much heat. But it just wasn't the right solution for me as the LEDs are quite expensive. But, this inspired me to understand that the only way is to consume this power. So I decided to use a 5V zener in series. Obviously, the zener diode will heat up too much to dissipate this power. For that I placed the zener on the aluminium PCB where all my LEDs are. That acted as a heat sink for the zener. Now obviously the aluminium PCB does get warm but it neither affects the LEDs, nor does the transistors get burnt/damaged.

I hope this post helps someone. 😀

FINAL UPDATE

So earlier I thought that using zener in series was a good way to drop some voltages but it is in fact a bad idea. Eventually the zener gives up, in a day or two maybe. THE SOLUTION WAS TO FINALLY MAKE SPACE FOR AN LM2596 BASED BUCK CONVERTER TO GET RELIABLE STEPPED DOWN VOLTAGE AND VERY LESS HEAT.

Best Answer

The max current should be based on the max dissipation by the transistor. 2N2222 is inadequate for this job due to too much dissipation. A BD139 can be used instead of the 2N2222.

Alternately, 2 more LED in series will dissipate only 0.65W in the transistor. Still too high for a TO92, but maybe some kind of heatsink or active cooling can be used, or LED operated below 50% duty cycle. TO92 should usually handle 300mW ok.

However, I don't understand the problem. You are using PWM already. Why are you trying to limit max current to 300mA? These LEDs (I'm assuming 1W) work fine for a few seconds even at upto 24V. So 12V should not be a problem. The average current through the LED should not exceed 280mA, or 330mA with good heatsinking. You can easily do this with PWM.

To regulate with PWM, you need to first change the transistor to something better (probably TIP122, but probably not BD139) and then set the resistor accordingly (probably 3R3 as it limits max current to 2.6A). Make sure the resistor can handle the power dissipation (probably 5W for 300mA average at 8.7V to ensure enough headroom; 3W is cutting it too thin). [Or, add 2 more LED in series and use just a 1 ohm 1W resistor.] Also make sure the peak current through the transistor is within the time limits in the SOA curve for the PWM frequency and duty cycles you are using.

You do not need the two diodes anymore, since the transistor here is a switching device, and not limiting current (the resistor is doing that by itself). For faster switching you may place a base resistor (1K to 10K) to ground. If using BD139, make sure it has the required base current for saturation, and is not working in the linear region.

schematic

simulate this circuit – Schematic created using CircuitLab

[As mentioned, a mosfet like AO3400 is smaller, better and costs less (if you can wait getting it from China). However, the TIP122 is pretty common and usually available locally.]