My mother likes a night light for the bathroom but she didn't want one that stayed on all night so I needed one that could detect a person. Many thoughts popped up into my head on what sensors to use. I could us esuch as the Linescan Imaging Sensor Daughterboard by Parallax but that was overkill and too expensive. A cheaper solution would be to use a few ir leds with ir phototransistor but still too complicated. I also thought of the Ping Sensor from Parallax but too hard to program with my beginner standards in C and, it used too much power. (I'm more of a Spin and Assembly language person.) I finally looked through my sensors box and found...(...drumroll please...) ...Parallax's Passive Infared Motion Sensor! It was fairly inespensive ($9.99), it could work in the dark, and, I have had experience in programming these!
Step 1: Get The Required Materials.
PIR Motion Sensor from Parallax
LED ( Preferably Ultra Bright White. I bought mine along with other colors at Ebay from this seller: http://myworld.ebay.com/led.shop*2010/?_trksid=p4340.l2559
They will compile your own personal mix of colors if you want them to...they will charge more but it is a personalized order. I also found this order of only white LEDs but very cheap.
Many jumper wires
Optoisolator/ optocoupler/ relay
Resistor. Define the value yourself.