You are welcome
In the LEDnique circuit, assume the transistor base currents are small (Hfe is large, say >100). The current through the LED also flows through Q1 collector, emitter and the current sensing resistor R2.
When the current rises to ~0.6V, the Q2 base-emitter srarts to be forward biased, turning Q2 ON. Q2 bleeds the Q1 base current, reducing the Q1 collector current.
This feedback loop thereby limits the Q1 collector current such that 0.6V is developed across R2.
These loops work up to a fequency in the order of 100MHz. So damn quick as far as your LEDs are concerned.
This constant current circuit 'costs' 0.6V plus Vbe. Vbe can be from ~0.1V to the full supply. Better 'compliance' than a resistor.
Hopefully, this explanations helps you understand.
Depends.
If the supply is fixed, then it's indeed overkill, but it is a good idea on battery power.
A current limiting resistor also does, and maybe more so
That's max continuous current.
IR transmit diodes can take much larger peak currents.
See the datasheet for max current at different pulse/pause ratios.
200mA is a safe value. Then pulse/pause can be up to 50%.
That would have been the base CL resistor for the 2N2222, not the LED CL resistor.
Hfe is irrelevant for a simple switching circuit (reverse biased collector/base).
See the saturation graph in the datasheet for IC:Ib values.
The transistor in a constant current driver is usually not saturated, so Hfe could be valid there.
Leo..
The second circuit uses a random IR LED that has a max of 38mA current limit so I thought the current passing through that LED would be 38mA. I don't have any data sheet for the LED and now looking back I'm surprised that it hasn't burnt.
Now with the working circuit the sending power should be much more than either of my previous circuits.
RE stevemj #21 and #22:
I understand the current limiter now! Such a clever design.
Also I just came up with this random 500mA number. I did not have any way to measure what the actual current is without a multimeter when using a 1k base resistor. Now it seems the previous current was quite small as the IR signal struggled to reach the heater.
RE Wawa #23:
I saw in the data sheet of the 2N2222 there are different parameters under AC current, specifically Hfe vs HFE. Does this matter since the signal I'm trying to send is in 38kHz NEC protocol?
I got my multimeter but it's hard to measure VCE since the LED can only be pulsed (100mA continuous and 1A peak pulsed) at this setup. I did measure my Vcc since I doubt 4.8V would supply enough voltage for the whole board, and I only got 3.07V. Luckily it is still enough for the remote signal.
You will damage the LED with >100mA at a slow rate.
With a 220ohm base resistor the 2N2222 is surely fully saturated, and will only drop ~0.2volt.
You know Vf of the LED (graph), and supply voltage (which is hopefully bypassed with >= 470uF).
Then you can simply calculate LED current from the LED current limiting resistor.
If you can't reach the distance with 200mA peak LED current,
then think "more LEDs", not higher current.
Leo..
I'm not sure how to read from the VCE graphs to determine if the NPN is saturated. Does a voltage higher than 0.6V (the first one) mean the NPN is fully saturated?
What also confused me is that VLED remains unchanged across different power sources, even though their VCC measurements are far apart.
As references, here are the graphs for a single red LED in series with a 330Ω resistor connecting directly to an Arduino pin without a transistor: