A field team faces an unresolved physical question: Why do an LED resistor and a light sensor use the same law? They must answer it before changing led resistor 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 led resistor. The middle card applies this page's relationship. The green card is selected divider voltage. 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 led resistor is 8.
- 2
Name the relationship. R LED =(3.3-2.0)/0.010=130 ohm V bright =3.3x10/(10+8)=1.83 V code bright =4095x1.83/3.3≈2,275 V dark =3.3x10/(10+1000)=0.0327 V code dark ≈41
- 3
Substitute the chapter fixture. Set led resistor to 8. The page ledger gives selected divider voltage as 1.83 V.
- 4
Read the result. Keep V beside the value. Use it only inside the technical boundary on this page.
Predict, then change led resistor
Try Predict the direction of selected divider voltage. Move one control, calculate, then check your prediction.
Observe The fixed resistor and LDR share one rail. Their resistance ratio, not resistance alone, decides the voltage share. Reset the control to 8 and compare selected divider voltage.
Explain Only led resistor 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 what the resistor controls
An LED has a forward voltage, but it does not hold its own current to a safe value. A series resistor spends the remaining rail voltage and sets the current. An LDR changes resistance with light. Paired with a fixed resistor, it turns that change into a voltage ratio that an ADC can read.
2. Name every algebra move
Find voltage across the LED resistorSubtract the LED forward voltage from the rail.
Choose resistanceUse R=(VS−Vf)/I.
Add divider resistanceFind Rfixed+Rsensor.
Take the fixed-resistor shareVout=VSRfixed/(Rfixed+Rsensor).
Scale voltage to ADC codecode=4,095×Vout/Vref.
3. Reproduce the chapter case
Vbright=3.3×10/(10+8)=1.83 V
codebright=4095×1.83/3.3≈2,275
Vdark=3.3×10/(10+1000)=0.0327 V
codedark≈41
The divider is not a linear light meter. As sensor resistance grows far beyond 10 kΩ, equal resistance changes produce smaller voltage and code changes. The raw code must be recorded with the lighting condition.
4. Try the LDR resistance
TryMove the LDR resistance while the rail, fixed resistor, LED, and ADC stay fixed.
ObserveRaising LDR resistance lowers the output voltage and ADC code, but the same resistance step produces less code movement toward the dark end.
ExplainThe fixed resistor and LDR share one rail. Their resistance ratio, not resistance alone, decides the voltage share.
This is a static ideal divider and nominal LED calculation, not a complete sensor or protection design.
- LED
- Forward voltage changes with part, current, and temperature; choose a standard resistor and verify current
- LDR
- Resistance versus lux is part-specific, curved, slow, and temperature-dependent
- ADC
- Input impedance, settling, noise, reference error, and calibration affect the code
Measure voltage and raw code at named light conditions before choosing thresholds.
5. Use the numbers at the bench
Before connecting the LED, calculate the resistor and check the chosen standard value. Before trusting the LDR, measure rail voltage, divider voltage, and raw ADC code in at least bright, normal, and dark conditions. A statement such as “sensor works” loses the curve that threshold design needs.
6. Record the evidence state
Store the rail, LED part and forward voltage, resistor value, measured current, LDR part, fixed resistor, wiring order, ADC reference and mode, raw codes, light conditions, temperature, board, and firmware version.
7. Check yourself
Why is the LED resistor 130 Ω in the teaching case?
Why is the bright divider output 1.83 V?
Does ADC code 2,275 mean a known light level?
The arithmetic reproduces the chapter's 3.3 V rail and catalog-typical LED and LDR values.
- 130 Ω
- A calculated value before standard-value selection and measurement
- 2,275
- An ideal 12-bit code from an assumed 8 kΩ LDR
- 41
- An ideal code at an assumed 1 MΩ, not a universal darkness threshold
Correct, not complete: this ledger does not map raw code to lux or prove electrical safety without measurement.
Voltage Vera guides