Introduction: Control Your Home Appliances Using IR Remote

Hello everyone, In this instructable we will be using Arduino And Relay module to control home appliances using IR remote.

Controlling home appliances using IR remote is basics of home automation.

Once done you can use the same method to control other appliances around your house like Fan, Coffee maker, e.t.c.

How it works?

  1. When you hit a key on your remote, the transmitting IR LED will blink very quickly for a fraction of a second, transmitting encoded data.
  2. The Arduino recive these encoded data using IR receiver and performs a pre-specified function.

Step 1: Gather the Parts

In order to remote control your home appliances you'll need:

  1. A breadboard
  2. A LED
  3. An Arduino
  4. A TSOP382 IR receiver
  5. A 5V Relay module
  6. Some jumper or hookup wires

Step 2: Wiring

Hookup all the components according to the circuit diagram shown above.

If you haven't already, check my previous instructable on how to wire up a Relay module to Arduino.

Step 3: Receive IR Signals

Download Ken Sherrifs IR library from github then add the library to "Arduino installation location\libraries\"

Then upload the following code to your arduino:

#include

int IR_Recv = 2; //IR Receiver Pin 2

IRrecv irrecv(IR_Recv);

decode_results results;

void setup(){

pinMode(13, OUTPUT);

Serial.begin(9600); //starts serial communication

irrecv.enableIRIn(); // Starts the receiver

}

void loop(){

if (irrecv.decode(&results))

{

long int decCode = results.value;

Serial.println(decCode);

irrecv.resume();

}

}

Then open the serial monitor on your arduino IDE and receive IR decimal signals by pressing buttons on your remote for this project we'll need two IR decimal signals.

Step 4: Arduino Sketch

Upload the following code to your arduino after replacing 2340092731 and 2086679999 with your IR remote decimal code:

#include

int IR_Recv = 2; //IR Receiver Pin 2

IRrecv irrecv(IR_Recv);

decode_results results;

void setup(){

pinMode(13, OUTPUT);

Serial.begin(9600); //starts serial communication

irrecv.enableIRIn(); // Starts the receiver

}

void loop(){

if (irrecv.decode(&results))

{

long int decCode = results.value;

Serial.println(decCode);

if (results.value == 2340092731)

{

digitalWrite(13, LOW);

Serial.println("Bulb turned ON");

}

if (results.value == 2086679999)

{

digitalWrite(13, HIGH);

Serial.println("Bulb turned OFF");

}

irrecv.resume();

}

}

Step 5: Done

Now, power up the arduino and relay. Then, Press the buttons on your remote to see your AC bulb turning on and off.

Thanks for viewing.

Makerspace Contest

Participated in the
Makerspace Contest

Lamps and Lighting Contest 2016

Participated in the
Lamps and Lighting Contest 2016

Maker Olympics Contest 2016

Participated in the
Maker Olympics Contest 2016