How SAR ADC (Successive Approximation Register ADC) Works: A Complete Guide For Beginners

SAR ADC Configuration

Introduction A Successive Approximation Register (SAR) ADC is one of the most widely used ADC types in modern microcontrollers. Known for its balance between speed, resolution, and power consumption, SAR ADCs are an excellent choice for many applications, from sensor interfaces to audio processing. In this article, we’ll cover how SAR ADCs work, why they’re often chosen over other types, and key features that make them suitable for a wide range of tasks.


What is an ADC?

An Analog-to-Digital Converter (ADC) converts an analog signal (such as voltage) into a digital format that a microcontroller or digital system can process. ADCs are crucial in embedded systems where analog data from the environment, like temperature, pressure, and light, needs to be processed digitally.

What is a SAR ADC?

A Successive Approximation Register (SAR) ADC is an ADC type that uses a binary search algorithm to convert an analog input signal into a digital output. It operates by successively narrowing down the range of possible values for each bit of the digital result, starting from the most significant bit (MSB) down to the least significant bit (LSB).


How SAR ADC Works

  1. Sampling:
    • The SAR ADC starts by sampling the input analog signal. This sample is held steady using a sample-and-hold circuit, which keeps the analog input constant while conversion takes place.
  2. Binary Search Process:
    • The SAR ADC uses a digital-to-analog converter (DAC) and a comparator to perform a binary search on the analog input voltage.
    • The conversion starts with the most significant bit (MSB). The DAC generates a voltage that represents half of the full-scale range.
    • The comparator checks if the input voltage is higher or lower than this DAC-generated value:
      • If the input voltage is higher, the MSB is set to 1.
      • If the input voltage is lower, the MSB is set to 0.
    • This process continues for each subsequent bit, halving the range each time and moving down to the LSB. The result is a digital binary value that approximates the input analog voltage.
  3. Resulting Digital Value:
    • At the end of the successive approximation process, the SAR ADC outputs a digital value that closely represents the sampled analog input.

SAR ADC Example (Source: Silicon Labs)

In the example below, VREF = 2.4 V and the analog input to the SAR ADC (4 bits for this example) is 0.7 V:

Step 1: First the SAR ADC tracks the analog input value. Each SAR ADC will have a minimum tracking time.

Step 2: The analog input is sampled and held during the conversion process.

Step 3: The DAC is set to half the full-scale output and compared to the held input value

Step 4: The result from the first comparison is moved to the test value, the next bit is set to 1, and the DAC output is compared to the input again. This step is repeated for each bit in the ADC:

… and so on.

Step 5: The final 4-bit result is posted and the ADC returns to tracking the input signal (Step 1).

Voltage Reference

All SAR ADCs require a voltage reference for the internal DAC to operate properly. The reference voltage determines the full-scale input and will affect the transfer function of the ADC.


SAR ADC Sampling and Conversion Clock

In SAR ADC, there are typically two separate clocks involved:

  1. Sampling Clock (or Input Sampling Rate): Determines the rate at which the ADC samples the analog input signal. The sampling clock defines the ADC’s sampling frequency (or rate), which determines how many samples it takes per second (measured in samples per second, or Hz).
  2. Conversion Clock (or SAR Clock): Controls the internal operation of the SAR ADC, specifically the successive approximation steps needed to complete each conversion. Since a 12-bit SAR ADC requires 12 iterations to determine the final digital value for each sample, this clock drives those 12 iterations per sample.

Relationship Between Sampling Rate and SAR Iterations

The sampling frequency (Fs) of a SAR ADC depends on the time required to perform all the SAR steps for each sample. In an ideal scenario:Tsample=1Fsampling=(Time to acquire sample)+(Time for SAR conversion)T_{\text{sample}} = \frac{1}{F_{\text{sampling}}} = \text{(Time to acquire sample)} + \text{(Time for SAR conversion)}Tsample​=Fsampling​1​=(Time to acquire sample)+(Time for SAR conversion)

For each sample, the ADC needs a short time to acquire and hold the sample (set by the sampling clock), followed by the time needed to perform the 12 successive approximation steps (set by the SAR clock).

Clock Frequencies in Practice

  • Sampling Clock: Sets how frequently the ADC takes new samples (Fs), and is usually derived based on the desired sampling rate of the ADC.
  • SAR Conversion Clock: Often much faster than the sampling clock and must allow for the full SAR conversion within each sample period. For example, if the ADC needs to sample at 1 kHz, but each sample requires 12 steps, then the SAR clock should be at least 12 kHz (12 times the sampling rate) to allow enough time for each conversion cycle.

In some ADCs, the sampling and SAR conversion clocks may come from a single base clock with internal dividers or multiplexing, while in others, you might configure them separately depending on the desired conversion speed and accuracy.

Example

For a 12-bit SAR ADC with a target sampling rate of 1 kHz:

  • The SAR conversion clock should ideally be at least 12 kHz (for the 12 steps) to fit within each 1 ms sampling period.

Why Choose SAR ADC Over Other Types?

SAR ADCs are popular in embedded systems due to their balance between speed, resolution, and power efficiency. Here’s why they’re often preferred:

  1. Speed and Efficiency:
    • SAR ADCs are faster than many types (such as Delta-Sigma ADCs) and provide conversion times suitable for medium-to-high-speed applications.
    • Conversion times are generally predictable, making SAR ADCs great for real-time applications.
  2. Resolution:
    • SAR ADCs offer a wide range of resolutions, typically from 8 to 16 bits. This flexibility allows for precise measurements in various applications.
  3. Power Efficiency:
    • SAR ADCs consume less power compared to faster ADCs like Flash ADCs, making them ideal for battery-powered devices.
  4. Complexity and Size:
    • SAR ADCs are simpler in design compared to Pipeline and Flash ADCs, resulting in a smaller and cost-effective solution for many microcontrollers.

Key Features of SAR ADCs

Resolution

SAR ADCs are commonly available with resolutions of 8, 10, 12, 14, and 16 bits. Higher resolution means finer precision, which is crucial for applications requiring detailed measurement, such as temperature sensing or audio signal processing.

Conversion Speed

Typical SAR ADCs operate at sampling rates up to a few megasamples per second (MSPS). They are generally fast enough for most embedded applications but not as fast as Flash ADCs, which can achieve gigasample rates for high-speed applications.

Power Consumption

SAR ADCs are highly power-efficient compared to Flash and Pipeline ADCs, making them a preferred choice for applications where energy saving is essential.

Sampling and Holding

Many SAR ADCs have a sample-and-hold circuit, which keeps the input signal steady during conversion. This feature improves accuracy and helps prevent variations in the input signal from affecting the result.


SAR ADC Applications

  • Microcontroller-based Sensor Systems: SAR ADCs are widely used in sensor applications (temperature, light, humidity) in microcontrollers, such as the ESP32, STM32, and Arduino.
  • Audio Processing: The moderate speed and accuracy make SAR ADCs suitable for processing analog audio signals.
  • Battery-powered Devices: Due to low power consumption, SAR ADCs are ideal for portable and battery-operated devices.
  • Control Systems: SAR ADCs’ predictable conversion time makes them suitable for real-time control applications like motor control or industrial automation.

Comparison with Other ADC Types

Here’s a quick comparison of SAR ADC with other ADC types to highlight why SAR ADCs are commonly chosen in embedded systems.

ADC TypeResolutionSpeedPower ConsumptionApplications
SAR ADC8 to 16 bitsModerate (up to a few MSPS)LowMicrocontroller-based sensors, battery-powered devices, audio
Flash ADC4 to 8 bitsVery High (up to GSPS)HighHigh-speed applications (video, RF)
Delta-Sigma ADCUp to 24 bitsLow to ModerateModerateHigh-precision applications (audio, lab instruments)
Pipeline ADC8 to 16 bitsHigh (up to a few hundred MSPS)HighCommunication systems, image processing
Dual-Slope ADCUp to 16 bitsLowLowPrecision measurements (digital multimeters)

Advantages and Limitations of SAR ADCs

Advantages

  • High Efficiency: Suitable for moderate-to-high speed applications.
  • Moderate Resolution: Flexible resolution options (up to 16 bits).
  • Low Power Consumption: Efficient for battery-operated and portable devices.
  • Predictable Timing: SAR ADCs have a deterministic conversion time, making them suitable for real-time applications.

Limitations

  • Not Ideal for Very High-Speed Applications: Flash ADCs are faster for applications requiring extremely high speeds.
  • Noise Sensitivity: Noise can affect the conversion accuracy of SAR ADCs, especially at higher resolutions.

SAR ADC in Popular Microcontrollers

MicrocontrollerSAR ADC ResolutionChannelsSampling SpeedApplication Notes
ESP3212 bits18Up to 1 MSPSGeneral-purpose applications, sensor interfacing
STM32 (varies)Up to 16 bitsUp to 20+Up to 5 MSPSHigh-performance applications, industrial control
Arduino Uno10 bits6125 kSPSBasic sensor applications
RP2040 (Pico)12 bits3 + temp sensorModerateSimple applications, internal temp sensor support

Conclusion

The SAR ADC is a versatile and efficient ADC type, ideal for applications requiring a balance between speed, resolution, and power consumption. This type of ADC is commonly found in microcontrollers due to its moderate speed and low power requirements. Understanding SAR ADC operation, advantages, and limitations helps in selecting and optimizing microcontroller applications, whether in simple sensor interfacing, audio processing, or control systems.

By choosing a SAR ADC, you’re leveraging a technology optimized for today’s embedded systems, offering reliable and precise digital representations of real-world analog signals.

Leave a Reply

Your email address will not be published. Required fields are marked *