In this system, there are 2 Infrared transmitter and receiver pair placed at door of room 1 and same at room 2. Now whenever any person passes through door, these pair senses and the lights of room gets on. Similarly if a person moves from one room to other room, the lights of room one turns off and lights of room where person enter turns on.
This system can work for any number of people entering and exiting the room.
Step 1: Required Components
=> 4 IR transmitter(white diode in image or bluish colored also available in market or at TV repair shop)
=>4 IR receiver (black colored in image, can be transparent also in color)
=>4 resistors of 1k ohm (for IR Tx)
=>4 resistors of 3k ohm (for IR Rx)
=>1 Arduino uno board (here Induino uno used which is indian version of arduino with more onboard components like LEDs, Tsop, IR tx, LDR, RGB diffused led, push button switches etc)visit : www.induino.com for more info.
=>1 or more LED for each room.(connect LED in parallel if more than one)
Extras: strip board, wire cutter, hot glue, solder gun and its wire, connecting wires
Key point: To test the IR transmitter connect it with a resistor of 1 k ohm along with +5V supply and ground to its shorter end.
If you see from any digital camera a purple dot glowing inside diode (Shown in image), then it is IR transmitter and its working.Else it is receiver or damaged transmitter, that we will see in next step.
Precaution : Don't connect IR Tx directly to supply of +5V and ground, it will be overheated and blow up diode permanently.
Note: This system is for two rooms and LEDs only so if you want more or less rooms, components vary respectively along with code.
Note: This system works only for dc so if u want it for real life you can use relay switch of 12v dc to 230v ac/ 110v ac for running bulbs(You can also connect fans with relay switch which will operate with Lights.)
Step 2: Making Circuit and Connections:
Connect the circuit as shown in figure
Use wire length according to your requirement.
Generate Four stripboard circuits each with a Tx and Rx as mentioned in figure.
Take control wires out for each Tx-Rx pair.
place a IR Tx and glue it on one side of door.It is necessary that Tx and Rx diode remains in a line of contact to complete circuit.
Now comes the main part: upload "IR dual serial monitor code"
Once code is uploaded, connect IR pair 1 o/p to pin 2 and connect IR pair 2 o/p to pin 3.
Also connect LED1 to pin 12 and LED2 to pin 13. power the circuit.
Hold IR Rx circuit in front of IR tx at other side of door in such a way that they are in same horizontal line and the LEDs at pin 12 and 13 remains off. If not then move little up and down for adjustments. Also avoid your fingers blocking the line of sight at this moment. Fix at that position using super glue.
Now if you pass through the door or cut the path of these two pairs, led 1 will glow first then led 2 as you move inside house.
Set up other 2 IR pairs to other door of house using above process.
Step 3: Finalization
Fix all circuits at entrance of the room.
We can use Relay switch accordingly for controlling AC powered appliances directly from pin 12, 13 of controller board.
At last, connect the all four outputs of sensor pairs at pin 2,3,4 and 5 of arduino board. Make sure they are connected in sequence.
If you don't want to control the lights using AC supply and relays, then connect LED1 and LED2 to pin 12 and 13 of arduino respectively.
Upload IR_final.ino code and turn on the circuit.
There you go !!!
I have made this automation project for participating in home automation contest.
Comment your queries.
Please Vote and save energy !