0% found this document useful (0 votes)
13 views9 pages

Adc & Dac

Digital refers to signals that represent data using discrete values, primarily in binary form, and is characterized by its ease of processing and noise resistance. Digital-to-Analog Converters (DACs) convert binary values into continuous analog voltages, essential for applications like audio playback, while Analog-to-Digital Converters (ADCs) perform the reverse process. Both ADCs and DACs are crucial for enabling digital systems to interact with real-world analog signals.

Uploaded by

bonnyking400
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views9 pages

Adc & Dac

Digital refers to signals that represent data using discrete values, primarily in binary form, and is characterized by its ease of processing and noise resistance. Digital-to-Analog Converters (DACs) convert binary values into continuous analog voltages, essential for applications like audio playback, while Analog-to-Digital Converters (ADCs) perform the reverse process. Both ADCs and DACs are crucial for enabling digital systems to interact with real-world analog signals.

Uploaded by

bonnyking400
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Definition of Digital

Digital refers to a type of signal or system that represents data using discrete (separate) values,
usually in binary form (Os and 1s). Unlike analogue, digital signals do not vary smoothly-they
jump between fixed levels.

Examples of Digital Signals:


o Binary code from a computer (e.g., 101101)
o Data from a digital thermometer
o Digital clock time display

Key Characteristics:
o Discrete values (steps)
o Uses binary (0 and 1)
o Easier to process and store using electronic systems
o More noise-resistar an analogue

When talking about signals, they can be broadly classified into analog signals and digital
signals. All Digital Electronics like Logic Gates, Flip-Flops, Microcontroller, Microprocessor
etc work with Digital Signals, while the Analog Electronics like Op-Amp, Power switches etc.
In a typical electronics design, these two signals often have to be converted from one form to
another. We already learnt how Analog to Digital Converters (ADC) is used to convert analog
signals to digital value. In this article we will learn how Digital signals can be converted to
Analog voltages using DACs.
What is a Digital-to-Analog Converter?

A Digital to Analog Converter commonly referred as DAC, D/A or D2A is a device that
converts binary values (0s and 1s) to a set of continuous analog voltages. There are many
techniques in which this is done, each with its own advantage and disadvantage. In this article
we will learn how a DAC works and how it can be used in out designs.

Where do we need DACs?


A computer is a binary machine operating in an analog world, so to be able to produce an output
that is understandable by other devices a DAC is used.
For example, a computer stores audio in the form of binary values of the sound wave. In order
to play these back as sound on a speaker we need analog signals, because as we know the
speaker’s diaphragm vibrates based on the intensity of the analog signal to produce
sound/music. So here, we will a DAC to convert the digital audio file to analog signal in order
to play it on a speaker.
DAC Working
The binary system is a positional system, i.e. a place value system, with each bit representing
the presence or absence of a certain power of two in the total sum of the powers.
In other words the whole digital to analog conversion process can be thought of as a scaling
operation – the binary count is mapped to a certain voltage range, with 0V being the minimum
and the maximum voltage being the maximum input binary voltage.

Types of DACs
1. Summing Amplifier
Since digital to analog conversion is simply a weighted sum of the binary input, a circuit called
a summing amplifier is used.
This is basically an op-amp amplifier with multiple resistors connected to one input.The
junction where the resistors meet is called the summing junction or the virtual ground.The
binary input goes into the resistors and the analog output is obtained on the output of the op-
amp.
What makes this circuit work is the resistors – each resistor has to be carefully chosen and
matched in order to obtain an accurate analog output. The more bits you have, the more
different values of resistors you need – and this is not always practical. The limitations can be
overcome by using the next method.

2. R-2R Ladder
This is the simplest type of DAC and needs only two resistor values arranged in a ladder. You
can think of this as a somewhat complex voltage divider, though the math is quite complex.
The binary input goes into the 2R resistors and the output is obtained at the bottom of the
ladder.
3. PWM DAC
This is the type of DAC that most of us have used without even knowing it!
The popular Arduino microcontroller has the capability to output analog signals using a PWM
signal. On the outset the PWM signal looks like a binary waveform with only high and low
peaks with a variable duty cycle (ratio of on time to time period).
However, this is intended to be used with a RC filter to convert the PWM signal into a voltage
value by filtering out the AC component and leaving behind the DC component. The voltage
output is proportional to the duty cycle of the input – the higher the duty cycle the greater the
output voltage of the filter.

Applications of DACs
1. Digital Signal Processing
It is much easier to work with signals once they have been converted to binary.
A good example of this is audio editing. The audio is converted to binary after which operations
can be performed on it. In order to play back this audio, a DAC is used to convert it into a
sound signal that can be played back on a speaker.

2. Digital Power Supplies


Most microcontrollers are too slow to be a part of a power supply control loop. In order to
change the voltage or current of a power supply, the reference can be changed. This can be
done by connecting a DAC to the output of a microcontroller and using that to change the
reference voltage to a preselected value.

Drawbacks of DACS
1. Accuracy
DACs can only produce as many voltage steps as the binary number will allow, in other words
it is nearly impossible to produce truly continuous voltage values.
2. Complexity
Most of the DAC circuits mentioned above need a few parts and this may not always be
practical. However, discrete DAC chips are available that can communicate with a
microcontroller through SPI and I2C.

Definition of Analogue:
Analogue refers to a continuous signal that can take any value within a given range. It
changes smoothly over time and is used to represent real-world quantities like temperature,
sound, light, and pressure.

Examples of Analogue Signals:


o Human voice in air
o Thermometer reading
o Voltage output from a microphone
Key Characteristics:
o Continuous (not broken into steps)
o Infinite possible values within a range
o Often represented by sine waves

An analog-to-digital converter (ADC) is used to convert an analog signal such as voltage to a


digital form so that it can be read and processed by a microcontroller. Most microcontrollers
nowadays have built-in ADC converters. It is also possible to connect an external ADC
converter to any type of microcontroller.

Sampling of Analog Signals:


Definition:
Sampling is the process of taking discrete measurements of an analog signal at regular
intervals, creating a sequence of values that represent the original signal.
Analog-to-Digital Converter (ADC)
An ADC performs sampling, capturing the analog signal's amplitude at specific time points.
Analogue signal - A continuous signal that varies over time (e.g., sound, temperature).
Sampling - Taking measurements of the analogue signal at fixed time intervals.
Sample rate - How many times per second you take a sample (e.g., 44,100 samples per second
for CD audio).
Sampling Rate:
The number of samples taken per second is called the sampling rate, measured in Hertz (Hz)
or samples per second (sps).

Important Concepts:

• Sampling Rate (fs): The number of samples taken per second. It is measured in Hertz
(Hz).
• According to the Nyquist Theorem, the sampling rate must be at least twice the highest
frequency present in the analogue signal to avoid aliasing (distortion).

Nyquist Rate = 2 × Maximum frequency of the signal.


Example:
If an analogue audio signal has a maximum frequency of 20 kHz, then the minimum sampling
rate should be:
fs = 2 × 20 kHz = 40 kHz

Measured in Hertz (Hz).

Resolution of Conversion:
Definition:
Resolution in A/D conversion refers to the number of distinct digital values an ADC can
represent, typically expressed as the number of bits
Resolution is the smallest change in analog input that can be detected by the Analog-to-
Digital Converter (ADC).
Formula:
For an n-bit ADC, the number of possible digital values is 2ⁿ
Resolution = Voltage range / 2ⁿ
Where:
• Voltage Range = difference between max and min input voltage
• n = number of bits of the ADC
Example:
• For a 3-bit ADC and a voltage range of 0-8V:
Resolution= 1V - meaning changes
smaller than 1V won't be detected.

Impact on Accuracy:
A higher resolution (more bits) means a greater number of quantization levels, leading to a
more accurate digital representation of the analog signal.
Example:
An 8-bit ADC can represent 256 distinct values
(28), while a 16-bit ADC can represent 65,536 values (216).
Resolution in D/A Conversion:
In D/A conversion, resolution determines the smoothness of the reconstructed analog signal.
Quantization:
Definition:
Quantization error is the difference between the actual analog value and the rounded digital
value after quantization.This error occurs because the analog signal is continuous, but the ADC
can only represent discrete levels.
Quantization is the process of mapping the sampled analog values to a finite set of discrete
levels, creating a digital representation of the signal.
Quantization Levels:
The number of quantization levels is determined by the resolution of the ADC.
Quantization Error:
Since the sampled values are mapped to discrete levels, there's a potential difference between
the original analog value and its quantized representation, known as quantization error.
Impact on Signal Quality:
A higher number of quantization levels (higher resolution) results in less quantization error and
a more accurate digital representation of the analog signal.
Example:
Imagine a voltage range from O to 5 volts, with an 8-bit ADC. The voltage range is divided
into 256 levels, and each sample is mapped to the closest level.
• It happens because the analogue signal can have infinite possible values, but the ADC
can only output a limited number of levels.
• The error is usually ≤½ of the resolution.
Example:
If the resolution is 1V and the actual signal is
3.6V, the ADC might record it as 4V. The quantization error is 0.4V.
This error occurs because the analog signal is continuous, but the ADC can only represent
discrete levels.
Formula:
Quantization Error ≤ Resolution / 2

Example:
o Suppose the actual voltage is 2.3V
o Resolution is 1V
o The ADC rounds it to 2V
o So, the quantization error is 0.3V

Encoding
Encoding is the process of converting information into a specific format, usually for
transmission, storage, or processing.
In electronics and communication:
• Encoding converts data or signals into binary format (Os and 1s).
• In ADC (Analog to Digital Conversion), encoding means converting the
quantized value into a binary code.
Example:
• Voltage level 5V → encoded as binary 101 in a 3-bit ADC.

Decoding
Decoding is the process of converting encoded (binary) data back to its original form.
In electronics and communication:
o Decoding converts binary codes into analog signals or human-readable formats.
o In DAC (Digital to Analog Conversion), decoding means converting binary
numbers back to a voltage or current.
Example:
• Binary input 101 → decoded to 5V analog output.
Digital-to-Analog Conversion (DAC):
Decoding:
DACs receive a digital code as input, which is decoded to determine the corresponding
analog voltage or current level.
Weighted Resistor Network:
A common DAC architecture uses a network of resistors with weights proportional to
the binary digits of the input code, creating an analog output voltage.
Voltage-Controlled Current Source:
Another approach uses a voltage-controlled current source to generate a current
proportional to the digital input, which is then converted to a voltage.
Common DAC Types:
o R-2R Ladder DAC: Uses a ladder network of resistors to convert digital values
to analog voltage, offering good accuracy and linearity.
o Weighted Resistor DAC: Employs resistors with values that are powers of 2 to
convert digital values to analog voltage, providing a simple and efficient
conversion method.
Sampling:
ADCs first sample the continuous analog signal at discrete time intervals, capturing its
value at specific points in time.
Quantization:
The sampled value is then quantized, meaning it's mapped to a discrete level within a
defined range of digital values, resulting in a digital representation of the signal.
Encoding:
The quantized value is encoded into a digital code, typically a binary number,
representing the amplitude of the analog signal at that sample point.
Common ADC Types:
• Flash ADCs: Employ a large number of comparators to perform parallel
conversion, offering high speed but potentially high power consumption and
complexity.
• Successive Approximation ADCs: Use a comparator and a digital-to-analog
converter (DAC) to iteratively approximate the analog input, providing a good
balance of speed, accuracy, and cost.
• Dual-Slope ADCs: Integrate the analog signal and then compare it to a known

Analog-to-digital converters (ADCs) and digital-to-analog converters (DACs) are


essential for bridging the gap between analog and digital
worlds, enabling digital systems to process and interact with real-world signals. ADCs
convert analog signals to digital, while DACs perform the reverse conversion.
Principles of ADC and DAC:
ADC (Analog-to-Digital Converter):
• Sampling: ADCs sample the continuous analog signal at discrete time intervals,
capturing its value at those points.
• Quantization: The sampled value is then quantized, meaning it's mapped to a
discrete digital value within a defined range, resulting in a loss of precision.
• Encoding: The quantized value is encoded into a digital code, typically a binary
representation.
DAC (Digital-to-Analog Converter):
Decoding: DACs take a digital input code and decode it into an analog output.
• Analog Reconstruction: The digital code is used to generate an analog voltage or
current that corresponds to the digital value, effectively reconstructing the analog

You might also like