Predict an Arduino ADC reading from a voltage divider
Place the upper resistor between 5 V and the junction and the lower resistor between the junction and ground.
0 of 3 complete · Progress saved on this device
Work out the example
Place the upper resistor between 5 V and the junction and the lower resistor between the junction and ground. With 10 kΩ above and 20 kΩ below, the junction is two thirds of the supply when the load is negligible.
Decide what to check next
Under the nominal 5 V reference, use the ideal ADC bin count as a prediction. The physical input has a finite sample-and-hold capacitance and resistor tolerances. A real reading may differ, particularly with high source impedance.
Compare with the serial result
The sketch prints 682. It computes an ideal ratio from constants without sampling a physical pin.
Open the exact Uno example
The sketch prints 682. It computes an ideal ratio from constants without sampling a physical pin.
void setup() {
Serial.begin(9600);
Serial.println(1024UL * 20 / (10 + 20));
}
void loop() {}Verified with [email protected] on Uno R3 (2026-12-05 UTC). This check did not use physical hardware.