Cloning an IR remote to integrate it into other systems
Cloning an IR remote to integrate it into other systems
As a part of a bigger project I need to integrate LED strips into a bigger system. The LED strips that we currently have are controlled by IR remotes. My goal is to control the LED strips via WiFi. I have two sensors available which look promising: An IR receiver and an IR sender module.
Since I do not have the remote at home, I will try to clone my TV remote for now.
For this, I connect the IR receiver to an Arduino Uno and try to read the signals of my remote. This should be easy? Right?
Reading signals from my remote
To my big surprise, it was easy. The sensors I have are part of a kit which comes with a lot of diagrams and code examples. I upload the example code and instantly manage to read the signals send by my remote. This was so much easier than expected. For example, the power on/off button seems to be 20DF10EF
Sending signals
Now I ‘only’ need to send the same signals with an ESP8266. I chose an ESP8266, since I need WiFi to interface with the exisiting network. An ESP32 would also work just fine, but those are more expensive and overkill for this scenario.
In order to see if the infrared LED is working, I use my phone camera. Most diagrams that I find only use the ground and signal pin. Nothing shows. After a while, I find another diagram which also connects the 5v pin.
As it turns out, the LED seems to have been in the wrong place in my box. It started flashing in different colors. Damn it. Now I need to find the correct LED. As it turns out, the correct LED seems to be dead.
So I had to wait for a new one to be delivered. When the new LEDs finally arrived, I put together a simple demo, which allows me to turn on my TV with the ESP. My TV however, was not the target device. The LED strips are used by an association that I am part of. Since we work with kids, I needed a case for the ESP and the IR LED. I found a nice case on printables, which I was able to adapt for my use case and print it.
With the preparation done, I took the project with me to the next event in order to get the remote cloned. Reading the codes was, once again, easy. While testing the cloned remote one color refused to work. I was stumped. The other colors worked, so I thought that I must have read a bad signal for one color. To this day, I do not know what went wrong; Repeatedly reading the signal always returned the same signal. After reuploading the code to the ESP (without changing anything), the color worked. Why? I have no idea.
You can find the final project on my Codeberg