Skip to main content
Renesas Electronics America - Knowledgebase

Sampling of A/D converter

Latest Updated:01/01/2007


Sampling of A/D converter


In order to process the analog signals in the natural world as digital signals in a microcontroller, an A/D (analog to digital) converter is required. Most of today's microcontrollers contain A/D converters on the microcontroller chip. The A/D converter captures analog signals at fixed time intervals along the time axis. This process is known as sampling, and the fixed time interval is known as the sampling period (the inverse of the sampling period is called the sampling frequency). On the other hand, the approaching of a predetermined discrete value along the amplitude axis is known as quantization.


The following points must be observed when carrying out A/D conversion.
(1) Caution concerning the relationship between the sampling frequency and the analog signal frequency
The sampling frequency (fs) must be at least twice the analog signal frequency (f) (Shannon's sampling theorem). For example, when the analog signal frequency and the sampling frequency are the same, as shown in the figure below, the value after digital conversion is always constant, making it impossible for the digital waveform to approximate the analog waveform.


The following figure shows the waveforms when the sampling frequency (fs) is twice the analog signal frequency (f). At twice the frequency, the digital waveform at last becomes a triangular waveform with the same frequency as the analog signal frequency. When the waveform phases are out of alignment, the amplitude becomes smaller. In this case, a large error occurs unless the sampling frequency is made even larger than twice the frequency of the analog waveform.
It is therefore necessary to select an A/D converter of the conversion speed to execute sampling at a frequency that is at least twice the upper limit of the frequency of the analog signal to be converted to the digital signal.


The actual analog waveform to be input to the A/D converter is not a single frequency component; rather, it consists of various frequency components, including components that are more than half the sampling frequency. A low-pass filter is therefore used in the stage before the A/D converter to cut off these components. However, a general low-pass filter cannot precipitously cut off frequencies above the desired level. Therefore, in order to create an analog input signal to sufficiently eliminate the frequency components that are more than half the sampling frequency, it is necessary to design a cut-off frequency. Note that, depending on the capacitor and coil in the low-pass filter, the signal input to the A/D converter may exceed the converter's absolute maximum rating when the power supply is shut off. It is therefore necessary to attach a protection diode to discharge power to the power supply.

(2) Caution concerning A/D conversion time
When the A/D converter is converting analog signals to digital signals, the analog signals are not steady; they are always changing. Because of this, in order to obtain accurate conversion values, it is necessary to put a sample & hold circuit in the stage just before the A/D converter to hold the analog signals steady for conversion. This sample & hold circuit is now commonly found in microcontrollers.

Suitable Products
  • Was this article helpful?