ARDUINO IR REMOTE (USE YOUR OLD REMOTE TO CONTROLL HOME APPLIANCES)
by KJ ELECTRONICS in Circuits > Arduino
6708 Views, 113 Favorites, 0 Comments
ARDUINO IR REMOTE (USE YOUR OLD REMOTE TO CONTROLL HOME APPLIANCES)
![585823809bad4bcd3300017b.jpeg](/proxy/?url=https://content.instructables.com/FLG/0WGQ/IWQVMDTV/FLG0WGQIWQVMDTV.jpg&filename=585823809bad4bcd3300017b.jpeg)
In this project you can choose any remote or a TV remote which you are using and you will notice that some keys are useless for your tv for that you can use that keys for controlling the home appliences like powering your TV,FAN,LIGHTS etc...
you need to follow the simple procedure from the video so that you can record hexa values for that particular key and put into the program of the arduino
WATCH THE VIDEO
![Arduino IR Remote - Convert Any Old Remote Into A Useful Remote For Your Own Buttons](/proxy/?url=https://content.instructables.com/F30/C1OD/IWQVMCCZ/F30C1ODIWQVMCCZ.jpg&filename=Arduino IR Remote - Convert Any Old Remote Into A Useful Remote For Your Own Buttons)
THINGS NEEDED
![arduino_uno_large-comp.jpg](/proxy/?url=https://content.instructables.com/FVA/CVOD/IWQVMPAR/FVACVODIWQVMPAR.jpg&filename=arduino_uno_large-comp.jpg)
![IR-24key-remote-rgb-led-strip-controller-China-factory-supply.jpg](/proxy/?url=https://content.instructables.com/F4C/N7LZ/IWQVNR1R/F4CN7LZIWQVNR1R.jpg&filename=IR-24key-remote-rgb-led-strip-controller-China-factory-supply.jpg)
![ir-receiver.jpg](/proxy/?url=https://content.instructables.com/F4X/M1TV/IWQVNR47/F4XM1TVIWQVNR47.jpg&filename=ir-receiver.jpg)
![l_11267648.jpg](/proxy/?url=https://content.instructables.com/FKM/636P/IWQVNR75/FKM636PIWQVNR75.jpg&filename=l_11267648.jpg)
![b.jpg](/proxy/?url=https://content.instructables.com/FPP/C4SJ/IWQVNRFH/FPPC4SJIWQVNRFH.jpg&filename=b.jpg)
The things needed for the following project are
1.ARDUINO UNO OR CLONE
2.IR RECIVER
3.ANY OLD REMOTE
4.RELAY MODULE
5.JUMPER WIRES
6.ARDUINO IDE
7.SOME LED'S
IF YOU WANT TO MAKE A RELAY MODULE BY YOURSELF YOU COULD NEED (OPTIONAL)
1.RELAY
2.BC547 TRANSISTOR
3. 1K OHM RESISTOR
4.COPPER DOT PCB
RECIVING THE IR CODE FROM REMOTE BUTTON
![Untitled.png](/proxy/?url=https://content.instructables.com/F4H/M7A7/IWQVOTU3/F4HM7A7IWQVOTU3.png&filename=Untitled.png)
This is the test to recieve the hexadecimal code of the remote button
1.install the ir remote library form the following link in the arduino / library folder
https://github.com/z3t0/Arduino-IRremote
if you already have the library installed follow the next step
2.open the arduino ide and open example/IRrecvDemo sketch into the arduino ide
3.upload the code to the arduino.
4.now connect the ir reciver to the arduino as shown in the video.
5.open the serial monitor in the arduino ide.
6.press any button on the remote and note the hexadecimal value of the button pressed
7.now you have the code of the button you can follow the next step
MODIFYING THE ARDUINO CODE
![Untitleddf.png](/proxy/?url=https://content.instructables.com/FG7/FO31/IWWFEFK0/FG7FO31IWWFEFK0.png&filename=Untitleddf.png)
YOU COULD USE THE FOLLOWING SKETCH TO MAKE 1 APPLICATION CONTROL
#include<IRremote.h>
int RECV_PIN = 11;
int state;
int led=13;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
pinMode(led,OUTPUT);
state=0;
irrecv.enableIRIn(); // Start the receiver
}
void loop()
{
if (irrecv.decode(&results))
{
if(results.value==(0xpaste your hexadecimal code for example "0xF730F4" )
{
if(state==0);
{
digitalWrite(led,HIGH);
state=1;
}
else
{
digitalWrite(led,LOW);
state=0;
}
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
delay(100);
}
AFTER UPLOADING THE FOLLOWING SKETCH TO THE ARDUINO CONNECT THE LED TO THE PIN 13 OF ARDUINO AND IR RECIVER OUTPUT TO 11 PIN OF ARDUINO TEST IT USING THE SAME REMOTE BUTTON WHOSE HEXADECIMAL CODE YOU HAVE COPIED.
IF YOU WANT TO INCREASE THE NUMBER OF CONTROLS
THEN YOU CAN USE THE MORE NUMBER OF DIFFERENT INT FUCTIONS FOR EXAMPLE
int light=13;
int fan=12;
int tablefan=11;
int tubelight=10;
and similarly the pinmode in the void setup as
pinMode(light,OUTPUT);
etc..
similarly in the void loop section include the hexadecimal code of the button and repeat the loop as many time your number of controls
ADDING RELAY MODULE
![b.jpg](/proxy/?url=https://content.instructables.com/FZ7/H1S7/IWWFEWAZ/FZ7H1S7IWWFEWAZ.jpg&filename=b.jpg)
![Untitled.png](/proxy/?url=https://content.instructables.com/FZS/X58Q/IWWFF08T/FZSX58QIWWFF08T.png&filename=Untitled.png)
YOU COULD BUY A 5V RELAY MODULE FROM ONLINE AND CONNECT IN THE FOLLOWING WAY
ARDUINO RELAY MODULE
+5V------------------------->+5V
GND------------------------>GND
13--------------------------->IN1
12--------------------------->IN2
11--------------------------->IN3
10--------------------------->IN4
AND THE SAME PROCESS REPEATS FOR THE NUMBER OF CONTROLS YOU HAVE
CONNECT THE NEUTRAL WIRE OF THE MAINS POWER SUPPLY(AC) TO THE NORMALLY OPEN SIDE OF THE RELAY AND THE LINE WIRE TO HOME APPLIANCE(BULB) THE THE SECOND WIRE FROM THE BULB WILL GO TO THE CENTER PIN OF THE RELAY
[ WARNING:: PLEASE DO NOT TRY TO PLAY WITH THE 240V AC POWER SUPPLY THAT CAN KILL YOU IMMEDIATELY ]
BEFORE CONNECTING THE RELAY MODULE DIRECTLY TO AC SOURCE CHECK THE CONNECTIONS TWICE AND MAKE SURE EVERYTHING IS CORRECT
MAKING THE RELAY MODULE(OPTIONAL)
![Untitleddfhkj.png](/proxy/?url=https://content.instructables.com/F35/OTPK/IWWFFCDX/F35OTPKIWWFFCDX.png&filename=Untitleddfhkj.png)
IF YOU WANT TO MAKE A RELAY MODULE BY YOURSELF THE YOU CAN FOLLOW THE GIVEN SCHEMATIC AND CREATE YOUR MODULE
THANKS FOR WATCHING
THANKS FOR WATCHING THE FOLLOWING INSTRUCTABLES IF YOU DO LIKE THE PROJECT AND HAVE ANY QUESTION PLEASE LEAVE THE COMMENT BELOW
DON'T FORGET TO VIEW MY OTHER VIDEOS ON THE YOUTUBE CHANNEL
https://www.youtube.com/channel/UCZE35bOktFxu8dIad...
MY OTHER INSTRUCTABLE LINKS ARE
ARDUINO WIRELESS LED DISPLAY BANNER(24X6 LED DISPLAY)
https://www.instructables.com/id/ARDUINO-WIRELESS-L...
[ WARNING : DO NOT PLAY WITH AC SUPPLY WITHOUT ENOUGH KNOWLEDGE BE SURE AND SECURE BEFORE USING THE AC SUPPLY ]