This article allows you to turn ON and OFF LED’s using a cheap IR remote control. Here we used an available IR Arduino library so it was pretty easy to decode the signals transmitted by the infrared remote.

The LED’s which are connected to Arduino will be controlled by IR Transceiver module. IR Transmitter i.e., Remote transmits unique code to IR sensor wirelessly. IR sensor receives that signal and controls the LED’s which are connected to Arduino according to Code.

Required Components

Hardware

Circuit Diagram

LED Control Using IR Receiver – Circuit Diagram

Circuit Diagram Explanation

First of all, connect the LED’s with Arduino. Connect the positive side of the four LED’s to the pins 7, 6, 5 and 4 of Arduino and the negative side of LED’s to the GND of Arduino through the 220 ohm resistors. The resistors are necessary because they prevent the excess amount of current from flowing through the LED’s.

After that, make the connections of the IR sensor with the Arduino as follows

Then we defined the code for each button through which we want to control the led. If you are running the Arduino code for the first time then upload the Arduino code as it is and open the Serial monitor. Press the button from the remote and a code will be shown on the serial monitor for each button.

Whenever a button is pressed, a code is received by the IR sensor and is given to the Arduino. The Arduino will then compare it to the already saved codes and if any of the code will match then it will turn on the led connected to that code. If the LED is already light up and the same button is pressed again then the led will go down.

Working

Whenever a button is pressed on the IR remote, an IR led blinks thousands of time in a fraction of second and sends that data to the IR receiver in the coded form. The IR receiver receives this signal and sends it to Arduino.

Each button has a unique code. So we have saved the codes for the buttons to which we want to control the LED’s in the Arduino code. Now whenever a button is pressed, then an unique code will be received by the IR receiver and sends to Arduino. Then the Arduino compares this received unique code with the saved codes. If any of the code matches with the Arduino pre-stored code then Arduino will turn ON the appropriate LED light.