### Author Topic: [Solved] which transistor to use for this constant current LED driver.  (Read 531 times)

0 Members and 1 Guest are viewing this topic.

#### Heisen

• Contributor
• Posts: 27
• Country:
##### [Solved] which transistor to use for this constant current LED driver.
« on: August 04, 2020, 12:28:05 pm »
Hello Everyone,

So here is the circuit that I am using for constant current source LED driver. It uses a pair of NPN transistors Q1 , Q2 and R2 which is a current sense resistor according to my understanding. R1 is just to limit the current into base of Q1. In my application V1 voltage source is stable at 5V all the time, but V2 voltage source varies slightly and the circuit works great at keeping the current through LEDs almost stable.

What I have learned so far :-
So we know the Vbe of Q2 has to be around 0.7v so therefore the voltage across the resistor R2 also has to be around 0.7v, and selecting the resistor value of 10 gives us the current of 70mA across all LEDs.

This circuit is mentioned in SDG Electronics youtube channel video at https://youtu.be/ceQDIfWKSK4?t=1075

Where he says that " The base to emitter voltage of Q2 0.7v is not a very tightly controlled parameter, so it does depend on the transistor itself, the current flowing through the transistor and also the temperature of the transistor. So it could vary. "

Further I also found this circuit on https://www.instructables.com/id/Circuits-for-using-High-Power-LED-s/

Where the guy talks about the thermal sensitivity of Q2. To somewhat overcome this problem he mentions the use of very specific NPN transistor for Q2 (such as: Fairchild 2N5088BU).

He says "the current set-point is somewhat sensitive to temperature. this is because Q2 is the trigger, and Q2 is thermally sensitive. the part number i specified above is one of the least thermally sensitive NPN's i could find. even so, expect perhaps a 30% reduction in current set point as you go from -20C to +100C. that may be a desired effect, it could save your Q1 or LED's from overheating."

I attach the datasheet for this transistor for you guys to look at.

To help me understand from where he determined that this transistor is the least thermally sensitive for this application, also since this Fairchild 2N5088BU is now obsolete, what is the new equivalent transistor for Q2 which I can use in TO-92 package?

Thanks.

[attach=1]

« Last Edit: August 06, 2020, 07:38:00 pm by Heisen »

#### Dabbot

• Regular Contributor
• Posts: 153
• Country:
##### Re: Help deciding which transistor to use for this constant current LED driver.
« Reply #1 on: August 04, 2020, 12:33:18 pm »
Why not use an LM317 in constant current configuration?

It will not drift about as much because it has a much better voltage reference.

#### Heisen

• Contributor
• Posts: 27
• Country:
##### Re: Help deciding which transistor to use for this constant current LED driver.
« Reply #2 on: August 04, 2020, 12:53:25 pm »
With LM317 how would I control it with PWM signal from a microcontroller? I prefer to keep the number of parts used to be minimum.

In the above circuit I am using GPIO pin in place of 5v voltage source.

#### Dabbot

• Regular Contributor
• Posts: 153
• Country:
##### Re: Help deciding which transistor to use for this constant current LED driver.
« Reply #3 on: August 04, 2020, 01:19:24 pm »
You could just use a common emitter transistor to perform the switching, though don't go too crazy with your PWM frequency due to the LM317 load transient response times.
It shouldn't pose a problem with the current you're looking to pass.

Edit: Ideally, you would use an adjustable current source which is set by a control voltage, supplied by your PWM through a low pass RC filter.
« Last Edit: August 04, 2020, 01:43:01 pm by Dabbot »

#### Heisen

• Contributor
• Posts: 27
• Country:
##### Re: Help deciding which transistor to use for this constant current LED driver.
« Reply #4 on: August 04, 2020, 02:41:36 pm »
Is this okay? For about PWM frequency of 100hz to 3000hz

Edit: I want LED to have either VCC or GND on one side, that's why I put them in this configuration.
« Last Edit: August 04, 2020, 02:44:35 pm by Heisen »

#### Dabbot

• Regular Contributor
• Posts: 153
• Country:
##### Re: Help deciding which transistor to use for this constant current LED driver.
« Reply #5 on: August 04, 2020, 02:59:29 pm »
It looks good to me.

The following users thanked this post: Heisen

#### fourfathom

• Frequent Contributor
• Posts: 629
• Country:
##### Re: Help deciding which transistor to use for this constant current LED driver.
« Reply #6 on: August 04, 2020, 04:32:01 pm »
But do decide if you can deal with the thermal sensitivity.

I had a LED driver design (linear, constant-current) where I used a power FET as a driver, and a NPN transistor connected to the FET source resistor (much like the OP's original circuit, but with a FET).  The (approximately) -2mV per deg C variation in Vbe gave me a current variation over my 0-50 deg C temperature range, but this was acceptable in my application, and this configuration gave me a much lower voltage drop across the regulator (when compared to an LM317).  In my case, this extended the battery voltage operating range.  I went with a linear design because I didn't want to have to deal with the RFI from a switching regulator.

The following users thanked this post: Heisen

#### magic

• Super Contributor
• Posts: 3083
• Country:
##### Re: Help deciding which transistor to use for this constant current LED driver.
« Reply #7 on: August 04, 2020, 04:44:58 pm »
I don't think there is anything special about 2N5088. Temperature coefficient of Vbe is actually specified in the datasheet and turns out to be a bit over 2mV/°C, which is nothing unusual. Vbe at 25°C is 0.6~0.7V depending on current, nothing unusual again.

Is this okay? For about PWM frequency of 100hz to 3000hz
No idea how LM317 will handle PWM, but since you have that circuit in LTspice, set V1 to "pulse" and run a transient sim.

The following users thanked this post: Heisen

#### Heisen

• Contributor
• Posts: 27
• Country:
##### Re: Help deciding which transistor to use for this constant current LED driver.
« Reply #8 on: August 06, 2020, 07:35:57 pm »
If anyone interested,  I have started a new thread which uses new opamp driven topology, where I have more questions. https://www.eevblog.com/forum/beginners/which-opamp-to-use-and-how-to-use-constant-current-source-led-driver/

This thread is solved.

Smf