Experiment 6
Experiment 6
Pre-Lab Reading
Consider a situation where you want to know the room temperature. There is a device on your
desk that is telling you that the temperature is 30o C today.
But how the device tells you the information! Simply put - There is a sensor (temperature sensor)
that senses the temperature and gives out to the screen. This sensor reads/senses the room
temperature and gives out an analog voltage (continuous in time, think of a sinusoid for example)
proportional to the room temperature, which is then further processed and is displayed. The
processing is done by some micro-controller. In fact, all sensors (Ex: micro-phone, pressure, light
etc.) output proportional analog voltage. Most signals are analog in nature and the electronic
sensors which we’re using for capturing these phenomena are also analog. All micro-controllers
(and processors) work with digital data. So, who is translating the equivalent digital data from
the available sensor analog data? – A separate module named “Analog to Digital Converter”
in-short ADC or, A/D converter.
What is an ADC?
An ADC (Analog-To-Digital) converter is an electronic circuit that takes in an analog voltage as
input and converts it into digital data, a value that represents the voltage level in binary code.
1011
Δ=10V/8=1.25
-5
Fig.2 Sampling and Quantization
Blue spikes show the sampled value while the corresponding 3-bit binary value is shown towards
the right in Figure -2. The whole analog signal is quantized in 8 levels which can be represented
by 3-bits in binary. Say, at t4, the 10V p-p sinusoid is at 2V (the green dot). This sample value is
at level 5 which gives out 101 in binary. The whole analog voltage range (also known as Full
Scale Range or, FSR) is divided into 8 levels. Each division is 1.25V. This is the resolution of the
ADC. The samples at t2, t3, t6, t7 are snapped to a defined level. If the binary values of these
samples are fed into a DAC, the result might be slightly different than the actual analog voltage.
Say, the real analog value at t2 is 3.5V, after sampling, the new snapped value is below 3.5V and
the quantized binary value is 110. Now, if this binary value was converted back to analog, the
result might be 3V. So, there is an error (quantization error) percentage at the output. This can be
reduced by increasing the number of levels (level = 2bit) which means a decrease in resolution.
So, Resolution = FSR/2n. For a 12-bit ADC and FSR=3.3V, Resolution =3.3V/212=0.8057 mV.
Circuit Diagram
Fig. 12 Circuit diagram in Proteus
Outputs