IR Receiver Distance Issues

So the long-short of things is, I have setup an IR Receiver and an IR Transmitter using the ESPHome components and they all work as they should controlling my TV and Amp… HOWEVER, only after putting it in place did I come to realize that the receiver/ESP8266 is only identifying codes from up to a few feet away. From across the room, the indicator LED on the receiver flashes when I push a remote button, so I know it’s seeing it, but apparently it’s a weak enough signal that the ESP isn’t able to decode it. I’ve tried tweaking the IR Receiver configuration options to no avail and also tried another IR Receiver (as well as an ESP32) to make sure it’s not a hardware issue. I was originally using a resistive divider to drop the receiver output from 5V to 3.3V but removed it (I assume the receiver is just passing an analog signal along?) with the same results.

I’m curious if this is normal or if other folks have definitely had luck at longer distances. Here is the specific receiver I’m using:
https://www.amazon.com/dp/B08YK39N85

substitutions:
  friendly_name: Remote Controller
esphome:
  name: remote-controller

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

ota:
  password: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: $friendly_name Hotspot
    password: "xxxxxxxxxxxxxxxx"

captive_portal:

web_server:
  port: 80

sensor:
  - platform: wifi_signal
    name: $friendly_name WiFi Strength
    update_interval: 60s
  - platform: uptime
    name: $friendly_name Uptime

text_sensor:
  - platform: wifi_info
    ip_address:
      name: $friendly_name IP Address

status_led:
  pin:
    number: GPIO2
    inverted: false

remote_receiver:
  pin:
    number: GPIO14
    inverted: true
    mode:
      input: true
      pullup: true

binary_sensor:
  - platform: remote_receiver
    name: "Pioneer Receiver Power Input"
    pioneer:
      rc_code_1: 0xA51C

remote_transmitter:
  pin:
    number: GPIO12
  # Infrared remotes use a 50% carrier signal
  carrier_duty_percent: 50%

button:
  - platform: template
    name: "Pioneer Receiver Power"
    id: pioneer_receiver_power_button
    icon: "mdi:power"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0xA51C

  - platform: template
    name: "Pioneer Receiver TV"
    icon: "mdi:television-classic"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0xA50C

  - platform: template
    name: "Pioneer Receiver Music"
    icon: "mdi:music"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0xA54C

  - platform: template
    name: "Pioneer Receiver Volume Up"
    icon: "mdi:volume-plus"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0xA50A

  - platform: template
    name: "Pioneer Receiver Volume Down"
    icon: "mdi:volume-minus"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0xA50B

  - platform: template
    name: "Pioneer Receiver Volume Mute"
    icon: "mdi:volume-mute"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0xA512


  - platform: template
    name: "Vizio TV Power"
    icon: "mdi:power"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0x2008

  - platform: template
    name: "Vizio TV Input"
    icon: "mdi:video-input-hdmi"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0x202F

  - platform: template
    name: "Vizio TV Up"
    icon: "mdi:arrow-up-bold"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0x2045

  - platform: template
    name: "Vizio TV Down"
    icon: "mdi:arrow-down-bold"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0x2046

  - platform: template
    name: "Vizio TV OK"
    icon: "mdi:hand-okay"
    on_press:
      remote_transmitter.transmit_pioneer:
         rc_code_1: 0x2044

Right now, the ‘binary sensor’ is the only part of it I have setup to receive a known remote code. Was planning to setup a similar sensor for all of them, that way I could tape over the device IR receivers and have ESPHome handle everything as well as ultimately store the known volume levels, etc. so I can have HA automations to adjust things based on what I’m doing (watching TV, listening to music, etc.)

This is one of those projects that I thought would take like 30 minutes, but I’ve since spent WAY more time on than that. :slight_smile: Open to getting a new receiver if that’s what I need to do, just don’t want to spend more time/money if it’s a fool’s errand.

Thanks a ton in advance for any help!

1 Like

I have an ESP8266 setup to decode IR remote signals and forward commands to a roku over the network. I believe the initial IR receiver module I was using was sensitive to wifi interference. It worked fine for testing IR with just a serial connection. Once wifi was added to project, IR performance was very degraded. I got a bare IR receiver (TSOP14438) from digikey.com that advertised RF/environmental immunity which resolved my issues.

Relocating your receiver relative to the wifi antenna might be enough to improve performance.

Thanks for the insight! In my case, I don’t THINK that’s it (unless it’s getting noise via the 5V or GND pins). My IR receiver is several feet from my ESP8266.

Has anyone else ran into this situation?

These boards have a fairly good range.
At least 3-4 m.
You can also modify the board with adding a second IR diod and/or put them on a wire to extend them to the position you want.

I don’t know why but aliexpress always direct me to the french page.

To make sure nobody is blocking the signal I added an arm to the TV and placed the diod there.

1 Like

@Hellis81 Interesting. I’m not really familiar with the ESP8255; is it compatible with ESPHome?

Also, my issue is with the receiver range, not the transmitter.

Interestingly, I decided to mess with it some more today and suddenly I couldn’t get it to decode anything at all. Through a lot of WTF trial and error I narrowed the cause down to the fact that I used a different wall plug USB adapter. Switching back and forth multiple times confirmed it. For fun, I then used a USB port on my laptop and immediately noticed that the flickering on the IR Receiver indicator LED stopped as well as the range increased quite a bit. Clearly the USB wall plugs I have are noisy (although I’ve used them on countless other projects without any issues).

Regardless, my range was still too limited for my use-case (maybe 6ft/2m+). Does this seem normal to what other folks have seen? Compared to the IR receiver on my amplifier that I’m trying to replace, it’s pretty terrible. I get a solid 15ft/4m+ and can usually point the remote pretty much anywhere in the room and it’s still able to pick it up.

Yes you can flash it with ESP-Home.
Not sure about the receive range. Never tested that.

My experience and observations are that a lot of remote issues are somehow hardware related.

I know you’ve done quite a bit of hardware quarantining but I would continue with that.

Have you tried an esp32 + a solid power supply?

I know you said you tried each, but have you tried them together? With your best power supply (from your phone etc). Just a thought…

Good to know, I’ll have to keep that in mind. Thanks for the info!

Definitely matches to my experience as well.

My last post was doing just that; I used my laptop as the power supply and definitely saw significantly increased range, but still less than what I need (and what the IR receivers on my TV and Amp that I’m trying to replace have).

At this point, I’m really just curious if anyone has had luck with an IR receiver going beyond 15ft/4m+, or if that’s a limitation of how ESPHome decodes the signals.

I can’t test the range of ours since it’s mounted behind the TV.
I’m not using the receive with this device

@Hellis81 No worries, thanks for your help and introducing me to a new device!

I did some additional testing; used a known good power supply and went back to dumping all the codes while trying different distances (thought maybe the codes were getting scrambled slightly at a further distance). The codes were always the same, regardless of distance (if it picked any up at all). However, I also noticed that the indicator LED on the IR receiver flashed only when the ESP was able to ‘see’ a code and it didn’t flash at all when it wasn’t able to ‘see’ a code, so it seems to definitely be a range issue with my specific IR receiver and not ESPHome.

Guess I’ll have to try getting another IR receiver to see if it has better range. Visually they pretty much all look the same; does anyone have an IR RECEIVER they’ve used that had good range (i.e. across a room)? The only ones I’ve found that actually look to be legitimately different are ones made specifically for devices that have a port such as this one:

I may just order one of those and see if I can make it work and whether it has better range. Of course, for a few bucks more I could get a repeater and have the transmitter taped to the front of my existing receiver, but that just feels… silly.

My remote (Logitech Harmony 880) works with the module I posted above consistently at 25 feet. It sits on top of my tv stand. The ESP8266 feather board and the IR module sit entirely enclosed in a 3d printed PLA case. Interconnecting wires are fairly short (30mm or so). (FYI, some PLA plastics are translucent in IR spectrum so case doesn’t have a cutout for the IR module). However, this one isn’t running ESPHome. Software is here.

Thanks! That’s super-helpful to know. I don’t normally order stuff from there, so the shipping is more than the part(s). But I might just go that route…

I do wonder if part of it is your remote though. I would think they’d put SUPER bright IR emitter(s) in a premium product like that versus the cheapo remotes that just comes with stuff.

Off the shelf products tend to have arrays of transmitters and receivers.

But that seems to be more about making them send/receive multi-directional rather than an amplifying thing…

Although I recall this one seemed to have 4 all pointing in one direction.

@Mahko_Mahko Makes sense. I actually tried putting 2 receivers in parallel and it didn’t help (and maybe made it worse, can’t remember for sure).

1 Like

Thanks to @mulcmu for recommending the TSOP14438 IR receiver. Ordered a few and after getting them wired up and configured correctly in ESPHome I got DRAMATICALLY better reception range than the original IR receiver I was using. Doesn’t really look any different/bigger, but clearly the internals are much higher quality.

Now I just need to get things off of a breadboard and soldered up nicely.

3 Likes