[Solved] which transistor to use for this constant current LED driver. - Page 1
Forum section: electronics / beginners

author: Heisen
author_rank: Contributor
timestamp: August 04, 2020, 12:28:05 pm
content: 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 10gives us the current of 70mA across all LEDs.This circuit is mentioned in SDG Electronics youtube channel video athttps://youtu.be/ceQDIfWKSK4?t=1075Where 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 onhttps://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.2N5088-D-1801552.pdf(86.54 kB - downloaded 128 times.)

author: Dabbot
author_rank: Regular Contributor
timestamp: August 04, 2020, 12:33:18 pm
content: Why not use an LM317 in constant current configuration?It will not drift about as much because it has a much better voltage reference.

author: Heisen
author_rank: Contributor
timestamp: August 04, 2020, 12:53:25 pm
content: 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.

author: Dabbot
author_rank: Regular Contributor
timestamp: August 04, 2020, 01:19:24 pm
content: 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.

author: Heisen
author_rank: Contributor
timestamp: August 04, 2020, 02:41:36 pm
content: Is this okay? For about PWM frequency of 100hz to 3000hzEdit: I want LED to have either VCC or GND on one side, that's why I put them in this configuration.

author: Dabbot
author_rank: Regular Contributor
timestamp: August 04, 2020, 02:59:29 pm
content: It looks good to me.

author: fourfathom
author_rank: Super Contributor
timestamp: August 04, 2020, 04:32:01 pm
content: 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.

author: magic
author_rank: Super Contributor
timestamp: August 04, 2020, 04:44:58 pm
content: 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.Quote from: Heisen on August 04, 2020, 02:41:36 pmNo idea how LM317 will handle PWM, but since you have that circuit in LTspice, set V1 to "pulse" and run a transient sim.

author: Heisen
author_rank: Contributor
timestamp: August 06, 2020, 07:35:57 pm
content: 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.