What is ADC (Analog-to-Digital Converter)? How do they work?

Analog-to-Digital Converter (ADC) is extremely useful in turning real-world phenomena into values ​​that we can use in programming projects.

Analog-to-Digital Converter (ADC) is extremely useful in turning real-world phenomena into values ​​that we can use in programming projects. But how can ADC convert analog signals into digital that we can use anywhere?

What is ADC used for?

You will find ADCs everywhere. They're on your phone, converting your voice into a string of binary values. They're in your car, measuring the rotation of the wheels. They are located in the oscilloscope (oscilloscope), which helps capture signals and represent them. However, where most people will use them is in the world of video and audio, where bringing light and sound into the digital space is fundamental.

What is Sample Rate? How does Sample Rate affect ADC?

One of the most important metrics of an ADC is Sample Rate: The number of readings taken per second.

A high-end oscilloscope can take 10 billion samples per second. In the audio world, a sample rate of 44,100 per second (44.1 kHz) is typical.

The more samples taken, the more accurately the signal is represented. Sometimes this is necessary; sometimes not. Let's say you're building a fader bank (designed to control electronic devices) with a few dozen potentiometers. In this case, the values ​​you need to measure are unlikely to change millions of times per second because your fingers cannot move that fast. You only need enough samples to get a smooth and responsive result.

What is bitrate? Does bitrate affect the quality of the ADC?

You should also think about the quality of the sample you receive. This is largely determined by the Bitrate, which tells us how many on-off states can be used to represent the voltage in digital form. The more bits we have, the more possible values ​​we can record in any given sample, so the final result is smoother and more accurate.

What is ADC (Analog-to-Digital Converter)? How do they work? Picture 1What is ADC (Analog-to-Digital Converter)? How do they work? Picture 1

So how many bits do we need? Again, it depends on what we are trying to achieve. Sometimes we can be limited by the protocol we are using. For example, the MIDI 1.0 protocol is limited to 7-bit (and sometimes 14-bit) values. In other cases, the limiting factor may be human perception. If increased fidelity doesn't produce any discernible improvement in results then it may not be worth the cost.

How does multiplexing improve ADC quality?

Popular ADC chips such as the ADS1115 and MCP3008 provide multiple inputs. But they actually only contain a single ADC inside. This is possible thanks to the multiplexers or multiplexing circuits built into these devices. Multiplexers are present everywhere in the world of electronics and telecommunications. They are digital switches that control traffic for your ADC. The ADC can sample one channel, then subsequent channels. So if you have 8 channels and a sampling rate of 200,000, you can cycle through all of them, taking 25,000 samples per channel.

What types of ADCs are there?

ADCs operate in a variety of ways, depending on cost and required capabilities.

Flash ADC operates through a very complex voltage divider. A series of resistors divides the reference voltage into increments, which are then checked against the input via a series of comparator circuits. Flash ADCs are lightning fast but they are limited in bit depth due to the number of comparator required.

Subranging ADCs seek to compensate for these weaknesses by dividing the job into two separate parts: One that roughly calculates the voltage, and a second that calculates it precisely. By breaking things down, we can reduce the number of comparator. Some clustering ADCs will divide the job into three phases, with built-in error correction throughout the process.

ADC SAR (Successive Approximation Register) does its job through a type of binary search. Let's say we have 8 bits to fill. The SAR will start from 10000000, which is the middle value (00000000 is the bottom and 11111111 is the top). If the voltage exceeds this midpoint, the SAR will keep the leftmost digit as 1; otherwise, SAR will set the leftmost digit to 0. We can repeat the process with subsequent digits recursively. This will cause the guessed value to gradually approach the real value:

What is ADC (Analog-to-Digital Converter)? How do they work? Picture 2What is ADC (Analog-to-Digital Converter)? How do they work? Picture 2

This way, we continuously narrow down the search, dividing the possibilities into two parts and asking whether the result is higher or lower than the midpoint. In this case, the value ranges from 0 to 255; After a few iterations, the ADC figured out that it was around 77.

The Sigma-delta converter is perhaps the most confusing. They are used for high-precision music and signal measurement applications.

They work by sampling the signal and fine-tuning the results using filters and extremely complex math. This process effectively reduces sample rate while increasing accuracy. These ADCs are great when noise and accuracy are more important than speed.

Finally, we have the Integrating ADC , which is even slower than sigma-delta. They operate with the help of a capacitor, the rate of charge of which can be used to determine the input voltage. The sample rate here is often synchronized with the mains frequency, which can be used to keep noise to a minimum.

5 ★ | 2 Vote