Sending IR signals only works intermittently

You are welcome :slight_smile:
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.

SleepyOrange wants to put 500mA through the diode.

SleepyOrange: its your project so you choose what you feels suits you. :wink:
Steve :slight_smile:

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..

I ended up putting two LEDs in series with a 220 ohm base resistor as Wawa mentioned
???

Thank you everyone for all the suggestions!


RE ArminJo #20 and #24:

Sorry for my bad English. What I meant is: I ended up [putting two LEDs in series] with [a 220 ohm base resistor] as Wawa mentioned. So like this:

Except that everything is < 4.8v instead of 5v. This has been working fine for the past few hours. Yay!

I think I messed up the description for my circuit for that part too. I have two configurations at the beginning, both works only intermittently:

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?

image

Try a 220R base resistor, then measure the Vce voltage, what is the voltage when the LED is told to turn on ?

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.

Do a quick test, write a routine that turns on/off the LED at a slower rate.

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..

Trying to determine if the OPs transistor is saturated as you expected.

Would be nice if there was a scope in the mix.


Have been caught by the word surely too many times in the past :wink: .

RE LarryD #26 & #28:

I programmed the Arduino to perform manual PWM (1%, pulse width 100us) on the IR LED circuit like this:

void loop() {
  digitalWrite(pin, HIGH);
  delayMicroseconds(100);  // Spec sheet: Max allowed pulse width = 100us
  digitalWrite(pin, LOW);
  delayMicroseconds(9900);  // Spec sheet: Max duty cycle = 1%
}

And measured voltage across a single IR LED & VCE with the following combinations:

  • Power source
    • Computer to Arduino micro USB (actual VCC is 4.86V)
    • 4.8V battery pack (actual VCC is 3.03V)
  • Current limiting
    • Using two IR LEDs in series
    • Using one IR LED in series with a 220Ω resistor (your suggestion in #26)

Here are the oscilloscope graphs:

Power Source Configuration VLED VCE
Arduino IR LED x2 graph graph
Battery IR LED x2 graph graph
Arduino IR LED + 220Ω graph graph*
Battery IR LED + 220Ω graph graph*

*Scales are different

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:

Power Source VLED
Arduino graph
Battery graph

They are also quite close.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.