A previous maker.io article discussed (Related Blog link) how it’s possible to receive, decode, and send IR signals using an Arduino and the simple IRremote library. This article builds upon this and explains how to use an Arduino to construct an intelligent learning custom IR remote control that can control any electronic device that comes with an IR remote control. The finished project allows its users to, for example, operate multiple different devices employing only a single remote control. This article focuses on the hardware aspect of the project, while the next article in the series discusses the software side.
As mentioned, this article builds upon earlier ones, and readers should familiarize themselves with the basics of IR communication protocols and how to use them on an Arduino before reading on. Additionally, the IRremote documentation contains helpful tips and compatibility information.
The following parts were used to build this project:
The circuit for this project looks simple, but it uses a high-level view of the universal IR receiver and transmitter module discussed in an earlier article. It is, however, also possible to use any other IR module to build this project.
View the full Schematic at Scheme-It.
It's possible to use any digital pin of the Arduino for connecting the buttons. The IR LED must, however, be connected to D3 on the Arduino Uno because the IR library uses hardware PWM to pulse the infrared LED data with the correct frequency. Note how the buttons directly connect to GND without the need for pull-down or pull-up resistors. This way, the circuit is smaller and uses fewer components, and it also means that the Arduino sketch will have to use the internal pull-up resistors so that the input pins are not left floating.
The IR receiver and sender circuit looks like this:
The infrared LED uses an additional NPN transistor as an amplifier because many IR LEDs require more current than the Arduino can safely supply. Directly connecting it to the Arduino will most likely not cause any harm to the components. It will, however, limit the effective range of the LED. Therefore, it makes more sense to employ an additional battery that can supply enough current, and that allows the LED to operate as intended.
As mentioned in the introduction, the finished product serves as a learning remote control. Users may push the button labeled S4 to instruct the Arduino to listen for incoming IR signals. If the Arduino receives a valid IR signal, it stores the decoded input and assigns it to one of the replicate buttons in ascending order. The user can then press any of the buttons S1 through S3 to replicate a previously recorded infrared sequence.
Previous articles gave an overview of infrared communications and the theory behind it. This article discusses how to apply the theoretical aspects in a practical project. For that purpose, this article introduced an Arduino-based circuit that implements a learning remote control. Users can capture signals from any conventional IR remote control and instruct the Arduino to replicate previously-stored samples. All this only requires a few components and a simple circuit which makes this an intriguing project for beginners and more experienced makers alike.