We wanted to save energy, and create convenience, by adding motion sensors to our lighting circuits. Maybe you want some notification of an intruder. Both can be done with a PIR Motion sensor. When I walk into a room, the lights come on automatically, and when I leave, shut off after a short period of time. You can choose how long that time delay is in the code. No more fumbling for a light switch in the dark with my arms full of groceries!
I also wanted a override switch for times I want the light to stay on, or off.
So, I took an Arduino, added a PIR sensor, a SSR, a SPDT switch, two 10k ohm resistors and whipped up a small sketch to glue it all together. Enjoy!
Original article, and more at http://arduinotronics.blogspot.com/2013/01/motion-sensors-ssrs.html
Multiple motion sensors, and multiple SSR's can be serviced by a single Arduino. A embedded Atmel chip can be built into the project instead of dedicating a complete Arduino board.
A CdS light sensor can be added to prevent the lights from activating if light level's are considered sufficient (user programmable). http://arduinotronics.blogspot.com/2012/03/light-sensing-with-cds-ldr.html
Step 1: The PIR Sensor
For background info on PIR, see http://en.wikipedia.org/wiki/Passive_infrared_sensor
We obtained our PIR Sensor from Amazon.
Connect the 3 pins of the PIR to +5vdc, Arduino Pin 2 (data out), and Ground.