A sensor input can look correct in the schematic and still produce misleading measurements. Scaling the voltage into the ADC range is only one part of the design. The input also needs suitable bandwidth, acquisition time and behaviour outside normal operating conditions.
Design for the largest expected input
For an unloaded resistor divider:
Vout = Vin × Rbottom / (Rtop + Rbottom)
Consider a deliberately hypothetical example: a 100 kΩ upper resistor and a 15 kΩ lower resistor produce approximately 3.13 V from 24 V. That seems suitable for a nominal 3.3 V ADC supply, but at 30 V the output becomes approximately 3.91 V.
The lesson is to calculate the maximum continuous input first. Include resistor tolerances and the lowest applicable ADC reference/supply. Check the ADC’s specified conversion range separately from its absolute maximum ratings. A pin surviving a voltage does not mean it can measure that voltage correctly.
For comparison, a hypothetical 120 kΩ / 10 kΩ divider produces approximately 2.77 V at 36 V. This illustrates greater headroom; it is not a complete, validated input circuit.
Review the resistance seen by the ADC
For a low-impedance input source, the divider’s Thevenin resistance is:
Rsource = Rtop × Rbottom / (Rtop + Rbottom)
For the second example, this is approximately 9.23 kΩ before additional series resistance. Increasing resistance reduces divider current, but changes how the source drives the ADC’s sampling network. Check the particular ADC’s acquisition requirements rather than selecting the shortest sampling time by default. ST discusses this relationship in AN2834.
Choose filtering from the required response
An external capacitor can suppress noise, but also slows the signal. In a simplified first-order model with 1 kΩ additional series resistance and 10 nF at the ADC input:
τ ≈ (9.23 kΩ + 1 kΩ) × 10 nF ≈ 102 µs
The corresponding cutoff is approximately 1.56 kHz. An ideal step takes about 4.6Ï„, or 0.47 ms, to settle within 1% of its final value.
These calculations describe the external passive network with an ideal source and negligible ADC loading. They do not calculate ADC acquisition error. Check both external settling and the actual sampling network, particularly when scanning channels with very different voltages.
Review protection as a separate requirement
Check transient amplitude, clamp voltage at the relevant current, leakage, capacitance and allowable pin injection current. Also consider an externally driven input while the MCU is unpowered. A protection device’s nominal voltage alone does not establish compatibility with the ADC.
Verify with a controlled input
Apply known voltages across the intended range and compare the result with a trusted measurement. Test a step, vary acquisition time and repeat with neighbouring ADC channels at different levels. This helps distinguish scaling, settling and channel-interaction errors.
Takeaway: review an ADC input as a complete measurement path, not just a divider ratio.