Transmitting IR LED (left) and receiving IR photo sensor (right)
IR, or infrared, communication is a common, inexpensive, and easy to use wireless communication technology. IR light is very similar to visible light, except that it has a slightlty longer wavelength. This means IR is undetectable to the human eye - perfect for wireless communication. For example, when you hit a button on your TV remote, an IR LED repeatedly turns on and off, 38,000 time a second, to transmit information (like volume or channel control) to an IR photo sensor on your TV.
This tutorial will first explain the inner workings of common IR communication protocols. Then we will go over two examples that will allow you to transmit and receive IR data using an Arduino. In the first example, we will read incoming IR data from a common remote control using the TSOP382 IR photo sensor. The next example will show you how to transmit data from an IR LED to control a common appliance, for example your home stereo.
All of the gritty signal processing is handled by a great Arduino library written by Ken Shirriff and allows you to easily send and receive IR data. For additional details on how the IR Arduino library works, see Ken’s blog here. Also, the code examples used in this tutorial are found in the examples directory in the library.
Here are some concepts that we will be covering in this tutorial.