Analog-to-Digital Conversion

Analog-to-Digital Conversion

Copyright: © 2017 |Pages: 15
DOI: 10.4018/978-1-68318-000-5.ch009

Chapter Preview



The purpose of the Analog-to-Digital converter (ADC) is to transform a voltage sample to a proportional digital code thereby allowing the measurement of physical quantities such as voltage, current, temperature, atmospheric pressure, etc. Most sensors transform physical quantities into voltage. For instance, the LM35 temperature sensor converts the temperature range (0 – 100 ºC) into a linear voltage range between 0 and 1 Volt as described by the characteristic curve of Figure 1. Due to the digital nature of a microcontroller, the ADC serves as a mediator between the analog world in which we live and the digital world created by Man.

Figure 1.

Characteristic curve of LM35 temperature sensor

This chapter discusses the functionality of the ADC and its use in a variety of applications. The Sample-and-Hold (SAH) circuit and the Successive-Approximation (SAR) ADC will be explained and pertinent timing constraints will be covered as well.


Sample-And-Hold Circuitry

In order to convert a voltage sample to digital code, the sample is not allowed to change value during conversion. This is because analog-to-digital conversion is not an instantaneous process. The successive-approximation A/D converter, employed by the PIC18 family, is essentially a state machine requiring a number of clock cycles to complete the conversion procedure.

Since signals in general (e.g. audio signals) vary rapidly as a function of time, the need to track the input signal is performed via a Sample-and-Hold (SAH) circuit as depicted in Figure 2. The 5 pF capacitor (Cin) in the figure models the input capacitance of the SAH whereas Chold is used to store or hold the input sample for conversion. In order to track an input signal, the sampling switch S is closed and the RC circuit formed by (Ric + RSS) and Chold allows the holding capacitor to track the input signal within five time constants. This “tracking time” Tc has been computed to be 1.2 μs under the worst considerations. If other factors such as the amplifier settling time (TAMP = 5 μs) and the temperature coefficient (TCOFF = 1.25 μs for an operating temperature of 50 °C) are taken into account, then the acquisition time (TACQ = TAMP + TC + TCOFF) adds up to 7.45 μs. Therefore, the sampling switch S must be closed for at least 7.45 μs for reliable data acquisition.

When the ADC is commanded to start conversion (GO = 1), S is opened and the input signal is disconnected from the hold capacitor. Simultaneously switch is closed and the conversion process of the voltage sample stored across Chold is initiated. Due to the high input impedance of the ADC, the voltage sample remains constant during conversion. Upon termination, an end-of-conversion flag () is asserted to 0 and consequently is opened and S is closed. This means that the SAH will go back to sampling mode. The charge holding capacitor Chold is instantaneously discharged after each sample via a discharge switch (not shown in Figure 2). This feature helps to optimize the sampling process, as the circuit always needs to charge the capacitor, rather than charge/discharge based upon previously measured values.

Figure 2.

Analog input model


Successive Approximation Adc

In reference to Figure 3, the successive approximation analog-to-digital (SAR ADC) converter circuit typically consists of five chief sub-circuits:

Complete Chapter List

Search this Book: