The sample and hold circuit

PS Audio logo

Paul McGowan: One of the basic elements in an Analog to Digital Converter is called a Sample and Hold Circuit.  Like the name implies, this circuit takes a sample of the incoming AC, holds that sample steady until the conversion circuit has time to turn the sample into a number (a word).  It’s really quite a simple circuit and it’s the very first thing most ADC’s have at their inputs.  Just picture a one way gate (usually a FET) feeding a small capacitor.  The FET acts as the one way gate and the capacitor stores the sample of the voltage like a battery would.

There are a couple of things to understand about this all important circuit.  The first is how often we take a sample and the answer to that will be familiar to you: 44,100 times a second, or 48,000, or 88,200, 96,000 and so on.  Do those numbers sound familiar?  Sure they do.  They are our familiar sample rates.  In fact, as you may have guessed, the actual term Sample Rate came from the ADC, not the DAC.  It describes how often we take a sample of the incoming voltage.  These are the steps we often hear about.

We might also want to ask a question at this point.  What happens if the incoming AC (the music) is changing faster than the ADC is taking samples?  Obviously, if the musical signal is changing its status while the ADC is busy with the sample it just took, there’s no way for it to know about the change and thus that change is lost.  When our output does not match our input we call this distortion.  When this particular type of distortion is in the form of something happening faster than we are sampling it, we call this aliasing.

To make sure we do not have this aliasing type of distortion we place what we call an anti-aliasing filter in front of the ADC (see how clever engineers are at naming things?).  This filter makes sure that nothing faster than half the sample rate is coming into the ADC.  So if we are sampling at 44,100 times a second (like we do on a CD), we need a filter that makes sure we don’t have anything moving faster than 22,500 times a second.  And since we want to have the music containing everything we can possibly hear, 20,000 times a second, one can only imagine how difficult and potentially destructive a filter that is flat at 20kHz and then zero at 22kHz is!  This is what we call a brick wall filter  and the reasons for that should be obvious.

One of the main reasons using a higher sample rate is preferable is so that you can use a gentler filter on the input of the ADC as well as preserving some of the harmonics found in music that exceed our ability to hear them.

Lastly the fellow that figured out we need to make sure only half the fastest frequency gets into the sampling machine is named Harry Nyquist, a transplanted Swede working at Bell Labs.  This has become known as the Nyquist-Shannon sampling theorem and I am sure you’ve heard the term “Nyquist”.

Interestingly enough, Nyquist had nothing to do with digital audio because at the time, 1924, there was certainly analog audio but nothing digital.  What Nyquist was working on was telegraph signals using Morse Code.  He wanted to determine the maximum speed at which one could send the “dit, dit” “dahs” of Morse code, a type of communication used a lot back then by the phone company’s rival Western Union (whom they later swallowed up).  Morse code, as you’ll recall, is a means of using a combination of short and long pulses to convey speech.

Short and long pulses, 1′s and 0′s, On and Offs.  All codes representing either language or music.

Seems like Samuel Morse’s first telegraph message, sent on May 24th 1844, stands as a pretty good question even today:

“What hath God wrought?”