A 12-bit ADC uses V. What is its step size?
- (A)
0.610 mV
- (B)
1.22 mV
- (C)
2.44 mV
- (D)
0.305 mV
Answer and solution
Answer: (A)
Step size is .
, so mV.
FOR CORE AND IT JOBS · CHAPTER 5 OF 7
This chapter explains how a microcontroller turns a voltage into a number and back. It covers ADC step size, successive approximation, converting a reading to a temperature, averaging away noise, and an analog output from PWM and an RC filter. You need it to trust what a sensor circuit reports.
Updated 30 Oct 2026
You will work out the step size of an n-bit converter and say why a reading can be off by up to one step. You will turn a code into a voltage and then into degrees. You will say how many readings to average for a given noise target. You will choose R and C to make a smooth analog level from a PWM pin.
Chapter 3, GPIO, timers and PWM
Powers of two, binary and the floor function
Series RC: the time constant and exponential charging
Complex numbers: and the modulus
Capacitor impedance and the voltage divider
Fourier series: a periodic wave is its average plus sinusoids at multiples of its frequency
The rms of a random error; mean squares of independent errors add
Straight-line equations and square roots
An ADC (analog-to-digital converter) looks at a voltage at one instant and reports a whole number. Two limits follow. It sees only instants, so it must look more than twice per cycle of the fastest component in the signal. It reports only whole numbers, so the voltage is rounded to one of a fixed set of levels.
SAMPLING CONDITION
Holds when the signal has no content above . is the sampling rate and the highest signal frequency, both in Hz. A tone at between and has the same samples as some tone at , so it shows up at that false frequency: filter out fast noise before the converter.
STEP SIZE OF AN N-BIT CONVERTER
The input range from 0 to is cut into equal intervals, one per code. is the width of one interval in volts, is the reference voltage in volts, is the number of bits.
CODE FROM INPUT VOLTAGE
Holds for an ideal converter that rounds down and for . is the integer code from 0 to . Reading back, is the bottom of the interval, so the true voltage lies between and . A converter that rounds to the nearest code puts it within of instead.
WATCH OUT FOR
The top code is , not . Test it on 2 bits with V: = 1 V, codes 0 to 3, and an input of 4 V still reads 3.
How does the converter find without trying every code? A successive-approximation converter does a binary search with three blocks. A sample capacitor is connected to the input, then disconnected to hold the voltage. An internal DAC (digital-to-analog converter) turns a trial code into the voltage . A comparator outputs 1 when its first input is at least its second, and 0 otherwise. The held input goes to the comparator's first input and the DAC output to its second.
Hold on the sample capacitor.
Set the most significant bit to 1 and all others to 0. The DAC gives .
If the comparator outputs 1, is at least the trial voltage, so the trial code is not too high: keep the bit. If it outputs 0, the trial is too high: clear it.
Set the next bit to 1, keeping the bits already decided, and compare again. After comparisons the kept bits are the code. The table runs this for 3 bits, V ( V) and V; bit 0 is the least significant bit.
Bit tried | Trial code | DAC output | Comparator | Code after |
|---|---|---|---|---|
2 | 100 | 4 V | 1 (5.3 ≥ 4) | 100 |
1 | 110 | 6 V | 0 (5.3 < 6) | 100 |
0 | 101 | 5 V | 1 (5.3 ≥ 5) | 101 = 5 |
Each comparison halves the interval that can still hold , so comparisons settle possibilities. A conversion takes about ADC clock cycles plus the time to charge the sample capacitor. The input must stay steady for all comparisons, which is why the hold step comes first.
The code is not yet a temperature. You convert in two steps: code to volts with the step size, then volts to degrees with the sensor's own line. Take a temperature sensor whose output is the straight line : at 0 °C, rising volts for each degree.
TEMPERATURE FROM AN ADC CODE
Holds in the range where the sensor output is a straight line and stays within 0 to . is in °C, in volts, in V/°C. One code step is worth degrees, which is the smallest change you can see.
Readings also jitter. Suppose the jitter is random, has zero average, has rms value in volts ( in codes), and is independent from one reading to the next. Adding readings adds up the steady signal, the same in each, to times its value. The mean squares of the random parts add, so their sum has rms . Dividing the sum by restores the signal and leaves noise of .
NOISE AFTER AVERAGING
Holds for independent, zero-average noise of about one step rms or more. Much smaller noise leaves every reading on one code, and the average is then that code. is the rms noise of one reading, that of the average of readings, in the same unit. Four times the readings halves the noise.
WATCH OUT FOR
Averaging shrinks only random error. Test: average many readings of a known steady voltage. Any offset from the true value that remains is fixed error, such as a wrong or a sensor offset, and more readings will not shrink it.
If the chip has a DAC, you write a code and get a voltage. If it has none, use the PWM pin from Chapter 3: its average voltage is set by the duty cycle. A low-pass filter, here the RC circuit described below, passes the steady (DC) level and shrinks fast changes, so it keeps the average and removes the switching. A smoother level costs speed. After a duty-cycle change the average moves to its new level as ; at the gap left is , under 1 %.
DAC OUTPUT LEVEL
Holds for an ideal n-bit DAC with input code from 0 to ; and in volts. For PWM followed by a filter, the same idea gives , with the duty cycle (0 to 1), the pin's high level in volts and a low level of 0 V.
CORNER FREQUENCY OF THE RC FILTER
For a resistor in series from the pin to the output, a capacitor from the output to ground, and no load. is in Hz, in ohms, in farads.
FILTER RESPONSE AT A FREQUENCY F
Same circuit, sinusoidal input of frequency in Hz. R and C form a voltage divider; multiply top and bottom by , then use . is the amplitude's shrink factor, at . A pulse train is its average plus sinusoids at the PWM frequency and its multiples, so choose far below the PWM frequency.
Set the factor by which the PWM-frequency component must shrink (for example 500), so . Since , choose .
Check the settling time . If it is too slow, raise the PWM frequency: can then rise with it for the same shrink.
Pick at most 1/100 of the load resistance, so the load changes the level by under 1 %. Then , rounded up to a value you have.
WATCH OUT FOR
A load across C scales the level by and raises the corner to . Test: measure the level with and without the load. If it moves too much, buffer the output.
WORKED EXAMPLE
A 12-bit ADC has V. A sensor gives 0.5 V at 0 °C and rises 10 mV per °C. The ADC returns . Find the temperature, and the temperature change one step represents. Each reading also carries independent, zero-average noise of 4 mV rms: how many readings must be averaged to bring it down to 1 mV rms?
Step size, from : mV.
Voltage: mV = 0.750 V. The code means the input is at least 0.750 V and below 0.751 V.
Temperature: °C, from the sensor's line solved for . An input of 0.751 V would give 25.1 °C, so from the rounding alone the true value lies from 25.0 to 25.1 °C.
One step: °C, so the converter cannot show finer detail.
Averaging: 4 mV rms is 4 steps, so the code jitters by about 4 codes rms. That is more than one step, so applies. Need mV, so and . The averaged noise, 1 mV, is worth °C, one step.
Answer: reads 25.0 °C (true value 25.0 to 25.1 °C), one step is 0.1 °C, and 16 readings are needed.
WORKED EXAMPLE
A PWM pin runs at 10 kHz with a high level of 3.3 V, a low level of 0 V and a duty cycle of 30 %. It feeds R = 10 kΩ in series, then a capacitor C to ground, with no load. Choose C from 0.1, 0.22, 0.47 and 1 µF so that the 10 kHz component is shrunk at least 500 times. Find the output level, C, the corner frequency and the settling time.
Level: V, because the DC part of the pulse train is its average and the unloaded filter passes DC with gain 1.
Corner needed: a shrink of means . Since , Hz.
Capacitor: Hz needs F, about 0.80 µF. A larger C lowers , so the smallest listed value that is large enough is 1 µF.
Check: Hz, so , a shrink of about 630 times, which meets 500. Multiples of 10 kHz shrink more.
Settling: ms, so the output is within 1 % of a new level about ms after a duty-cycle change. That suits a level that is set and then held, such as a bias voltage.
Answer: 0.99 V, C = 1 µF, Hz, settling about 50 ms.
A 12-bit ADC uses V. What is its step size?
0.610 mV
1.22 mV
2.44 mV
0.305 mV
Answer: (A)
Step size is .
, so mV.
A temperature sensor gives 0.5 V at 0 °C and 10 mV per °C. A 10-bit ADC with V returns code 400. Using , what is the temperature in °C?
Answer: (accepted range )
mV.
mV = 0.800 V.
°C.
Which statements about a successive-approximation ADC are correct?
An n-bit conversion takes n comparisons.
The most significant bit is tested first.
The input must stay constant during the conversion.
Each extra bit doubles the number of comparisons.
Answer: (A), (B), (C)
It is a binary search: one comparison per bit, most significant first.
The search compares against a fixed input, so the input is held.
Each extra bit adds one comparison, so D is false.
An ADC has a step size of 1 mV. Each reading carries zero-average noise of 6 mV rms, independent from one reading to the next. How many readings must be averaged to bring the noise down to 1.5 mV rms?
Answer:
6 mV is 6 steps, more than one step, so applies.
, so .