Data is stored digitally in a microcomputer. However, if we wish to connect a digital computer to external hardware containing an analogue device, such as a sensor, this requires the use of an Analogue to Digital Converter (ADC). The ADC does the conversion from an analogue signal to a digital representation of that signal.
Figure 1: Example – Connecting Sensor to a PC
An Analogue-to-Digital Converter is a device that provides an output that digitally represents an input voltage or current level. Most ADCs convert an input voltage to a digital word (i.e. 1’s and 0’s). Digital words have a FIXED number of different values whereas analogue quantities have an INFINITE number of different values.
Figure 2: 8-bit ADC
ADC has an analogue reference voltage to which the analogue input is compared. The digital output tells us what fraction of this reference voltage is the input voltage. This is given by the formula:
Here is a simple example of a 3-bit ADC. Because it has three output bits,
this means there are 8
possible output codes.
If Vref is 10V, this would give us the following table mapping input voltage ranges to an output binary code:
We cannot represent all the possible analogue values with different digital combinations, so we need to limit the number of analogue values to some fixed, finite number that is less than or equal to the number of digital combinations available. This restriction operation is achieved by having a fixed number of analogue value ranges.
Figure 3: Quantisation Errors