The **basic theory of ADC (Analog-to-Digital Converter)** revolves around the conversion of **analog signals** (continuous signals) into **digital data** (discrete values) so that digital systems like microcontrollers, computers, or digital signal processors (DSPs) can process real-world information such as temperature, sound, light intensity, or voltage.
Let’s break this theory down into detailed steps to help you understand each part of the process clearly.
---
## What Is an Analog Signal?
An **analog signal** is a continuous signal that varies over time and can have an infinite number of values within a given range. For example:
* The voltage from a temperature sensor that continuously changes as temperature rises or falls.
* An audio waveform from a microphone.
## Purpose of ADC
Since digital systems work with **binary values** (0s and 1s), they **cannot directly interpret analog signals**. An ADC is used to **translate these analog signals into a digital form** that can be understood, stored, and manipulated by digital electronics.
---
## ️ Main Steps of ADC Conversion
There are three key processes involved in analog-to-digital conversion:
### 1. **Sampling**
* **Definition**: Taking snapshots of the analog signal at regular time intervals.
* **Why it matters**: Since analog signals are continuous, we can’t store all their values. So, we "sample" them at fixed time intervals (e.g., every 1 millisecond).
* **Sampling Rate (Fs)**: The number of samples taken per second, usually measured in **Hz** or **samples per second (SPS)**.
* **Nyquist Theorem**: To accurately reconstruct the signal, the sampling rate must be at least **twice** the highest frequency component of the signal.
Example: If your signal has frequency components up to 5 kHz, the sampling rate must be at least **10 kHz**.
---
### 2. **Quantization**
* **Definition**: Assigning each sampled value to the **nearest level** in a fixed set of digital levels.
* **Why it matters**: Digital systems can’t represent all real numbers. Quantization rounds off the sampled analog voltage to the nearest available digital value.
* **Resolution**: Determined by the **number of bits** in the ADC (e.g., 8-bit, 10-bit, 12-bit).
For example:
* A **3-bit ADC** has $2^3 = 8$ levels.
* A **10-bit ADC** has $2^{10} = 1024$ levels.
* **Quantization Error**: The small difference between the actual analog value and the digital representation.
---
### 3. **Encoding**
* **Definition**: Converting the quantized levels into binary numbers.
* **Why it matters**: This is how digital systems store and process the data.
For instance, if the quantized level is the 5th step out of 8, the binary output of a 3-bit ADC would be `100` (which is decimal 4, because indexing often starts from 0).
---
## Key Parameters of ADC
| Parameter | Description |
| ------------------------------- | -------------------------------------------------------------------------------- |
| **Resolution** | Number of bits used to represent each sample (higher resolution = more accurate) |
| **Sampling Rate** | How many times per second the analog signal is sampled |
| **Input Range** | The range of voltages the ADC can convert (e.g., 0–5V) |
| **Conversion Time** | Time it takes to process one analog sample |
| **Accuracy** | How close the digital value is to the actual analog signal |
| **Signal-to-Noise Ratio (SNR)** | Indicates how clean the signal is compared to noise |
---
## Common Types of ADC Architectures
1. **Successive Approximation Register (SAR)**
* Very common in microcontrollers.
* Good balance between speed and power consumption.
2. **Flash ADC**
* Extremely fast.
* Used in high-speed applications (like oscilloscopes).
* Requires lots of comparators.
3. **Delta-Sigma (ΔΣ) ADC**
* High resolution, low speed.
* Ideal for audio and precision instruments.
4. **Dual Slope ADC**
* Very accurate.
* Common in digital multimeters.
---
## Real-Life Example
Let’s say you are reading the temperature from a sensor that outputs a voltage between 0V (0°C) and 5V (100°C), using a **10-bit ADC**:
* The ADC can divide the 0–5V range into 1024 levels.
* Each level represents approximately **4.88 mV** (i.e., 5V / 1024).
* If the sensor outputs 2.44V, the ADC would output a digital value close to:
$$
\frac{2.44V}{4.88mV} ≈ 500
$$
* This digital value (500) can then be used in software to calculate and display the temperature.
---
## ✅ Summary
| Step | What Happens |
| ------------ | ------------------------------------------ |
| Sampling | Capture signal value at regular intervals |
| Quantization | Approximate each sample to a digital level |
| Encoding | Convert level to binary number |
An ADC bridges the real analog world and the digital computing world, making it essential in nearly every electronic system that deals with real-world inputs.
Would you like a visual diagram of how an ADC works?