But how can an ADC convert analog signals into digital ones we can use anywhere?

What Are ADCs Used For?

You’ll find ADCs just about everywhere.

A photograph of an ADC

They’re on your phone, converting your voice into a string of binary values.

They’re in your car, measuring the rotation of your wheels.

They’re in oscilloscopes, helping to capture signals and represent them.

animation illustrating how bit depth works

What Is a Sample Rate?

How Does Sample Rate Affect an ADC?

A very high-end oscilloscope might take ten billion samples per second.

a graph demonstrating SAR adc works

The plucky little MCP3008 ADC can take a relatively modest two hundred thousand.

In the audio world, a sample rate of 44,100 per second (44.1 kHz) is typical.

The more samples we take, the more accurately we can represent a signal.

animation illustrating phase shift flattening waveform

Sometimes, this is essential; sometimes, it’s not.

We just need enough samples for the result to be smooth and responsive.

What Is Bitrate?

animation showing aliasing

Does Bitrate Affect the Quality of an ADC?

We should also think about the quality of the sample we’re getting.

How many bits do we need?

animation showing how more samples creates a better waveform

Again, it depends on what we’re trying to accomplish.

Sometimes, we might be limited by the protocol we’re using.

For example, the MIDI 1.0 protocol is limited to seven-bit (and occasionally fourteen-bit) values.

In other cases, the limiting factor might be human perception.

If the increased fidelity doesn’t produce any perceptible improvement in the result, it might not be worthwhile.

How Does Multiplexing Improve ADC Quality?

Popular ADC chips like theADS1115and theMCP3008offer many inputs.

But under the hood, they really only contain a single ADC.

This is possible because of the multiplexers built into these devices.

Multiplexers are absolutely everywhere in the world of electronics and telecommunications.

They’re digital switches that act as traffic control for your ADC.

The ADC might sample one channel, and then the next, and then the next.

What Types of ADC Are There?

ADCs work in various ways, depending on the cost and capabilities required.

AFlash ADCworks via a very complex voltage divider.

They’re also power-hungry for the same reason.

By splitting things up, we can decrease the number of comparators.

Some subranging ADCs will split the work into three stages, with error correction built in along the way.

SAR (Successive Approximation Register) ADCs do their work viaa kind of binary search.

Suppose we have eight bits to fill.

We can repeat the process with the next digit and so on recursively.

Sigma-deltaconverters are probably the most difficult to understand.

They’re used for high-precision musical and signal-measuring applications.

They work by oversampling a signal and refining the result using fiendishly complicated filtering and mathematics.

This process effectively reduces the sample rate while increasing precision.

These ADCs are great when noise and precision matter more than speed.

Finally, we haveIntegrating ADCs, which are even slower than sigma-delta ones.

What Is Nyquist-Shannon Theory?

Let’s say we want to describe an analog signal digitally.

Thus, our sampling frequency must be at least twice the highest frequency we expect to measure.

This is known as the Nyquist frequency, after Swedish-American physicist Harry Nyquist.

Whoever we credit with the theory, there’s a problem with it.

It’s impossible to know in advance when the top and bottom of a waveform will arrive.

What if we take our samples midway up the incoming waveform?

Fences, staircases, and stripey jumpers begin to look very peculiar indeed.

It’s distortion, but a particular kind of distortion.

What’s with all of those ugly frequencies emerging from the noise?

In other words, there isn’t enough information to faithfully represent what’s happening.

The samples we’re taking are misaligned with what we’re trying to measure.

This isn’t a problem that’s unique to analog-digital conversion.

In many of these cases, we’re converting one kind of digital signal to another.

So, what’s the solution?

Or, we can take many, many more samples than we need.

There are depths to plumb here: ADCs are extremely complicated.

Voltages go in, and numbers come out.