Analog Circuit Design of an Automatic Street Light Controller
Overview
Street lighting accounts for a substantial fraction of municipal electricity consumption, and manual switching by operators introduces both energy waste and maintenance overhead. This project addresses that inefficiency through a fully autonomous analog controller that transitions streetlights on at dusk and off at dawn, tracking ambient illuminance without any microcontroller, programmable logic, or network connection. The design relies entirely on passive and linear components, making it repairable with basic tools in a low-resource environment.
The core insight is that a light-dependent resistor (LDR) exhibits a resistance that drops by several orders of magnitude as illuminance rises from near-dark to full daylight conditions. This large resistance swing is sufficient to drive a comparator through a simple voltage divider, producing a clean switching action at a calibrated illuminance threshold that corresponds to natural dusk and dawn levels.
Technical Approach
The LDR is placed in the lower arm of a resistive voltage divider, with a fixed resistor in the upper arm chosen to center the divider output at approximately mid-supply voltage at the target switching illuminance. A 10 kΩ cermet potentiometer in series with the upper arm provides fine threshold adjustment, spanning a range equivalent to approximately 5–50 lux — a window that brackets natural twilight. The divider output feeds the inverting input of an LM741 general-purpose op-amp configured as an open-loop comparator, while the non-inverting input is held at a stable reference voltage derived from a Zener-diode regulator to decouple the threshold from supply voltage fluctuations.
When the divider voltage falls below the Zener reference at dusk, the comparator output swings to the positive rail. This high output forward-biases a BC547 NPN transistor through a 1 kΩ base resistor, and the saturated transistor energizes a 12 V SPDT relay coil. The relay's normally-open contact closes to complete the 230 V AC streetlight circuit. A 1N4007 freewheeling diode across the relay coil suppresses the inductive voltage spike at turn-off, protecting the transistor from breakdown. At dawn, the sequence reverses: rising illuminance increases LDR conductance, the divider output climbs above the reference, the comparator output goes low, the transistor cuts off, the relay de-energizes, and the lamp extinguishes.
A small amount of positive feedback (hysteresis) was introduced around the comparator by adding a 1 MΩ resistor from output to non-inverting input. This creates a dead band of approximately 3 lux centered on the switching threshold, preventing relay chatter during conditions of fluctuating cloud cover at twilight.
Outcomes & Learnings
The breadboarded prototype was tested by sweeping illuminance from full darkness to approximately 1000 lux using a calibrated light source while monitoring relay state with an LED indicator. The circuit switched cleanly on and off at the calibrated thresholds across 50 consecutive illuminance cycles, with no chatter observed once hysteresis was added. The switching threshold was tunable across the target 5–50 lux range without circuit modification.
The project established practical fluency in voltage-divider design with non-linear sensor elements, op-amp comparator configuration, and relay driver circuit design — a combination of skills that recurs in protection relay hardware and sensor interfacing in power engineering contexts. The deliberate avoidance of any digital component also sharpened the ability to solve control problems entirely within the analog domain, which informs an understanding of legacy protection equipment still operating in utility substations.