Home > Projects > Robotics – Automation Projects > Arduino All-In-One Remote

Arduino All-In-One Remote

Summary of Arduino All-In-One Remote


This article guides users in building a universal infrared remote using an Arduino to consolidate household remotes into one handheld device. The project involves capturing IR signals from existing remotes and storing them to be re-emitted via a custom interface with an LCD keypad shield, eliminating the need for multiple controllers.

Parts used in the Arduino All-In-One Remote:

  • Arduino (specifically a copy of the Arduino UNO)
  • LCD keypad shield
  • Infrared LED (~940nm)
  • Infrared sensor
  • Computer capable of running the Arduino compiler
  • Female pin headers (if not included with the shield)

Now you can have all the remotes of your house in a device that fits in your hand with Arduino, never fight for who has the TV remote again!

To make it you will need:

  • Arduino (I used a cheap copy of the arduino UNO).
  • LCD keypad shield, (I bought mine from dealextreme)
  • 1x Infrared LED (standard ~940nm)
  • 1x Infrared sensor.
  • A computer. (That can run the arduino compiler program)

Codes/Programs:

  • Program for gathering signals (download here)
  • Main program (download here)
  • Video program (download here)

Step 1: Intro:

Arduino All-In-One Remote

Infrared light has been used quite a lot for many different applications in many fields, one of them is communication, specifically between remotes and domestic devices, what allows us to control them without leaving the comfort of our sofa.

The process of communication between an emitter (the remote) and a receiver (the device) starts when the user presses any button of the remote, this device has an oscillator and a preconfigured chip that allow the signal to adopt a square waveform with a frequency of 39kHz, depending on the button pressed, the chip will use a determined signal code.
This signal travels through the circuit until it reaches the infrared LED, which transforms it into a series of pulses of invisible light (~940nm). If any sensor it’s in it’s range those pulses will be transformed into a quadratic wave that will indicate what to do according to the programming of the device.

To create a remote we want to capture those pulses, which will have a certain amplitude in time, we also want to know the time between those pulses so we can reproduce those pulses with voltage and time as the only variables.

Step 2: The hardware.

In this instructable we won’t need to work hard creating complicated circuits, instead, our work will be centered on the code we are going to implement.

The hardware we are going to use is the Arduino and the LCD keypad shield, which will help to visualize the menu that will order the codes by their function and the remote they come from .

Notice that this shields usually come without the pin headers, without them we won’t be able to use the pins that remain free.
If your shield don’t has them just go to your local electronics store and buy a female pin header, cut it and sand the edges with sandpaper, then just solder them into place.

We will use 2 different setups depending on whether we want to gather of send the codes:

Step 3: Gathering the codes.

Before we can create a functional remote we will need to gather the codes of the remotes we want to use, we will use an infrared sensor to do so.

To set up the circuit, we can follow the sketch in the pictures, connecting the signal pin of the sensor to the pin 2 and the other pins to 5V and ground.

The code we will be using is from an Adafruit tutorial, I made some changes in order to make our job easier.

Now comes the boring part, once the code has been uploaded and the sensor connected we go to “Tools” and we click on “Serial Monitor”. You will see a message that says “Ready to decode IR!”, now, by pressing any key of the remote while facing the sensor, we will be able to obtain the code.

Arduino All-In-One Remote circuit

If you use the version I provided the readings will appear in a code form ready to be pasted and interpreted by the Arduino main program, we just need to take care of storing this code to avoid losing it, to do so we can open a .txt to paste and label this signals now converted into code.

IMPORTANT: the program reads the time the signal is high as well as it is low, before you send the signal the program is already counting the time it is low, that time will appear as the first reading and it is useless so it must be deleted. Also, many of the code is unnecessary since it’s repeated to make sure the device get’s it, if you can find a pattern I suggest you to cut the code and save space, if you just copy and paste it all it’s OK but you might be pasting too much redundant information.

TIP: If the Arduino compiler show this message “Serial port ‘COM3’ not found. Did you select the right one from the Tools > Serial Port menu?” your Arduino isn’t connected or the port isn’t recognized.
Once we have all the codes we want we can move on to the next step.

 

Step 4: Preparing our code: menus and submenus

Before being able to send the codes we need to visualize what are we sending, we will need to create a menu with all the functions (or submenus) we want to use.

Creating a menu it’s easy, but it can be quite confusing, I’ve added lots of comments about the functions of each part in the main code.

I would have liked to use a library but instead I built it all in a single monolithic program so you don’t have to download anything else, that way it’s easier to learn how it works, creating a menu is quite useful and a must-learn task for every programmer.

 

For more detail: Arduino All-In-One Remote

Quick Solutions to Questions related to Arduino All-In-One Remote:

  • How do I connect the infrared sensor?
    Connect the signal pin of the sensor to pin 2, and the other pins to 5V and ground.
  • What frequency does the remote signal use?
    The preconfigured chip uses a frequency of 39kHz to adopt a square waveform.
  • Can I build this without downloading extra libraries?
    Yes, the author built the menu system in a single monolithic program so no additional downloads are needed.
  • What should I do if the serial port is not found?
    Ensure your Arduino is connected properly or select the correct port from the Tools > Serial Port menu.
  • How do I clean up the captured code data?
    Delete the first reading which represents the initial low time, and cut out any redundant repeated patterns to save space.
  • What happens when I press a button on the original remote?
    The chip generates a specific signal code that travels to the IR LED, transforming it into pulses of invisible light at ~940nm.
  • Why might my shield not work immediately?
    Shields often come without pin headers; you must buy, cut, sand, and solder female pin headers to access free pins.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top