A field team faces an unresolved physical question: How LDR resistance becomes an ADC code They must answer it before changing ldr resistance in kilohms on the real device. Predict the direction first.
See the relationship before changing it
The figure reads from left to right. The blue card is ldr resistance in kilohms. The middle card applies this page's relationship. The green card is ideal adc code. Walk the arrows once: set the input, apply the rule, then read the result with its unit.
The retained audit below checks several chapter fixtures. This added model holds every other chapter fixture fixed, so the numeric fixture does not switch without explanation.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline for ldr resistance in kilohms is 10.
- 2
Name the relationship. Vout=VCC Rfixed/(RLDR+Rfixed); code=4095 Vout/VCC
- 3
Substitute the chapter fixture. Set ldr resistance in kilohms to 10. The page ledger gives ideal adc code as 2048.
- 4
Read the result. Keep the stated output unit beside the value. Use it only inside the technical boundary on this page.
Predict, then change ldr resistance in kilohms
Try Predict the direction of ideal adc code. Move one control, calculate, then check your prediction.
Observe Increasing the LDR resistance lowers both series current and the fixed resistor's voltage share. Reset the control to 10 and compare ideal adc code.
Explain Only ldr resistance in kilohms moves here. The other chapter fixtures remain fixed.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
1. Start with the current path
The LDR and the fixed resistor form one series path from 3.3 V to ground. The ADC watches the voltage across the fixed resistor.
2. Build the divider rule
Add the series resistanceRtotal=RLDR+Rfixed.
Find currentI=VCC/Rtotal.
Take the fixed-resistor dropVout=IRfixed=VCC Rfixed/(RLDR+Rfixed).
3. Convert voltage to a code
A 12-bit converter has codes 0 through 4095. The ideal code is the same fraction of 4095 as Vout is of 3.3 V.
The hardware returns an integer, so the ideal value is rounded to the nearest available code.
4. Try the LDR resistance
TryMove the LDR from bright-light resistance toward the chapter's darker cases.
ObserveAt 10 kΩ, equal resistors split 3.3 V in half: 1.65 V, ideal code 2048, and 0.165 mA.
ExplainIncreasing the LDR resistance lowers both series current and the fixed resistor's voltage share.
This ideal divider
- ADC input loading
- Needs separate evidence
- resistor tolerance
- Needs separate evidence
- LDR spectral response
- Needs separate evidence
- self-heating
- Needs separate evidence
- supply/reference error
- Needs separate evidence
- nonlinear calibration
- Needs separate evidence
- target colour
- Needs separate evidence
- angle
- Needs separate evidence
- sunlight
- Needs separate evidence
- optics
- Needs separate evidence
- two-way geometry
- Needs separate evidence
Use field evidence or a deeper model before release.
5. Work bright and midpoint
The midpoint is easy to reason about: equal resistors share the supply equally.
6. Work darkness, then stop claiming universality
The chapter's 50 cm proximity threshold is a measured decision boundary. Inverse-square spreading predicts 4.00× one-way irradiance at 25 cm, but it does not make one universal ADC threshold for every target and room.
7. Check yourself
Why is Vout 1.65 V when both resistors are 10 kΩ?
Which way does the ADC code move as this LDR resistance rises?
Does the inverse-square rule produce a universal 50 cm threshold?
These are the chapter inputs, worked results, and named teaching assumptions.
- 3.3 V supply
- Voltage or voltage-step value
- 10 kΩ fixed resistor
- Resistance or impedance value
- 12-bit 0–4095 ADC
- Digital resolution or converter setting
- 1 kΩ/3.00 V/code 3723
- Voltage or voltage-step value
- 10 kΩ/1.65 V/code 2048
- Voltage or voltage-step value
- 1 MΩ/0.0327 V/code 41
- Voltage or voltage-step value
- 50 cm threshold
- Distance, wavelength, or size
- 4.00× 25 cm ratio come from the chapter
- Distance, wavelength, or size
This page does not turn a pedagogical divider into a calibrated lux or distance meter.
Phoebe guides