light sensor circuit diagram
This is a free printable light sensor circuit diagram: download the diagram as SVG or open it and print to paper or PDF.
A light sensor circuit diagram configuration establishes reliable control over complex electrical systems through strategic use of contactors and distributed protection. The circuit topology separates control signals from power paths, allowing low-voltage logic to manage high-power loads safely. Protective devices are rated and coordinated to ensure selective tripping during fault conditions, preventing cascade failures across unaffected branches. Component tolerance analysis ensures predictable operation across manufacturing variations and environmental temperature ranges. The ground distribution uses star topology to minimize return-path impedance and reduce voltage distortion.
How to wire light sensor circuit diagram
- Choose the sensor type for your application Use an LDR for simple light/dark switching (outdoor lights, security lights). Use a phototransistor for faster detection (counters, object detection). Use a PIR where human movement detection is needed rather than ambient light level.
- Build the voltage divider with the LDR Connect the LDR between the positive supply (5 V or 3.3 V) and the analogue input pin. Connect a 10 kΩ resistor from the analogue input pin to ground. The midpoint voltage varies from near-supply in darkness to near-ground in bright light.
- Set the threshold with a comparator Use an LM393 dual comparator. Connect the LDR divider output to the inverting input. Connect a potentiometer voltage divider to the non-inverting input as a threshold reference. Adjust the pot until the output switches at the desired light level.
- Add hysteresis to prevent chatter Add a 100 kΩ feedback resistor from the comparator output to the non-inverting input. This creates a small hysteresis band so the output does not chatter when the light level hovers near the switching threshold — a common problem on street light control circuits.
- Drive a relay for mains switching Connect the comparator output to the base of an NPN transistor (BC547 or 2N2222) via a 1 kΩ resistor. Connect a 5 V relay coil between the collector and supply. Add a 1N4007 flyback diode across the relay coil to suppress the back-EMF spike.
- Test with a torch and shade Power the circuit. Cover the LDR completely — the relay should energise. Shine a torch on the LDR — the relay should release. Adjust the threshold pot to the exact light level at which you want the switching to occur.
Frequently asked questions
What types of light sensors are used in circuit diagrams?
The most common types are LDR (light-dependent resistor), phototransistor, photodiode, and PIR sensor. LDRs are passive resistive components used in simple switch circuits. Phototransistors and photodiodes are active devices with faster response times used in signal circuits and counters.
How does an LDR work in a light sensor circuit?
An LDR (light-dependent resistor) decreases resistance as light intensity increases. In a voltage divider circuit with a fixed resistor, the voltage at the midpoint changes with light level. A comparator or transistor then switches a load on or off based on the threshold voltage.
What resistor value do I use with an LDR in a 5 V Arduino circuit?
A 10 kΩ pull-down resistor in a voltage divider with the LDR is the standard starting point for a 5 V Arduino analogue input. The LDR resistance in normal indoor light is typically 5–20 kΩ, so 10 kΩ gives a readable voltage swing across the ADC range.
Why does my light sensor circuit behave erratically?
Common causes are a floating input on the microcontroller (no pull-up or pull-down resistor), supply voltage noise affecting the comparator threshold, or the LDR responding to IR from nearby equipment. Add a 100 nF decoupling capacitor on the supply pins of your comparator or MCU.
Can a light sensor circuit control a 220 V light fitting directly?
No. An LDR or phototransistor output is a low-voltage signal only. To switch a 220 V load, connect the sensor output to a relay module or solid-state relay rated for 220 V. The relay provides the voltage isolation between the sensor circuit and the mains load.
Related diagrams
- 3 wire motion sensor light wiring diagram
- 4v rechargeable emergency light circuit diagram
- 50 led light circuit diagram 230v
- automatic street light circuit diagram
- emergency light circuit diagram
- led light circuit diagram