Microchip ATmega32U2 Handleiding


Lees hieronder de 📖 handleiding in het Nederlandse voor Microchip ATmega32U2 (12 pagina's) in de categorie Niet gecategoriseerd. Deze handleiding was nuttig voor 27 personen en werd door 2 gebruikers gemiddeld met 4.5 sterren beoordeeld

Pagina 1/12
Differential and Single-Ended
ADC
Differential and Single-Ended ADC
Introduction
Author: Kristian Saxrud Bekken, Microchip Technology Inc.
A common requirement for microcontroller applications is the need to sense the real world in one way or another.
This requires bridging the gap between the digital dimension of a microcontroller and the analog realm of the real
world. In most cases, this is accomplished by using a sensor that translates the magnitude of a physical phenomenon
to an analog voltage which is routed to a pin on the microcontroller. Lastly, a dedicated part of the microcontroller
called an analog-to-digital converter, also referred to as an ADC or A/D converter, transforms the analog voltage to a
digital value to be further processed by the microcontroller.
Most analog sensors either output their measured value as a single analog voltage signal or as a difference between
two analog voltage signals. The two concepts are referred to as single-ended signaling and differential signaling,
respectively.
This white paper provides a high-level introduction to A/D conversion of single-ended and differential analog signals
by presenting the main advantages and drawbacks for the two approaches, as well as a selection of common
applications and useful considerations.
© 2019 Microchip Technology Inc. White Paper DS-00003197A-page 1
Table of Contents
Introduction.....................................................................................................................................................1
1. Single-Ended Operation..........................................................................................................................3
1.1. General Concept.......................................................................................................................... 3
1.2. Advantages and Drawbacks.........................................................................................................3
1.3. Typical Applications......................................................................................................................3
2. Differential Operation.............................................................................................................................. 5
2.1. General Concept.......................................................................................................................... 5
2.2. Advantages and Drawbacks.........................................................................................................6
2.3. Typical Applications......................................................................................................................6
3. Considerations........................................................................................................................................ 7
4. Revision History...................................................................................................................................... 8
The Microchip Website...................................................................................................................................9
Product Change Notification Service..............................................................................................................9
Customer Support.......................................................................................................................................... 9
Product Identification System.......................................................................................................................10
Microchip Devices Code Protection Feature................................................................................................ 10
Legal Notice................................................................................................................................................. 10
Trademarks.................................................................................................................................................. 10
Quality Management System....................................................................................................................... 11
Worldwide Sales and Service.......................................................................................................................12
Differential and Single-Ended ADC
© 2019 Microchip Technology Inc. White Paper DS-00003197A-page 2
1. Single-Ended Operation
1.1 General Concept
The simplest and most widely used analog sensors provide single-ended signals. These are designed to be
connected to the same ground level as the microcontroller and to provide their measurement result as an analog
voltage signal on a single wire referenced to this common ground. All basic ADCs support single-ended operation.
An ADC can be designed to operate in different ways, and the amount of time required to perform an analog-to-digital
conversion will vary between ADCs. Regardless, the result is a digital representation of the analog input value. The
digital value will typically be an integer between and 0 2
n-1 n, where is the resolution of the ADC in bits. An integer
value of means that the analog voltage level is the same as ground, while the maximum value (0 2
n-1) corresponds
to the level of what is referred to as the ADC voltage reference (V
ref). The voltage reference defines the conversion
range of the ADC, which for single-ended operation means that an analog input above this level still produces the
maximum digital value, while an input below ground level gives a digital value of . In most cases, the ADC voltage0
reference can be selected among different levels between ground and the microcontroller supply voltage in order to
utilize as much of the ADC resolution as possible for inputs in a given voltage range.
A 12-bit single-ended ADC will most likely have an output range of . If the selected [0,4095] V
ref is 2.0V, and the
analog input signal is 0.5V, the corresponding digital value can be calculated as follows:
Equation 1-1. Example - 12-bit Single-Ended Conversion
ADC Output = Input

Total ADC Counts
=0.5V
2.0V 4096
= 1024
1.2 Advantages and Drawbacks
Whether single-ended operation is the best choice in a given setting depends on the specific application. Below are
some of the main advantages and drawbacks associated with this approach.
Main advantages:
Both sensors and microcontrollers are available at very low cost
Occupies only one analog microcontroller input per sensor
In most cases conceptually simple and easy to use
Large selection of available sensors and microcontrollers
Main drawbacks:
Sensitive to noise along the analog signal path
Sensitive to common-mode noise on the ground and reference voltage levels of the microcontroller
The signal path between the sensor and the microcontroller should be as short as possible to minimize noise
and ground-level differences
Conditioning circuitry that adds cost and unwanted dynamic effects might be needed
1.3 Typical Applications
There are numerous types of single-ended analog sensors available. Some of the most common use-cases in
microcontroller applications are:
Potentiometers for measuring angle or position
Light intensity measurement
Infrared and ultrasonic range measurement
Differential and Single-Ended ADC
Single-Ended Operation
© 2019 Microchip Technology Inc. White Paper DS-00003197A-page 3
Gas and air quality measurement
Differential and Single-Ended ADC
Single-Ended Operation
© 2019 Microchip Technology Inc. White Paper DS-00003197A-page 4
2. Differential Operation
2.1 General Concept
A differential ADC measures the voltage difference between two inputs. This can be essential in certain applications
as some measurement concepts require two output signals instead of one to quantify the physical property of
interest. Sensors that implement such concepts typically provide their output value as the voltage difference between
two signals, also known as a differential signal. Other sensors might provide a differential output for added
robustness even though the measurement itself generates a single-ended signal.
A basic single-ended ADC can be used to measure a differential signal by connecting each of the two inputs to a
single-ended ADC channel, sampling them sequentially, and comparing the results in software. Other so-called
pseudo-differential approaches also exist, but all have little effect on dynamic common-mode noise since the two
inputs are sampled at different times. An ADC that supports differential operation would be the preferred option when
using such sensors since the ADC will then be capable of directly converting the difference between the two varying
voltage levels to a digital value.
When connecting a differential analog sensor to a microcontroller one of the signals in the differential pair is defined
as the positive input while the other is defined as the negative input. By definition, the value of the differential signal is
the voltage of the positive input referenced to the negative input. The positive and negative designation of each signal
determines the polarity of the differential signal, defining it as positive when the positive input is larger than the
negative input and negative if the negative input is larger than the positive input.
Note:  A negative differential signal does not imply a negative voltage on any of the two corresponding inputs, as this
would be outside the specifications of most microcontrollers. It only means that the negative input is larger than the
positive input.
The voltages of each signal in a differential pair are in most cases referenced to the same ground level as the
microcontroller, but in some applications, the ground level of the sensor could be isolated from that of the
microcontroller.
Like single-ended operation, the ADC voltage reference (V
ref) is often configurable and determines the range of
input voltages that will be converted. But for differential operation, the input range is extended in the negative
direction such that differential voltages of -V
ref and Vref gives the minimum and maximum input values, respectively.
The corresponding digital values for the valid analog input range [-V
ref,Vref] can be represented in different ways
depending on the ADC. A common output is signed integers in the range [-2
n-1,2n-1-1] n, where is the resolution
of the ADC in bits. The specific integer format can also vary, but 2’s complement is widely used.
A 12-bit differential ADC with signed output will commonly give digital values in the range . If [-2048,2047] V
ref is
2.0V and the analog differential signal is -0.5V, the corresponding digital value can be calculated as shown below.
Notice how the total number of ADC counts is divided by 2 as the 4096 available ADC counts are distributed on each
side of zero.
Equation 2-1. Example - 12-bit Differential Conversion with Signed Output
ADC Output = Differential Input

Total ADC Counts
2
=0.5V
2.0V 4096
2
= 512
Another commonly used output format is direct binary mapping using unsigned integers in the range [0,2
n-1],
where is the ADC resolution in bits.n
The unsigned output range of a typical differential 12-bit ADC will be . If [0,4095] V
ref is 2.0V and the analog
differential signal is -0.5V, the corresponding digital value can be calculated as shown below. Notice how an offset of
2048 is added to make an input of 0.0V correspond to the center of the output range, and how the total number of
ADC counts is divided by 2 as the 4096 available ADC counts are distributed on each side of zero before adding the
offset.
Differential and Single-Ended ADC
Differential Operation
© 2019 Microchip Technology Inc. White Paper DS-00003197A-page 5
Equation 2-2. Example - 12-bit Differential Conversion with Unsigned Output
ADC Output = Differential Output
 Total ADC Counts
2+ ADC Counts at Zero
=0.5V
2.0V 4096
2+ 2048
= 512 + 2048
= 1536
2.2 Advantages and Drawbacks
Differential analog-to-digital conversion is often selected for demanding environments that require higher
performance and robustness compared to the more common single-ended approach. Below are some of the main
advantages and drawbacks that could help decide whether differential operation is required for a specific application.
Main advantages:
Rejects noise along the signal path if the positive and negative inputs are twisted or routed together since any
noise then affects both signals equally
Rejects common-mode noise on the microcontroller ground and reference voltage levels since equal noise on
these do not affect the differential signal
Double dynamic range compared to single-ended operation since the allowed input range is symmetric around
0V instead of being limited to positive values only
Provides good performance even for small voltage signals due to strong noise rejection
Can be used to measure single-ended signals by connecting the sensor ground level to the negative input of the
differential pair
Compared to using operational amplifiers to transform a differential signal for single-ended conversion, a
differential ADC offers end-to-end differential signaling through an integrated and more robust solution
If a sensor provides a small single-ended signal with a large DC-offset, a differential ADC could utilize more of
the available resolution by connecting a corresponding DC-voltage to one of the differential inputs and setting
the voltage reference to match the signal, while a single-ended ADC would need to use a voltage reference
large enough to include both the DC-offset and the actual signal
Main drawbacks:
Sensors and microcontrollers are commonly not available in the lowest price ranges
Requires two microcontroller input pins per sensor compared to one for single-ended operation
Somewhat more complex to connect and use
Compared to single-ended sensors, fewer sensors provide a native differential output
2.3 Typical Applications
Below are some specific microcontroller applications where differential signaling and conversion are commonly used:
Thermocouple-based temperature measurement
Strain gauge-based force sensing
Resistor bridge-based pressure sensing
Applications in environments with electromagnetic and radio frequency noise
Applications that require long signal paths between sensors and microcontroller
Current measurements
Differential and Single-Ended ADC
Differential Operation
© 2019 Microchip Technology Inc. White Paper DS-00003197A-page 6
3. Considerations
There will always be some level of noise on the analog signal for any kind of A/D conversion. Consider the possible
noise magnitude when evaluating the maximum dynamic range of the input signal. The output will saturate, and
information will be lost if the input, including noise, exceeds the ADC voltage reference. It might be harmful to the
microcontroller if it exceeds the allowed pin voltage range.
To improve resolution utilization when using an ADC with a configurable voltage reference, evaluate the maximum
dynamic range of the input signal including noise and select a reference level that encompasses it as tightly as
possible without limiting it.
For both single-ended and differential conversion, the magnitude of the final result is the ratio between input
magnitude and reference voltage level. Consequently, not only noise on the signal itself but also noise on the
microcontroller ground level and ADC voltage reference will affect the converted value.
A shorter analog signal path will most likely pick up less noise. This is especially important for single-ended signals.
A microcontroller with a differential ADC does not necessarily allow a total input range of to . Make sure-Vcc Vcc
the selected voltage reference is within the allowed pin voltage range. If the ADC supports both single-ended and
differential operation, a voltage reference close to could be inside the allowed range in single-ended mode, butVcc
outside specifications in differential mode.
If a differential sensor and the microcontroller are electrically isolated, the signal could be allowed to have a DC
voltage outside the rated range for the microcontroller.
Differential and Single-Ended ADC
Considerations
© 2019 Microchip Technology Inc. White Paper DS-00003197A-page 7


Product specificaties

Merk: Microchip
Categorie: Niet gecategoriseerd
Model: ATmega32U2

Heb je hulp nodig?

Als je hulp nodig hebt met Microchip ATmega32U2 stel dan hieronder een vraag en andere gebruikers zullen je antwoorden




Handleiding Niet gecategoriseerd Microchip

Handleiding Niet gecategoriseerd

Nieuwste handleidingen voor Niet gecategoriseerd