Introduction: IRduino: Arduino Remote Control - Imitate a Lost Remote

If you've ever lost the remote control for your TV or DVD player, you know how frustrating it is to have to walk to, find, and use the buttons on the device itself. Sometimes, these buttons don't even offer the same functionality as the remote. Recently, one of my remotes went inexplicably missing, and I decided something had to be done to restore ease-of-use and lost functionality to my Blu-ray player.

After a bit of research, I learned that most, if not all, remotes use infrared (IR) to communicate with their devices (this is why you have to point the remote at the TV, for example). My thoughts turned to Arduino, and when I found an infrared LED among my sensors and gadgets, I knew I could make it work.

And now, here's how I did it.

Tip: make sure to click on the images and hover over the transparent tooltips boxes for detailed step-by-step instructions.

Step 1: Your Device and IR

To simplify the process of finding the IR codes for your device and integrating them into an Arduino program, I recommend you use the free application IrScrutinizer, which can be downloaded and is documented here. I will use IrScrutinizer in this Instructable to show you how to find and use IR codes for your device.

Before continuing with this tutorial, you should check to see if you can find codes for your device in IrScrutinizer. First download and install IrScrutinizer from the link above and execute the IrScrutinizer.jar file in the installation directory. Click on the "Import" tab near the top of the screen and choose the "IRDB" from the tabs that appear below. Follow the tooltips from the picture above the find the codes for your device.

Step 2: Assembling a Prototype Arduino Remote

Now that you have verified IrScrutinizer knows the IR codes of your device, you're ready to build a prototype Arduino Remote to test them. Above is the design I used. A few important points: use an NPN transistor, connect its base with Arduino digital pin 3, and use an infrared LED (not a normal color one). The resistor I used was about 300 ohms so anything in that neighborhood should be fine.

Step 3: Preparing the Arduino Development Environment

You need a library that will enable your Arduino to control the IR LED to produce the codes for your device. I used IRremote, the oldest yet most stable and reliable infrared library. Follow the installation directions on its homepage to download the library and install it into your Arduino IDE. Here is a great tutorial on how to install a library.

After installing the library, you should be able to access its examples from the IDE. Look them over a bit to familiarize yourself with the library.

Step 4: Generating the Arduino Program

A truly great feature of IrScrutinizer is its ability to generate a full, if unimaginative, Arduino program containing all the IR codes you wish to include with a simple mechanism to send them through an infrared library, including IRremote. In IrScrutinizer, select all the signals you wish to be able to send in the left pane of the "Import" screen and click the "Import selection" button, or just click the "Import all" button. You will be taken to the "Scrutinize remote" screen where you can verify you imported all the codes you want. Click on the "Export" tab to go to the export screen. Enter all the correct settings there as show in the picture above and click "Export param. remote" to create the Arduino program.

Now, open the generated program with the Arduino IDE. The program is quite simple; it defines all the IR codes you selected as global variables and in the loop function allows you to choose which one to send through the Serial Monitor.

Step 5: Testing the Arduino Remote

Make sure everything is correctly wired and connect the Arduino with your computer. With the IR program open in the Arduino IDE, verify the settings for your board are right and upload the program. Now, point the IR LED at your device from where it can easily pick it up (closer is better) and use the Serial Monitor to choose which signal to send.

Did it work? If it did, congratulations, you have built an Arduino Remote Control and no longer have to worry about your lost remote. If it didn't, review all the steps above to see if you missed anything. Also feel free to post a comment describing your situation.

Step 6: Thoughts for Improvement

This Arduino Remote prototype you've assembled, programmed, and tested is really quite unwieldy and awkward to use.

If you want to improve your Arduino Remote, I have a few ideas to offer you however. Instead of using a development board like the Arduino Uno along with a breadboard, you could use something like an Arduino Nano in some type of enclosure possibly with buttons like a true remote control.

Another way to get around the issue of having to have your computer around to use the Serial Monitor to control the Arduino Remote would be to add an IR receiver module to receive IR codes from a remote you haven't lost (yet) and convert them to codes your device understands.

Shortly before finding my Blu-ray remote, which ultimately spelled the death of this project's continuation, I upgraded my IRduino to do just that, namely receive IR codes from another remote, converting them to my Blu-ray player's codes before rebroadcasting them again. Unfortunately, soon afterwards, IRduino was no more.

The only surviving part of IRduino is its program, which can still be found at https://github.com/gttotev/IRduino. Apologies for all the hardcoding, cryptic comments, magic numbers, and utter lack of documentation. It's IrScrutinizer's fault! But really I should have put more care into my code. Looking back on it now, a year later, I almost cannot decipher what is happening (or supposed to be happening). For next time then!

This concludes the Arduino Remote Control Instructable. Thanks for reading.