electronut Programming & Embedded Systems - by Mahesh Venkitachalam

555 Based Motion Sensing Night Lamp Kit

Night Lamp

This is a short note on my attempt in 2013 to create an electronics kit meant for kids - a DIY motion sensing night lamp based on the good old 555. Although I gave up on the project before I got to the final manufacturing stage, it was an educational experience for me.


The basic idea is as follows: A PIR sensor triggers the 555 IC which lights up an LED for some time. So if something moves in the dark, the light will automatically come on. Here is the schematic:

Night Lamp

In the schematic above, the 555 is configured in a monostable mode - a timer, that is. T1 is used to invert the signal from the PIR sensor, as the ones I used go from LOW to HIGH when the triggered by motion. But Pin 2 of the 555 needs to go LOW to be triggered - hence the inversion. The values of C1 and R3 are chosen such that the timer lasts about 15 seconds. The output of the 555 goes to a two transistor constant current LED driver, and for the LED I chose a really bright one (Part No. C503C-WAS-CBADA151, 20 mA If, 24 cd brightness). Power supply is from a 9V battery.


This was my first real forway into PCB manufacturing. I used EAGLE, and messed up the first PCB:

Night Lamp

The second time around, I did get it right.

Night Lamp


I used laser cut acrylic for the enclosure. I attempted a screw-less cantilever design, and even had a slot for hanging the box on a nail. I used Inkscape and Sketchup to design the box. I had to make 7 iterations by the time I ironed out all the issues. Here’s lucky #7:

Night Lamp

This was 2 years ago. Today, I dusted off the circuit, changed the battery, and it still works.


You can get all files for this project from my github link below:


Night Lamp

You can also order the PCB from the OSH Park link below:



Although the circuit worked well, I didn’t have the drive to perfect the enclosure and bring the kit to production. But it did get me started on the path to becoming an indie hardware maker. Some things I learned from this exercise:

  1. The cantilever design for enclosure was a bad idea. It breaks very fast.
  2. Be prepared to iterate over PCB and enclosure design.
  3. Hardware is hard (duh!). Even a small kit like this takes time to perfect.
  4. The last 5% takes forever.


  1. Practical Electronics for Inventors, Third Edition, by Paul Scherz and Simon Monk.

If you liked this article, please consider supporting my efforts by purchasing my book.

Python Playground, published by No Starch Press, USA, is a collection of imaginative programming projects that will inspire you to use Python to make art and music, build simulations of real-world phenomena, and interact with hardware like the Arduino and Raspberry Pi. Do check it out!