In my never ending quest to save energy, I decided to connect Motion Sensors (more accurately “Passive Infra Red” or PIR) to an Arduino, and having that control my lighting through an SSR. This is a good way to make sure the lights go out when people leave the room, and come on when they enter, preventing stumbling in the dark with your arms full trying to find the light switch.
Qty (2) 10k ohm resistors (Radio Shack 5 / $1.20)
Qty (1) SPDT Center Off Toggle Switch
Qty (1) PIR Sensor
Qty (1) SSR
Qty (1) Arduino
Full code and construction info at http://arduinotronics.blogspot.com/2013/01/motion-sensors-ssrs.html