C6 · Lesson 29 · Analog switches and sample-and-hold circuits
Freezing a voltage on a capacitor, and the errors that come with it
A converter needs its input to hold still while it measures. A sample-and-hold does that with the simplest possible circuit: a switch and a capacitor. Closed, the capacitor follows the input; open, it remembers. Every detail of that sentence hides an error: the switch's resistance slows the following, its channel charge kicks the capacitor when it opens, the capacitor leaks, thermal noise is frozen in, and the moment of opening wanders. Each sets a limit on the converter behind it.
Play
- The smooth curve is a sine input; the steps are a sample-and-hold's output, which grabs the input at each sampling instant and holds it until the next.
- Raise the input frequency toward half the sampling rate. The held steps still lie on the input at the sampling instants, but they no longer look like it.
- Add droop: the held value sags between samples as the capacitor leaks.
Predict
A sample-and-hold's switch has 100 Ω of on-resistance and its capacitor is 10 pF. How long must it track before the capacitor is within half an LSB of a 12-bit converter?
About 9 ns. The capacitor settles exponentially with τ = = 1 ns, and reaching of a full-scale step takes = 9.0τ. Each extra bit costs another 0.69τ, which is why fast, high-resolution converters need low-resistance switches and small hold capacitors, and why small capacitors bring their own problems.
Name it
Analog switches
An NMOS switch in triode has : low for inputs near ground, infinite as the input nears . A PMOS switch is the mirror image. A transmission gate puts both in parallel, so one conducts where the other fails, and the resistance stays bounded across the whole range.
Tracking
Closed, the switch and the hold capacitor form an RC with . Settling a full-scale step to within half an LSB of an N-bit converter takes
The errors of holding
- Charge injection: the switch's channel holds a charge , and when it turns off, roughly half lands on : a step of . Clock feedthrough through the gate's overlap capacitance adds to it. Dummy switches and differential sampling cancel most of both.
- kT/C noise: the switch's thermal noise is frozen on the capacitor when it opens, with RMS value , independent of the resistance: 20 µV for 10 pF at 300 K, 64 µV for 1 pF.
- Droop: leakage current I discharges the capacitor at .
- Aperture jitter: a timing error σ on a sine of frequency f gives an error whose signal-to-noise ratio is dB.
A small tracks fast but suffers more from injection, kT/C noise and droop: every sample-and-hold design is that trade.
Worked example
An NMOS switch with K = 1 mA/V² and = 0.5 V on 3.3 V passes signals from 0 to 3.3 V. Find its on-resistance at 0 V and at 1.65 V, and a transmission gate's at 1.65 V (PMOS with the same K and threshold).
Show the solution
- NMOS at 0 V.
- NMOS at 1.65 V. The overdrive is 1.15 V, so the resistance is kΩ = 870 Ω. Above 2.8 V the NMOS doesn't conduct at all.
- Transmission gate at 1.65 V. The PMOS has the same 1.15 V of overdrive, so it's also 870 Ω, and the pair in parallel is 435 Ω.
- Across the range. At 3.3 V the PMOS alone gives 357 Ω, so the transmission gate's resistance stays between 357 and 435 Ω across the range, worst in the middle.
Answer the NMOS switch is 357 Ω at 0 V and 870 Ω at 1.65 V; the transmission gate is 435 Ω at 1.65 V.
Worked example
A switch releases 20 fC of channel charge when it opens, half of it onto a 10 pF hold capacitor. How big is the error for a 12-bit converter with a 2 V range, and how does it compare with kT/C noise at 300 K?
Show the solution
- Injection step.
- In LSBs. One LSB is so the injection is 2.0 LSB: an error the design has to cancel, usually by sampling differentially so both sides get the same kick.
- kT/C noise. The frozen thermal noise is a twenty-fourth of an LSB.
- A smaller capacitor. Shrinking it to 1 pF would make the noise 64 µV and the injection 10 mV.
Answer the error is 1.0 mV, or 2.0 LSB, while the kT/C noise is only 20 µV RMS, a twenty-fourth of an LSB.
Worked example
A converter samples a 10 MHz sine with 1 ps of aperture jitter. What signal-to-noise ratio does the jitter allow? And at 100 MHz?
Show the solution
- SNR at 10 MHz. enough for about 13.7 bits.
- At 100 MHz. The slope is ten times steeper and the SNR falls 20 dB, to 64.0 dB, about 10.3 bits whatever the converter's resolution.
- What sets the bits. At high input frequencies the clock's jitter limits the effective number of bits more than the converter does.
Answer the jitter allows 84.0 dB (about 13.7 bits) at 10 MHz, and 64.0 dB (about 10.3 bits) at 100 MHz.
Check
An NMOS switch (K = 2 mA/V², = 0.7 V) is driven from 1.8 V and passes 0.9 V.
(a)
What's its on-resistance?
Write units the way you normally would: 1.5 Ω, 1500 mΩ and 0.0015 kΩ are the same answer.
(b)
Above what input does it stop conducting?
Check
A switch of 100 Ω charges a 1 pF hold capacitor. How long must it track to settle a full-scale step to half an LSB of a 16-bit converter?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
Check
A switch dumps 20 fC of channel charge, half onto a 1 pF hold capacitor, in front of a 12-bit converter with a 2 V range.
(a)
How large is the step?
Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.
(b)
How many LSBs is that?
Check
What RMS noise is frozen on a 1 pF sampling capacitor at 300 K?
Write units the way you normally would: 1.5 µV, 1500 nV and 0.0015 mV are the same answer.
Check
A converter samples a 10 MHz sine with 0.1 ps of aperture jitter.
(a)
What SNR does the jitter allow?
(b)
How many effective bits is that?
Check
A hold capacitor of 1 pF leaks 1 nA. How far does it droop in a 10 µs hold?
Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.
Check
Why does a transmission gate pair an NMOS and a PMOS switch?
Check
A switch of resistance R samples onto capacitance C for an N-bit converter, at temperature T.
Step 1
What's the acquisition time to half an LSB?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What RMS noise is frozen on C?
Explain why
Why is the kT/C noise of a sample-and-hold independent of the switch's resistance?
The switch's resistance produces thermal noise whose density grows with the resistance, but the resistance and the hold capacitor also form a low-pass filter whose bandwidth shrinks as the resistance grows. The total noise voltage on the capacitor is the density integrated over that bandwidth, and the resistance cancels: four kT R times one over four RC is kT over C. When the switch opens, whatever noise voltage the capacitor holds at that instant is frozen, with RMS value the square root of kT over C. Only a larger capacitor reduces it.
Practice
Keep practicing
8 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.