# Control Your Home Appliances With TV Remote!!

10,407

196

18

Watch the project output video here.

I've found that some people are very lazy to stand up go to the board and press the switch to turn on light or fan or any other appliance but Hey!,Now there is an easier solution. Now you can turn on or off any appliance with just your TV remote. In this instructable I will show you :

• The Parts you need.
• Function of each components.
• How to make the Circuits( The most important one!!!)
• Apply it in your home.
• Some TroubleShooting.

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: Gather the Parts!!!

Here all the parts you would need in this Project are mentioned and the links from where you can buy them but I recommend that you should first try to find the components locally because this way you could buy them faster and maybe cheaper but if they are not available locally you can always buy them with the links provided. I always buy everything from ebay 'cause it's the cheapest. For this project you would need:

## Step 2: What Is IR???

Infrared (IR) is invisible radiant energy, electromagnetic radiation with longer wavelengths than those of visible light, extending from the nominal red edge of the visible spectrum at 700 nanometers (frequency 430 THz) to 1 mm (300 GHz). Most of the thermal radiation emitted by objects near room temperature is infrared. The TV Remote or any other remote produces a burst of IR light of a frequency of 38 KHZ which is also known as Carrier Frequency. Now you must be thinking why 38 KHZ??? It's because a lamp, sun and every other light source produces IR rays so to differentiate from those rays frequency of 38 KHZ is used. The system in our project works like this:

• IR remote sends a burst of IR light which is received by the IR Receiver.
• The IR reciever contains Filter, Amplifier and Demodulator.
• Then the IR Receiver sends a logic output to the arduino and by using the IRRemote.h library and the program we make we can see a unique hexadecimal code for each button we press.

## Step 3: Lets Make the Circuit!!!

By the Schematics provided here you can create the circuit. I would recommend making a shield for arduino uno so it could be easy to connects as well as install it anywhere. You want to know how to make Sheilds? Check this. I would also recommend that you should first prototype this circuit on a breadboard and after testing you can head over to the PCB. Don't Forget to Double Check Your Circuit.

## Step 4: Which Pin Goes WHERE???

IR RECEIVER DATA - DIGITAL PIN 10 OF ARDUINO

RELAY1 - DIGITAL PIN 8 OF ARDUINO

RELAY2 - DIGITAL PIN 12 OF ARDUINO

## Step 5: Get Hex Code for Your Remote Buttons.

• Now go to Arduino folder where you have installed ARDUINO IDE << libraries << unzip the file here.
• Follow the Schematic and while facing the curved surface of the IR Receiver, Connect PIN 1 to Digital Pin 11, PIN 2 to GROUND and PIN 3 to 5V or VCC
• Now upload the IRRecvDemo from examples of the library and upload the code.
• Now open the Serial monitor and any time you press any button on your remote you would get the hex code.

## Step 6: Time for Coding!

First Download the simple Arduino Program I created. Then instead of numbers 1 2 3 4 as showed in red area write the hex code of the button you want to use in TV remote. Here the code 1 sets your relay 1 on digital pin 8 as HIGH and the code2 sets it as LOW. The code3 sets relay 2 on pin 12 as HIGH and code 4 sets it LOW. In the Second pic you can see that how I changed the values according to the hex code of my buttons in TV remote.

## Step 7: CAUTION!!! HIGH VOLTAGE!!!

### WARNING!!!

Incorrect or Improper use can lead to:

• Serious injuries or Death.
• Physical Damage to the Product.
• Creating dangerous Hazards.

*** I take no responsibility for any of your actions ***

## Step 8: How to Use This at Your HOME!!!

Let's say you want to control your light and fan of your bedroom, you can install this circuit on the switch board. Just open the switch board that controls your lights and fans and you will find that two wires are attached to the switch. Just remove those wires from switch and connect them to the PCB terminals and you're done. Super Simple yet Efficient.

## Step 9: What's Happening Here???

Here Arduino is Brain of the circuit. When you press any button on your Remote, it sends a burst of IR light at 38KHZ carrier frequency. The IR Receiver receives that light and sends a logic signal to Arduino. Arduino converts those signals to hexadecimal codes which we can see in the serial monitor. Then according to our program, arduino takes those signals as commands and implements it. In our program we have mentioned that if signal of button 1 is received, then relay1 should be set HIGH and so. Here Relay acts as switch. A relay, quite simply, is a small machine consisting of an electromagnet (coil), a switch, and a spring. The spring holds the switch in one position, until a current is passed through the coil. The coil generates a magnetic field which moves the switch. It's that simple. You can use a very small amount of current to activate a relay, and the switch can often handle a lot of current. Here I used a NPN transistor to activate those relays with the Arduino 5v signal because if anything goes WRONG, your transistor would be damaged but your arduino would be saved.

## Step 10: TroubleShooting!@#\$%

Hmm... Not working as Expected???

Try this Trouble Shooting guide so you can make your project work like a charm!!

• First Check the Code. Have you entered the Wrong Hex code in the program.
• Make sure that the Connections are correct. Using the continuity function of your multimeter check for any wrong connections or short circuits!!!
• Make sure you have working Relays and Arduino.
• Make sure you have placed to diode correctly
• Make sure that your REMOTE is working!!!!

*** If you have any doubts regarding this you can always ask me in the comments below ***

## Step 11: Check These Points!!!

• Before testing the circuit, double check all connections with continuity function of multi meter for any wrong connections or short circuits.
• Install the diode between the coils in correct polarity as it will protect our circuit from any reverse current.
• I recommend that before testing the circuit with HIGH AC VOLTAGE, first try it with lower voltage like just a simple led.
• Also never use such appliances that draws more current than your Relay's ratings.

## Step 12: What Else Can You Do???

You want to something more, I have some suggestions for you:

• Instead of Arduino uno you can use ATTINY85 which will save a lot of space.
• You can always make a Standalone Arduino on the PCB. Check GreatScott's Tutorial on this.
• You can also make this circuit IOT compatible. You can use ESP8266 WiFi module to control your relays over the internet.

## Step 13: Conclusion!!!

This being my first Instructable there may be some mistakes here but that would be awesome if you can give some suggestions in the comments section below. If you like this project please hit the like button and let me know in the comments what you think about this.

### YAVNIK SHARMA

Runner Up in the
Automation Contest 2016

Participated in the
First Time Author Contest 2016

Participated in the
Sensors Contest 2016

## Recommendations

• ### Internet of Things Class

22,786 Enrolled

## 18 Discussions

well good to see you here.
Keep doing stuffs like that ..they are awesome.:D

Favorited and voted for clarity of your explanation and usefullness!

for good instr about DIY Arduino.

Good luck to you!

Jan

Great project! I like it better than others like it because it doesn't require you to use your phone, and open an app. Voting for it!

hey! its a nice project. i am trying to make it, but i cant find a way to download the library form the link you have provided, there isnt any download option. and if i just copy it, i get an error while compiling. it says

exit status 1

error compiling,

Hi Yijaz, if you are viewing on mobile, go to desktop version and if you still don't see any download option just look at the left side you will find something as BRANCH MASTER just change it to BRANCH DEV and you will find a download option on the left side. Download it as a .zip file

If you still have any doubts feel free to ask me :)

VOTED,nice work loved your instructable description but could you explain about relay more plz that would be better.

A relay, quite simply, is a small machine consisting of an electromagnet (coil), a switch, and a spring. The spring holds the switch in one position, until a current is passed through the coil. The coil generates a magnetic field which moves the switch. It's that simple. You can use a very small amount of current to activate a relay, and the switch can often handle a lot of current.

If you have any other doubts feel free to ask me!

Wish you luck for your win. Nice Instructable.. Keep going buddy. :)