Top Banner Ad

BEC302 — Unit 5: Digital-to-Analog converters (DAC)

Table of Contents (21 sections)

BEC302 · DIGITAL SYSTEM DESIGN · Unit 5

Digital-to-Analog converters (DAC)

Unit Scope & Exam Weightage: This unit bridges digital and analogue worlds: DAC specifications, binary-weighted resistor and R–2R ladder DACs, ADC specifications and conversion principle, switched-capacitor circuits, and ADC types — dual slope, successive approximation, counting type and flash. The paper repeatedly asks 7-mark numericals on ADC resolution/quantisation/error and SAR conversion, plus 7-mark derivations of R–2R and successive-approximation operation. Expect 14–21 marks.


Front Page: Importance-Wise Topic Roadmap (2023–26 PYQs)

Priority Topic (Exact Syllabus) PYQs Asked Marks Weightage Tag
1 Analog-to-digital converters (ADC): Specifications of ADCs 3 (2025-26 ×3) 7m + 7m + 2m Survival Mode Numerical
2 R-2R ladder 3 (2023-24, 2025-26 ×2) 7m × 3 Survival Mode Derivation
3 principle of ADC (successive approximation numerical) 2 (2023-24, 2025-26) 7m × 2 Algorithm
4 switched capacitor circuits: Basic concept 1 (2023-24) 7m Core Concept
5 Specifications of DACs 1 (2023-24) 2m Quick Definition
6 Weighted resistor / dual slope / counting type / flash 0 direct — Supporting Topic

2-Hour Last-Night Survival Checklist:

  1. Step size: Δ=VFS/2n\Delta=V_{FS}/2^n (ADC) and Δ=VFS/(2n−1)\Delta=V_{FS}/(2^n-1) when full scale is defined as the largest code; quantisation error is ±Δ/2\pm\Delta/2. For 8-bit, 5 V: Δ=19.53\Delta=19.53 mV, error ±9.77 mV.
  2. SAR conversion: 10-bit at 1 MHz → 10 clock periods = 10 µs; test bits MSB first, keep a bit only if DAC output ≤ analogue input (truncation, not rounding).
  3. R–2R ladder: requires only two resistor values; output impedance is constant RR looking into any node; Vo=−Vref(bn−1/2+bn−2/4+⋯+b0/2n)V_o=-V_{ref}(b_{n-1}/2+b_{n-2}/4+\dots+b_0/2^n).
  4. Percentage resolution: =100/(2n−1)%=100/(2^n-1)\%; for 10-bit DAC with 10 mV step, VFS=1023×10 mV=10.23V_{FS}=1023\times10\text{ mV}=10.23 V and resolution ≈0.0978%.
  5. ADC speed: flash (fastest, 2n−12^n-1 comparators) > SAR (nn clocks) > counting type (up to 2n−12^n-1 clocks) > dual slope (slow, high noise rejection).

1. Specifications of DACs and ADCs

DAC (2 Marks): a circuit that converts an nn-bit digital word into a proportional analogue voltage or current. ADC (2 Marks): a circuit that samples an analogue voltage and produces the nn-bit digital word nearest to (or just below) it.

1.1 DAC Specifications

Specification Meaning
Resolution Smallest change in output for a 1-LSB change in input = VFS/(2n−1)V_{FS}/(2^n-1)
Full-scale output Analogue value for code 11…111\ldots1
Linearity Maximum deviation from the ideal straight-line transfer curve
Monotonicity Output never decreases when the input code increases
Settling time Time for output to settle within ±½ LSB after a code change
Offset / gain error Constant shift and slope error of the transfer characteristic

1.2 ADC Specifications

Δ=Vref2n,quantisation error=±Δ2,% resolution=1002n−1\Delta=\frac{V_{ref}}{2^n},\qquad \text{quantisation error}=\pm\frac{\Delta}{2},\qquad \%\text{ resolution}=\frac{100}{2^n-1} Vdigital code=kΔ ⇒ k=⌊VinΔ⌋ (SAR truncation)V_{\text{digital code}}=k\Delta\ \Rightarrow\ k=\left\lfloor\frac{V_{in}}{\Delta}\right\rfloor\ \text{(SAR truncation)}
Specification Meaning
Resolution Number of bits nn; step size Δ\Delta
Quantisation error Difference between sample and represented level, max ±½ LSB
Conversion time Time from start-of-conversion to valid digital output
Sampling rate Maximum conversions per second (Nyquist: ≥2× signal bandwidth)
Accuracy Includes offset, gain, linearity and quantisation errors
Missing codes A code never produced due to nonlinearity (must be absent in a good ADC)

Examiner Tip (resolution wording): If the question gives Vref=5V_{ref}=5 V and 8 bits, the step size is 5/256=19.5315/256=19.531 mV; if it asks "percentage resolution", use 100/255=0.392%100/255=0.392\%. Write both the step size and the percentage so either marking convention is covered.


2. DAC Architectures

2.1 Binary-Weighted Resistor DAC

An inverting op-amp sums currents from branches with resistors R,2R,4R,…,2n−1RR,2R,4R,\dots,2^{n-1}R, switched to VrefV_{ref} when the bit is 1 and to ground when it is 0. With Rf=R/2R_f=R/2:

Vo=−Vref(bn−1+bn−22+bn−34+⋯+b02n−1)V_o=-V_{ref}\left(b_{n-1}+\frac{b_{n-2}}{2}+\frac{b_{n-3}}{4}+\dots+\frac{b_0}{2^{n-1}}\right)

Drawback: for 10 bits the largest resistor is 512R512R; if R=1R=1 kΩ the range is 1 kΩ to 512 kΩ — too wide for accurate matching on an IC.

2.2 R–2R Ladder DAC

Only two resistor values are used. Every node looking right into the ladder presents resistance RR to ground, so bit currents halve systematically as one moves along the ladder.

%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart LR
    REF["Vref"] --> L["2R from MSB node"]
    L --> N1["Node b(n-1)"]
    N1 --> R1["R"]
    R1 --> N2["Node b(n-2)"]
    N2 --> R2["R"]
    R2 --> N3["..."]
    N1 --> S1["2R to switch"]
    N2 --> S2["2R to switch"]
    N3 --> S3["2R to switch"]
    S1 --> OP["Op-amp summing node"]
    S2 --> OP
    S3 --> OP

Derivation of the output: because each successive node contributes half the current of the previous one, the summing node receives Vref/2RV_{ref}/2R weighted by bn−1b_{n-1}, Vref/4RV_{ref}/4R by bn−2b_{n-2}, etc. With feedback resistor Rf=RR_f=R:

Vo=−Vref(bn−12+bn−24+⋯+b02n)\boxed{V_o=-V_{ref}\left(\frac{b_{n-1}}{2}+\frac{b_{n-2}}{4}+\dots+\frac{b_0}{2^n}\right)}
Feature Weighted-resistor DAC R–2R ladder DAC
Resistor values Many (RR to 2n−1R2^{n-1}R) Only RR and 2R2R
Matching accuracy Poor for high nn Excellent
Output impedance Varies with code Constant RR
Monotonicity Harder to guarantee Inherently good
IC suitability Low High

Worked example: 4-bit R–2R, Vref=5V_{ref}=5 V, input 1011: Vo=−5(1/2+0/4+1/8+1/16)=−5(0.6875)=−3.4375V_o=-5(1/2+0/4+1/8+1/16)=-5(0.6875)=-3.4375 V.

2.3 Switched-Capacitor Circuits

Switched-capacitor circuit (2 Marks): a network in which MOS switches periodically connect a capacitor between two nodes, transferring packets of charge Q=CΔVQ=C\Delta V so that it behaves like a resistor of Req=1/(Cfclk)R_{eq}=1/(Cf_{clk}).

Application How the switched capacitor is used
Sample-and-hold Capacitor stores the input voltage while the switch opens
SC filters Replaces resistors in active-RC filters; cutoff set by CC ratio × clock
Pipelined ADC Multiplying DAC and residue amplifier use capacitor arrays
Sigma–delta ADC Integrator built from switched capacitors; oversampling gives high resolution

Advantages: accurate time constants depend on capacitor ratios and clock frequency, not on absolute resistor values; fully compatible with CMOS. Limitation: clock feed-through and charge injection require careful switch design.


3. ADC Architectures and Principle

3.1 Successive Approximation Register (SAR) ADC

Principle: a DAC, a comparator and a successive-approximation register perform a binary search. The MSB is tried first; if the DAC output is less than or equal to the input, the bit is kept, otherwise it is cleared. Each bit requires one clock, so conversion time =nTclk=nT_{clk}.

%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart TD
    START["Start of conversion<br/>clear all bits"] --> MSB["Set MSB = 1"]
    MSB --> DAC["DAC converts trial word"]
    DAC --> CMP{"VDAC <= VIN ?"}
    CMP -->|Yes| KEEP["Keep bit = 1"]
    CMP -->|No| CLEAR["Clear bit = 0"]
    KEEP --> NEXT["Move to next bit"]
    CLEAR --> NEXT
    NEXT --> MSB
    NEXT --> DONE["After n clocks: output code"]

3.2 Other ADC Types

Type Hardware Conversion time Strength Weakness
Flash 2n−12^n-1 comparators + priority encoder One clock Fastest Huge hardware for large nn
Counting type Counter + DAC + comparator Up to (2n−1)T(2^n-1)T Very simple Slow
Dual slope Integrator + counter 2n+1T2^{n+1}T Excellent noise rejection, accurate Very slow; used in DMMs
SAR DAC + comparator + register nTnT Best speed/accuracy/cost compromise Needs a precise DAC

After-Topic PYQs:

  • 2025-26 (7 Marks): "An 8-bit ADC has a reference voltage of 5 V. (a) Calculate the resolution (b) Determine the quantization error (c) Find the digital output for an input of 2.6 V."
  • 2025-26 (7 Marks): "Assume the following values for the ADC: clock frequency = 1 MHz; VT=0.1V_T = 0.1 mV; DAC has F.S. output = 10.23 V and a 10-bit input. Determine the following values: (i) The digital equivalent obtained for VA=3.728V_A = 3.728 V. (ii) The conversion time. (iii) The resolution of this converter."
  • 2025-26 (2 Marks): "Calculate the step size of a 10-bit ADC with 5 V reference."
  • 2023-24 (7 Marks): "Describe the principle of operation of a successive approximation ADC."
  • 2023-24 (7 Marks): "Explain switched capacitor and give its applications."
  • 2023-24 (7 Marks): "Explain the principle of operation of an R-2R ladder DAC."
  • 2023-24 (2 Marks): "What are the key specifications of a DAC?"
  • 2025-26 (7 Marks): "What is the advantage of R/2R ladder DACs over those that use binary weighted resistors? A 10-bit DAC has a step size of 10 mV. Determine the full-scale output voltage and the percentage resolution."

Solved Exam-Ready Questions

Solved Q1 (2025-26 — 7 Marks | 8-bit ADC Numerical)

Q: An 8-bit ADC has a reference voltage of 5 V. (a) Calculate the resolution (b) Determine the quantization error (c) Find the digital output for an input of 2.6 V.

Solution:

  1. Number of levels =28=256=2^8=256.
  2. (a) Resolution / step size: Δ=5/256=0.01953125\Delta=5/256=0.01953125 V =19.53 mV=\mathbf{19.53\ mV}. Percentage resolution =100/256=0.391%=100/256=0.391\% (or 100/255=0.392%100/255=0.392\% by the FS convention).
  3. (b) Quantisation error: maximum =Δ/2=9.77 mV=\Delta/2=\mathbf{9.77\ mV} (i.e. ±½ LSB). RMS error =Δ/12≈5.64=\Delta/\sqrt{12}\approx5.64 mV if required.
  4. (c) Digital code: k=Vin/Δ=2.6/0.01953125=133.12k=V_{in}/\Delta=2.6/0.01953125=133.12. Truncating (SAR behaviour) gives k=133k=133; rounding to the nearest level also gives 133 since the fraction 0.12 < 0.5.
  5. Binary conversion: 133=128+4+1=27+22+20133=128+4+1=2^7+2^2+2^0 → 100001012\mathbf{10000101_2}.
  6. Reconstructed voltage: 133×19.53125 mV=2.5977133\times19.53125\text{ mV}=2.5977 V; error 2.6−2.5977=0.00232.6-2.5977=0.0023 V, well within ±½ LSB ✓.

Solved Q2 (2025-26 — 7 Marks | SAR ADC Numerical)

Q: Assume the following values for the ADC: clock frequency = 1 MHz; VT=0.1V_T = 0.1 mV; DAC has F.S. output = 10.23 V and a 10-bit input. Determine the following values: (i) The digital equivalent obtained for VA=3.728V_A = 3.728 V. (ii) The conversion time. (iii) The resolution of this converter.

Solution:

  1. Step size: with full-scale = (210−1)Δ=1023Δ=10.23(2^{10}-1)\Delta=1023\Delta=10.23 V, Δ=10 mV\Delta=\mathbf{10\ mV}. The comparator threshold VT=0.1V_T=0.1 mV is much smaller than ½ LSB, so comparisons are decisive.
  2. SAR trial table (candidate code kept only if VDAC≤VAV_{DAC}\le V_A):
Bit tried Weight (V) Cumulative trial (V) Decision Bit
b9b_9 5.12 5.12 5.12 > 3.728 → clear 0
b8b_8 2.56 2.56 ≤ 3.728 → keep 1
b7b_7 1.28 3.84 > 3.728 → clear 0
b6b_6 0.64 3.20 ≤ → keep 1
b5b_5 0.32 3.52 ≤ → keep 1
b4b_4 0.16 3.68 ≤ → keep 1
b3b_3 0.08 3.76 > → clear 0
b2b_2 0.04 3.72 ≤ → keep 1
b1b_1 0.02 3.74 > → clear 0
b0b_0 0.01 3.73 > → clear 0
  1. (i) Digital equivalent: 01011101002=256+64+32+16+4=372100101110100_2=256+64+32+16+4=\mathbf{372_{10}}, representing 3.72 V (error +8+8 mV from truncation).
  2. (ii) Conversion time: one bit per clock → 10×(1/1 MHz)=10 μs10\times(1/1\text{ MHz})=\mathbf{10\ \mu s}.
  3. (iii) Resolution: step size =10 mV=\mathbf{10\ mV}; percentage resolution =100/1023=0.0978%=100/1023=\mathbf{0.0978\%}.
  4. Check: 372×10 mV = 3.72 V ≤ 3.728 V and 373×10 mV = 3.73 V > 3.728 V, so the SAR choice is correct.

Solved Q3 (2025-26 — 2 Marks | ADC Step Size)

Q: Calculate the step size of a 10-bit ADC with 5 V reference.

Solution: Δ=Vref/2n=5/1024=0.0048828\Delta=V_{ref}/2^n=5/1024=0.0048828 V =4.883 mV=\mathbf{4.883\ mV}. Maximum quantisation error is ±2.44 mV, and percentage resolution is 100/1024=0.0977%100/1024=0.0977\%.


Solved Q4 (2023-24 — 7 Marks | Successive Approximation Principle)

Q: Describe the principle of operation of a successive approximation ADC.

Solution:

  1. Blocks: sample-and-hold, DAC, comparator, successive-approximation register (SAR), and clock/control logic.
  2. On start, all bits are cleared. The SAR sets the MSB to 1; the DAC produces half-scale.
  3. The comparator checks whether VDAC≤VinV_{DAC}\le V_{in}. If yes the bit stays 1; if no it is reset to 0.
  4. The same test repeats for the next bit, with the previously decided bits held, until all nn bits are decided — a binary search over 2n2^n levels.
  5. Conversion time: nTclknT_{clk}; for 10 bits at 1 MHz it is 10 µs (independent of input amplitude, unlike the counting type).
  6. Accuracy: limited by DAC linearity, comparator offset and quantisation ±½ LSB.
  7. Use: the most common general-purpose ADC (data acquisition, microcontrollers, audio).

Solved Q5 (2023-24 — 7 Marks | R–2R Ladder Principle)

Q: Explain the principle of operation of an R-2R ladder DAC.

Solution:

  1. Network: a ladder of series RR and shunt 2R2R branches; each bit switch connects its 2R2R leg either to VrefV_{ref} (bit 1) or to virtual ground (bit 0) at the op-amp summing node.
  2. Key property: looking right from any node, the equivalent resistance is RR (a 2R2R leg in parallel with R+2R∥…R+2R\parallel\dots equals RR), so each stage halves the current reaching the next stage.
  3. Weights: MSB contributes Vref/2RV_{ref}/2R, next bit Vref/4RV_{ref}/4R, …, LSB Vref/2nRV_{ref}/2^nR.
  4. Output with Rf=RR_f=R: Vo=−Vref(bn−1/2+bn−2/4+⋯+b0/2n)V_o=-V_{ref}(b_{n-1}/2+b_{n-2}/4+\dots+b_0/2^n).
  5. Example: 3-bit, Vref=8V_{ref}=8 V, input 101 → −8(1/2+0+1/8)=−5-8(1/2+0+1/8)=-5 V.
  6. Advantages: only two resistor values, constant output impedance, excellent monotonicity and easy IC fabrication (see comparison table in Section 2.2).

Solved Q6 (2025-26 — 7 Marks | R–2R Advantage and DAC Numerical)

Q: What is the advantage of R/2R ladder DACs over those that use binary weighted resistors? A 10-bit DAC has a step size of 10 mV. Determine the full-scale output voltage and the percentage resolution.

Solution:

  1. Advantage: a binary-weighted DAC needs resistors from RR to 29R2^{9}R (512:1 ratio for 10 bits), which are hard to match accurately on a chip. The R–2R ladder needs only RR and 2R2R, giving precise ratios, constant output impedance and good monotonicity.
  2. Full-scale output: the largest code is 210−1=10232^{10}-1=1023, so VFS=1023×10 mV=10.23 VV_{FS}=1023\times10\text{ mV}=\mathbf{10.23\ V}.
  3. Percentage resolution: ΔVFS×100=10 mV10.23 V×100=1001023=0.0978%\dfrac{\Delta}{V_{FS}}\times100=\dfrac{10\text{ mV}}{10.23\text{ V}}\times100=\dfrac{100}{1023}=\mathbf{0.0978\%}.
  4. Alternative convention: if full scale is taken as 2nΔ=10.242^n\Delta=10.24 V, the percentage is 100/1024=0.0977%100/1024=0.0977\% — both are acceptable if stated.
  5. Check: VoV_o for code 1111111111 = 10.23 V and for 1000000000 = 5.12 V = half scale ✓.

Solved Q7 (2023-24 — 7 Marks | Switched Capacitor)

Q: Explain switched capacitor and give its applications.

Solution:

  1. Structure: a capacitor connected between two nodes through MOS switches driven by a two-phase non-overlapping clock.
  2. Charge transfer: in phase 1 the capacitor charges to V1V_1; in phase 2 it discharges into V2V_2, moving charge ΔQ=C(V1−V2)\Delta Q=C(V_1-V_2) each cycle.
  3. Equivalent resistance: average current I=ΔQfclk=C(V1−V2)fclkI=\Delta Q f_{clk}=C(V_1-V_2)f_{clk}, hence Req=(V1−V2)/I=1/(Cfclk)R_{eq}=(V_1-V_2)/I=\mathbf{1/(Cf_{clk})}.
  4. Applications: sample-and-hold circuits, switched-capacitor filters (cutoff set by capacitor ratios and clock), pipelined and sigma–delta ADCs, capacitive DACs.
  5. Advantages: accurate ratios in IC form, programmable filters via clock frequency, no large resistors.
  6. Non-idealities: charge injection, clock feed-through and finite op-amp bandwidth.

Solved Q8 (2023-24 — 2 Marks | DAC Specifications)

Q: What are the key specifications of a DAC?

Solution: The key specifications are resolution (1-LSB step), full-scale output, linearity, monotonicity, settling time, offset/gain error and glitch impulse. Together they describe how closely the analogue output follows the ideal straight-line relation with digital code.


Practice Questions (Self-Test)

  1. (7 Marks) For a 6-bit R–2R DAC with Vref=10V_{ref}=10 V, find the output for code 101010 and the maximum output.
  2. (7 Marks) An ADC has Vref=5V_{ref}=5 V and 12 bits. Find step size, percentage resolution and maximum quantisation error.
  3. (7 Marks) Explain why the counting-type ADC is slower than the SAR ADC and give one application of each.
  4. (7 Marks) Derive the transfer function of a first-order RC low-pass filter and relate its cutoff to a switched-capacitor clock.
  5. (2 Marks) State two advantages of R–2R over binary-weighted DAC.
  6. (7 Marks) A flash ADC uses 255 comparators. How many bits is it, and how many resistors are needed in the reference ladder? (Ans: 8 bits; 256 equal resistors.)