I have a circuit where I am driving IR LED (TSAL6400) with MOSFET (DMN2058UW-7) using the below circuit. The GPIO of ESP32-S3 is connected with the gate of MOSFET via 100Ohm resistor.
The datasheet of TSAL6400 IR LED says that the peak forward current that it can handle is 200mA. The calculated current on the paper through the IR LED is about 110mA (calculations shown below) but when I measure the current using Power Profile Kit II I get a peak of about 187mA and few lower values as shown in the graph below. Why this much disparity?
I moved your topic to an appropriate forum category @ssohaib.
In the future, when creating a topic please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
The drive transistor could be the mosfet you're using now,
the feedback transistor could be a BC547/548 or 2N3904 etc.
Calculate LED current for ~0.65volt across Rsense (3.3Ohm = 200mA).
R control can be 100 Ohm, and keep the 10k from Arduino pin to ground.
Two LEDs in series give 40% more range (for the same current).
Connect the top LED directly to 5volt (no 33 Ohm resistor).
Use a 470uF buffer cap on that 5volt rail.
Leo..
The currents at the two points arrowed are not always the same. The difference is due to current flowing in to or out of the capacitors C37 and C39.
When the LED is pulsed, initially some of the current is supplied by the capacitors C37 and C39.
For a while the current at point A is less than point B.
At a slightly later time, the capacitors will get recharged from the +5V source.
This charging current can briefly be higher than the current drawn by the LED.
My guess is that:
You are measuring at point A.
The LED current is close to 110mA.
The peak current from the supply, including capacitor charging current is 184mA.
I've never tried it, but I've wondered if a modification to your two-transistor setup would provide a constant current circuit using two IR LEDs when power is provided by a single cell battery like the 18650. With two LEDs the .6V dropped across the sense resistor may be too much at, say, 3.5V from a nearly- discharged battery.
What I'm thinking of is to move the second LED down to where the sense resistor is, and make the sense resistor very low value, possibly zero ohms. Then you would need a resistor divider going into the NPN base. This is based on the idea that the Vf of the LED increases with current, so in that way it behaves a bit like a resistor, and is the basis of the feedback.
It seems to me this might work. What do you think?
I did, drive two of those IR LEDs with the circuit I gave you from a 3.7V LiPo battery.
You might not get the full current when voltage drops below 3.7volt, but two LEDs clearly compensate for the achieved light output.
And because this is a constant current circuit, you can just use one LED without modification, or four LEDs with a 9volt supply.
Leo..
No, I always use the constant current circuit I posted, because it has been succesfully used in remote controls for decades. It works fine with one or two LEDs and a 5volt supply.
I know it is borderline with two LEDs on a 3.7volt LiPo battery, but that doesn't matter for a remote control. You still get a better range with two LEDs.
I got more than 65m when I made a beambreak/tripwire with that circuit.
Leo..
I suppose you could use a lower value sense resistor and a (LM393) comparator opamp instead of a feedback transistor. But I doubt it's worth the extra effort.
Leo..
Well, in your circuit the voltage drop across the sense resistor has to be at least 0.6V before the NPN will have any current-limiting effect. That's not a problem at 5V, but with a single cell lithium driving two LEDs, that voltage drop means battery voltage will no longer be able to get over the threshold pretty early as it discharges, depending of course on the Vf of the LEDs. So if you could eliminate the need for that 0.6V drop, it would extend effective battery life.
The second LED is moved down to where the sense resistor used to be. My drawing still has a resistor below it, but it's mainly there to be able to measure the voltage across it to measure current during testing. As I said before, the idea is that since LED Vf increases with current, the lower LED may behave enough like a resistor to provide the needed feedback. There's no need for the 0.6V sacrifice. So things might continue to work down to a battery voltage of 3V, or even a bit less.
Calculating the resistor values is above my pay grade because the LED isn't actually a resistor, but I think they could be determined experimentally. I would try this out, but don't have the two IR LEDs on hand. I will try to remember them on my next Digikey order so I can see if this works.
Yes, I understood that from your previous post.
But Vf of that IR LED not only varies with current' but also with temperature,
increasing LED current with higher LED temp is not exactly what you want.
The original question was why LED current was different from measured current.
Vf of a LED depends on current and temperature.
5volt might not be exactly 5volt, and dips under load.
The 33 Ohm resistor could be 5% off.
The FET specs could differ from the datasheet.
The wiring/soldering could be poor.
A two-transistor constant current circuit catches most of these decrepancies.
Leo..
Thank you for sharing idea on using constant current circuit to drive IR LED. I will try to get the hardware for testing and will share my results. It may take few days to get them. Before I start working on it, correct me if I am wrong. I just need to make a constant current circuit that give let’s say 110mA current on its collector and then used IR LED as shown in the circuit by you.
The circuit with the diodes is the same, but an active circuit (with sense transistor) seems to work better.
The principle is simple.
The mosfet drives the LED as hard as possible, the small NPN transistor acts as a brake, making sure current doesn't go over a set threshold, set by value of the sense resistor.
It is not a problem to drive the LED to 200mA if more range is needed,
because remote control signals are 50% or less duty cycle.
The average current shouldn't be more than 100mA.
3.3 Ohm sense will give you about 200mA peak, which is fine, even for continuous 50% 38KHz.
Current = BE voltage drop / sense resistor = 0.65volt / 3.3 Ohm = ~200mA.
Leo..
Thank you very much. Your both responses have given me a good starting point. I will do some testing in few days and will share the results.
On the side note now I am really starting to appreciate why professors spend few lectures teaching constant current circuitry in electronics course in the university.
A question just popped in my mind. If IR LED peak forward current is 200mA (given in the datasheet of TSAL 6400), does it not mean that we should have both the instantaneous and average current below this limit?
I guess average will be below if we set a condition on instantaneous current to be below 200mA. So should we not force our design with instantaneous currents less than 200mA?