/    Calculators » ADC calculator
Support the project on Patreon


Calculator KB-44

ADC calculator

What analogRead actually measures and what code you'll get for your voltage.

KB-44ADC calculatorCalculates in real time

Result

Least significant bit value4.883 mV
ADC code675
At the ADC input3.3 V
Can measure up to5 V
Step size including divider4.883 mV
Theoretical signal-to-noise ratio62 dB
Share calculation

In brief: Microcontroller ADC calculations: resolution in millivolts, code value for a given voltage, voltage divider for measuring higher voltages, and theoretical signal-to-noise ratio. Example: Least significant bit value: 4.883 mV.

Calculation example

Input data
Resolution10 bit
Reference voltage5 V
Measured voltage3.3 V
Result
Least significant bit value4.883 mV
ADC code675
At the ADC input3.3 V
Can measure up to5 V
Step size including divider4.883 mV
Theoretical signal-to-noise ratio62 dB

How it is calculated

LSB = Vref / 2ⁿ
N = U / LSB
SNR = 6,02 · n + 1,76 dB

The ADC divides the range from zero to the reference voltage into 2ⁿ steps and outputs the step number. Accuracy is often determined not by the resolution, but by the stability of the reference voltage and power supply noise.

What to look for

  • The ADC input voltage must not exceed the reference voltage or the supply voltage: doing so can damage the pin.
  • The ESP32 ADC is noticeably nonlinear, especially near the ends of its range. Calibration is needed for accurate measurements.

Frequently asked questions

How many volts per ADC count on an Arduino Uno?

10 bits with a 5 V reference: 5 / 1024 = 4.883 mV per count. An input of 3.3 V gives a reading of 675.

How do you measure 12 V with an ADC using a 3.3 V reference?

Use a voltage divider: 10 kΩ and 2.2 kΩ reduce 12 V to 2.16 V, extending the measurement range to 18.3 V. One step of a 12-bit ADC then corresponds to about 4.5 mV at the input.

Why are ESP32 ADC readings inaccurate?

Its response is nonlinear, especially near the ends of the range, and the reference voltage varies between chips. Calibration is needed; for accurate measurements, use an external ADC such as the ADS1115.

Updated · kirich.blog · The calculation runs in your browser; no data is sent anywhere.

See also