ADC · DAC · LEARNING LAB

ANALOG ↔ DIGITAL CONVERSION · INTERACTIVE INSTRUMENT SIMULATOR · MORAINE VALLEY COMMUNITY COLLEGE

SYSTEM READY
Levels: 1024  |  Max code: 1023
Full-scale: 24 V
-12 V+12 V
VOLTS
── CH1 ANALOG INPUT ── CH2 QUANTIZED
Digital Value (Dec)
Integer code
Hex Value
Base 16
Octal Value
Base 8
Step Size (LSB)
V per count
Quant. Error
±½ LSB max
% Full Scale
Input position
BINARY WORD — 10-BIT OUTPUT  ▲ MSB ▲ LSB
Conversion History
#Analog (V)DecimalHexBinaryLSB (mV)
Levels: 1024  |  Max code: 1023
01023
DEC
0x
── CH1 ANALOG OUTPUT (STAIRCASE) - - IDEAL ENVELOPE
Analog Output (V)
Reconstructed voltage
Decimal Code
Input code
Hex Code
Base 16
Binary Word
Bit pattern
Step Size (LSB)
mV per code
% Full Scale
Code utilization
BINARY WORD — 10-BIT INPUT
DAC History
#Dec CodeHexAnalog Out (V)% FS

🔌 What is an ADC?

An Analog-to-Digital Converter (ADC) samples a continuous analog voltage and converts it to a discrete binary number. Every ADC performs two core operations:

  • Sampling — capturing the signal at uniform time intervals (must satisfy Nyquist: fs ≥ 2fmax)
  • Quantization — mapping the sample to the nearest of 2ᴺ discrete voltage levels

Higher bit depth = more levels = finer resolution = less quantization error. Each added bit improves dynamic range by ~6 dB and halves the step size.

Digital Code = floor[ (V_in − V_min) / (V_max − V_min) × (2ᴺ − 1) ]
Step Size (LSB) = (V_max − V_min) / (2ᴺ − 1)
Max Quant. Error = ±½ × LSB
Dynamic Range ≈ 6.02 × N + 1.76 dB
Live Formula — Current ADC Settings
Step Size = 24 V ÷ 1023 = 23.46 mV
Max Error = ±11.73 mV
Dyn. Range = 62.0 dB

🔊 What is a DAC?

A Digital-to-Analog Converter (DAC) reconstructs a continuous voltage from a binary code. DACs are essential in audio playback, motor control, RF signal generation, and industrial process control.

  • R-2R Ladder — uses a precision resistor network; low cost, widely used
  • Weighted Resistor — each bit drives a differently weighted resistor
  • Delta-Sigma (ΔΣ) — oversampling + noise shaping for 16–24 bit audio
  • PWM-based — pulse width modulated output + low-pass filter
V_out = V_min + Code × [(V_max − V_min) / (2ᴺ − 1)]
Resolution = (V_max − V_min) / (2ᴺ − 1)
% Full Scale = (Code / (2ᴺ − 1)) × 100

The characteristic staircase waveform of a DAC output is smoothed by a reconstruction (low-pass) filter to recover the original continuous signal.

📊 Resolution Comparison Table

Bits Levels LSB @ 5V LSB @ 24V Dyn Range
825619.6 mV94.1 mV49.9 dB
101,0244.89 mV23.5 mV61.9 dB
124,0961.22 mV5.86 mV73.9 dB
1665,53676 µV366 µV97.8 dB

Each additional bit doubles resolution and adds ~6 dB of dynamic range. Choosing bit depth is a trade-off between precision, speed, power, and cost.

Bipolar ranges (e.g., ±12V) require offset encoding; unipolar ranges (e.g., 0–5V) use straight binary coding.

🎓 Learning Competencies

Upon completing this module, students will be able to:

  • Explain the difference between analog and digital signals and why conversion is necessary in modern systems
  • Calculate the number of quantization levels for any N-bit ADC/DAC (2ᴺ levels)
  • Apply the ADC conversion formula to map a voltage to its correct digital code
  • Calculate step size (LSB) and maximum quantization error for any given configuration
  • Explain the trade-off between bit resolution, conversion speed, power, and cost
  • Describe flash, successive approximation (SAR), and delta-sigma ADC architectures
  • Perform DAC reconstruction and calculate the expected analog output voltage from a code
  • Interpret binary, hexadecimal, octal, and decimal representations of converter codes
  • Analyze the effect of bipolar vs. unipolar voltage ranges on code mapping
  • Apply Nyquist's theorem to determine minimum sampling rates for given signals
0/8
SCORE