Electronics & Circuits · Study deck

ADC Fundamentals: Conversion and Resolution

This first route explains the conversion chain and turns bit depth, reference voltage, codes, and quantization into bounded calculations.

Voltage Vera is your guide for this deck.

analogdigital
Voltage Vera, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Trace ADC Operation: Describe the sample-hold-quantize-encode pipeline that converts analog voltages to digital values
  • Apply ADC Formulas: Calculate digital output, step size, and reconstructed voltage from input parameters
  • Differentiate Resolution Levels: Analyze how bit depth (8, 10, 12, 16-bit) determines voltage precision and quantization step size
  • Estimate Quantization Error: Calculate maximum measurement error for a given ADC resolution and reference voltage
iotclass.org

Major section

Start Simple

A displayed number is not yet a good measurement.

  • The first check is whether a known input becomes the expected code, unit, and decision.
  • An analog-to-digital converter is a circuit that turns a measured voltage into a number.
  • ADC is the short name for that converter.
  • This runway does not prove measurement accuracy from bit count alone.
iotclass.org

Major section

MVU: Analog-to-Digital Conversion

Core Concept: An ADC (Analog-to-Digital Converter) translates continuous real-world signals (voltage) into discrete digital numbers that microcontrollers can process.

  • Resolution (bit depth) determines precision: a 12-bit ADC divides the voltage range into 4,096 steps, while 10-bit provides only 1,024 steps.
  • The ADC is the mandatory bridge - without it, your microcontroller literally cannot "see" the physical world.
  • Understanding ADC resolution and quantization error helps you choose the right hardware for your accuracy requirements.
iotclass.org

Major section

For Kids: Meet the Sensor Squad!

The ADC is like a translator between the smooth real world and the step-by-step computer world!

  • Temperature Terry was frustrated. "I can feel exactly how warm it is: 23.456 degrees!
  • But the microcontroller keeps asking me for simple numbers like 23 or 24!".
  • Max was delighted. "961!

Why it matters

the battery smiled. "And because Andy translates so efficiently, I don't waste energy trying to send impossibly precise numbers!".

iotclass.org

Major section

For Kids: Meet the Sensor Squad! (continued)

When you tell me 23.456, I don't know what to do with the.456 part!".

  • With 12 bits, I can translate Sammy's smooth feelings into 4,096 different steps!".
  • I'll save it, send it over the network, and compare it to yesterday's reading!".
  • But even the best ADC rounds to the nearest step - that tiny error is called "quantization error"!
iotclass.org

Major section

Key Concepts

An ADC connects a sensor's continuously varying voltage to the microcontroller's finite set of numbers.

  • The voltage axis depends on reference voltage and resolution together.
  • The reference establishes the conversion scale, while an $n$-bit resolution provides $2^n$ possible codes across that scale.
  • Assigning a continuously variable input to one code is quantization, and the difference between the input and its representative level is quantization error.

Why it matters

More bits can reduce the ideal step, but they cannot repair an unstable reference, a noisy front end, or a poorly chosen sampling rate.

iotclass.org

Major section

The Analog vs Digital Divide

The sample-and-hold block takes one time-specific snapshot and keeps it steady long enough to measure.

  • This example then shows a SAR engine narrowing down the nearest supported level by comparison with an internal DAC.
  • The important change is not simply “analog in, digital out”; it is continuous signal → held sample → chosen level → stored code.
ADC architecture showing the conversion from analog sensor signals to digital values
ADC architecture showing the conversion from analog sensor signals to digital values
iotclass.org

Major section

The Analog vs Digital Divide (continued)

Sensor noise, bandwidth, calibration, and the analogue front end still limit what can be known.

  • That sequence is the bridge the rest of the chapter will unpack.
  • A processor needs repeatable symbols it can store, compare, and transmit.
  • In Figure: The Digital World, the left panel shows the storage alphabet: bits.
iotclass.org

Major section

The Analog vs Digital Divide (continued)

Their units and timescales differ, but each curve can occupy values between the marked examples; the physical signal is not restricted to integer code levels. “Continuous” does not mean that a real sensor has infinite accuracy.

  • The right panel connects the number of available steps to bit depth.
  • A code is stable and easy to copy, but it represents an interval of possible input voltages rather than the exact original voltage.
  • Valid logic margins can tolerate some electrical disturbance, error checks can protect transmission, and arithmetic can turn readings into decisions.
iotclass.org

Major section

Analog-to-Digital Converters (ADC)

An analogue-to-digital converter (ADC) observes an input voltage at a chosen time and assigns it one of the digital codes the converter supports.

  • To understand the result, do not jump straight from voltage to bits.
  • The conversion has three distinct decisions, and each one answers a different question.

Key terms

Resolution
Resolution is the number of discrete values the ADC can output.
ADC Internal Architecture: Sample-Quantize-Encode Pipeline
ADC Internal Architecture: Sample-Quantize-Encode Pipeline
iotclass.org

Major section

Analog-to-Digital Converters (ADC) (continued)

The code is therefore a description of the selected level, not a perfectly precise copy of the original signal.

  • When firmware later converts the code into volts or engineering units, it is interpreting the end of this same chain.
  • Four settings define what that pipeline can do.
  • The input range states which voltages the front end is designed to accept; an out-of-range signal cannot be rescued by extra bits.
iotclass.org

Major section

Analog-to-Digital Converters (ADC) (continued)

Figure: ADC and DAC conversion processes adds a useful reverse comparison.

  • The reference voltage provides the scale against which the held input is judged.: Resolution sets how many codes divide that scale, while the sampling rate sets how often a new held value can enter the pipeline.
  • Resolution is easiest to understand by connecting the signal path to the converter settings.
  • Resolution is the number of discrete values the ADC can output.
iotclass.org

Major section

Analog-to-Digital Converters (ADC) (continued)

The top row in Figure: Analog-to-Digital Converter operation and components reinforces the representation changes: waveform, held sample, chosen step, binary code.

  • Below it, $V_{ref}$ and input range set the scale, resolution divides that scale into codes, and sampling rate controls the spacing between observations in time.
  • More bits make the voltage divisions finer, but they do not widen a safe input range, increase the sampling rate, or remove sensor and circuit error.
  • Reference error, front-end noise, linearity, and the sensor itself can all make the useful resolution coarser.
iotclass.org

Major section

Putting Numbers to It

For a 12-bit ADC with $V_{ref} = 3.3$ V, the engineering step size (LSB) is $V_{step} = V_{ref} / 2^n = 3.3 / 4096 = 0.806$ mV.

  • Quantization error is up to $\pm V_{step}/2 = \pm 0.403$ mV.
  • For a bipolar ADC range, use the whole span.
  • Sensitivity must include that noise floor.

Numbers to remember

100mVIf the sensor signal is 100mV ($\approx$ 124 counts)

Why it matters

Averaging 64 independent samples can reduce random noise by sqrt(64) = 8, but it costs time and does not fix bias, nonlinearity, or correlated noise.

iotclass.org

Major section

Phoebe's Field Notes: Where the SNR Formula Comes From

At 12 bits those values are 0.806 mV, 0.403 mV, 0.233 mV, and 74.0 dB; real converters add reference, timing, and linearity errors.

  • That finer partition is the source of the smaller ideal step and higher ideal quantization SNR derived above.

Numbers to remember

12 bitsAt 12 bits those values are 0.806 mV
0.806 mVAt 12 bits those values are 0.806 mV
0.403 mVAt 12 bits those values are 0.806 mV, 0.403 mV
ADC Resolution Comparison: 1-bit to 16-bit Value Ranges
ADC Resolution Comparison: 1-bit to 16-bit Value Ranges
iotclass.org

Deck summary

Key takeaways

A displayed number is not yet a good measurement.

  • Core Concept: An ADC (Analog-to-Digital Converter) translates continuous real-world signals (voltage) into discrete digital numbers that microcontrollers can process.
  • The ADC is like a translator between the smooth real world and the step-by-step computer world!
  • When you tell me 23.456, I don't know what to do with the.456 part!".
  • An ADC connects a sensor's continuously varying voltage to the microcontroller's finite set of numbers.
iotclass.org

Retrieval practice

Recall check

Voltage Vera says: answer from memory, then check your reasoning.

Q1An ESP32 has a 12-bit ADC with a 3.3V reference. How many unique voltage levels can it distinguish?

A1,024 levels (about 3.2mV per step)
B4,096 levels (about 0.8mV per step)
C65,536 levels (about 0.05mV per step)
D256 levels (about 12.9mV per step)
Show answer

Answer: B A 12-bit ADC has 2^12 = 4,096 unique levels.

iotclass.org

Print reference

Answers

Answer key.

  1. B · A 12-bit ADC has 2^12 = 4,096 unique levels.
iotclass.org