Constant current with transistor as switch - advanced question, please help!

Thread Starter

DuanC

Joined Jul 23, 2015
2
Hello

This is not a basic question about why a base resistor is required for a transistor. -_-

I am switching a LED with a constant current circuit. The LED must have a minimum of 5mA triggering current, but should be immune to supply variations. As such, I designed a basic constant current driver using a 2N2222A transistor (MMBT2222). The appeal is that a single resistor and transistor is required.

The supply line ranges from 10-24V. The transistor is switched using a 5V microcontroller pin.
Circuit.jpg
This circuit simulated fine and works well. However, in my research I found an untraceable picture of a similar circuit, with a fundamental difference of a base diode.

Circuit2.jpg

My question is why is this circuit recommended? I wish to avoid adding any circuitry more than is required.

Thank you
 

Bordodynov

Joined May 20, 2015
2,642
The diode can be useful in the breakdown of the transistor. For example, if an overvoltage (crash). Diode current will not flow into the microcontroller.
 

Bordodynov

Joined May 20, 2015
2,642
Anything can happen. For example, if you switch the circuit from car batteries (from the car). But if the voltage is as indicated on your figure does not exceed 24 V, there is no point in a further diode. Applied easily withstand 60V transistor.
 

Sensacell

Joined Jun 19, 2012
2,582
I agree that the transistor alone should isolate the logic output pin from the LED supply.
The diode is useful to reduce the burden voltage across the constant current sink, so you can operate more LED's or use a lower supply voltage and still remain in constant current mode.
 
Top