Introduction: Infrared Home Automation With Arduino
ARDUINO HOME AUTOMATION
Home automation simply means making thing that you normally do manually to be done for you automatically. You normally will get up to flip the switch , what if you could just press the remote and your light automatically comes on, if you're lazy to get up to switch off the light at night or turn off the fan, this project is for you. I say been lazy also needs some hardwork.
well that is what we are going to talk about in this instructable.
MATERIALS
Arduino ( I use Arduino pro mini) but any flavor will be alright
3 or 2 relay channel module (I use two. But 3 is compulsory if you want to use the photo resistor function)
Infrared receiver diode
Jumper wires
2 lamp holders (I used 1. But 2 is compulsory if you want to use the photo resistor function)
Fan(you should have this in your home, so need to buy one)
Ir remote
Ac light bulb
Ac plug
Breadboard
NTC 10k thermistor
1 photoresistor
2 10k resistors
Buzzer
12v DC adapter
7805 voltage regulator.
Step 1: Voltage Dividers
voltage divider are simply resistors connected in series to step down voltage. To learn more about voltage divider go Here.
Step 2: Variable Resistors (thermistors and Photo Resistors)
variable resistors are simply resistors that change their resistance due to certain circumstances.
In this instructables we will focusing more on thermistors and photo resistors.
THERMISTORS
from the word therm you should have an idea that it deals with temperature. There are two types of thermistors namely NTC thermistor and PTC thermistor. NTC thermistor their resistance reduce as temperature increases i.e their resistance is inversely proportional to temperature while it is the opposite for PTC thermistor.
NOTE: when you here that a thermistor is 10k ohms, it means it is at 10k at room temperature which is 25 degree Celsius.
PHOTO RESISTOR
photo resistors also know as Light Dependant Resistors(LDRs) are resistors that change their resistance due to changes in light intensity. When there is alot of light their resistance drop and when there is less light their resistance increase.
When we use this variable resistors to form voltage divider, we can vary voltage easily.
To find more on thermistors go to this link.
To find out more about photo resistors go to this link.
Step 3: Infrared
I won't be saying anything here about infrared, but you can go to my previous instructable how to create an infrared controlled car with Arduino for more info. To know how to connect the infrared to Arduino check the data sheet on pin mapping online because I might be using a different receiver from the one you have. Connect the voltage pin to 5v and GND to GND and connect its output to digital pin 10 of Arduino.
Step 4: SETUP AND WIRING
connect your thermistor in series with a 10k resistor, then connect the other lead of the thermistor to 5v and connect the other lead of the 10k resistor to ground, then connect the centre lead to analoginput. Do the same for the photo resistor. To know the analogpin just check the code and you can also change it to any analog pin of your choice.
Connect the positive lead of the buzzer to digital pin 5 and negative to GROUND.
RELAY
connect IN1 to digital pin 2
connect IN2 to digital pin 8
connect IN3 TO digital pin 4
Connect NO1,2,3 TO one lead of the AC SUPPLY
connect on lead of the AC bulb to Com1
Connect one lead of the fan to COM2
connect one lead of the AC bulb of the bed side lamp to COM3
Connect the other lead of all the AC APPLIANCES TOGETHER THEN CONNECT THEM TO the other lead of the AC supply. My relay comes on when the Arduino digital pin is low, if yours comes on when it is high change every low to high in the code. To check if your comes up when it low or high connect any input of the relay module to GND, if the lead at that input comes on therefor your relay comes on when it's low, but if it doesn't then it comes on when it is high. For information on relay visit Here.
Step 5: Code
The code was created by NDUKWU PIUS, which is of course me. Just download the code and open in Arduino IDE. Modify it to your taste and upload.