Automatic Street Light Circuit Diagram
This is a free printable automatic street light circuit diagram: download the diagram as SVG or open it and print to paper or PDF.
A complete reference for the LDR-transistor-relay automatic dusk-to-dawn street light circuit covering component operation, sensitivity adjustment, and safe mains connection.
An automatic street light circuit uses a light-dependent resistor (LDR) to detect ambient light levels and switch a lamp on at dusk and off at dawn without manual intervention. This dusk-to-dawn switching function is useful for street lights, security lights, outdoor signage, and garden lighting.
The LDR (also called a photoresistor or photocell) is a passive component whose resistance decreases as light intensity increases. In darkness, a typical LDR resistance is in the range of 1–10 MΩ; in bright daylight it may drop to 100–1000 Ω. The LDR is positioned to receive ambient sky light — usually facing away from the lamp to prevent the lamp itself from triggering the off condition.
The classic transistor-relay circuit uses the LDR in a voltage-divider network with a fixed or variable resistor. The output voltage of this divider is applied to the base of an NPN transistor (commonly a BC547, 2N2222, or equivalent small-signal transistor). At night, the LDR's high resistance causes the voltage divider output to be high, forward-biasing the transistor base, which causes the transistor to conduct and energise a relay coil. The relay's normally-open contact closes, completing the mains lamp circuit and switching the lamp on. As daylight increases, the LDR resistance drops, the voltage divider output falls, the transistor turns off, the relay de-energises, and the lamp switches off.
A variable resistor (potentiometer or preset trimmer) in series with the LDR in the voltage divider allows the switching threshold (light level at which the circuit operates) to be adjusted for local conditions — extremely useful when the circuit needs to activate at a different light level to account for moonlight, artificial ambient light, or cloud cover.
A flyback diode across the relay coil is essential to protect the transistor from the inductive spike generated when the relay coil de-energises. Without it, the transistor fails rapidly.
For reliable long-term operation, the control circuit is powered from a small low-voltage DC supply (typically 5–12 V) derived from the mains using a transformer and rectifier, or from a dedicated plug-pack supply. The relay then switches the full mains voltage lamp circuit, maintaining complete isolation between the low-voltage control side and the mains load side.
Automatic street light systems use a light-dependent resistor (LDR) or photodiode to sense ambient light levels and switch a relay or transistor that drives the lamp. The core circuit diagram for automatic street light control is simple enough to build on a breadboard yet powerful enough for real installations — it typically includes an LDR, a comparator (such as the LM741 or LM358), a relay, and a DC power supply. You can sketch and customise this circuit for free in the browser using the online editor at circuitdiagrammaker.com, no download needed.
How to wire automatic street light circuit diagram
- Assemble the low-voltage control circuit on a breadboard or PCB Wire the LDR and variable resistor (10 kΩ potentiometer) in series as a voltage divider between the positive supply rail and ground. Take the junction of the LDR and potentiometer to the base of an NPN transistor (BC547 or 2N2222) via a 10 kΩ base resistor. The transistor emitter connects to ground; the collector connects to one end of the relay coil. The other end of the relay coil connects to the positive supply rail.
- Install the flyback diode across the relay coil Connect a 1N4007 diode across the relay coil terminals with cathode (banded end) connected to the positive supply rail and anode to the collector of the transistor. This diode clamps the inductive spike from coil de-energisation and protects the transistor from voltage breakdown.
- Connect the DC power supply to the control circuit Use a regulated 5–12 V DC power supply or a rectified and filtered supply derived from a small mains transformer. Verify the supply polarity before connecting. The supply voltage must match the relay coil voltage rating.
- Position the LDR to face ambient sky light Mount the LDR in a weatherproof enclosure with a small window, positioned to receive natural ambient light from the sky. The LDR must be shielded from the controlled lamp. For outdoor installations, use an IP65-rated enclosure and UV-resistant cable.
- Adjust the potentiometer sensitivity threshold At dusk (when you want the lamp to switch on), slowly rotate the potentiometer until the relay just energises and the lamp lights. Verify the lamp switches off when ambient light returns. If the circuit chatters at dusk, add a hysteresis resistor (approximately 1 MΩ) from the relay's normally-open contact via a junction to the base resistor junction to create bistable behaviour around the threshold.
- Connect the relay to the mains lamp circuit Connect the mains lamp in series with the relay's normally-open (NO) contact and a fuse. When the relay energises (darkness detected), the NO contact closes and the lamp illuminates. This step involves mains voltage and must comply with the applicable wiring standard. A licensed electrician must complete this connection in jurisdictions where mains wiring is controlled.
- Test operation through a full dusk-to-dawn cycle Observe the circuit at dusk to confirm the lamp switches on at the desired ambient light level. Check at dawn that the lamp switches off. Verify there is no chattering at either threshold. After 48 hours of operation, inspect all connections for signs of overheating or loose terminations.
Specifications
| Control circuit supply voltage (typical) | 5–12 V DC regulated |
|---|---|
| LDR dark resistance (typical) | 1–10 MΩ |
| LDR illuminated resistance at 10 lux (typical) | 10–100 kΩ |
| LDR illuminated resistance in bright sunlight (typical) | 100–1000 Ω |
| Transistor base resistor (typical) | 10 kΩ |
| Relay coil voltage (control circuit) | 5 V DC or 12 V DC (matched to supply) |
| Relay contact rating (mains lamp circuit) | Minimum 10 A / 250 V AC |
| Typical switching threshold (ambient illuminance) | 10–50 lux (adjustable via potentiometer) |
Safety warnings
- The relay contact side of this circuit operates at full mains voltage (120 V or 230 V AC). This portion of the circuit must be wired in compliance with the applicable electrical installation standard (NEC/NFPA 70, BS 7671, AS/NZS 3000, or IEC 60364). A licensed electrician must install and certify any new mains wiring.
- Maintain complete physical separation between the low-voltage control circuit and the mains voltage lamp circuit. Use an enclosure with separate compartments, or mount the two sections in separate boxes, with the relay providing the only electrical connection between them.
- For outdoor installations, use an IP65-rated or better enclosure for all components. Moisture ingress into a mains-connected circuit creates a lethal shock hazard.
- The LDR contains cadmium sulphide (CdS), which is a restricted hazardous substance under RoHS in many jurisdictions for new manufactured equipment, though it remains widely available for repair and educational use. Dispose of at an appropriate electronics recycling facility.
- Never operate the mains lamp circuit with the relay contacts exposed or the enclosure open. Isolate from the mains supply before any adjustment or servicing.
Tools needed
- Digital multimeter
- Soldering iron and solder (for PCB assembly)
- Breadboard (for prototype assembly)
- Regulated DC bench power supply (for testing control circuit)
- Light meter or mobile phone lux app (for calibration)
- Screwdrivers (flat and Phillips)
- Wire stripper and crimper
- Weatherproof enclosure with cable glands
Common mistakes
- Positioning the LDR so the controlled lamp illuminates it directly — causes rapid oscillation (relay chatter) as the lamp light fights with the ambient light control.
- Omitting the flyback diode across the relay coil — causes transistor failure after a small number of switching cycles due to inductive voltage spikes.
- Using a relay with insufficient contact voltage rating for the mains supply — underrated contacts arc and deteriorate rapidly, creating a fire hazard.
- Failing to weatherproof the LDR for outdoor use — moisture ingress changes LDR resistance and causes erratic switching.
- Setting the sensitivity too coarsely — the lamp activates too early in the day or not until full darkness. Adjust the potentiometer at the target switching light level.
- Not including a mains fuse in the lamp circuit — an unfused lamp circuit is a fire hazard if the lamp or wiring develops a fault.
Troubleshooting
- Lamp does not switch on at night
- Cause: Transistor not conducting; LDR not in darkness; relay coil open circuit Fix: Measure voltage at transistor base in darkness — it should be approximately 0.6–0.7 V above emitter (ground). If base voltage is too low, check LDR resistance (should be > 100 kΩ in darkness) and verify potentiometer position. Measure relay coil resistance — open circuit (infinite Ω) confirms a faulty relay.
- Lamp does not switch off in daylight
- Cause: Transistor permanently saturated; LDR covered or shielded from light; relay contacts welded Fix: Measure base voltage in bright light — should be below 0.5 V. Check LDR resistance in sunlight (should be < 1 kΩ). If base voltage is correct but transistor still conducts, the transistor is faulty. If transistor is off but lamp stays on, relay contacts are welded — replace relay and investigate cause (contact rating exceeded).
- Relay chatters at dusk and dawn
- Cause: No hysteresis in the switching circuit; ambient light level is exactly at the threshold Fix: Add a hysteresis resistor (1 MΩ) from the relay NO contact (or from the relay coil positive terminal) back to the junction of LDR/VR1 and the base resistor. This positive feedback makes the turn-on threshold different from the turn-off threshold, creating a stable bistable region around the switching point.
- Lamp switches on during the day due to shadows
- Cause: Potentiometer set too sensitively; LDR exposed to intermittent shade Fix: Adjust the potentiometer to raise the switching threshold so that only full darkness (not passing cloud or tree shadow) triggers the relay. Relocate the LDR enclosure to a position with stable sky exposure, away from tree canopies and building overhangs.
- Transistor fails repeatedly
- Cause: No flyback diode, or flyback diode installed reversed Fix: Verify flyback diode is installed across relay coil with cathode to positive supply and anode to transistor collector. A reversed diode shorts the supply. Replace the transistor and correctly oriented diode.
Frequently asked questions
Why does the street light flicker at dusk and dawn?
Flickering at the switching threshold is caused by the transistor operating in its linear region — the light level is exactly at the threshold, causing the transistor to switch rapidly between conducting and non-conducting. Adding a small amount of hysteresis (positive feedback from the relay's normally-open contact via a high-value resistor back to the base circuit) prevents the relay from chattering at threshold by creating a wider gap between turn-on and turn-off light levels.
How do I adjust the sensitivity of the LDR circuit?
The sensitivity is set by the variable resistor in the LDR voltage divider. Rotating the potentiometer changes the voltage divider ratio and therefore the light level at which the transistor switches on. Set the adjustment at twilight with the LDR positioned as it will be in service. Turn the potentiometer until the relay just switches the lamp on, then verify the lamp switches off in morning light.
Can I use an operational amplifier (op-amp) instead of a transistor?
Yes — a comparator configuration using a general-purpose op-amp (such as LM741 or LM358) provides sharper switching with less sensitivity to transistor gain variation and temperature. The LDR-resistor divider connects to one input of the comparator; a reference voltage (set by a second voltage divider) connects to the other input. When LDR voltage exceeds the reference, the comparator output drives the relay driver transistor.
Why is the LDR positioned away from the lamp it controls?
If the LDR faces the controlled lamp, the lamp's own light reduces LDR resistance, which can turn off the transistor, which switches off the lamp, causing LDR resistance to rise again, which switches the lamp on — a rapid oscillation cycle. Positioning the LDR to face ambient sky light, shielded from the controlled lamp, prevents this feedback loop.
Is it safe to build this circuit for mains voltage lamps at home?
The low-voltage control circuit (LDR, transistor, relay coil) can be safely assembled by a competent person. However, the mains side of the relay — the contacts that switch the lamp — operates at full mains voltage and must be wired in accordance with the applicable electrical installation standard (NEC, BS 7671, AS/NZS 3000, or IEC 60364). In most jurisdictions, a licensed electrician must connect and certify any new mains circuit.
What does a circuit diagram for automatic street light look like?
A circuit diagram for automatic street light control includes four main stages: an LDR voltage-divider that produces a voltage proportional to light intensity, a comparator IC (commonly LM358) that trips at a set threshold, a transistor or relay driver stage, and the lamp load. When darkness causes the LDR resistance to rise, the comparator output switches high, energises the relay coil, and closes the circuit to the streetlight. The sensitivity threshold is set by a variable resistor in the voltage-divider. You can draw and edit this diagram online for free at circuitdiagrammaker.com.
Related diagrams
- street light circuit diagram
- 4v rechargeable emergency light circuit diagram
- 50 led light circuit diagram 230v
- automatic battery charger circuit diagram
- automatic electric iron circuit diagram
- automatic star delta starter control circuit diagram