Motion-activated basement light

In 2014 I made a motion-activated light for my basement that can be powered from a 12 volt battery. When activated, a light is switched on and remains on for about 51 seconds. The light is a 12 volt LED light tape that is attached to a piece of wood mounted on the ceiling. The device is powered by a battery which is connected to a solar panel. The circuit is based on a 555 timer for timing the light and a relay for switching the light. The circuit is shown below:

Operation of the timer circuit

The motion sensor is configured to only output a signal if the room is currently dark. The 555 timer is configured in monostable mode. When the output is off, the 555 timer shorts the discharge pin (dis) to ground. The 47μF capacitor is discharged and the threshold pin is near 0 volts as well. The 10k resistor keeps the trigger pin (tr) at 5 volts.
When the motion sensor detects motion, it applies a positive pulse to the pin labelled "from PIR" in the schematic, switching on the transistor. This pulls the trigger pin of the 555 timer low, switching on the output of the timer. The output transistor and relay switch on, and the LED tape lights up. Since the output of the timer is on, the discharge pin is no loger shorted to ground and the voltage on the capacitor rises as it charges through the 1M resistor. Once the voltage on the threshold pin reaches 2/3 of the supply voltage, the output of the 555 timer shuts off, and so do the LEDs. Even if another pulse comes from the motion sensor, the timer will not start over as the output of the 555 timer is already high.

Recent enhancements

As explained above, once the timer's countdown is started, it cannot be reset until the light has turned off. If a person enters the room and stays in the room for several minutes, every 51 seconds they will have to re-activate the light. The circuit was modified to allow the on-time of the light to be extended for as long as the person was in the room: In the above circuit, a diode and resistor were added from the 47μF capacitor to the collector of the input transistor. Even if the output of the timer is already on, and the capacitor is currently charging, if another pulse comes from the motion sensor, the transistor will discharge the 47μF capacitor through the resistor and diode, effectively restarting the countdown. Additionally, the mode of the motion sensor must be changed to allow it to output a signal when the light is on.

Future enhancements

Second motion sensor

Right now, the motion sensor and LED tape only cover half of the basement. this means that if someone enters from the other end of the basement, the light will not come on until they have reached the middle. In the future, a second motion sensor may be added that covers the other half of the basement. A second LED tape will be wired in parallel with the first one.

Mains detection

Before making the modification described in this article, if the mains-powered lights were switched on, the motion-activated light would not come on, as the room would already be bright. Since the light now comes on regardless of the brightness of the room, the motion activated light will come on and stay on even when the mains-powered lights are in use, which drains the battery. In the future, a circuit may be added that shuts off the motion-activated light when the mains-powered lights are on.

Comments

Popular posts from this blog

Improving and calibrating the capacitive water sensor

Turn a buck converter module into a buck-boost converter with only two components

Self-starting inverter