For a 2.5V analog input on a 16-bit AD converter circuit with a 5.0V reference voltage, the exact digital output code is 32,768 (hex 0x8000). The governing formula for a unipolar ADC is Code = (Vin / Vref) × 2n. Substituting our exact values: (2.5V / 5.0V) × 216 = 0.5 × 65,536 = 32,768. This calculation assumes a single-ended, unipolar configuration with zero offset error and a perfectly stable voltage reference.

Neighboring Voltage-to-Code Conversion Table (±20% Range)

When debugging sensor drift or mapping a potentiometer sweep, you rarely sit exactly on the midpoint. Below is the conversion table for a ±20% range around our 2.5V baseline (2.0V to 3.0V), mapped across three common ADC resolutions using a fixed 5.0V reference.

Analog Input (Vin) 10-Bit Code (Max 1023) 12-Bit Code (Max 4095) 16-Bit Code (Max 65535)
2.0V (-20%)409163826214
2.2V (-12%)450180228835
2.4V (-4%)491196631457
2.5V (Baseline)512204832768
2.6V (+4%)532213034078
2.8V (+12%)573229336700
3.0V (+20%)614245739321

Core Assumptions and Voltage Shifts

The raw math above only holds if three assumptions remain fixed: the reference voltage (Vref), the bit resolution (n), and the input topology (unipolar vs. bipolar). If any of these shift, your digital code changes drastically.

How the Answer Shifts Across Platforms

  • 3.3V Logic (e.g., ESP32 Internal 12-bit ADC): If Vref drops to 3.3V, a 2.5V input yields (2.5 / 3.3) × 4096 = 3103. Note that ESP32 internal ADCs are notoriously non-linear above 2.8V; always use an external ADC for precision 3.3V work.
  • 5.0V Logic (e.g., Arduino Uno ATmega328P 10-bit ADC): With a 5.0V Vref, a 2.5V input yields 512. However, if you power the Uno via USB, Vref might actually be 4.7V due to diode drops, shifting your 2.5V code to 545.
  • Industrial Bipolar (e.g., ±10V PLC Input 16-bit): In a bipolar system, the formula shifts to Code = [(Vin - Vmin) / (Vmax - Vmin)] × 2n. For a ±10V range (20V span), a 2.5V input yields [(2.5 - (-10)) / 20] × 65536 = 40960.
When the Conversion is Meaningless: Do not trust the digital code if your input signal frequency exceeds the Nyquist limit (half your sampling rate). Sampling a 60Hz AC waveform at 100Hz will yield aliasing, producing mathematically valid but physically false digital codes. Furthermore, if your circuit's noise floor is 10mV, the bottom 4 bits of a 16-bit ADC (where 1 LSB = 0.076mV at 5V) are just digitizing thermal noise.

AD Converter Circuit IC Decision Tree

Stop guessing which ADC breakout to buy. Follow this decision path to terminate on the exact part number for your bench or PCB design.

Application Constraint If your project requires... Then choose this exact IC Typical 2026 Price
Hobby / Low Speed Reading slow-moving potentiometers or joysticks via SPI, ≤10kHz sample rate. Microchip MCP3008 (10-bit, 8-channel SPI) $1.80 (DIP-16)
Precision I2C Sensor Measuring load cells, thermocouples, or battery voltage where I2C is preferred and noise must be rejected. TI ADS1115 (16-bit, 4-channel I2C with PGA) $3.50 (Breakout)
High-Speed Oscilloscope Capturing audio or vibration waveforms requiring ≥1 MSPS (Mega-samples per second). TI ADS4142 (14-bit, 65 MSPS LVDS) $28.00 (QFN)
Industrial Mains Monitoring Directly sampling ±10V analog PLC signals or isolated AC waveforms without external op-amp scaling. TI ADS8688A (16-bit SAR, ±10V input ranges) $14.50 (LQFP-48)

Hardware Design and PCB Layout Rules

An ADS1115 datasheet will promise 16 bits of resolution, but your physical layout dictates how many bits you actually get. To prevent your AD converter circuit from acting like a random number generator, enforce these bench rules:

  1. Decoupling is Non-Negotiable: Place a 100nF X7R ceramic capacitor and a 10μF tantalum capacitor as close to the VDD and GND pins as physically possible. SAR ADCs draw massive instantaneous current spikes during the sampling phase; without local charge storage, the internal reference will brownout, corrupting the MSBs.
  2. Star Ground the Analog Return: Never route high-current digital return paths (like motor driver grounds) through the ADC's analog ground plane. Route the ADC GND pin directly to the power supply entry point in a star topology to prevent ground bounce from adding offset voltage to your Vin.
  3. RC Anti-Aliasing Filter: Always place a low-pass RC filter (e.g., 100Ω resistor + 1nF C0G capacitor) on the analog input pin. This creates a 1.59MHz cutoff, providing a charge reservoir for the ADC's internal sampling capacitor while attenuating high-frequency RF interference.

ADC Troubleshooting FAQ

Why is my 16-bit ADC fluctuating by ±15 counts when the input voltage is perfectly stable?
You are digitizing your power supply noise. If your Vref is derived directly from a switching buck converter without an LDO (Low Dropout Regulator) post-filter, the switching ripple is being multiplied by your ADC. Put a linear regulator (like an LP5907) between your main supply and the ADC Vref pin.

Can I use the microcontroller's internal VCC as the ADC reference voltage?
Only if you don't care about accuracy. As standard digital conversion theory dictates, the ADC measures the ratio of Vin to Vref. If Vref is tied to VCC, and VCC sags by 3% when a servo motor turns on, your digital code will shift by 3% even if the analog sensor voltage hasn't changed. Always use a dedicated voltage reference IC (like the LM4040) for precision work.

My ADC reads exactly 65,535 (all 1s) no matter what I plug in. What broke?
Your input voltage exceeds Vref, or you have a floating input pin on a CMOS ADC. Unconnected CMOS ADC inputs do not default to zero; they float to the positive rail due to leakage currents, maxing out the register. Tie all unused ADC inputs to GND via a 10kΩ pulldown resistor.