IR Sender range - where did I go wrong?

I’ve got a TCL Android TV and in a recent update they’ve stopped it responding to HDMI-CEC when asleep as well as put the TCP/IP stack to sleep. Upshot is that it doesn’t wake up for anything other than an IR command for power toggle. I tried a Broadlink box but lost patience when it required me to totally reconfigure my wifi to make it happy…and it should be possible to do it safer (I have trust issues!) with ESPHome, right?

So I picked up some ESP8266 boards, some IR LEDs and receivers and made up a PCB to switch a pair of them using a PN2222A transistor. Power is 5V from the 5V pin on the ESP. 330 ohm resister to current limit before each LED (in parallel) and a 1k resistor between the base pin of the transistor and the GPIO.
I’ve picked up some codes for my amp (Pioneer command set) and the TV (Raw command set) and they work when I transmit them…but the range is little over 1.5m. ESP is powered by micro USB. Is there a very low current limit out of the 5V pin or are the LEDs too weak/inappropriate. Anyone done this and got less disappointing results?

Thanks in advance,
Gareth

You are actually getting freaking good results from that circuit. Narrow angle led?
Don’t drive leds in parallel. Use either single one or two in series.
Your led resistor should be more close to 33ohm than 330ohm.

Cheers. Helpfully there are no specs for the IR LEDs so I’m not sure of the angle but even pointing directly at the TV, the range is short.
I also can’t calculate the correct resistance required and guessed a fairly common value. Are they commonly very different in requirement or is it just that because they’re being pulsed and on for quite short periods that it’s acceptable to over drive them?

Why series in preference to parallel? I know it appears that I’m asking for answers and then refuting them but I’m just trying to understand what I could do better.

Anything wrong with the rest of the circuit? The transistor is from a set but seemed to be capable of switching in the MHz range.

Guessed common resistor value?? :grinning:
It’s not important to know the angle, I was just surprised that you got 1.5m from that circuit.
So, while you can drive leds in parallel, if possible drive them in series. Google for more info, if interested.

Anyway , the issue of you circuit is that 330ohm resistor, you get about 10mA through your led. But you should look for much higher. Swap it to 47ohm and observe your range improvement. If you are sure that in your code you only run common IR pulses with that led (not continuous high), you can go even lower 33ohm… 22ohm…
I personally drive them with single digit resistors. No problem to get 10+m range.

I remember a post on DIY IR blaster a few years ago and the advice was to not use any resistor as it boosted the distance and the user had been using that way for years and had never burnt out a IR LED as it was such a short burst.

For ir led I agree, many remore controls don’t have resistor for led, they count on AAA battery resistance. But generally it’s better to have some >10ohm resistor to stay within specs of transistor and power supply.

Ok, thanks guys. I’m going to try changing out the resistors but first I’m trying to check if the transistor is actually saturated or not as that could be providing less voltage than I was expecting…and was blissfully unaware was even possible. I’ll come back when I get somewhere. Cheers.

Your base resistor is unnecessary high, drop it to 330-470 if you want to drive with high currents.