Analog Digital Converter, or ADC, is a data converter that encodes an analog signal into binary code, allowing digital circuits to interface with the real world.
Analog-to-Digital Converters (ADCs) enable microprocessor-controlled circuits, Arduinos, Raspberry Pi and other such digital logic circuits to communicate with the real world.In the real world, analog signals have ever-changing values from a variety of sources and sensors that can measure sound, light, temperature or motion, and many digital systems interact with their surroundings by measuring analog signals from such transducers.
Analog signals can be continuous and provide an infinite number of different voltage values, while digital circuits work with a binary signal with only two separate state, a "1" (HIGH) or a "0" (LOW) logic.Therefore, it is necessary to have an electronic circuit that can transform between two different areas of ever-changing analog signals and discrete digital signals, and this is where analog-digital converters (A/D) come from.
Basically, an analog-to-digital converter takes a snapshot of analog voltage at a time and generates a digital output code that represents this analog voltage.The number of binary digits or bits used to represent this analog voltage value depends on the resolution of an A/D converter.
For example, a 4-bit ADC will have a resolution of one in 15 (2 4 – 1), while an 8-bit ADC will have a resolution of one (2 8 – 1) in 255.Thus, an analog-to-digital converter receives an unknown continuous analog signal and converts it to a 2 n-bit "n"-bit binary number.
But first let's remember the differences between analog (or analog) signal and digital signal as shown:
Analogue and Digital Signals
Here we can see that the terminal of the pontiometer is rotated between 0 volts and V MAX, producing a continuous output signal (or voltage) with an infinite number of output values according to its position.Since the posiometer is adjusted from one position to another, there is no sudden or gradual change between the two voltage levels, thereby producing a continuously variable output voltage.Analog signal samples include temperature, pressure, fluid levels and light intensity.
For a digital circuit, the ponciometer was replaced with a single rotary switch, which connects sequentially to each connection of the serial resistance chain, forming a basic network of potential dividers.When the switch is returned to the output voltage after a position (or node), V OUT changes rapidly in separate and different voltage steps representing multiples of 1.0 volts in each switching action or step, as shown.
For example, the output voltage will be 2 volts, 3 volts, 5 volts, etc., but not 2.5V, 3.1V or 4.6V.Better output voltage levels can be easily generated by using a multi-position switch and increasing the number of resistant elements within the potentially divisive network, thereby increasing the number of separate switching steps.
Next, we can see that the biggest difference between an analog signal and a digital signal is that the amount of an "Analog" constantly changes over time, and a "Digital" amount has discrete (step-by-step) values."LOW" to "HIGH" or "HIGH" to "LOW."
So, how can we convert an ever-changing signal with an infinite number of values to one that has different values or steps for use by a digital circuit.
Analog to Digital Converter
The process of receiving an analog voltage signal and converting it to an equivalent digital signal can be done in many different ways, and while there are many analog-to-digital converter chips, such as the ADC08xx series from various manufacturers, it is possible to do this.
A simple and easy way is to use parallel encoding, also known as flash, concurrent or multiple comparator converters, where comparators are used to detect different voltage levels and give switching states to an encoder.
Parallel "Flash" A/D converters use a series of interconnected but evenly spaced comparators and voltage references generated by a series of sensitive resistance networks to generate equivalent output code for a given n-bit resolution.
The advantage of parallel or flash converters is that they are simple to create and do not require any timing time as soon as an analog voltage is applied to the comparator inputs, compared to a reference voltage.
It is an analog comparator such as the LM339N, which has two analog inputs, one positive and one negative, and can be used to compare the magnitudes of two different voltage levels.
One voltage input, (V IN) signal is applied to one input of the comparator, and a reference voltage (V REF) is applied to the other.The comparison of the two voltage levels at the entrance of the comparator is made to determine the digital logic output status of the comparator as "1" or "0".
The reference voltage, V REF, is compared to the V IN input voltage applied to the other input.For an LM339 comparator, if the input voltage is lower than the reference voltage (V IN < V REF), the output is "OFF" and if the reference is greater than the voltage (V IN > V REF) there will be output. Be "ON".Thus, a comparator compares the two voltage levels and determines which of the two is higher.
In our simple example above, the voltage divider is obtained from the network installation by V REF , R 1 and R 2 .If the two resistors are of equal value, that is, R 1 = R 2, then clearly the reference voltage level will be equal to half of the feed voltage or V/2.Therefore, for a comparator with an open collector output, if V is less than V/2, the output is HIGH, and V IN is greater than V/2, the output is LOW, which acts as a 1-bit ADC.
But by adding more resistance to the voltage divider network, we can effectively "divide" the supply voltage to an amount determined by the resistances of the resistors.However, the more resistance we use in the voltage dividing network, the more comparators will be required.
In general, a "n" bit binary output, where "n" is typically in the range of 8 to 16, requires a 2 n – 1 comparator to convert. In our example above, single-bit ADC 2 1 – V IN equals "1" comparator to determine whether it is larger or smaller than the V/2 reference voltage.
Now if we create a 2-bit ADC, we will need 2 2 – 1, i.e. "3" comparators, since we need four different voltage levels corresponding to the 4 digital values required for a 4-to-2-bit encoder circuit, as shown.
2-bit Analog to Digital Converter Circuit
This will give us a 2-bit output code for all four possible values of analog input:
2-bit A/D converter Output
|Analog Input |
Voltage (V IN)
|Comparator Outputs||Digital |
|D 3.||D 2.||D 1||D 0||Q 1||Q 0|
|0 to 1 V||0||0||0||0||0||0|
|1 to 2 V||0||0||1||x||0||1|
|2 to 3 V||0||1||x||x||1||0|
|3 to 4 V||1||x||x||x||1||1|
Here: "X", "I don't care", that is, logic is the condition "0" or logic "1".
So how does this analog-to-digital converter work?For an A/D converter to be useful, it must produce a meaningful digital representation of the analog input signal.Below, we assumed that the V input voltage in a simple 2-bit ADC sample was between 0 and 4 volts, that is, the V REF and the resistant voltage divider network that were set to drop 1 volt over each resistance.
When V IN is between 0 and 1 volt ( <1V), üç karşılaştırıcının tamamındaki giriş referans voltajdan daha az olacaktır, bu nedenle çıkışları DÜŞÜK olacaktır ve kodlayıcı Q 0 pins will give a binary zero (00) condition. and Q will give 1 .When V IN increases or exceeds 1 volt but is less than 2 volts, the reference voltage input is set to 1 volt (1V <V IN <2V) karşılaştırıcı U1 bu voltaj farkını algılayacak ve YÜKSEK bir çıkış üretecektir.The priority encoder, used as a 4-to-2-bit encoder, detects the input change in D 1 and produces binary output "1" (01).
Note that a Priority Encoder, such as TTL 74LS148, allocates a priority level to each entry.The priority encoder output corresponds to the input that is currently active with the highest priority.Therefore, when an entry with a higher priority (D 1 compared to D 0) is available, all other entries with a lower priority are ignored.Therefore, if there are two or more entries at the logic level "1" at the same time, the actual exit code in D 0 and D 1 corresponds only to the entry with the highest priority specified.
So now when the V IN rises above the next reference voltage level of 2 volts, the comparator U2 detects the change and produces a HIGH output.However, since input D 2 has a higher priority than inputs D 0 or D 1, the priority encoder returns a binary code "2" (10), and when the V IN exceeds 3 volts, "3" (11).V clearly lowers in or changes between each reference voltage level, each comparison output produces either high or 11 binary code 2-bits according to the low state 00 V to the inturn encoder IN.
All of these are good and beautiful, but priority encoders are not available as 4 to 2 bit devices, and if we use a commercially available encoder, such as the equivalent of TTL 74LS148 or CMOS 4532, both 8-bit devices, six binary bits will not be used.However, a simple encoder circuit can be made using digital Ex-OR doors and a signal diode matrix as shown.
2-bit ADC Using Diodes
Here, the outputs of the comparators are encoded using special-OR doors before feeding into the diodes.Two external pull-down resistances are used in their outputs and grounding (0V) to provide a low condition and to stop the fluctuation of outputs when the diodes are inverted.
Therefore, as with the previous circuit, in comparison of in depending on the V value, single-OR doors that produce a high output if one input or other input is high may be high (or low) an output signal, but this is detected both, (Boolean expression, Q = is a . B + A B ).These Ex-OR doors can also be created using ve–or–NAND combination logic.
Here the problem with both designs of the 4-to-2 converter is that the resolution of this simple 2-bit A/D converter is 1 volt, since as we can see, the analog input voltage in V IN should change one full volt at 1 volt. to change the encoder's exit code.One way to improve the resolution of the output is to upgrade it to a 3-bit A/D converter using more comparators.
3-bit Analog to Digital Converter
The parallel ADC above converts the analog input voltage in the range of 0 to 3 volts to produce a 2-bit binary code.Since a 3-bit digital logic system can produce 2 3 = 8 different digital outputs, the analog input voltage is therefore comparable to eight reference voltage levels, with each voltage level equal to one-eighth of the reference voltage (V/8).So now we can measure a resolution of 0.5 (4/8) volts and as shown we will need a 2 3 – 1 comparator for a 3-bit binary code output from 000 (0) to 111 (7).
3-bit Analog to Digital Converter Circuit
This will give us a 3-bit output code for all of the possible eight values of the analog input:
3-bit A/D converter Output
|Analog Input |
Voltage (V IN)
|Comparator Outputs||Digital |
|D 7||D 6||D 5||D 4||D 3.||D 2.||D 1||D 0||Q, 2||Q 1||Q 0|
|0 to 0.5 V||0||0||0||0||0||0||0||0||0||0||0|
|0.5 to 1.0 V||0||0||0||0||0||0||1||x||0||0||1|
|1.0 to 1.5 V||0||0||0||0||0||1||x||x||0||1||0|
|1.5 to 2.0 V||0||0||0||0||1||x||x||x||0||1||1|
|2.0 to 2.5 V||0||0||0||1||x||x||x||x||1||0||0|
|2.5 to 3.0 V||0||0||1||x||x||x||x||x||1||0||1|
|3.0 – 3.5 V||0||1||x||x||x||x||x||x||1||1||0|
|3.5 to 4.0 V||1||x||x||x||x||x||x||x||1||1||1|
Again, when "X" is a "I don't care", this is either a logic "0" or a logic "1" entry condition.
Next, by increasing the resolution of the ADC, we can see that it not only increases the number of output binary bits, but also increases the number of necessary comparators and voltage levels.
Therefore, a resolution of 4 bits requires a 15 (2 4 – 1) comparator, an 8-bit resolution requires a 255 (2 8 – 1) comparator, while a 10-bit analog-to-digital converter requires a 1023 comparator, etc. The higher the number of output bits required for this type of Analog-Digital Converter circuit, the more complex the circuit becomes.
However, the advantage of this type of parallel or flash A/D converter is that the real-time conversion rate is relatively fast and can be easily created as part of a project when only a few binary bits are required to produce a read on it. digital display showing the voltage value of the analog input signal.
In addition to receiving an analog input signal from a sensor or converter and converting it to a digital binary code as part of an input interface circuit using an analog-to-digital converter, we can also take a binary code and convert it to its equivalent. the amount of analogue that uses a Digital-Analog Converter to control an engine or actuator or for the output interface in widely audio applications.
In the next tutorial on digital circuits , we will look at the digital-to-analog converter, or simply DAC, which is the opposite of the analog-to-digital converters examined here .DACs use op-amps and resistant dividing networks to convert an "n" bit binary number into an equivalent analog output voltage or current signal.