
Ⅰ Introduction
In an analog world, surrounded by digital devices, we exist. In nature, everything we see, feel or measure is identical, such as light, temperature, speed, pressure, etc. But most of the electronic devices around us are all digital devices, starting from a basic digital watch to a supercomputer. So, it's evident that for a microcontroller or microprocessor to understand it, we need something that could convert these analog parameters to a digital value. This is referred to as the ADC or Analog to Digital Converter and we will learn more about them in this ADC post.
Catalog
Ⅱ Definition of ADC (Analog to Digital Converter)
A circuit that converts a continuous voltage value (analog) to a binary value (digital) that can be interpreted by a digital computer that could then be used for digital computing is an analog to digital converter. These ADC circuits can be found on their own as individual ADC ICs or integrated into a microcontroller. They are called short ADCs.
Ⅲ The Reason for Using ADC
Today's electronics are solely digital; the good old days of analog computers are gone. Unfortunately, the world in which we live is still analog and full of color for digital systems, not just black and white. For example, a temperature sensor such as the LM35 outputs a temperature-dependent voltage, in the case of that particular unit, 10 mV per degree of temperature increase. If we link this directly to a digital input, depending on the input thresholds, it will register either as high or low, which is completely useless. Instead, we use an ADC to convert the analog voltage input to a set of bits that can be directly connected to the microprocessor's data bus and used for computation.
Ⅳ Working of ADC
Imagining it as a mathematical scaler is a good way to look at the process of an ADC. Scaling is simply mapping values from one set to another, so an ADC maps a binary number to a voltage value.
What we need is something that, for example, in a register, can convert a voltage to a series of logic levels. Of course, registers can only accept logic levels as inputs themselves, so the results wouldn't be nice if you were to connect the signal directly to a logic input. Anything has to behave as an interface between the logic and the analog input voltage.
Here are some essential features of ADCs that we will learn how they work while going through them.
4.1 Reference Voltage
No ADC is absolute, of course, so the voltage mapped to a maximum binary value is referred to as the reference voltage. For eg, in a 10-bit converter with 5V as the reference voltage, 1111111111111 (all bits one, the highest possible binary 10-bit number) corresponds to 5V and 0000000000 (the lowest number corresponds to 0V. So each binary step up is around 4.9mV since 1024 possible digits are available in 10 bits. The resolution of the ADC is called this measure of 'volts per bit.'
What if the change in voltage is below 4.9mV per step? This places the ADC in a dead zone, so there is always a slight error in the conversion outcome. Using an ADC with a higher resolution will avoid this. There are available ADCs up to 24 bits, but conversion frequencies are low, in the order of a few hertz.
4.2 Sample Speed
The sample speed is called the number of analog to digital conversions that the converter will perform per second. A very good ADC, for example, can have a sample rate of 300Ms/s. This is to be read per second as mega-samples, which means a million samples per second. Notice that here, SI prefixes apply.
The speed of the sample depends entirely on the type of converter and the precision required. If a very precise reading is required, the ADC usually spends more time looking at the input signal (usually a sample-and-hold or integrated type input), and if accuracy is not a concern, the reading can be quick and dirty.
The general rule of thumb is that speed and accuracy are more or less inversely proportional; depending on the application, it is necessary to choose an ADC.
Ⅴ Types Of ADCs
5.1 Flash ADCs
This is the simplest form of ADC and the fastest, as the name implies. It consists of a set of comparators connected to a voltage divider ladder with the non-inverting inputs connected to the signal input and the inverting pins.
If, however, the voltage is above one of the ladder levels, all the output bits below the level are set to one, as the voltage is above the bottom comparator threshold. Outputs are fed through a priority encoder that converts the output to binary, to circumvent this problem.
The speed is constrained only by the comparator's propagation delays and the priority encoder. Accuracy, however, is mild.
5.2 Counting/Slope Integration ADCs
There, at the time of conversion, a ramp generating circuit is started and a binary counter is started at the same time. As the ramp goes over the input voltage, a comparator detects it and stops the binary counter. The obtained binary count is proportional to the voltage level of the input.
The absolute accuracy of this converter is doubtful, but although easy to implement, it provides good resolution and even spacing between the binary steps. This circuit can also be rendered discretely if no chips are usable.
5.3 Successive Approximation ADCs
Perhaps the most reliable are these ADCs. A comparator, a basic flash DAC and a memory register are composed of them. The system initially assumes that all the bits in the register are zeroes, except for the highest significant bit (which is one). The register then sends this to the DAC, which transforms it via the comparator to an analog voltage, which is compared to the input. The MSB remains one if the input voltage is higher than the DAC voltage. In other words, once the register value exactly matches the input voltage, this procedure repeats until all the bits have been set to either zero or one.
This ADC is one of the most widely used when accuracy is needed and speed, for example in microcontrollers, is not too much of a limitation. Conversion times of a few microseconds can easily be achieved by SA style ADCs.
Ⅵ Applications of ADCs
6.1 Digital Oscilloscopes and Multimeter
The biggest advantage of analog oscilloscopes is that between the input connector and the screen there is very little 'circuit', in other words, you see exactly what's going on in real-time in a circuit. They do not, however, store waveforms for later use or conduct on-board measurements.
All these problems are solved by digital oscilloscopes, and at their core lies a very strong and fast ADC with a resolution of 12 bits and above. The ADC transforms the waveforms to a binary value that can be stored, worked on and seen on a screen in memory.
6.2 Microcontrollers
Nearly all modern microcontrollers have an ADC built-in, the most common being the Arduino with a 10-bit resolution based on the ATMega328P and the STM32 with a 12-bit resolution.
A useful 'analogRead()' function is given by the Arduino IDE that reads an analog voltage on one of the analog pins and returns a 10-bit integer value, i.e. a range from 0 to 1023.
6.3 Digital Power Supplies
Most power supplies are computer regulated these days, and an ADC is required for the computer to calculate the voltage output.
Ⅶ How to use an ADC IC?
The market has many ADC ICs that can be used to calculate analog voltages. A few of the most used ADC modules are the ADC0804, ADC0808, MCP3008, etc. Together with Raspberry pi and other processors or digital circuits, they are widely used where there is no In-built ADC accessible. Let's remember, for instance, Texas Instruments' ADS1115 ADC IC, which has high resolution and modern architecture.
It comes in either a QFN or a VSSOP box, making for a very small form factor-it takes up almost no room on a PCB. We'll take a look at some of its features below. This little chip does it all.
7.1 I2C Compatibility
Anyone who has worked with microcontrollers understands how useful it can be to connect with peripherals with the SPI and I2C bus. Since extensive libraries have been written for the computer, this feature makes using this IC with an Arduino board very simple.
7.2 Power Consumption
The benefit of using any modern IC is that it absorbs very low currents and works over a wide range of voltages, from 2.0V to 5.5V in this case. Beware of the fine print, it's for continuous conversion mode, under the 150uA current.
7.3 Programmable Comparator
A comparator whose reference can be programmed over the I2C bus comes with the ADS. Of course, nothing beats a discrete comparator IC for fast use.
7.4 Configurable Inputs
The four inputs may either be two differential pairs or four single-ended inputs (only the voltage difference between those pins is taken into account). Another good thing about this IC is that among hobbyists it's very common, which makes it easy to find documentation and example code.
Ⅷ Drawbacks of ADCs
• ADCs, usually in the order of a few micro or nanoseconds, are sluggish.
• Lack of continuous values for voltages.
• The complexity of circuits improves.
Ⅸ FAQ
1. Why do we need an ADC converter?
In the physical world things are analog. Sound waves, radio waves, light waves, etc. In the virtual world there are only ones and zeros. These are bits. Several bits together form a number. For computers to deal with physical world signals, they have to sample those signals and convert the samples to numbers, which they can then store and/or perform operations on. An ADC is an Analog to Digital Converter. It makes it possible for a computer to form a representation of a physical world property. There are a variety of ADC types used, depending on the type of signal to be sampled.
2. What is the slowest ADC?
Comparator - Counter type ADC is slowest.
In that , a counter starts counting from 0. Its digital output is converted into analog and compared with unknown input signal. When analog signal exceeds unknown signal, conversion stops and counter value is declared as ADC output.
Suppose the unknown signal has maximum amplitude then conversion time will be longest. If it has minimum value = 0 then it will convert in 1 clock cycle.
3. What is the difference between 8 bit ADC and 10 bit ADC?
An ADC has a resolution, meaning how many steps of voltage you can see on your Serial Monitor. An 8 bit ADC will have 256 steps, 0–255, whereas the 10 bit one will have 1024 steps, 0–1023. How does it come into action?
The 8bit one will increase its readings (let's say from 34 to 35) every 0.019 volts or 19 millivolts. On the other hand, on the 10 bit one, the reading will increment every 4 millivolts.
To make a long story and explanation short, the higher the resolution of the ADC, the more sensitive it will be towards voltages.
4. What is the difference between ADC and DAC in a microcontroller?
ADC samples the analog signal to allow the processor to read it in digital form. It is an input device.
DAC is the opposite, producing an analog signal according to its digital form. It is an output device.
If you want to measure voltage or record speech, you use ADC. If you want to generate a signal or play speech, you use DAC.
5. How does the ADC inside an micro-controller works?
ADCs can vary greatly between different microcontrollers. The simplest example is an integrating ADC. It uses the analog voltage to charge up an internal capacitor and then measure the time it takes to discharge across an internal resistor. The microcontroller monitors the number of clock cycles that pass before the capacitor is discharged. This number of cycles is the number that is returned once the ADC is complete. Number is written in a specific register or memory area, and becomes available to microcontroller's ALU.
Ordering & Quality
Photo | Mfr. Part # | Company | Description | Package | Qty | Pricing (USD) |
|||||||||||||||||||||
![]() |
MMSZ4699T1G | Company:ON Semiconductor | Remark:Zener Diodes 12V 500mW | Package:N/A | ![]() N/A |
In Stock:On Order Inquiry |
Price:
|
Inquiry | |||||||||||||||||||
![]() |
SPP20N60S5 | Company:Infineon Technologies | Remark:MOSFET N-Ch 600V 20A TO220-3 CoolMOS S5 | Package:N/A | ![]() N/A |
In Stock:On Order Inquiry |
Price:
|
Inquiry | |||||||||||||||||||
![]() |
1N5817 | Company:STMicroelectronics | Remark:Schottky Diodes & Rectifiers Vr/20V Io/1A BULK | Package:N/A | ![]() N/A |
In Stock:On Order Inquiry |
Price:
|
Inquiry | |||||||||||||||||||
![]() |
STW88N65M5 | Company:STMicroelectronics | Remark:MOSFET N-Ch 650V 0.024 Ohm 84A MDMesh M5 | Package:N/A | ![]() N/A |
In Stock:On Order Inquiry |
Price:
|
Inquiry | |||||||||||||||||||
![]() |
2N5551 | Company:Central Semiconductor | Remark:Bipolar Transistors - BJT NPN Gen Pur SS | Package:N/A | ![]() N/A |
In Stock:On Order Inquiry |
Price:
|
Inquiry | |||||||||||||||||||
![]() |
1SMB5929BT3G | Company:ON Semiconductor | Remark:Zener Diodes 15V 3W | Package:N/A | ![]() N/A |
In Stock:On Order Inquiry |
Price:
|
Inquiry | |||||||||||||||||||
![]() |
SPW20N60S5 | Company:Infineon Technologies | Remark:MOSFET N-Ch 600V 20A TO247-3 CoolMOS S5 | Package:N/A | ![]() N/A |
In Stock:On Order Inquiry |
Price:
|
Inquiry | |||||||||||||||||||
![]() |
ULN2004AN | Company:Texas Instruments | Remark:Darlington Transistors Hi V & A Darlington | Package:N/A | ![]() N/A |
In Stock:On Order Inquiry |
Price:
|
Inquiry |