GlossaryAnalog-to-digital converter
Analog-to-digital converter
An analog-to-digital converter (ADC) is a circuit that measures a continuous voltage and converts it into a digital number. It is how a microcontroller reads sensors, battery voltage, motor current, temperature and any other analog signal.
How it works
An ADC samples its input at regular intervals and compares each sample to a reference voltage. With N bits of resolution, it divides the reference range into 2 to the power N steps and outputs the step nearest the input. The reference voltage sets the full scale, so its accuracy and noise flow directly into every reading.
Common architectures trade speed, resolution and power. Successive approximation (SAR) ADCs, built into most microcontrollers, find each bit in turn by comparing against an internal DAC and suit moderate rates. Delta-sigma ADCs sample at a much higher rate with coarse resolution and use digital filtering to trade speed for very fine resolution, which suits precise measurements such as load cells and temperature. Pipeline and flash ADCs serve very high sample rates.
Real converters fall short of their bit count. Noise, offset, gain error and nonlinearity reduce the effective number of bits, and IEEE 1241 defines how such terms are measured.
ADC vs DAC
An ADC turns an analog voltage into a number. A digital-to-analog converter (DAC) does the opposite, producing a voltage from a number. Many systems use both, and a SAR ADC contains a DAC internally to make its comparisons.
Why it matters
Battery state, motor current, temperature and many sensor readings all pass through an ADC, so its accuracy sets the accuracy of the decisions built on them. Common problems include aliasing when signals contain frequencies above half the sample rate, noise from switching regulators coupling into the reference and sampling at the wrong moment in a PWM cycle.
How to get it right
- Add an anti-aliasing filter before the ADC, matched to the sample rate.
- Use a clean, stable voltage reference, with its own decoupling.
- Check that the source impedance lets the sample capacitor settle within the sampling time.
- Keep analog traces and the ADC ground away from switching currents.
- Trigger motor current samples in sync with PWM, at the quiet point of the cycle.
- Calibrate offset and gain in production where accuracy matters.
ADCs in robotics and drone hardware
Flight controllers read battery voltage and current through ADCs, which feed failsafes and remaining capacity estimates. Motor drivers sample phase currents for field-oriented control, timed to the PWM. Robots read force sensors, strain gauges and temperature sensors through precise delta-sigma converters. Board layout often decides whether an ADC delivers its rated accuracy.