Although ready-made twilight switches for exterior lights are available in every home improvement shop, any self-respecting electronics enthusiast would rather put together something from a few components that happen to be lying around. The circuit described here does not require an AC power transformer. Instead, the voltage is reduced by series capacitor (C1) connected directly to the mains voltage via a current-limiting resistor. The AC voltage is rectified by D1–D4, and the resulting DC voltage is limited by D1 and smoothed by C2. An LDR (R3) is used to detect the light level. The resistance of the LDR is high when there is little or no light. The resulting voltage on the base of T1 is very low, cutting off the transistor. This causes T2 to be driven into conduction by the current through R4, thereby energizing the relay so that the exterior light connected to it is lit.
When sufficient light falls on the LDR, the voltage on the base of T1 rises and it is driven into conduction. This diverts the base current away from T2, with the result that the relay drops out. The switching level can be adjusted with the potentiometer. Capacitor C4 provides a bit of hysteresis to prevent the circuit from jittering near the threshold level.
The entire circuit should be fitted in an insulated enclosure since it is connected directly to the AC powerlines. The component values are not especially critical. However, the coil of relay Re1 must have a low operating current (no more than a few dozen milliamperes). The author used a type JJM1-12V relay from Panasonic in the prototype.