When working with embedded systems, the most fundamental unit conversion is translating an analog voltage into a digital count. For a baseline query of converting a 2.5V analog input using a 16-bit ADC with a 5.0V reference voltage, the direct converted answer is exactly 32768. The governing formula is Digital Code = (Vin / Vref) × 2n. Substituting our values: (2.5 / 5.0) × 216 = 0.5 × 65536 = 32768. At this resolution, your Least Significant Bit (LSB)—the smallest voltage change the ADC can detect—is 5.0V / 65536, or 76.29 µV. However, this math only holds true if you understand the underlying architecture of your specific chip and the physical limitations of your analog front-end.
Core Architectures: Types of AD Converters Compared
Not all ADCs calculate that digital code the same way. The types of AD converters available on the market are divided by how they sample and quantize the incoming signal. Choosing the wrong architecture for your sampling rate or resolution needs will result in dropped data or excessive noise.
| Architecture | Resolution (Bits) | Sampling Rate (SPS) | Latency / Conversion Time | Common IC Example | Best Application |
|---|---|---|---|---|---|
| SAR (Successive Approximation) | 8 to 20-bit | 10k to 5M SPS | Low (Single clock cycle per bit) | TI ADS1115 (16-bit, 860 SPS) | Precision DC sensors, battery monitoring, I2C/SPI MCU add-ons |
| Sigma-Delta (ΣΔ) | 16 to 32-bit | 10 to 100k SPS | High (Requires digital filter settling) | TI ADS1256 (24-bit, 30k SPS) | Load cells, RTDs, audio, high-precision slow-moving DC |
| Flash (Parallel) | 6 to 12-bit | 100M to >1G SPS | Ultra-Low (Single clock edge) | Analog Devices AD9480 (8-bit, 250M SPS) | RF digitization, oscilloscopes, high-speed radar |
| Pipeline | 10 to 16-bit | 10M to 500M SPS | Medium (Multi-stage pipeline delay) | Analog Devices LTC2208 (13-bit, 130M SPS) | Software-defined radio, medical imaging, intermediate-frequency (IF) sampling |
Voltage-to-Code Conversion Table (±20% Range)
The assumption that fixes your conversion answer is the Reference Voltage (Vref) and the bit depth (n). If Vref drifts due to thermal noise or poor PCB layout, your digital code shifts proportionally. Below is a conversion table showing a ±20% range around our 2.5V baseline, mapped across three common microcontroller and external ADC configurations.
| Analog Input (Vin) | 16-bit Code (5.0V Ref) | 12-bit Code (3.3V Ref - ESP32/STM32) | 10-bit Code (5.0V Ref - AVR/Arduino) |
|---|---|---|---|
| 2.0V (-20%) | 26214 | 2482 | 410 |
| 2.1V | 27525 | 2606 | 430 |
| 2.5V (Baseline) | 32768 | 3103 | 512 |
| 2.9V | 38010 | 3599 | 594 |
| 3.0V (+20%) | 39321 | 3723 | 614 |
How the Math Shifts for 120V vs 230V vs 3-Phase Systems
A critical safety and engineering distinction arises when bridging low-voltage embedded ADCs with high-voltage AC power systems. You cannot plug 120V, 230V, or 3-phase mains directly into an ADC. Doing so will instantly vaporize the silicon and pose a lethal shock hazard. ADCs operate strictly in the low-voltage DC domain (typically 0–3.3V or 0–5V).
To digitize mains power, the answer shifts from a simple DC ratio to an AC scaling and DSP problem:
- 120V vs 230V AC: You must use a step-down voltage transformer (e.g., ZMPT101B module) or a high-impedance resistor divider to scale the peak AC voltage down to your ADC's Vref. Because ADCs sample instantaneous DC voltage, you must sample fast enough to capture the sine wave and calculate the RMS value in firmware using VRMS = Vpeak / √2.
- 3-Phase Systems: The raw ADC conversion formula remains identical, but you now require three synchronized ADC channels (or a multiplexed Sigma-Delta) tracking the 120° phase offsets. If your ADC multiplexer introduces a 500µs delay between Phase A and Phase B sampling, your calculated power factor and real power (Watts) will be mathematically skewed.
When the Conversion is Meaningless: Edge Cases and Hardware Limits
Just because your firmware spits out a 16-bit integer doesn't mean the physical measurement is valid. According to fundamental ADC design principles, the voltage-to-code conversion becomes entirely meaningless under two common hardware conditions:
The ATmega328P (Arduino Uno) uses an unbuffered SAR ADC. The Microchip datasheet specifies a maximum source impedance of 10kΩ. If you feed the ADC from a 100kΩ voltage divider, the internal sample-and-hold capacitor (14pF) cannot charge fully during the 1.5 ADC clock cycle acquisition time. The digital code will read lower than reality. The math is correct, but the physics failed.
If your analog sensor outputs 50mV of broadband thermal noise, using a 24-bit Sigma-Delta ADC with a 1µV LSB is an exercise in futility. The ADC will faithfully convert the noise into 50,000 distinct digital codes. The conversion is meaningless because the noise floor vastly exceeds the resolution. In this scenario, a cheaper 12-bit SAR ADC with a hardware low-pass RC filter will yield a more stable, usable measurement.
Frequently Asked Questions
Q: Can I use the microcontroller's internal 1.2V bandgap as Vref to measure a 3.3V signal?
A: No. If Vin exceeds Vref, the ADC will saturate and output the maximum possible code (e.g., 4095 for a 12-bit ADC) regardless of whether the input is 1.3V or 3.3V. You must use a voltage divider to scale the signal below Vref.
Q: Why does my 16-bit ADC only give me 12 bits of usable resolution?
A: Effective Number of Bits (ENOB) is always lower than nominal resolution due to internal thermal noise, clock jitter, and non-linearity. A 16-bit ADC typically yields 14 to 15 bits of ENOB in real-world PCB layouts unless heavily shielded and fed by a ultra-low-noise linear regulator.






