IR spoofer ? skipping the IR part entirely + floating a GPIO pin / transmitter pin?

So I’m trying to wifi-enable a ceiling fan. It has a super annoying IR remote, basically only reacts to well aimed shots from maximum three meters. At first I built an IR proxy, but at least with the weak transmitting LED I used it also had to be close and well aimed. Then I thought, since the fan has conviniently a sub-board with the IR sensors that gets 3 wires: 5V, signal, ground - why not just throw an ESP32-c3 supermicro in there and don’t deal with IR at all. So I tried a couple things, realised I probably need a level-shifter for 3.3 to become 5V output etc. The problem is not only I didn’t got it to work yet, but even having the transmitter-out pin connected alredy prevents also the remote from working. If I disable the transmitter, it usually works (I think now it stopped because the two BC547 level shifter I built also introduces some pull-down effects?)
So
Is there a way to force a GPIO pin, and particularly one used by transmitter component, to FLOAT unless currently transmitting?
or
Disable the transmitter component, and therfore stop the GPIO pin from being an output /pulled down, and only enable it for transmission?

I have a few ideas how to deal with it circumventing those problems (well basically coding all this in a massive lambda directly toggling the type and state of the GPIO and bitbanging the transmissions) but they sound both effort consuming and risky

Or, I’ll just stick an IR diode in there aimed directly at one of the recievers. Extra points for hacking, but significant penalty for style :wink:

Lot of words, but nothing clear.
Post some simple circuit drawing to understand better.

Are you aware that the receiver (“ir-sensor”) does demodulation as well? So carrier is removed before it outputs signal…
And that the IR receiver outputs ls low when transmitter outputs high?

If you prefer to go back to IR, with good transmitter circuit you can generally get 10m range without problems.

1 Like

Look at the bigger picture. A manufacturer needs to offer a device with remote control functionality. What technology to use, based on cost primarily, user requirements, and least amount of complications and technical support?

Look out there. IR standards have been out there for ages. Short range works well. Many chip makers offer a encode/decode chipset pair, even with cheap keyboard button encoding, and probably fan speed switching as a drop in solution. Easy choice and only adds cents when done by the thousands. The new fangled Matter needs licencing fees, and a lot of mucking around with smart devices and more expensive chips. Easy choice.

You come along, wanting smart home integration…

You could reverse engineer the IR protocol, keeping both the transmitter and receiver, and adding your own interface. Broadcom is one such vendor that offers smart home integration. You seem to have already explored this option somewhat. You could replace the entire control chain, deceiving the fan motor controller into believing it is getting signals from a remote, or just choose a fan with one that has inbuilt smart functionality. You also seem to have gone down that path and stumbled on signal level translation.

Do you keep IR, or go with another transport layer? BlueTooth, BLE, WiFi, ZigBee, Thread (gotta be trendy), or even 433Mhz? You seemed to have settled on WiFi.

You seem to have already got a fan device, and your time and technical resources is free. Reverse engineering is but a mountain to climb, to conquer.

First, what do you already have? Detailed photos of the PCB for the sender as well as receiver, both sides, with clear component and chip markings would be appreciated. Make and model of the fan, even the vendor website.

Next, what protocol does your IR carrier speak? Is it one of the standard ones supported by the common rc-switch subroutines developed by the Arduino community and incorporated in Tasmota and ESPHome ecosystems? Have you looked at recent posts here on these forums with people trying to decode 433Mhz and IR signals, with varying levels of success and understanding.

Does your phone offer an app to use the camera to decode IR signals? They are very sensitive on the IR end of the light spectrum. Point your remote at the camera and see for yourself. Usually signals are modulated at 38Khz. My old Samsung S6 used to have an IR blaster, very handy for changing the TV channel at the local McDonalds when you wanted to annoy the manager on a busy day, and put on the sports channel instead of the music channel, or the midday movie. Often you ‘accidentally forgot’ to change it back when leaving, forcing them to find their remote control hidden somewhere in the shop.

Have you looked at what ESPHome already offers for IR systems?

How much space and available power supply do you have in the ceiling fan? Do you need to still use the existing remote control, or will you abandon it and absorb control into your HomeAssistant ecosystem?

Post the photos.

1 Like

I did, in the end, went with just soldering an IR diode aimed at one of the IR recievers because I decided that getting points (from myself lol) for an elegant solution would not be worth the extra hours of work. I’ll call that poor mans optocoupler :v

2 Likes