Remote low-voltage outdoor light switch

In this article I will explain a remote light switch for low-voltage outdoor lighting. This device toggles the state of the load whenever the power to it is interrupted briefly. This device also connects to a wireless remote control (similar to this one) to allow the user to control the brightness of the LED strip.

Background

I built this device to power a set of LED light strings (similar to these) from a 12 volt battery. The battery is charged by a solar panel through a charge controller. Various motion-activated lights in the house are also powered from the battery and solar panel. However, there was only a single 12 volt wire feeding multiple outdoor loads, some of which were needed during the day. Thus, I created this device to switch these lights on at night. An Arduino measures the voltage on the solar panel and determines when night begins. Then, it briefly interrupts the power to the lights, and the device interprets this and switches the lights on (or off). This allows power to be present on this wire to the lights even when the lights are supposed to be off.

This device also connects to a wireless LED controller, which allows the user to control the brightness of the LED strip or set a blink pattern/speed. This device also has a switch that allows the user to select one of three modes: "normal" mode, "winter" mode, and "test" mode. In "winter" mode, the LEDs are controlled by the wireless controller only, and in "test" mode, the LEDs are controlled by the internal circuit only.

Schematic and explanation

The schematic is shown below:

U1, R9, and R10 form an adjustable regulator. The potentiometer can be used to adjust the voltage on the load (referred to as V_reg). Thus, this device can be used with LED strings with various voltage. The regulator also charges a 1000uF capacitor through a diode, ensuring the circuit is still powered when the power to the entire device is briefly interrupted.

Bistable circuit

Q1, Q2, and R1-R5 form a bistable circuit. If Q1 is on, it shorts the base of Q2 to ground through R3 and R4, keeping it off. Thus current flows through R2 and R5, keeping Q1 on. Similarly, if Q2 were on, it would short the base of Q1 to ground through R5, keeping it off. Thus, current can flow through R1, R3, and R4, keeping Q2 on. In either of these states, the circuit is stable and does not change on its own.

Normally, no current flows through the capacitors C2 and C3 because the voltages across them are not changing. The diodes D3 and D4 only allow current to flow away from the bases, so they cannot turn on the transistors, only turn them off. The bottom side of each of the capacitors is at V_reg volts. The top side of the capacitor connected to the transistor that is on is near 0 volts, and the voltage on that capacitor is around V_reg volts. Similarly, the top side of the capacitor connected to the transistor that is off is near V_reg volts, so the voltage across that capacitor is V_reg.

Suppose the Q2 is on. C3 is charged to V_reg volts and C2 is charged to 0 volts. Now suppose the power to the device is interrupted briefly. The voltage on the output of the regulator drops to zero. The top side of C3 is now at -V_reg volts. Thus, D4 conducts, turning Q2 off. The voltage on the collector of Q2 rises, until Q1 turns on and holds the base of Q2 low. Now, Q1 is on, and the bistable circuit has changed state.

When the power is reconnected, both capacitors will have charged somewhat. However, this change does not affect the transistors, as the diodes prevent the rising edge from affecting the bases of the transistors.

Output circuit

(The wireless LED controller contains an N-channel MOSFET that switches the negative rail of the output. This MOSFET is used to vary the brightness of the LED strip or make them blink at various speeds and patterns.)

When Q1 is on and Q2 is off, the current can also flow through R2 and R8 to turn on Q3 and Q4, which form a Darlington pair. This effectively creates a transistor with a higher gain, allowing Q4 to switch a larger load with a smaller base current. However, unlike a single transistor, this transistor pair has around 0.6 volts between its collector and emitter when it is on.

Normally, S1 is in the center position, and neither contact is connected. If the MOSFET in the wireless LED controller is on, and Q4 is on, then the voltage on the LED strip is V_reg - 0.6. The setting of the wireless LED controller is passed through the additional transistor.

If S1 is in the "winter" mode, it bypasses Q4 and Q3 via D1. Thus, the state of the LED output is only affected by the setting of the wireless LED controller and not the state of the bistable circuit. Since the transistors drop 0.6 volts when they are on, it is necessary to also drop those 0.6 volts when the transistor are bypassed, or there would be a noticeable brightness difference between the "winter" and "normal" modes (especially with low-voltage LED strings).

If S1 is in the "test" mode, it bypasses the MOSFET in the wireless LED controller by shorting its drain to ground. Thus, the state of the LED output is only affected by the state of the bistable circuit, and not by the wireless LED controller.

Images

Picture of the device in its box and the wireless LED controller.

Close-up of the circuit board. D4 is soldered directly to the switch.

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