Light sensing and hysteresis
A night-light that remembers
LDR means Light Dependent Resistor: a light-sensitive resistor whose resistance falls in brighter light. A comparator compares voltages and switches its output. Hysteresis uses two switching thresholds, keeping the previous state between them.
EXPERIMENT BENCH
Change the circuit settings, predict the readings, then check a challenge. These are learning models, with the assumptions explained in each lesson.
Sign in to save progress. Guest progress stays on this device.
Why it works
Illustrative LDR model: 100 kΩ in darkness to 1 kΩ at maximum light. Ideal comparator turns the lamp on at 2 V or below and off at 3 V or above; intermediate voltage retains its state.
The upper LDR and lower fixed resistor divide 5 V. More light lowers LDR resistance and raises the input voltage. Hysteresis separates the on and off thresholds, reducing repeated switching near one threshold.
Difficulty
Build · Build it
Power on with 10 kΩ below the sensor and light at 20% or less. Make the lamp on with input at most 2 V.
Need a hint?
20%; 10 kΩ → 1.00 V
Explore · Change one thing
With 10 kΩ, raise light to at least 80%. Make the lamp off with input at least 3 V.
Need a hint?
80%; 10 kΩ → 4.00 V
Solve it · Solve the challenge
With 10 kΩ, first make it dark, then return light to 50%. Keep the lamp on at 2.50 V.
Need a hint?
0% → 50%; 10 kΩ → 2.50 V
Extra reading and circuit recipes
A night-light that remembers
A useful pattern
At 50% light the model gives 10 kΩ; equal divider resistances produce 2.50 V.
Beyond this model
Real sensor response and switching thresholds vary; this illustrative light scale is not a lux measurement.
A useful trap to avoid
Hysteresis is state memory between thresholds, not a timed delay. The same intermediate light can produce either state.
At 2.50 V between thresholds, a previously on lamp…
- turns off
- flickers automatically
- stays on
Read more
Neither switching threshold is crossed, so the comparator keeps its previous state.