How an Analog-to-Digital Converter ADC Works
An Analog-to-Digital Converter (ADC) is an electronic circuit, which samples the voltage of a continuously changing waveform at regular intervals and converts the sampled voltage into a digital number. The voltage is a physical quantity, which represents the amplitude of the waveform at any particular moment in time. It is this quantity, which once measured, converts into a binary value.
Analog Signal
An analog signal, also known as analogue signal in the UK, is a continuously changing variable signal, where the amplitude measured in volts, changes with respect to time.
Sampling
The perfect representation of the analog signal can never occur due to the gap between each sample. This gap reduces by taking more samples; however, there will always be a small error.
As you can see from the diagram above, if you sample the amplitude values (voltage) at equal intervals in time, convert those values into binary, and store them in the computer’s memory, you then have an approximate representation of the signal stored in the computer. Obviously, the more sample values you take closer together, the more accurate your representation of the original signal will be.
ADC Implementation
An electronic circuit performs the sampling and conversion. In recent times, an integrated circuit (IC) incorporates this function, and microcontrollers such as the AVR have this function built-in.
However many processors such as the Broadcom processor used on the Raspberry Pi cannot perform this type of conversion. This is not a problem since many IC packages can perform this function instead. The MCP3002 provides the ADC function, whilst the MCP4802 performs the reverse function (DAC). Both of these integrated circuits interface through the Serial Peripheral Interface (SPI) of the Raspberry Pi.
This Article Continues...
How an Analog-to-Digital Converter ADC WorksRaspberry Pi ADC: Analog to Digital Converter Chip MCP3002
Raspberry Pi Analog Input Circuit
Raspberry Pi LDR Light Sensor Circuit
ADC Circuit: Raspberry Pi Analog Input Circuit on Breadboard
MCP3002
Raspberry Pi SPI
Raspberry Pi Pinout