Hi guys ,
Welcome to my another instructables.
Today in this instructable we are going to make something really useful and very cool thing a IR Remote Controlled Home Automation System.
The reason i come up with this idea is, i hate to turn on and off my switches in my garage. Because the switch board is little far away from my work bench, So every time to turn on or off my light or something i really need to stand up and go to switch board . It is a horrible problem when i working with something in my garage. So i decided to find a way to solve my problem . I come up with a home automation device.
The best way is to use a IR remote to control through this, i can control multiple devices. The work bench and switch board is approximately about 3 meter away so it will work fine. Using this device you can also control any home appliances like TV, Fan, Lights etc....
It does not cost me enough , i just spend about 15$ or less to make this device.So guys it is super cheep and very useful.
So what you waiting for lets roll........
The first and primary step is to collect the necessary parts that we needed to do this project. The parts are super cheap .You can collect from your nearest radioshack.
Here Is The Parts You Needed To Collect :-
Other Tools Needed :-
I think that's all we needed.
warning :- In this instructables we are dealing with high voltage so, do not proceed this instructable without wearing safety glass and gloves.
Now lets head to the next step.
In this step we need to solder the TSOP1738 IR sensor to a small piece of PCB. Like the image given above. I know it can directly plug to arduino but some cases the pin will break and the sensor will useless to us, to prevent this i just soldered the TSOP1738 on a small piece of PCB with male header pins, so i can use it like a sensor module.
It is not hard enough to make, see the above images and make one yourself.
After you make one lets jump to the next step.
Before we proceeding to next upcoming steps. We need to install IRremote library in Arduino IDE.This library is necessary to do this instructable.
To install the Library in your Arduino IDE keep below steps:-
We done we just installed the IRremote library.
Lets go to the next step now.
Now in this step we need to take the hex code of the remote button.
The IR remote have unique hex codes for every button, it helps to uniquely identify witch button is pressed on the remote.So first we need to take the hex codes of button that we are going to use on the remote.
Follow This Step To Get The Hex Code From IR remote:-
#include
int RECV_PIN = 8;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receive
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}After you get the Hex code we can move to the next step.
Now its time for wiring the arduino and other components together !
See the above schematics and carefully connect all the parts to the arduino. I used some jumper wires to wire the components.
It is a pretty easy , does not have any complicated connections. You can use a mini breadboard to wire up the arduino and component together easily.
Here i explain by parts :-
Warning:(do not connect the bulb or any home appliances to the relay module out now !)
After wiring the parts together lets move to the next step !
Now its the time for uploading the sketch to the arduino.
Simply just download the below arduino sketch called irautomation.ino , then simply open in your arduino IDE and upload it.
please note:- replace the hex code of remote buttons that you took from your remote and also using this code you can control up to 4 relay module.
So we are uploaded the arduino sketch to arduino board . Now we should check if it is work or not.
Deeply check there is any wrong connections exist, if not then just power up your arduino board.
Now take your IRremote and press the button that you used in the previous steps.
If the relay turn on and hear a beep sound from buzzer, its all fine lets go to the next step.
Else is there any problem in working, carefully check once again the connections and also the arduino sketch.
Then power the arduino once again and check it.
After the successful testing lets go to the next step.
Now we are almost done .
In this step we need to put all our electronics in a box for a safety, because we are using high AC voltage.
Its not a hard step. Find a box yourself that we can use to put all our electronics together. I always make my own custom box myself using form board sheet(here i used an old box that i made for one of my previous instructables).
please note:- Do not use metal box.