Thursday, 25 December 2014

Analog to Digital Conversion

Any physical excitation or disturbance such as light,sound,heat or even pressure in order to be utilised has to be measured and analysed. These signals generally present themselves as a continuum of time which means that their amplitudes assume a continuous range of values with respect to time such signals are known as analog signals.

The real numbers between any two real numbers are infinite. In a similar fashion the analog signal has infinite values in a fixed duration of time. Keep this in mind for the time being.

When these analog signals are to be used electronically these signals need to be converted to something called as discrete signals. Discrete signals have discrete values of amplitudes at specific points of time. Discrete signals reduce the number of value points of a signal. The need for this arises because any computer including a super computer has a limited memory and limited processing speed. And as I said earlier analog signals have infinite values which as you can imagine will possibly crash a computer.

Enter Analog to Digital Conversion.

Analog to digital conversion consists of these processes

1. Sampling
2. Quantization

These names can vary.

The method in which samples are taken from an analog signal at fixed time intervals is called sampling'. This means that specific values of the signal are collected at specific intervals of time.
Suppose one sample is taken every millisecond, that means 1000 samples are taken every second.
Now generally sampling rate selection is kept low, the motivation behind this is cost. Low sampling rate means slower processing speeds are required so slower or cheaper computers can be used.

The process of rounding off the values of these samples to some unit of precision is called quantization. Thus a minimum amount of error is introduced in sampling values due to rounding or truncation.

 The requirement for quantization comes during the process called coding. Coding is the process of converting sampled values to Binary or more accurately Gray code.The sampled values cannot be used as it is by a computer because the computer basically uses binary logic. Hence, these values have to be converted to something the computer might understand.

Coding can be easily done for integers rather than for decimal numbers hence quantization is required.

Suppose you want the brightness of your computer screen to change according to the intensity of the light in the room you are in, that would require analog to digital conversion. The process for this is easier than you think all you need is light sensor such as an LDR (Light Dependent Resistor) and microcontroller with an A/D converter and your computer of course.

 I made a similar project by using an Arduino UNO R3 which has built in A/D converter. While the project did not require knowledge of A/D conversion it is always good to have an understanding of the underlying principles.

Until next time,

Abhijeet