The Light and Proximity Numbers
The Light and Proximity Numbers
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
The Light and Proximity Numbers
Divider voltage, time of flight, and temperature error, ~4 minutes
The sensor reading only becomes trustworthy after the physics unit is explicit: volts for the divider, metres for an echo, nanoseconds for optical timing, and centimetres of error when air temperature changes.
A lab notebook records a threshold of 1800 ADC counts and an ultrasonic echo of 5.83 ms that the chapter turns into a 1.00 m reading using 343 m/s, while light itself needs only 6.67 ns to cover that same 1 m round trip. The same page warns that at 0°C, sound closer to 331 m/s makes the 343 m/s formula overestimate a 2.0 m target by roughly 7 cm. This audit asks the question those numbers invite: once volts, metres, nanoseconds, and temperature are all made explicit, do the divider and time-of-flight calculations actually hold up?
Companion to the chapter Light and Proximity Readout Physics — every number here comes from that chapter.
See the relationship before changing it
The figure reads from left to right. The blue card is photodiode current. The middle card applies this page's rule. The green card is amplifier output. 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 model keeps those stated values fixed and changes only photodiode current, so the numeric fixture does not switch without explanation.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 1 uA.
- 2
Name the relationship. voltage = photocurrent x 1 megaohm
- 3
Substitute with units. 1 uA x 1 megaohm = 1.00 V
- 4
Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.
Predict, then change photodiode current
Try Predict the direction of voltage = photocurrent x 1 megaohm. Test another photodiode current, then compare amplifier output.
Observe The transimpedance stage turns each microamp of light current into one volt. Reset photodiode current to 1 and compare amplifier output.
Explain The transimpedance stage turns each microamp of light current into one volt.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
Begin with Iphoto = 1 microamp and Rf = 1 Mohm, then evaluate the 3.3 V LDR divider before pressing Check audit.
Photodiode output reads 1.0 V; the LDR voltage shifts from 2.5385 V bright to 0.4714 V dim, exposing the divider orientation.
The 1 Mohm transimpedance stage converts current linearly, whereas the LDR forms a resistance ratio whose output direction depends on which divider leg contains the sensor.
The checks from the chapter values
| Check | Arithmetic from the chapter values | Review result |
|---|---|---|
| Photodiode front-end | Vout = Iphoto * Rf = 0.000001 A * 1,000,000 ohm = 1.000000 V. |
A 1 microamp photocurrent becomes a readable 1.0 V ADC input. |
| LDR divider | Vbright = 3.3 * 10 / (3 + 10) = 33 / 13 = 2.538461538 V; Vdim = 3.3 * 10 / (60 + 10) = 33 / 70 = 0.471428571 V. |
The rounded values are 2.54 V and 0.47 V, so this divider orientation falls as darkness raises the LDR resistance. |
| Ultrasonic echo | distance = 343 m/s * 0.00583 s / 2 = 0.999845 m. |
The displayed 1.00 m result is the final rounded value after the round-trip divide-by-two. |
| Optical time of flight | round trip = 2 m / 300,000,000 m/s = 0.000000006666... s = 6.666... ns. |
The 6.67 ns result explains why optical ranging needs dedicated timing hardware. |
| Cold-air distance error | For a true 2.0 m target at 0 °C: echo time = 4 / 331 = 0.012084592 s; using 343 m/s gives 343 * 0.012084592 / 2 = 2.072508 m. |
The overestimate is 2.072508 - 2.0 = 0.072508 m, or about 7.3 cm. |
What the audit buys you: thresholds become portable only when the unit, divider orientation, propagation speed, and rounding step are visible. A count-only threshold hides the physics; a short arithmetic trail makes the lab repeatable.
Every number above is taken from the chapter’s own light and proximity examples and re-derived step by step.
Technical boundaries: The ideal transimpedance and LDR-divider equations omit photodiode dark current and capacitance, amplifier bandwidth and offset, LDR tolerance and hysteresis, ambient spectrum, ADC loading, and supply variation.