Menu Close

Sample and hold circuits, ADCs and DACs: UPSC Electrical Engineering Optional PYQ Solutions (1995–2019)

All 9 questions UPSC has asked on sample and hold circuits, ADCs and DACs in the Electrical Engineering Optional (Paper I, Digital Electronics) from 1995 to 2019, solved step by step – latest first.

Try them yourself first: the same questions, without solutions, are on our Digital Electronics topic-wise PYQs page. Circuit diagrams have been redrawn from the question papers.

How we check these solutions

These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:

  • ✓ Checked by computer the numbers were worked out again independently in code (SymPy and NumPy: circuit equations, power balance, matrices, integrals).
  • ✓ Answer checked step by step for theory and descriptive questions, every point was checked against the standard theory.

Where a printed question is wrong, unclear or incomplete, we say so and solve the intended version.

Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.

Jump to a question (year · question number):

2019 · 8a 2016 · 6a 2010 · 6b(ii) 2010 · 6b(iii) 2007 · 1b(ii) 2006 · 5b(iv) 1999 · 6c 1996 · 4c 1995 · 8c

Cover of the UPSC Prelims Topic-wise PYQ book with detailed explanations

From the Optional Province team

Preparing for Prelims too?

Our UPSC Prelims Topic-wise PYQ Book covers every Prelims question with detailed explanations, so you can see exactly where UPSC asks from. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Draw the block diagram of a single slope type A/D converter and explain its principle of operation.

2019 · Paper I · Q8a · 20 marks

Solution

Block diagram. A single-slope (ramp) ADC has a ramp generator, a comparator, an AND gate, a clock, a binary counter and control logic.

ComparatorVinRampgeneratorClockBinarycounterDigitaloutputControl logicreset / startreset
Single-slope (ramp-type) ADC. On a phone, swipe sideways to see all of it.

Principle of operation.

  1. At the start of a conversion, the control logic resets the counter to zero and starts the ramp from 0 V. The ramp rises linearly, vr=kt.
  2. While the ramp is below Vin, the comparator output is HIGH, so the AND gate passes clock pulses to the counter.
  3. When the ramp reaches Vin, the comparator output goes LOW, the gate closes and counting stops. This happens at tc=Vin/k.
  4. The count is N=tcfclk=fclkkVin, which is proportional to the input. The counter outputs are the digital result. The control logic then resets the ramp and counter for the next conversion.
t_crampV_incounted clock pulsest
Clock pulses are counted until the ramp reaches Vin.

Features. It is simple and cheap. But the conversion time grows with Vin (up to 2n clock periods for an n-bit result), so it is slow. Its accuracy depends directly on the ramp slope k, which drifts with the RC values and the clock frequency. The dual-slope converter removes this dependence.

✓ Answer checked step by step We checked the description step by step against the standard working of the single-slope converter.

↑ Back to the question list

Identify the circuit shown in Fig. 6(a). Briefly explain the same. Calculate the current i and Vo, if VR=5V and R=5kΩ=RF:

VRN₀N₁N₂N₃RRR2Ri →2R2R2R2RRFVo
Figure redrawn from the question paper. On a phone, swipe sideways to see all of it.

2016 · Paper I · Q6a · 20 marks

Solution

Identification. It is a 4-bit R–2R ladder digital-to-analog converter of the current (inverted-ladder) type. The four shunt 2R resistors are the bit legs: a leg connected to the op-amp’s inverting input is a 1 and a leg connected to ground is a 0. Here the legs at N1 and N3 go to the op-amp, so the input word (N0 as MSB) is 0101.

Why the currents halve. The inverting input is a virtual ground, so every 2R leg ends at 0 V whichever way it is switched. Looking right from each node, the resistance to ground is always 2R (for example, at N3: 2R ∥ 2R = R, plus the series R from N2 gives 2R). So each node sees R in series feeding 2R ∥ 2R, and the voltage halves at every node: VN0=VR=5V,VN1=2.5V,VN2=1.25V,VN3=0.625V.

Current i. With R=5 kΩ, so 2R = 10 kΩ: i=VN32R=0.62510kΩ=62.5μA.

Output. The legs at N1 and N3 feed the summing junction: I=2.510kΩ+0.62510kΩ=250+62.5=312.5μA, Vo=−RFI=−5kΩ×312.5μA=−1.5625V.

As a check: Vo=−RFRVR⋅516=−5×516=−1.5625 V, since 0101 is 5 out of 16.

✓ Checked by computer We solved the ladder by nodal analysis in code.

↑ Back to the question list

With the aid of circuit, draw R/2R ladder DAC and discuss its operation.

2010 · Paper I · Q6b(ii) · 6 marks

Solution

Circuit. A 4-bit R–2R ladder DAC (inverted-ladder form) uses only two resistor values. The reference VR feeds a chain of series resistors R. A 2R leg hangs from each node to a changeover switch. Bit bk=1 connects the leg to the op-amp’s inverting input; bk=0 connects it to ground. The ladder ends in a 2R resistor to ground.

VRN₀N₁N₂N₃RRR2R2Rb₃ (MSB)2Rb₂2Rb₁2Rb₀ (LSB)RFVo
4-bit R–2R ladder DAC (inverted ladder). On a phone, swipe sideways to see all of it.

Operation.

  • Both switch positions are at 0 V (ground or virtual ground), so switching a bit does not change the ladder currents.
  • From every node, the resistance looking to the right is 2R. So the current entering each node splits equally between its leg and the rest of the ladder.
  • The total current from the reference is I=VR/R. The leg currents are I/2,I/4,I/8,I/16 from MSB to LSB, which are binary weighted.
  • The op-amp sums the currents of the legs that are set to 1: Vo=−RFI(b32+b24+b18+b016)=−RFRVRD16, where D is the decimal value of the input word.

Advantages over the weighted-resistor DAC. Only two resistor values (easy to match and trim on a chip) for any number of bits. Each switch carries a constant current, so switching is fast with little glitching.

✓ Answer checked step by step We checked the circuit and its working step by step against the standard R–2R DAC theory.

↑ Back to the question list

With VREF=5V for the DAC, find the resolution and full-scale output of this converter.

2010 · Paper I · Q6b(iii) · 4 marks

Solution

Assumption. The bit length is not given; we take the 4-bit R–2R DAC of part (ii) with RF=R, so |Vo|=VREFD/24.

Resolution (the change in output for one LSB): VREF24=516=0.3125V(6.25%of VREF).

Full-scale output (input 1111): VFS=VREF24−124=5×1516=4.6875V.

The output is negative for the inverting op-amp, so Vo runs from 0 to −4.6875 V in steps of 0.3125 V.

In general, for an n-bit converter the resolution is VREF/2n and the full scale is VREF(1−2−n). For an 8-bit DAC with VREF=5 V these are 19.5 mV and 4.98 V.

✓ Checked by computer We checked the resolution and full-scale output in code.

↑ Back to the question list

Cover of the UPSC Mains Topic-wise and Year-wise PYQs book (2013–2026)

From the Optional Province team

Strengthen your GS papers

Our UPSC Mains Topic-wise & Year-wise PYQ Book (2013–2026) maps every GS question to the syllabus, so you know what UPSC asks and how often. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

A D/A converter has the lowest and the highest values of resistances 1 kΩ and 4 kΩ, respectively. If the bit-length of the converter is to be increased by 2, what would be the number of resistors required and their values? Draw the complete circuit of the new converter.

2007 · Paper I · Q1b(ii) · 10 marks

Solution

The existing converter. Resistors from 1 kΩ to 4 kΩ, doubling from bit to bit, point to a binary-weighted resistor DAC: 1 kΩ (MSB), 2 kΩ, 4 kΩ (LSB). That is a 3-bit converter with 3 resistors (plus the feedback resistor).

Adding 2 bits. A 5-bit converter needs one resistor per bit, each double the previous one. We keep the MSB resistor and add two smaller-weight bits: 1kΩ,2kΩ,4kΩ,8kΩ,16kΩ. So 5 input resistors are needed (plus RF). The largest is now 16 kΩ, 16 times the smallest.

Complete circuit. Each bit input is at VR (logic 1) or 0 V (logic 0). The op-amp sums the currents: Vo=−RF(b41k+b32k+b24k+b18k+b016k)VR.

1 kΩb₄ (MSB)2 kΩb₃4 kΩb₂8 kΩb₁16 kΩb₀ (LSB)RFVo
5-bit binary-weighted resistor DAC.

For example, with RF=0.5 kΩ the full-scale output (11111) is −3132VR.

The resistor spread doubles with every added bit, which is why weighted-resistor DACs are rarely used beyond 6–8 bits; an R–2R ladder needs only two values whatever the bit length.

✓ Checked by computer We checked the resistor sequence in code.

↑ Back to the question list

Determine (1) maximum conversion rate (2) average conversion rate (3) maximum conversion time for a 16–bit counter type A/D converter using a 1 MHz clock.

2006 · Paper I · Q5b(iv) · 5 marks

Solution

Counter-type ADC. The counter counts up from zero, one count per clock period, until the DAC output reaches the input. With a 1 MHz clock, Tclk=1μs.

(3) Maximum conversion time. A full-scale input needs all 216 counts: tmax=216×1μs=65,536μs≈65.5ms. (Strictly 65,535 counts reach the top code; the difference is negligible.)

(1) Maximum conversion rate. The rate the converter can always sustain, whatever the input, is set by the worst case: 1tmax=165.536ms≈15.3conversions per second.

(2) Average conversion rate. On average the counter stops halfway, so the average conversion time is tmax/2=32.8 ms and average rate=132.768ms≈30.5conversions per second.

Such slow rates are why counter-type ADCs are replaced by successive-approximation converters, which need only 16 clock periods (16 µs) for 16 bits.

✓ Checked by computer We computed the times and rates in code.

↑ Back to the question list

Describe any two types of A to D converters. Discuss their merits and demerits.

1999 · Paper I · Q6c · 20 marks

Solution

We describe the two most widely used types: the successive-approximation ADC and the dual-slope ADC.

1. Successive-approximation ADC. It contains a comparator, an n-bit DAC, a successive-approximation register (SAR) with control logic, and a clock.

ComparatorVinn-bit DACSuccessiveapproximationregister+ controlClockn bitsDigitaloutputStart
Successive-approximation ADC. On a phone, swipe sideways to see all of it.

It finds the digital code one bit at a time, starting with the MSB, like a binary search:

  • Set the MSB to 1. If the DAC output exceeds Vin, the comparator clears the bit; otherwise the bit stays 1.
  • Repeat for each lower bit in turn.
  • After n clock periods the register holds the result.

Merits: fast (n clock periods, independent of Vin), moderate cost, and good resolution (8–18 bits), so it is the most common general-purpose ADC. Demerits: needs an accurate DAC; the input must stay constant during conversion, so a sample-and-hold is needed; it is slower than a flash converter.

2. Dual-slope (integrating) ADC. An integrator first integrates Vin for a fixed time T1 (a fixed count of 2n clock pulses). Its output reaches a value proportional to Vin. Then it integrates a reference −Vref of opposite sign until the output returns to zero, while a counter measures this time T2: VinT1=VrefT2⇒T2=VinVrefT1.

T₁ (fixed)larger V_insmaller V_inT₂ ∝ V_int|v_int|
Dual-slope integration: T₂ is proportional to Vin.

Merits: very accurate. The result does not depend on R, C or the clock frequency, because they appear in both slopes. It rejects noise and mains hum (choose T1 as a multiple of 20 ms) and is cheap. Demerits: very slow (tens of conversions per second at most), so it suits digital voltmeters and panel meters, not fast signals.

Successive approximation Dual slope Flash (for reference)
Conversion time n clock periods up to 2n+1 clock periods one clock period
Speed medium–high low very high
Accuracy good (depends on DAC) very high moderate
Noise rejection poor excellent poor
Hardware 1 comparator + DAC integrator + counter 2n−1 comparators

✓ Answer checked step by step We checked both descriptions and the comparison step by step against the standard theory.

↑ Back to the question list

For the R-2R type of digital-to-analog converter shown in Fig. 4c, find the output voltage when S4 is closed and S3, S2 and S1 are grounded.

2RRRRVB = 15 VP2RS₄Q2RS₃S2RS₂T2RS₁vo
Figure redrawn from the question paper. On a phone, swipe sideways to see all of it.

1996 · Paper I · Q4c · 20 marks

Solution

Reading the figure. The battery value is unclear in the scan; we take VB=15 V. The answer is VB/16 in any case.

How the ladder weights the bits. This is a voltage-mode R–2R ladder with the output taken at T, the end farthest from the grounded 2R. Each bit leg is attenuated by a factor of 2 for every node between it and T. So the output from a leg switched to VB is VB/2 (leg at T, S1, MSB), VB/4 (S2), VB/8 (S3), or VB/16 (leg at P, S4, LSB).

Only S4 at VB. By Thevenin reduction from the left:

  • At P: 2R to ground in parallel with 2R to VB gives VB/2 behind R.
  • With the series R, that is VB/2 behind 2R, in parallel with the grounded 2R leg at Q: VB/4 behind R.
  • In the same way, at S: VB/8 behind R, and at T: VB/16 behind R.

The voltage follower draws no current, so vo=VB16=1516=0.9375V.

For any switch setting, vo=VB16(8S1+4S2+2S3+S4), where Sk=1 when switch k is at VB. The full-scale output (all at VB) is 1516VB=14.06 V. The output resistance at T is always R, which is why the follower buffers it.

✓ Checked by computer We solved the ladder by nodal analysis in code for this and all other switch settings.

↑ Back to the question list

Describe a successive approximation type of an A to D converter and give its merits. Find the conversion time and the resolution of an 8-bit ADC of this type when the clock period is 1.25 μs.

1995 · Paper I · Q8c · 20 marks

Solution

Working. The successive-approximation ADC has a comparator, an n-bit DAC, a successive-approximation register (SAR) with control logic, and a clock.

ComparatorVinn-bit DACSuccessiveapproximationregister+ controlClockn bitsDigitaloutputStart
Successive-approximation ADC. On a phone, swipe sideways to see all of it.

At the start of conversion the register is cleared and the MSB is set to 1. The DAC output (half of full scale) is compared with Vin: if Vin is smaller the bit is reset, otherwise it is kept. The next bit is then set and tested, and so on down to the LSB. Each clock period decides one bit, so after n periods the register holds the digital value and the end-of-conversion signal is given.

For example, with a 10 V full scale and Vin=6.3 V, the 8 trials give 10100001 = 161, that is 6.29 V, within one LSB of the input.

Merits.

  • Fast: the conversion time is fixed at n clock periods, independent of the input (a counter-type ADC needs up to 2n).
  • Good resolution and accuracy with modest hardware (one comparator, one DAC).
  • Constant conversion time makes it easy to interface with microprocessors.

8-bit converter with a 1.25 µs clock. tc=nTclk=8×1.25μs=10μs (about 100,000 conversions per second; some designs add one or two periods for start and end of conversion). Resolution=128=1256of full scale≈0.39%. For example, with a 10 V full scale, one LSB is 10/256 = 39 mV.

✓ Checked by computer We checked the timing, the resolution and a sample conversion in code.

↑ Back to the question list

More on Digital Electronics

Questions: UPSC Civil Services (Main) Examination, Electrical Engineering Paper I, 1995–2019. Solutions: Optional Province. Found an error? Tell us.

Spotted an error? Tell us.

We classify every PYQ with care, but mistakes can slip in. If a question is in the wrong topic, has a typo, the wrong year, or is missing, let us know. We review every report and update the page.

Report an Error
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted