The infrared (IR) communication technology, which existed long before WiFi and Bluetooth, is still a key component in implementing major components of a typical home automation system. For example, IR technology is still used in cordless headphones, for intrusion detection in home security systems, and in handheld remotes for controlling home entertainment systems (TV, DVD, soundbox, etc), air-conditioning units, and other household appliances. Because IR technology requires a line-of-sight between the transmitter and receiver units, it can only be used for connecting devices in short range, like in a same room.
In one of my previous articles, I wrote about a simple IR remote control circuit based on the CD4017 decade counter IC. That was capable to switch on and off any home appliance hooked to it by using any TV/DVD remote. Today, I am going to show how to make an Arduino-based IR receiver for decoding the IR signals coming from a TV/DVD remote. Based on the decoded values corresponding to specific buttons on the remote, we will program the Arduino to control multiple relay switches.
The IR signal transmitted by a remote can be easily interfered by other nearby IR sources, such as heaters and incandescent lamps. Therefore, in order for the receiver to distinguish between the IR signals and all other sources of infrared noise, the transmitted IR signal is modulated. For modulation, a stable carrier frequency (typically 30–60 kHz) is required, with 38Khz being the most commonly used carrier frequency. Although there are several digital modulation techniques, most of the modern consumer electronics use Amplitude Shift Keying (ASK) for designing IR remote control units. In ASK, the amplitude of the carrier is varied in accordance with the digital input signal. Logic 1 is represented by a carrier signal of certain amplitude, while logic 0 is represented by changing the carrier amplitude to zero (or turning it off). You can find a lot more detail on IR modulation schemes in the following application notes:
In this project, we will use IR signals coming from a TV remote for controlling multiple relay switches. In order to do that, we need an IR receiver circuit that would demodulate the IR signals transmitted by the TV remote. The demodulated digital output can be then directly interpreted by Arduino.
The receiving circuit for this project is built with the TSOP1740 IR receiver. The TSOP17XX series are miniaturized receivers with photo detector and preamplifier built in one package and are ready to use for infrared remote control systems. A bandpassfilter, an integrator stage and an automatic gain control are also used inside to suppress unwanted noises. The last two digits (XX) of its name represent the center frequency of the bandpass. Therefore, the TSOP1740 operates for a modulated IR signal of 40 KHz. For more details on TSOP17XX receiver, check the datasheet.