Vocademy

Analog to Digital Converters (ADCs)

An analog to digital converter (ADC) takes a continuously variable voltage and converts it to a digital output that represents that voltage.

Input Voltage 8-bit Digital Output
An 8-bit analog to digital converter

For example, let's say you have a thermometer based on a thermistor or thermocouple that you would like to drive a digital display. Just for the convenience of explanation, let's say the thermometer has an output of 0 volts at 0 degrees Celsius and 100mV for 100 degrees Celsius. What we need is a circuit that will produce the 8-bit binary number 00000000 at 0 degrees and 1100100 at 100 degrees. This can then be decoded into a decimal numeric display from 0 to 100 in decimal.

There are several approaches to converting an analog signal to a decimal signal. Here are some of them:

Flash ADC

A flash ADC is a bank of Op-Amp comparators. Each comparator is triggered by a different voltage level. Here is a 2-bit flash converter:

A two-bit Flash ADC

Remember the rules for series circuits, with equal resistors you get equal voltages. In the example circuit, the resistor can be virtually any value as long as the ratios are maintained. For example, if the bottom resistor (labeled R/2, meaning it has half the value of R) is 10k, the next-higher resistor (labeled R) will be 20k. Notice that each comparator has a successively higher reference voltage. As VIN rises, the comparators are triggered in turn. The comparators in this ADC are triggered by three voltage levels. Adjusting the resistors and VIN determines what those levels are. If VREF is 3 volts, the lowest comparator will be triggered by 0.5 volts, the next one will be triggered by 1.5 volts, and the top one will be triggered by 2.5 volts. This assures that the lowest comparator is in the triggered state at 1 volt, the next one at 2 volts and the top one at 3 volts. Looking at the outputs of the comparators as binary numbers gives us 001, 011, and 111 respectively. This is decoded into standard 8421 binary code by the decoding logic giving us the following results:

Input Volts    Comparator Bank Output   Binary Output
0   000   00
1   001   01
2   011   10
3   111   11

Notice that there is a lot of leeway in the voltage levels. For example, the lowest comparator and only the lowest comparator will be in the triggered state with an input voltage range from 0.5 volts to 1.5 volts. This leeway is the resolution of the counter. The above counter has a resolution of 1 volt (the leeway range). To have a finer resolution, you need more comparators and lower-value resistors.

To make a 4-bit flash ADC, you need 15 comparators. To make an 8-bit flash ADC, you need 255 comparators. To this, you need to add increasingly-complex logic to decode the states of the comparators to 8421 binary code. Therefore, flash ADCs are impractical for digital circuits that use more than 8 bits. IC flash decoders can be purchased with up to an 8-bit input.

Counter ADCs

There are several approaches to building ADCs using binary counters. Note that in the following examples that the counters will count in binary, but for convenience, we will talk about decimal numbers.

Gated counters

A gated counter has a binary counter that is allowed to count for a short time. The counter is stopped when it is expected to present a binary number that is representative of the analog input. There are several approaches to building a gated-counter ADC:

Constant count rate

A counter counts at a constant rate. The analog voltage operates a gate circuit that stops the counter after a longer time at higher voltages and a shorter time at lower voltages. For example, let's say the counter counts at one 100 counts per second. Let's also say that with an analog input voltage of 5 volts the counter is allowed to count for 500mS (1/2 second). The counter will be stopped when it reaches a count of 50. Convert this to a numeric display and add a decimal point after the 5 and you have 5.0 volts. Now let's say the analog voltage is 7.5 volts. Assume that counter is allowed to count for 750mS allowing the counter to count to 75. Convert this to a numeric display and add a decimal point at the same digit as before and you have 7.5 volts displayed.

Constant count time

The counter is driven by a voltage-controlled oscillator. The counter counts faster when the analog input voltage is higher. The counter is allowed to count for a particular time, then stopped. For example, let's say the counter counts at 500 counts per second with an analog voltage of 5 volts. The counter is allowed to count for 1 second then stopped. The counter starts and is stopped one second later, which allows the counter to count to 500. Convert this to a numeric display and add a decimal point after the 5 and you have 5.00 volts. Now let's increase the analog voltage to 7.5 volts. The counter now counts at 750 counts per second. After being allowed to count for one second, it has counted to 750. Convert this to a numeric display, add the decimal point and you have 7.50 volts.

Ramp compare

A ramp generator (a circuit that creates a steady increase in voltage) starts at the same time as the counter. When the ramp voltage equals the analog input voltage, the counter is stopped. The ramp generator is designed to complement the counter so that the output of the counter gives a good representation of the analog voltage.

Servo tracking

A servo-tracking ADC is more complex that gated counters. However, it is easier to make one that gives a good representation of the analog voltage in a digital form. This is because it doesn't depend on timers or voltage-controlled oscillators, which need to be matched to the analog input voltage to get a meaningful conversion.

The counter of a servo tracking ADC is connected to a DAC. The output of this DAC is connected to a comparator that compares it to the original analog voltage being converted. Now we have a comparator that tells us if the output of the counter is higher or lower than the analog voltage. If it is higher, the comparator tells it to count down. If it is lower, the comparator tells it to count up. For example, let's say the analog voltage is 5 volts and the counter is at 750. The output of the counter goes to the DAC, which is designed to give us 7.5 volts at this count. Therefore, the analog input is now 5 volts, and the counter/DAC combination is giving us 7.5 volts. The comparator tells the counter to count down and stops it when the output of the DAC reaches 5.0 volts. The counter now gives us 500 (decimal) which is converted to a numeric display with a decimal point, giving us 5.00 volts.

A Servo-tracking ADC

Successive Approximation

A successive-approximation ADC is similar to a servo-tracking ADC but uses more complex logic to arrive at the correct result. The successive approximation register (SAR) tries one bit at a time, starting with the most significant bit. If the comparator shows that the output of the DAC is higher than the analog input, that bit is removed. If it is lower, the bit stays. Then it tries the next significant bit and does the same thing. It continues until all bits have been tried.

A Successive-approximation ADC

Theses are just the main examples to give you an overview of how ADCs work. ADCs are usually obtained as integrated circuits.

Sample and Hold Circuits

Regardless of the type of ADC the circuit begins with a sample and hold circuit. The sample and hold circuit periodically connects to the analog voltage then disconnects, holding that value for the ADC circuit proper. The sample rate is an important aspect of the use of ADC circuits. For example, to get high-fidelity audio (frequencies up to 20kHz) the circuit will need a sample rate of about 44kHz. Notice that this is about twice the highest frequency that needs to be converted (called the Nyquist rate). An audio ADC will sample, hold and convert 44,000 or more times every second.

Applications

The most common applications to ADC are in digital audio and video. For example, an audio stream will be sampled and converted 44,000 times every second (or more), and the obtained values will be stored in computer memory or used in some other way. This type of conversion is called Pulse Code Modulation (PCM).

Professional audio equipment will sample at rates as high as 192kHz. Although theoretically, you only need to sample part of the input wave to record all the information you need to reproduce the original, tiny fluctuations it clock timing, etc., cause slightly irregular sampling; successive waves of the same frequency are not sampled a the same points in the waves. Oversampling at higher rates reduces the noise introduced by these irregularities.

 

 

 

 

Vocademy