Arduino and PIR motion sensor based automatic multiple light control system. Room light on - TableLamp off. Room light off - TableLamp on. Perfect device for study. Control things by just waving at them.
I've built a PIR motion sensor based automated light / Appliances project which can be found here. This project is a bigger version with relay to control 220V lights.
FEATURES-
- Table lamp ON main Light OFF
- Table lamp OFF main Light ON
PARTS YOU'LL NEED -
- Arduino pro mini (or any board)
- 2 Channel relay module
- Buzzer
- PIR motion sensor
- 220v to 5v converter
- wires
- hot glue
THE CIRCUIT DIAGRAM:
Making the project:
I've built a PIR motion sensor based automated light / Appliances project which can be found here. This project is a bigger version with relay to control 220V lights.
Just added the lights switch wires to relays and powered the arduino and relay module using a 220 to 5v converter - for that I've used a mobile charger which gives 5v in output.
Then I put the entire circuit into a plastic box. Note that I've made some tiny holes on the lid because the relay's get warm and it is needed to get some air.
Make sure to secure all the exposed wires and to cover them with glue gun for extra security.
THE CODE -
Uploading code to arduino pro mini (5v 16 mHz)
Arduino pro mini doesn't have USB programming option. So you may Upload code using a USB to TTL converter. Or you may use an Arduino Uno. We all have an uno right?
So let's upload code using an arduino Uno.
- Remove The ATmega IC from Uno (using a screwdriver) [be carefull not to harm the IC]
- Connect Arduino pro mini ------ Uno as following
- TX to tx
- Rx to rx
- Vcc to 5v
- Gnd to gnd
- rst to Reset
Note: You can just upload code to Arduino pro (5v 16 mHz) mini using UNO not the 3.3v one. Check before you buy one.
Download the code from the github link and upload to arduino. That's it.
Then power it up and enjoy. Thank you.
If you find difficulties working with PIR sensors then click here for my PIR solution post.
Comments
Post a Comment