If you are feeding a 2.5V analog signal into an ADC converter circuit, the resulting digital output count depends entirely on your reference voltage and bit resolution. For a standard 10-bit Arduino Uno (5V reference), 2.5V converts to exactly 512 counts. For a 12-bit ESP32 internal ADC (3.3V reference), it theoretically converts to 3070 counts, but practically reads around 2850 counts due to inherent silicon non-linearity. For a precision 16-bit external ADC like the TI ADS1115 (5V reference), 2.5V yields exactly 32768 counts.

The universal formula for this conversion is:
Count = (V_in / V_ref) × (2^n - 1)
Substituting our baseline values for a 10-bit system: (2.5V / 5.0V) × (2^10 - 1) = 0.5 × 1023 = 511.5 (which the microcontroller rounds to 512).

Neighboring Values: The ±20% Conversion Table

In real-world sensor applications, your voltage will fluctuate. Here is how a ±20% variance around our 2.5V target (2.0V to 3.0V) maps to digital counts across the three most common microcontroller ADC resolutions. This table assumes a stable, ideal reference voltage.

Analog Input (V_in) 10-Bit (5V Ref)
Arduino Uno
12-Bit (3.3V Ref)
ESP32 Internal
16-Bit (5V Ref)
TI ADS1115
2.0V (-20%)4092275 (Practical)26214
2.2V (-12%)4502500 (Practical)28835
2.5V (Baseline)5122850 (Practical)32768
2.8V (+12%)5733180 (Practical)36700
3.0V (+20%)614Saturation Risk39321

What Fixes Your ADC Conversion Accuracy

The math above assumes an ideal world. In practice, three assumptions fix your actual conversion accuracy:

  • Reference Voltage (V_ref) Stability: If your 5V USB rail sags to 4.8V under load, your 2.5V reading on a 10-bit ADC jumps from 512 to 533. The assumption that V_ref is exactly 5.0V is the most common point of failure in hobbyist circuits.
  • Bit-Depth and Noise Floor: A 16-bit ADC has a theoretical resolution of 0.076mV per count (at 5V). If your breadboard has 5mV of switching noise, your last 6 bits are meaningless garbage. The conversion is mathematically precise but practically useless.
  • Silicon Non-Linearity: The Espressif ESP32 technical reference manual explicitly documents that the internal 12-bit ADC suffers from severe non-linearity, particularly near the 0V and 3.3V rails. A theoretical formula will fail here; you must use the ESP-IDF ADC calibration API or an external chip.
When is the conversion meaningless?
The voltage-to-count conversion becomes meaningless when your input noise exceeds 1 LSB (Least Significant Bit), or when you attempt to measure voltages outside the ADC's linear range. For example, feeding 3.2V into the ESP32 internal ADC will yield unpredictable saturation counts, rendering the formula invalid.

Scaling Mains Voltage: 120V, 230V, and 3-Phase Shifts

A common question is how this conversion shifts when measuring mains power (120V vs 230V vs 3-phase). You cannot feed mains voltage directly into an ADC converter circuit. Doing so will instantly destroy the microcontroller and pose a lethal shock hazard.

To measure AC mains, the answer shifts from a direct voltage conversion to a scaled and biased conversion:

  • 120V AC (US): Requires a step-down transformer or ZMPT101B voltage sensor module to scale the 170V peak down to a 0-3.3V range, biased at 1.65V DC so the ADC can read the negative half-cycles.
  • 230V AC (EU/UK): Requires a higher ratio voltage divider or sensor module. The ADC still only sees 0-3.3V, but your software multiplier must account for the 230V RMS primary side.
  • 3-Phase: Requires three isolated ADC channels (or three separate ADC chips) to maintain safe phase-to-phase isolation. The conversion formula remains identical per channel, but you must sample all three simultaneously to calculate phase angle and power factor.

Decision Tree: Picking the Right ADC Converter Circuit

Stop guessing which chip to buy. Use this decision path to terminate on a concrete part number for your next PCB or breadboard build.

If your application requires... And your constraint is... Then pick this exact ADC part:
Basic potentiometer or LDR reading Low cost, no strict precision needed Internal MCU ADC (Use 100nF cap on pin to GND to reduce noise)
8-channel sensor array (e.g., soil moisture) 5V logic, moderate speed, SPI bus Microchip MCP3008 (10-bit, 8-channel SPI, ~$2.50)
Precision load cell, thermocouple, or battery monitoring High resolution, slow signal, I2C bus TI ADS1115 (16-bit, 4-channel I2C, ~$3.00) [DEFAULT PICK]
Audio sampling or high-speed waveform capture >100 kSPS sampling rate, 3.3V logic TI ADS8688 (16-bit, 8-channel SPI, 500kSPS, ~$12.00)

Implementation: Wiring the Default Pick (ADS1115)

For 90% of precision DIY projects, the TI ADS1115 is the correct choice. It bypasses the noisy internal ADCs of the ESP32 and Arduino, providing a stable 16-bit conversion with a programmable gain amplifier (PGA).

Wiring Pinout (ESP32 to ADS1115)

  • VDD: 3.3V (Do not use 5V if your ESP32 I2C pins are 3.3V tolerant only)
  • GND: Common ground with ESP32 and sensor
  • SCL: GPIO 22
  • SDA: GPIO 21
  • A0: Analog signal input (0V to VDD)
  • ADDR: GND (Sets I2C address to 0x48)

Arduino/ESP32 Code Snippet

#include <Wire.h>
#include <Adafruit_ADS1X15.h>

Adafruit_ADS1115 ads;

void setup() {
  Serial.begin(115200);
  // Gain set to 2/3x (allows 0-6.144V range on a 5V powered board, 
  // or safely up to 3.3V on a 3.3V board without clipping)
  ads.setGain(GAIN_TWOTHIRDS);
  if (!ads.begin(0x48)) {
    Serial.println("Failed to initialize ADS1115. Check wiring.");
    while (1);
  }
}

void loop() {
  int16_t adc0 = ads.readADC_SingleEnded(0);
  // Convert raw count back to voltage based on 6.144V range and 16-bit resolution
  float voltage = adc0 * 0.1875 / 1000.0; 
  
  Serial.print("Raw Count: "); Serial.print(adc0);
  Serial.print(" | Voltage: "); Serial.println(voltage, 4);
  delay(250);
}

FAQ: ADC Converter Circuit Edge Cases

Why does my 16-bit ADC reading fluctuate by 20 counts when the multimeter reads a steady 2.500V?
Your multimeter has a low-pass filter and averages the reading. The ADC is sampling high-frequency breadboard noise. Add a 100nF ceramic capacitor and a 10µF electrolytic capacitor in parallel between the ADC input pin and GND to create a hardware low-pass filter.

Can I use a voltage divider to measure a 12V car battery with a 3.3V ESP32 internal ADC?
Yes, but the conversion will drift. Car alternators introduce massive voltage spikes and ripple. Use a 10kΩ/3.3kΩ resistor divider, add a 100nF cap at the ADC pin, and rely on the ESP32's multi-sampling API to average out the alternator whine.