Interactive workbench · Experiment 05
How do you light an LED as it gets darker?
Connect light, resistance, voltage and a threshold to build a night light.
Change the light. The LDR changes resistance; the comparator decides whether the LED lights up.
IDEAL MODELSelect a component
Measurements
- —V
- —V
- LED current
- —mA
- LDR resistance
- —kΩ
A · remembered
B · current
Difference B − A
Checks with the current configuration
- Darkness · 20%
- To measure
- Light · 80%
- To measure
Explain before continuing
Principle and limits
Ideal night light: supply → fixed resistor → LDR → ground. The comparator does not load the divider; its output equals the supply if Uldr ≥ threshold, otherwise 0 V. It drives a fixed-drop 2 V LED through 330 Ω. LDR resistance follows an illustrative law from 100 kΩ in darkness to 1 kΩ at full light: this percentage is not a lux measurement. No commercial component, hysteresis, delay or heating is reproduced.
Adafruit · Photocells (resistive sensing principle) ↗