PHY 452 · Electronics
Our notes
2 min readWhy convert
The real world is analogue (temperature, sound, voltage from sensors); processing is digital. An ADC turns a voltage into a number; a DAC turns a number back into a voltage.
DAC basics
Output voltage = Vref × D / 2^n, where D is the input number and n the number of bits.
- Resolution (step size) = Vref / 2^n.
- Example: a 4-bit DAC with Vref = 8 V. Step = 8/16 = 0.5 V. Input 1011 (11): output = 11 × 0.5 = 5.5 V.
Weighted-resistor DAC
Each bit switches a resistor (R, 2R, 4R, 8R ...) into the summing junction of an inverting op-amp; currents add in binary proportion. Problem: needs a wide range of precise resistor values for many bits.
R-2R ladder DAC
Uses only two values, R and 2R, in a ladder; each bit's current is half the previous one. Easy to make accurately in ICs: the usual design.
DAC specifications
Resolution, full-scale output, accuracy, linearity, settling time and monotonicity (output always rises as the input rises).
ADC basics
- Step size (one LSB) = Vref / 2^n.
- Example: an 8-bit ADC with Vref = 5 V. Step = 5/256 = 19.5 mV. An input of 3.2 V gives 3.2 / 0.01953 = 163.8, so the output code is 163 = 10100011 (truncating).
- Quantisation error: up to one step (or half a step with rounding).
- Sampling theorem (Nyquist): sample at more than twice the highest signal frequency, or aliasing distorts the signal (audio CDs sample at 44.1 kHz for sound up to about 20 kHz).
- A sample-and-hold circuit keeps the input steady during conversion.
Types of ADC
| Type | How it works | Speed | Use |
|---|---|---|---|
| Flash (parallel) | 2^n - 1 comparators at once | fastest | video, radar |
| Counter (ramp) | a counter drives a DAC until it matches the input | slow, variable | simple |
| Successive approximation | tests each bit from the MSB, like a binary search, n steps | medium, fixed | microcontrollers, data loggers |
| Dual slope (integrating) | integrates input, then a reference; time measures voltage | slow | digital multimeters; rejects noise |
| Sigma-delta | oversampling with feedback | high resolution | audio, precision sensors |
Applications
Digital multimeters, sound recording, phone cameras, sensors in weather stations and medical devices, and microcontroller projects (Arduino boards have 10-bit ADCs).
Exams usually ask
- Calculate DAC output and resolution; explain the R-2R ladder.
- Describe the successive approximation ADC.
Common mistake
Dividing by 2^n - 1 in one formula and 2^n in another without saying so. State your convention; these notes use Vref / 2^n throughout.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
No reading links here yet
Our team adds free books, videos and practice for each topic, and opens every link before it goes up.