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. 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.
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:
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.
You should read it
- 5 effective ways to help you work smarter
- How to find meaning in work and work happily?
- Using 1 hour after work will determine your success
- 27 images show that work risks are inevitable
- 9 simple tips to keep you happy at work
- Do not work hard, work smart!
- 12 tools to help you comfortably work from anywhere in the world
- If you're complaining about your current job, read this article!
- 10 signs of an effective working group
- What is Spotify for Work? How to access?
- 15 habits that help you increase your creativity and performance at work
- Why can overwork can adversely affect your career?
Maybe you are interested
What is an Instagram broadcast channel?
How to broadcast wifi on MacBook, create Wifi Hotspot on MacBook
How to add an ADC to Raspberry Pi: What you need to know
How to broadcast Wifi from computer without software
How to broadcast communication events between components in Vue
Download OBS - Open Broadcaster Software 26.1