Hey guys, Im trying to build a constant current driver using a dual BJT constant current driver but I'm experiencing some grief trying to get the desired current.
From my understanding and above from my diagram, the resistor R1 is the resistor that will dictate the current through my LEDs. Since the voltage through R1 is the same as Vbe of Q2 the load current can be calculated with R1=I_L / Vbe(q2).
So my LED current and what we are trying to achieve is 1A.
My MOSFET Q1 is the TIP32CG and the data sheet suggests it should be fine to take the load I would like.
My Transistor Q2 is just a general transistor 2N3904 with Vbe of 0.65V but were just taking it at 0.7V.
The problem we are running into is that the current going through the load despite having just 1 LED and the right resistor value of 0.7ohmes doesnt reach anywhere near 1A. My thinking is that it has something to due with my resistor R2 which is not turning on the transistors. Im kind of lost in picking my resistor R2, I just thought it just needed to be enough to allow base of Q1 to Conduict and base of Q2 to direct current but having a real hard time.
A PNP transistor cannot work, use a TIP132 NPN Darlington instead.
Also check that the TIP base voltage can become high enough when driven by only 3.3V.
I've deleted reply #3, which as well as being a cover for spam (right at the end) was an awful example of AI generated nonsense, as well as the replies. It might be that I have accidentally also deleted useful content in the replies, so please accept my apologies if this is the case and re-post the information lost.
While I appreciate that it is common (is it?) practice to put high power LEDs in parallel as you have shown, I suggest this is bad theoretically as there is no mechanism to share the current equally, and, in my experience it leads to early life failures of the LEDs. I had to build for my brother new PCBs for his hall lights because of exactly this problem, the PCBs I made had 2.2Ω resistors in series with each string of LEDs to balance the current, so far no failures.
LEDs have a negative temperature coefficient, so Vf falls with rising temperature. The risk of putting them in parallel is that as they heat up Vf falls unequally between the LEDs, the LED with the lowest Vf will take a larger share of the current causing it to heat up more, making the situation worse, until it takes more current than it is rated for then failing as a result.
The TIP31 (NPN) is a poor choice, as it needs 20-40mA base current from the 3.3volt pin for 1Amp. A logic level (SMD) mosfet could do better there. With a 5volt supply, you could have two IR LEDs in series, for double the power.
What are you using this for (modulation type). 1Amp LED current is a lot. Most common remotes top at 200mA peak. For that you can use a 2N2222. With 200mA peak you can bridge a 50m beambreak sensor.
Leo..
Yeah thats my bad sorry we are using a TIP31CG NPN. I've done it for previous low power LED applications before and its worked completely fine. The whole circuit was done in the same manner with instead of a 3.3 there's a PWM signal to dim the lights. So im just a bit confused of why it wouldn't work for here as well.
Ah yes that is something that I've encountered with my previous project using this circuit where LEDs place in parallel would just die. But just confirming you just had a small shunt resistor to balance out the current?
Since we are using high power LEDs in this project the goal is to place a heatsync on them. Thanks for your assistance
Thank you for your response Hmmm that is indeed very interesting. Would you mind clarifying why it would require 20-40mA base current from the 3.3 to achieve 1 amp? Would this be to do with the DC gain of the actual transistor? Because of my uneducated mind to get 20mA lets say from a 3.3v I would just set R2 as 165 ohms.
The goal here is to do lifi with this circuit where we will be sending modulation where the 3.3v supply is (microcontroller we're using has a maximum out of 3.3v). We had success with this but we want to achieve it over a greater distance but the current is just not coming out as we are calculating. So that's our main issue right now.
1 amp is very big, but that's the high power LED were using right now where according to the datasheet the maximum current is 1.5A. My last project I was using this exact same circuit where we utilised low power LEDs. With that everything worked as calculated and I didn't even have a R2 resistor there, just PWM straight to the base of Q1 and collector of Q2. With this set up TIP31CG* it was able to reach that 135mA required fine. So just a bit puzzled here.
Note I said 2.2Ω above, and the schematic shows 2.7Ω, it doesn't matter, you need to choose to suit the current. How do you choose? Good question! I was aiming for a small voltage drop at the LED current of about 150mA per string. I guess you need to aim for a voltage drop of more than the expected change in Vf from possible heating, but I cannot give you an equation, this is part of the art of electronics.
I agree. You need constant current if the voltage is going to change, such as battery voltage dropping over time. But here you have 5V. If that's a regulated supply, then you just need the right resistor for the Vf of the LED.
And have you said what the Vf of the LEDs is at the desired current?
Edit: It's times like this that expose my lack of an EE degree. I guess constant current is really to deal with variations in Vf.
Anyway, If the TIP31 has a gain of 25 at 1A, then the base current needs to be 40mA. And if the emitter is at 0.7V, then the base will be at 1.4V. So you have a voltage drop of 1.9V across the base resistor, which would need to be about 47R. That's assuming your MCU GPIO will source 40mA. Seems like a mosfet would be a better choice, and if possible, two LEDs in series.
Yes. Assuming you use a mosfet with a very low Vgs(th), at or below 1volt.
It needs to be fully 'on' at "3.3volt - 0.65volt BE".
A lot of SMD mosfets are suitable for this, but it might not be easy to find a through-hole one.
+1.
A two-transistor design only has advantages when the circuit is battery powered.
It can keep current constant with decreasing battery voltage.
Leo..
The OP said this was for "lifi". But do we know if the LEDs here are 3+V white light, or lower Vf IR? If the latter, then with 5V power one solution might be to put two LEDs in series, at 500mA.