Honestly, how many people have been in this scenario (leave a yes or no in the comments) : It is 2:30 in the morning and you wake up with a need to do something whatever that may be (bathroom, forgotten homework assignment, project due in 5 or 6 hours, etc.) it takes you 5-10 minutes to find the light switch (give or take...)

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.

1 of everything except where noted.

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.
<p>Hi, made it, but I did a few changes, I had a small 2 channel relay board laying around gathering dust, so I used that in place of the other parts. Hooked it up to Pin 12, split the negative wire on a small set of 16 bright white LED's that are mounted on a perf board, and hooked up to a small 12 volt battery pack I made up from some 1850's (another project I built total of 6 18650's with a step down transformer, volt/amp gauge with outlets for test leads, and a rather large 30 Watt LED on top, I have the LED plugged in to a 2.1 plug so I can unplug it and use it for a power supply when needed, which is a common happening around my recliner now days. Thanks for the sketch and idea, this shall rest in our bathroom in our old Motor Home that we use now to tour this fine land of ours.</p>
Gud project but it can be done without using the arduino!<br>
Of course!<br><br>It can be but since I was entering this in a Arduino competition I used the Arduino. I could have used a transistor and possibly a Darlington transistor. Maybe I will make another one with a transistor...

About This Instructable




Bio: I love building things and taking pictures. If you want me to build something...I'm open to ideas. My motto? "If you want something ... More »
More by blinkyblinky:Keeping Up Appearances with Chindogu A Complete Beginner's Guide to Raw Files And Raw Processing Hypercard - An Impossible Paper Object 
Add instructable to: