Introduction: Nocte Lux
For this project, I wanted to try and make a simple night lamp – something that you can put under your cot and use it simply by picking it up. Useful in case you get up in the middle of the night and need a quick light.
Objective
Design a low cost motion activated night lamp. It need not be very bright, but it should shut itself off after a few minutes and should not drain much battery when not in use.
Circuit Design
The first thing that came to mind when I thought “motion activated” is “accelerometer”. But I decided to take a much more low-tech route for this project. We will use a tilt sensor, which is a switch that uses a rolling ball to make/break electrical contacts when you tilt it. For the timer, we will again turn to our old pal the 555 timer IC. So here is the schematic:
The tilt sensor I used has a default position of “closed”, which means that in the circuit above, the gate for Q1 is grounded. The high value of R1 (470K) ensures that there is less current drain in the default state. When we tilt the sensor, the switch goes to “open” state, and the MOSFET is switched on, triggering the 555, which is set up in a monostable configuration. The output pin 3 of the 555 then goes high for t = 1.1*R3*C2 = 1.1 * 106 * 100*10-6 = 110 seconds – a little under 2 minutes. The output goes to another MOSFET Q2 that ensures that it can handle the current needed to switch the LEDs on. In this case I used 9 LEDS from a strip.
PCB Making
The schematic and PCB were designed in EAGLE light. Here is the PCB design, which needs 3 wires to be routed manually.
This time, for making the PCB, I used a variation of the toner transfer method where the ferric chloride is directky sponged on to the boad. This means you can make a PCB in under 5 minutes. (See references below for a link to the process.)
Choice of SMD
You must have noticed above that the PCB uses SMD components. For this project, I decided to go with SMD components to reduce the size of the final product. But I think it is still important to use a breadboard and regular through-hole components to test your design. You can see below the remarkable difference in size between the same circuit that uses regular vs. SMD components.
If you have never used SMD before, don’t be intimidated by it. You don’t need any fancy equipment to solder SMD components. A regular soldering iron with a 1mm or 2mm chisel tip can be easily used to solder the components used in this circuit. You can even solder miniscule QFN chips, which have pads underneath them, right at home using a hot air gun. Please check the references section below for some resources on SMD soldering.
Enclosure
For enclosing the night lamp, I chose a cheap translucent plastic bottle. The LED strip is hot glued inside the bottle in the shape of a helix, and the PCB and 9V battery are also similarly glues on to the bottle.
Here is how it looks in action when it all comes together:
Conclusion
So there it is, another simple, useful 555 based circuit. I think it’s possible to design a much more sophisticated version of the same using an accelerometer chip and an ATtiny microcontroller – but that’s for another project.