Three simple low-power light timer circuits

In this post, I will describe three light timer circuits. These circuits all have a switch which is mechanically connected to a door and a light controlled by that switch in some way. Each circuit lights the light for a certain amount of time after the door is opened before switching it off.

Circuit 1: installed August 2020

This circuit is based around an LED task light which had already been bought for the purpose of becoming a closet light. This LED light had a button for selecting the mode and a built-in rechargable lithium cell. However, the light had no motion sensor or door switch to turn it on automatically. Thus, a circuit was constructed to switch the light on when the door was opened. The schematic is shown below: The components inside the box represent part of the circuitry inside the LED light. In reality, the gate of the MOSFET is connected to a control circuit that can adjust the brightness of the LEDs. The 10k resistor was not originally in the light, as it was added to allow the rest of the circuit to work. Charging and protection circuitry is not shown in the above schematic. (Note: a 100 ohm resistor was added to the simulation to make it work. It does not exist in reality.)

Suppose the door is closed and the switch is closed. The right side of the capacitor is at battery voltage and the left side is at about 0.6 volts (the nominal forward voltage of the base-emitter junction of the transistor). Thus, the capacitor is charged to about 3.1 volts. Current flows through the 470k resistor and turns the transistor on, shorting the gate of the MOSFET to ground, switching off the LEDs.

Suppose the door is opened and the switch is opened. Now, the 10k resistor (the one not in the box) will pull the right side of the capacitor to ground. Since the capacitor has been charged to 3.1 volts, the base of the NPN transistor will be at about -3.1 volts. The transistor is switched off and the lights come on. The voltage on the left side of the capacitor will begin to increase as the capacitor charges through the 470k resistor.

Suppose the door is left open for a while. The voltage on the left side of the capacitor will increase to 0.6 volts and the transistor will switch on again, turning the lights off.

Suppose the door and switch are closed again. The voltage on the right and left sides of the capacitor will increase as the switch closes. Since the voltage on the base-emitter junction of the transistor is limited, the base-emitter junction will immediately charge the capacitor so the voltage on the base is 0.6 volts again.

An image of the installed device is shown below:

Circuit 2: installed June 2021

This circuit is based on an LED strip. This strip came with a power supply and a dimmer. The power supply was not used, as the circuit was instead powered by a battery. The battery must be removed and charged separately. The schematic is shown below: The MOSFET in this circuit was desoldered from the dimmer that was included with the light.

Suppose the door is closed and the lower switch contacts are closed. In this position, the switch shorts the capacitor. The circuit is completely isolated from the battery and draws no power. The resistors pull the gate of the MOSFET down.

Suppose the door is opened and the upper switch contacts are closed. Power is connected to the top of the capacitor and the positive of the LED strip. Since the capacitor is charged to 0 volts, the gate of the MOSFET is at battery voltage. The MOSFET is on (linear region) and the LED strip lights. The capacitor charges via the resistor chain and the voltage on the gate decreases over time.

Suppose the door is left open for a while. The voltage on the gate approaches the threshold voltage of the MOSFET. The MOSFET begins to saturate and will get hot, so it has been attached to a heatsink. Eventually, the MOSFET switches off completely and the lights go out.

Suppose the door is closed again. The upper contacts open and the lower ones close, shorting the capacitor. The timing cycle is completely reset and ready to be activated again.

Images of installation coming soon.

Circuit 3: installation soon

This circuit is based on the same LED strip as the previous one and is similar in design. This one is powered by 3 lithium cells in series rather than by a lead-acid battery. The lithium cells have been scavenged from a broken handheld vacuum cleaner. This way, the cells are protected from over-discharge by the built-in protection circuitry. A schematic is shown below that includes parts of the protection circuit: (Note about the simulation: the 1μF capacitor was added to make the circuit work. It does not exist in reality.) The two MOSFETS form a latch. If the right MOSFET turns off, the voltage on the gate of the left MOSFET increases, which causes it to pull the gate of the right MOSFET to ground, keeping it off. This latch can be reset by removing the voltage from the drain of the right MOSFET, in this case, by disconnecting the LEDs. Also, the resistors in parallel are approximately equivalent to 330k, however, I couldn't find any 330k resistors.

Suppose the door is closed and the lower switch contacts are closed. The capacitor is discharged by the switch. The parallel resistors pull the gate of the right MOSFET low. The positive side of the battery is isolated from the circuit, and the latch circuit described above is powered off.

Suppose the door is opened and the upper switch contacts are closed. Battery voltage is connected to the positive side of the LED strip. Since the right MOSFET is initially off, the voltage at its drain rises to the battery voltage, and so does the voltage on the gate of the left MOSFET. This causes the latch circuit to power up in the OFF state, and the LEDs do not light. As a result, a 10nF capacitor was added across the diode. When the switch is released, this capacitor delivers a pulse to the gate of the right MOSFET, ensuring that the latch circuit powers up ON and the LED strip lights. Additionally, the 220μF capacitor charges via the parallel resistors, and the voltage at the cathode of the diode decreases.

Suppose the door is left open for a while. Once the voltage on the cathode is lower than the voltage on the anode, it begins to conduct, pulling the voltage on the gate down. Once the voltage gets low enough, the right MOSFET switches off, which triggers the latch and ensures a clean shut-off rather than a slow fade.

Suppose the door is closed again. The capacitor is discharged and the latch circuit is reset by removing power from the drain of the right MOSFET.

Comments

Popular posts from this blog

Improving and calibrating the capacitive water sensor

Controlling a ceiling fan and light with an Arduino

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