viewof vd_vin = Inputs.range([1, 12], {value: 3.3, step: 0.1, label: "Supply Voltage V_in (V)"})
viewof vd_r1 = Inputs.range([100, 100000], {value: 10000, step: 100, label: "R1 - Top Resistor (Ω)"})
viewof vd_r2 = Inputs.range([100, 100000], {value: 10000, step: 100, label: "R2 - Bottom Resistor (Ω)"})Voltage Divider Calculator
Voltage Divider Calculator
animation
sensors
Try Leave Supply Voltage V_in (V) at 3.3 and R2 - Bottom Resistor (Ω) at 10000, then lower R1 - Top Resistor (Ω) from 10000.
Observe The opening equal resistors give 1.650 V, 0.165 mA and ADC reading 2048. Lowering the top resistance raises both output voltage and divider current.
Explain R2 - Bottom Resistor (Ω) divided by the sum of both resistances sets the supply fraction at the output.
Technical boundaries. The divider assumes ideal resistors with no load on the tap. ADC conversion rounds the output-to-3.3 V ratio times 4095 and replaces the reading with a warning when the output exceeds 3.3 V.
Voltage Divider Calculator
Use the resistor values and supply voltage to estimate the tap voltage before connecting it to the ADC.
TipGuided Lab: Voltage Divider
Try it yourself! Use the voltage-divider calculator above to see how resistor ratios become measurable sensor voltages. Predict the output first, then move the sliders.
1. Start balanced
Set R1 = 10 kΩ and R2 = 10 kΩ. The output should be half of the supply voltage.
2. Make the sensor change
Lower R1 to model bright light on an LDR, then raise R1 to model darkness.
3. Connect the meaning
Watch the ADC count move with voltage. This is the number your microcontroller actually reads.
Design question: which resistor placement gives the largest voltage swing over the sensor's real resistance range?