After working a looong while on other parts of this project I am back at this point, now I built myself a small ammeter to see what actually hits the LED. However the max I am getting is about 10mA.
timestamp/busvoltage/shuntsvoltage/loadvoltage/mA/mW
45491327 / 0.87 / 0.97 / 0.87 / 9.90 / 10.00
The measuring frequency is a at about 18ms (script isn't faster, running on a D1 mini),
so I might miss some peaks but those should appear once in a while I guess.
The signal length is 29ms (IRRemote lib)
Power supply is a 2A power bank, circuit as above. The resistor on the emitter would be a 0,5 Ohm to hit the max of the allowed A for the ir diode. I just left it out cause I couldn't get 0,5 Ohm resistors yet but I don't think this is the problem?
What do I need to do to push 1A to the diode?
Constant current IR LED circuit
Re: Constant current IR LED circuit
post a circuit diagram of your setup -hand drawn is OK showing part numbers and values etc. Also show the voltage supply to the IR LED(s)
A photo would also be useful .
FYI: having no or too low value resistor 'could' blow the IR LED and/or transistor. See my previous post!
A photo would also be useful .
FYI: having no or too low value resistor 'could' blow the IR LED and/or transistor. See my previous post!
Re: Constant current IR LED circuit
I know missing a resistor in front of the LED could kill it but the bursts are so short and for visual reasons I replaced the IR diode with a cheap yellow one. It is a bit risky, yes.
Signal (IRRemote) : (6 + (16 * 3) + 1) * 526 = 55 * 526 = 28930 microseconds or 29 ms
The IR diode can handle 3A for 10 microseconds, technically it should burn but with my measuring results I am far away from that.
Power supply is a 2A power bank.
You do not have the required permissions to view the files attached to this post.
Re: Constant current IR LED circuit
As before put a resistor on the emitter of the transistor. It is likely the IR LED is blown because of effective short.
resistor value: 3R (you can make this up by paralleling 3 or 4 10R resistors)
This resistor is required.!!!!!
You cannot put a yellow led in place because the current is much higher....so likely also blown because of effective short.
resistor value: 3R (you can make this up by paralleling 3 or 4 10R resistors)
This resistor is required.!!!!!
You cannot put a yellow led in place because the current is much higher....so likely also blown because of effective short.
Re: Constant current IR LED circuit
This just makes the signal weaker, just tried with 4.5 Ohm and 2 Ohm.
According to your article:
"Next we look at R1/R4, which at 2.5ohms means that the current going through the resistor will be 0.5/2.5 = 0.2A or 200 mA."
If I put 4 Ohm there it would be 0.5/4 = 125mA or 0.5/2 = 250mA.
Following that sentence a 0.5 Ohm would lead to 1A or lower to even more and that SHOULD kill the LED but it doesn't, it doesn't with the cheap yellow and it doesn't with the IR diode
Never thought I could be unhappy NOT destroying a component but that is where I am now.
With the IR Led and 4.5 Ohm resistor:
timestime/microseconds/mA/mW
18:08:58.143 -> 70562044 10.00 10.00
18:08:58.189 -> 70581205 9.30 6.00
18:08:58.189 -> 70600310 6.10 6.00
18:08:58.189 -> 70619321 2.10 4.00
According to your article:
"Next we look at R1/R4, which at 2.5ohms means that the current going through the resistor will be 0.5/2.5 = 0.2A or 200 mA."
If I put 4 Ohm there it would be 0.5/4 = 125mA or 0.5/2 = 250mA.
Following that sentence a 0.5 Ohm would lead to 1A or lower to even more and that SHOULD kill the LED but it doesn't, it doesn't with the cheap yellow and it doesn't with the IR diode

Never thought I could be unhappy NOT destroying a component but that is where I am now.
With the IR Led and 4.5 Ohm resistor:
timestime/microseconds/mA/mW
18:08:58.143 -> 70562044 10.00 10.00
18:08:58.189 -> 70581205 9.30 6.00
18:08:58.189 -> 70600310 6.10 6.00
18:08:58.189 -> 70619321 2.10 4.00
Re: Constant current IR LED circuit
ok 3 diodes and 2 Ohm: about 130mA
4 diodes and 2 Ohm: about 190mA
Maybe I should consider using a different transistor? The TIP120 is a bit too huge I guess.
4 diodes and 2 Ohm: about 190mA
Maybe I should consider using a different transistor? The TIP120 is a bit too huge I guess.
Re: Constant current IR LED circuit
It could also be that the GPIO pin can not provide enough current to drive the transistor + the 2 diodes.
Try taking out the diodes and see if it is any better.
Maybe I should consider using a different transistor? The TIP120 is a bit too huge I guess.
Agree just any jellybean NPN is OK (I usually use 2n4401 or similar....no need for power NPN)
Try taking out the diodes and see if it is any better.
Maybe I should consider using a different transistor? The TIP120 is a bit too huge I guess.
Agree just any jellybean NPN is OK (I usually use 2n4401 or similar....no need for power NPN)
Re: Constant current IR LED circuit
First of all, thanks for sharing your knowledge, and the opportunity to ask questions.
I'd like to try this circuit, but my supply voltage will be low.
To maximize range it seems worth looking, if a different transistor+diodes can leave more voltage for the LED.
However, I'm no expert, and afraid I might choose wrong parts.
Transistor:
To my untrained eye, ZXTN25100DFH is one of the best I've seen.
At least Vce(sat) is much lower than BC337, so that's good.
And other properties seem to be not _too_ different from BC337.
Except that it's made for a bit higher current, which I aim for anyway (1A).
Is this a good one?
That series also has parts with higher hFE and lower Vce(sat).
Then they don't need so much base current.
But my understanding is that at some point, it could also become too much to regulate?
Anyway, ZXTN25100BFH is just a little "stronger" than above.
For example at Ic=1A and Ib=20mA, Vce(sat) of the first one is 0.5V, while this one is 0.3V.
Would this one be better?
In case much stronger is better (I guess not), these are some others my shop has: ZXTN19100CFF, ZXTN25020BFH.
Diodes:
Of course diode voltage depends on current, I assumed 50mA.
If so, then SD103ASDM seems nice.
Vf is quite stable with varying current, and it's fast, so that's good.
It has 4 diodes. Chaining 3 of them, should result in 1.13V at 50mA.
Looking at the transistor Vbe graphs, I hope that voltage would be enough?
I estimate it would make Ve a bit less than in the blog, but not extremely.
If 1.13V is too low, I found other options.
In short, they should give respectively 1.22/1.27/1.30V at 50mA.
Though they are less convenient than that 4-in-1 part (I try to keep it small).
Or would one of those still be recommended?
Btw, I wondered if the diode voltage would be determined by the total base resistor current.
As that current in reality is shared with the transistor.
But looking at the blog measurements, (5V-1.2V)/3.3kR=1mA.
And the current where 1N4148 is 0.6V, is also 1mA.
So I assumed that calculation is somehow still correct?
I'd be grateful to hear your thoughts on this.
Maybe 1A/50mA is too much, at least those were handy values for datasheet reading and calculating.
When I have parts, I'll try what works.
Or maybe you already have an educated guess on that?
At least thanks for your attention, and of course the blog and this forum, much respect.
- - - 8< - - -
Some more details if needed:
Supply voltage:
I use a CR1216 battery, so after it's a bit depleted, 2.8V?
With help from 160uF, I send a very simple code:
Only 6x 38kHz carrier periods, then a long pause.
Sending that code with 1A at 25%, would drop the voltage to 2.6V, I calculated.
LED:
VSMB2943SLX01
It seems to have the same Vf/If curve as TSAL6x00.
So for example 2.2V@1A / 1.35V@100mA.
Signal (base/diode current):
Comes from Attiny25V, 5 pins parallel, that means at most 200mA.
Though the pin voltage then drops with 1.3V or something.
The above transistors have Vce(sat)=0.1V at Ic=1A and Ib=50mA.
So just to start somewhere, I assumed 50mA.
That would drop the pin voltage by 0.3V? That seems manageable.
Although a bit less current probably is also fine.
I'd like to try this circuit, but my supply voltage will be low.
To maximize range it seems worth looking, if a different transistor+diodes can leave more voltage for the LED.
However, I'm no expert, and afraid I might choose wrong parts.
Transistor:
To my untrained eye, ZXTN25100DFH is one of the best I've seen.
At least Vce(sat) is much lower than BC337, so that's good.
And other properties seem to be not _too_ different from BC337.
Except that it's made for a bit higher current, which I aim for anyway (1A).
Is this a good one?
That series also has parts with higher hFE and lower Vce(sat).
Then they don't need so much base current.
But my understanding is that at some point, it could also become too much to regulate?
Anyway, ZXTN25100BFH is just a little "stronger" than above.
For example at Ic=1A and Ib=20mA, Vce(sat) of the first one is 0.5V, while this one is 0.3V.
Would this one be better?
In case much stronger is better (I guess not), these are some others my shop has: ZXTN19100CFF, ZXTN25020BFH.
Diodes:
Of course diode voltage depends on current, I assumed 50mA.
If so, then SD103ASDM seems nice.
Vf is quite stable with varying current, and it's fast, so that's good.
It has 4 diodes. Chaining 3 of them, should result in 1.13V at 50mA.
Looking at the transistor Vbe graphs, I hope that voltage would be enough?
I estimate it would make Ve a bit less than in the blog, but not extremely.
If 1.13V is too low, I found other options.
In short, they should give respectively 1.22/1.27/1.30V at 50mA.
Though they are less convenient than that 4-in-1 part (I try to keep it small).
Or would one of those still be recommended?
Btw, I wondered if the diode voltage would be determined by the total base resistor current.
As that current in reality is shared with the transistor.
But looking at the blog measurements, (5V-1.2V)/3.3kR=1mA.
And the current where 1N4148 is 0.6V, is also 1mA.
So I assumed that calculation is somehow still correct?
I'd be grateful to hear your thoughts on this.
Maybe 1A/50mA is too much, at least those were handy values for datasheet reading and calculating.
When I have parts, I'll try what works.
Or maybe you already have an educated guess on that?
At least thanks for your attention, and of course the blog and this forum, much respect.
- - - 8< - - -
Some more details if needed:
Supply voltage:
I use a CR1216 battery, so after it's a bit depleted, 2.8V?
With help from 160uF, I send a very simple code:
Only 6x 38kHz carrier periods, then a long pause.
Sending that code with 1A at 25%, would drop the voltage to 2.6V, I calculated.
LED:
VSMB2943SLX01
It seems to have the same Vf/If curve as TSAL6x00.
So for example 2.2V@1A / 1.35V@100mA.
Signal (base/diode current):
Comes from Attiny25V, 5 pins parallel, that means at most 200mA.
Though the pin voltage then drops with 1.3V or something.
The above transistors have Vce(sat)=0.1V at Ic=1A and Ib=50mA.
So just to start somewhere, I assumed 50mA.
That would drop the pin voltage by 0.3V? That seems manageable.
Although a bit less current probably is also fine.
Re: Constant current IR LED circuit
I am travelling at present with limited time available, so here is a quick response:
- you will only get 1 IR led in series (becasue 2x1.8V = 3.6V)....unless you create parallel driver circuits.
- Don't think about 1A current. On USB power devices I would send a max of 300mA "peak" current thru an IR LED. Having 2 in series gets you double for free. (1A is often the stated max but only for very short bursts)
- You can play around with the transistors, but you will always need to test the voltage thru the base resistor with a scope to see what current you get.
- To get more driver current on the base, you could us another transistor to generate that rather than using up ins on the MCU. It is unlikely the MCU will be able to drive PWM on all pins simultaneously..
- You could also look at darlington pair...but would have to match the base resistor to the measured base voltage to drive the desired current.
- For battery powered devices a duty cycle of 33.3333% is the optimum value for power saving. You can design for you peak current after that.
In summary, you can try many different approaches but in the end you should measure the results and make changes accordingly before deciding on a final circuit design.
- you will only get 1 IR led in series (becasue 2x1.8V = 3.6V)....unless you create parallel driver circuits.
- Don't think about 1A current. On USB power devices I would send a max of 300mA "peak" current thru an IR LED. Having 2 in series gets you double for free. (1A is often the stated max but only for very short bursts)
- You can play around with the transistors, but you will always need to test the voltage thru the base resistor with a scope to see what current you get.
- To get more driver current on the base, you could us another transistor to generate that rather than using up ins on the MCU. It is unlikely the MCU will be able to drive PWM on all pins simultaneously..
- You could also look at darlington pair...but would have to match the base resistor to the measured base voltage to drive the desired current.
- For battery powered devices a duty cycle of 33.3333% is the optimum value for power saving. You can design for you peak current after that.
In summary, you can try many different approaches but in the end you should measure the results and make changes accordingly before deciding on a final circuit design.