Two ways to measure light
8 parts
Two light sensors share one 5 V rail. The LDR is a resistance law — R = R₁₀·(lux/10)^−γ, with the illuminance a number you set, because nothing on the canvas actually senses light — and it forms the upper leg of a divider feeding an 8-segment bar readout: at the shipped 100 lx it measures 1995 Ω and the divider settles at 4.161 V, lighting 7 of the 8 segments. The photodiode beside it is a real Shockley junction model, reverse-biased from the same rail and pushing its parameter-set photocurrent of resp × irr = 50.0 µA into a 22 kΩ load, measured at 1.100 V. The bar graph is a behavioural display — one real input resistance, eight thresholds evaluated only for the picture — and both readings land inside the default window, node A within 0.76 ms and node B within 0.48 ms.
- V1 5V
- LDR1 2kΩ@100lx
- R1 10kΩ
- C1 100nF
- BAR81 1MΩ
- PHD1 100W/m²
- R2 22kΩ
- C2 4.7nF