An ADC diagram is a schematic or block map that shows how a continuous analog voltage signal is sampled, quantized, and converted into a discrete digital integer that a microcontroller can process. Understanding this diagram fundamentally changes how you route PCB traces, where you place decoupling capacitors, and how you map raw sensor readings to real-world physical units in your firmware. Without it, you are just guessing at why your temperature sensor reads 4°C higher than reality or why your battery monitor flatlines at 90%.
Decoding the Internal ADC Diagram
When you look at a microcontroller's technical reference manual, the ADC diagram typically reveals a Successive Approximation Register (SAR) architecture. The signal path flows through three critical stages:
- Input Multiplexer (MUX): Routes one of several GPIO pins to the single internal ADC core. This is why you can only sample one pin at a time in single-shot mode.
- Sample-and-Hold (S/H) Circuit: A tiny internal capacitor that charges to the input voltage. The acquisition time (often 10-12 clock cycles) is the time allowed for this capacitor to charge. If your external circuit has high impedance, this capacitor won't charge fully, resulting in a lower-than-actual reading.
- SAR Logic & DAC: The core engine that compares the held voltage against an internal Digital-to-Analog Converter, adjusting bit-by-bit from the Most Significant Bit (MSB) down to the Least Significant Bit (LSB) to find the closest digital match.
Worked Numeric Example: 12-Bit ESP32-S3 Conversion
Let's run the math on a modern ESP32-S3 using its 12-bit ADC. We are measuring a lithium-ion battery voltage through a resistor divider that scales the 4.2V max battery down to a safe 2.8V max at the GPIO pin.
- Resolution: 12-bit = 4096 discrete steps (0 to 4095).
- Reference Voltage (Vref): Tied to VDD_A, which is 3.3V on our dev board.
- Step Size (LSB Voltage): 3.3V / 4095 = 0.8058 mV per step.
If your multimeter reads 2.15V at the GPIO pin, what integer should the ADC return?
ADC_Raw = (2.15V / 3.3V) * 4095 = 2668
Conversely, if your firmware reads a raw value of 1850, the voltage at the pin is:
V_pin = (1850 / 4095) * 3.3V = 1.488V
You then multiply 1.488V by your resistor divider ratio (e.g., 1.5) to get the actual battery voltage of 2.23V.
Where You Meet ADC Diagrams in Practice
You will pull up an ADC diagram or pinout chart whenever you interface the physical, continuous world with a digital brain. Common scenarios include:
- NTC Thermistors: Wired in a voltage divider. The ADC reads the changing voltage as the thermistor's resistance shifts with temperature.
- Battery Monitoring: Using a high-impedance resistor divider (e.g., 100kΩ and 33kΩ) to step down 12V or 24V system voltages into the 0-3.3V ADC range.
- Potentiometers and Joysticks: The wiper pin outputs a variable voltage directly proportional to the physical shaft position.
- Current Sensing: Reading the millivolt output from a shunt resistor or a hall-effect sensor like the ACS712.
Real-World Scenario: The Original ESP32 Non-Linearity Trap
If you read the basics of SAR ADCs, you'd assume all 12-bit converters behave linearly. The original ESP32 (ESP32-WROOM-32) proves otherwise, and ignoring its specific ADC diagram leads to massive headaches.
The Setup: We wired a 10kΩ NTC thermistor with a 10kΩ pull-up resistor to 3.3V on GPIO 34 of an original ESP32 DevKit V1. At exactly 25°C, the thermistor resistance is 10kΩ, creating a perfect 50/50 voltage divider.
The Numbers: We expected the voltage at the pin to be exactly 1.65V. Using our standard 12-bit math: (1.65 / 3.3) * 4095 = 2048.
The Outcome: The serial monitor spat out raw values fluctuating between 2350 and 2410. Furthermore, when we heated the thermistor to push the voltage toward 3.3V, the ADC reading completely flatlined and capped out at around 3100, refusing to read any higher.
What Went Wrong: We ignored the ESP32's specific ADC schematic and known silicon errata. The original ESP32 ADC has an internal voltage drop of about 0.1V to 0.2V due to the input protection diodes and routing resistance. More critically, the ADC is notoriously non-linear above 2.5V and physically cannot read the full 3.3V rail; it saturates around 3.1V (raw ~3100).
The Fix: For precision work on the original ESP32, you must design your voltage dividers to keep the maximum signal below 2.5V, or upgrade to the ESP32-S3, which features a redesigned, highly linear ADC that actually reaches the 3.3V rail.
Common Confusions: ADC vs. DAC and Resolution vs. Range
When reviewing datasheet diagrams, hobbyists frequently mix up two distinct concepts:
1. ADC vs. DAC Diagrams: An ADC (Analog-to-Digital) diagram shows a continuous voltage entering and a digital bus (bits) leaving. A DAC (Digital-to-Analog) diagram shows the reverse. On chips like the ESP32-S3 or Raspberry Pi Pico, the DAC pins are explicitly marked in the block diagram. Feeding an analog signal into a DAC pin will not give you a reading; it will just back-feed the output buffer and potentially damage the silicon.
2. Resolution (Bits) vs. Reference Voltage (Range): A 16-bit ADC is not inherently "more accurate" than a 12-bit ADC if the reference voltage is noisy. Resolution dictates how many slices you cut the pie into; the reference voltage dictates the size of the pie. A 12-bit ADC on a clean 2.048V reference (0.5mV per step) will yield vastly superior real-world measurements compared to a 16-bit ADC on a noisy 5.0V rail where the noise floor swallows the lower 4 bits anyway.
FAQ: ADC Wiring and Diagram Troubleshooting
Why does my ADC reading jump around by 10-20 steps even when the input is tied to a battery?
This is usually caused by a high-impedance source or missing decoupling. The internal Sample-and-Hold capacitor needs a low-impedance path to charge fully within the acquisition window. Add a 100nF ceramic capacitor as close to the GPIO pin as possible, and ensure your source impedance is under 10kΩ. If using a high-value voltage divider, add an op-amp voltage follower to buffer the signal.
Can I use an ADC pin as a digital GPIO simultaneously?
Yes, but you must reconfigure the pin mux in your firmware before taking a reading. On the ESP32, calling analogRead() automatically switches the pin to the ADC peripheral, but if you are using low-level registers, you must explicitly route the GPIO matrix to the ADC block. Be aware that leaving a pin in ADC mode while driving it digitally can cause internal bus contention.
What is ADC attenuation and when should I use it?
Attenuation is an internal voltage divider inside the microcontroller's ADC front-end. On the ESP32, setting the attenuation to 11dB scales the input voltage down internally, allowing you to measure signals up to ~3.1V (or ~3.3V on the S3) instead of the default ~1.1V full-scale range. Always use 11dB attenuation when measuring signals referenced to the 3.3V rail.






