Many device bring-up sessions run into the same symptom: the sensor is not moving, the environment looks stable, but the raw ADC value keeps jumping.
The first reaction is often to add averaging, add a low-pass filter, or adjust thresholds. Sometimes that makes the curve look better, but it does not necessarily solve the problem. ADC jitter is not a single issue. It is the visible result of the whole analog chain.
A better first model is:
Physical quantity
-> sensor, divider, bridge, or shunt
-> amplification, filtering, protection, and routing
-> ADC input sampling
-> reference voltage and quantization
-> firmware filtering, calibration, and state decisions
The number seen by software is not created by the ADC alone. If any earlier layer is unstable, the final code can move too.
Jitter Does Not Mean The ADC Is Broken
An ADC maps input voltage into a number. If the input voltage, reference voltage, sampling condition, or surrounding noise changes, the number can change.
Common sources include:
- The measured physical quantity is actually changing slightly
- The sensor output has noise
- The analog front end amplifies the noise along with the signal
- Source impedance is too high, so the ADC sampling capacitor does not settle
- The reference voltage moves with power ripple
- Ground potential is shifted by large current, switching supplies, or motors
- EMI couples into a high-impedance input or long wire
- Firmware sampling lands on periodic interference
So “the ADC code is jumping” only says that something in the chain is changing. It does not prove that the ADC has poor accuracy.
For a 12-bit ADC with a 3.3 V reference, one code is roughly:
3.3 V / 4096 ≈ 0.8 mV
If the input or reference moves by a few millivolts, several counts of movement are normal. Power ripple, ground drop, switching spikes, and sensor noise in real devices can easily exceed that scale.
Resolution Is Not Accuracy
Seeing 12-bit or 16-bit often leads people to expect a stable and precise result.
Bit depth only says how many steps the ADC divides the range into. It does not say every step is trustworthy. The usable number of bits also depends on noise, reference voltage, front-end error, layout, sampling time, and the signal itself.
For example, a 16-bit ADC with a 3.3 V reference has an ideal step size of about 50 uV. But if front-end noise, reference drift, or ground disturbance is already hundreds of microvolts or several millivolts, the lower bits will keep moving.
Averaging can make the display more stable, but it cannot turn unreliable low bits into real accuracy. It trades time for stability:
Random noise
-> multiple samples averaged
-> smaller visible fluctuation
-> slower response
If the noise is periodic, comes from a switching supply, or is caused by invalid sampling conditions, simple averaging may hide the problem instead of fixing it.
Input Impedance Affects Sampling
An ADC input pin looks like it measures voltage, but internally it is not always an ideal probe that draws no current.
Many MCU ADC front ends use a sample-and-hold capacitor. During sampling, the external signal source must charge that capacitor within a limited time. If the source impedance is too high, or if the signal passes through a large resistor or heavy RC filter, the capacitor may not settle. The ADC then reads a voltage different from what the circuit designer expects.
Typical symptoms include:
- Repeated reads from the same channel become more stable after the first sample
- The first sample after switching channels is suspicious
- Large divider resistors make the reading more jumpy
- Increasing ADC sampling time improves stability
- Adding a suitable capacitor near the ADC input reduces high-frequency jitter but slows response
This is not just a firmware loop-order issue. It is a mismatch between the analog source and the ADC sampling structure.
A useful clue is this: if longer sampling time, lower source impedance, or discarding the first sample after a channel switch improves the result, the issue is likely in the sampling condition, not only in the filtering algorithm.
The Reference Voltage Is Part Of The Measurement
The ADC result is not determined by input voltage alone. It is determined by the ratio between input voltage and reference voltage.
Roughly:
ADC code ≈ Vin / Vref * full scale
So if Vin is stable but Vref moves, the code still moves. If the ADC reference comes directly from the system supply, and the system has Wi-Fi transmission, motor startup, relay switching, high-current LED refresh, or switching regulator ripple, the reference may move with those events.
That is why some devices look fine on a quiet bench but show sensor jumps during radio transmission, motor movement, or load switching.
In that situation, checking the ADC input pin is not enough. Also check:
- Whether the ADC reference voltage is stable
- Whether analog and digital supplies are polluting each other
- Whether high-current return paths pass through the measurement reference ground
- Whether load activity and ADC jumps line up in time
If the reference itself is unstable, firmware filtering can reduce the symptom, but it cannot restore a valid measurement boundary.
Ground Is Not An Ideal Zero Point
Many measurements rely on a quiet assumption: the sensor, front end, ADC, and reference all see the same ground.
In real PCBs and cables, ground has resistance and inductance, and it carries current. When motor, solenoid, relay, radio, backlight, or charging current flows through part of the ground path, that path develops a voltage drop. The ADC may use one local ground as zero, while the sensor effectively uses another. The reading changes even if the physical signal did not.
Common signs include:
- Multiple analog channels jump when a large load turns on
- Touching, plugging cables, or connecting the enclosure changes the reading
- USB power and battery power produce different readings
- Short lab wiring works, while long field wiring is unstable
- Connecting an oscilloscope ground clip changes the behavior
These problems are not solved by averaging harder. They require looking at current paths, ground points, shielding, differential sensing, isolation, or analog ground layout.
A Capacitor Is Not A Free Fix
Adding a capacitor at the ADC input is common when readings jitter. It can reduce high-frequency noise and provide charge during the ADC sampling instant, making the value more stable.
But the capacitor is not free.
If there is a resistor before it, the resistor and capacitor form a low-pass filter:
time constant τ = R * C
A larger time constant makes the value steadier, but also slower. That may be fine for temperature and humidity display. It may be unacceptable for button voltage detection, overcurrent protection, fast pressure changes, or closed-loop control.
The capacitor can also create new issues:
- Longer settling time after power-up
- Residual voltage from the previous channel in multiplexed ADC sampling
- Slow charge and discharge if the sensor cannot drive the capacitor well
- Fast events smoothed away, delaying state decisions
Before adding capacitance, decide whether the channel is used for display, statistics, alarm, protection, or control. The acceptable latency is different for each use.
Firmware Should Keep The Raw Value
Firmware can average, low-pass filter, median-filter, and reject outliers. But during debugging, do not look only at the filtered result.
Useful logs keep at least three layers:
raw ADC code
converted voltage or physical value
filtered value and business state
If the raw code is moving, compare it against power, load activity, channel selection, sampling period, and external disturbance. If the raw code is stable but the converted physical value jumps, the problem may be calibration, scaling, units, or overflow. If the filtered value is stable but the business state toggles, the issue is more likely thresholding, hysteresis, or the state machine.
Several simple experiments can narrow the problem:
- Short the ADC input to analog ground and measure the baseline noise
- Connect a stable voltage source or reference to remove the sensor from the chain
- Hold the input voltage fixed and try different sampling times
- Disable motors, radio, relays, and other disturbance sources
- Log load activity timestamps together with ADC jumps
- In multi-channel sampling, compare results after discarding the first sample after a channel switch
The point of these experiments is not to fix everything at once. It is to break “ADC jitter” into smaller questions: is the input moving, is the reference moving, is ground moving, are sampling conditions invalid, or is firmware processing the data poorly?
Stable Does Not Mean Accurate
There are two separate goals: stable and accurate.
Averaging, low-pass filtering, and input capacitors can make a value steadier. A steady value can still be wrong. The reference may be shifted, divider resistors may be inaccurate, the op-amp may have offset, the sensor may drift with temperature, or the input may already be saturated.
A practical ADC debugging order is:
- Confirm the input range stays within the ADC and front-end limits.
- Check that reference voltage, ground, and supply do not move with device activity.
- Confirm that source impedance, sampling time, and channel switching meet ADC requirements.
- Identify the noise shape: random, periodic, slow drift, spike, or step.
- Then choose hardware filtering, firmware filtering, calibration, and threshold strategy.
ADC jitter is not one problem that averaging can solve everywhere. It is the combined result of the sensor, analog front end, reference voltage, ground, sampling structure, and firmware processing. Once the chain is separated, a vague unstable reading becomes a problem that can be located.