Você está na página 1de 42

INTRODUCTION

For this experiment, we have constructed the circuit for Analog to Digital Conversion and
understand the application of the conversion. As we can understand the output voltage for the IC is in
analog signal but to full fill the objective of this experiment we have to convert the signal into digital
and connect the circuit using DAQ to simulate the result in digital signal.

Figure 1.0: Block Diagram

Figure 1.0 is illustrates the fundamental function of A/D conversion. The block that been label A/D
converter is ADC0804 . In any case, it accept the analog signal as its input and produce a readable
digital output. For the digital System is DAQ SCB-68 to receive the data and show in simulation.
An analog-to-digital converter is a device that converts a voltage to a digital number that can be read by
digital system. The conversion involves quantization of the input, so it necessarily introduces a small
amount of error. Instead of doing a single conversion, an ADC often performs the conversions ("samples"
the input) periodically.

Figure 1.1: ADC0804

Connecting digital circuitry to sensor devices is simple if the sensor devices are inherently
digital themselves. Switches, relays, and encoders are easily interfaced with gate circuits due
to the on/off nature of their signals. However, when analog devices are involved, interfacing
becomes much more complex. What is needed is a way to electronically translate analog
signals into digital (binary) quantities, and vice versa. An analog-to-digital converter, or
ADC, performs the former task while a digital-to-analog converter, or DAC, performs the
latter.
An ADC inputs an analog electrical signal such as voltage or current and outputs a binary
number. In block diagram form, it can be represented as such:

A DAC, on the other hand, inputs a binary number and outputs an analog voltage or current
signal. In block diagram form, it looks like this:

Together, they are often used in digital systems to provide complete interface with analog
sensors and output devices for control systems such as those used in automotive engine
controls:

It is much easier to convert a digital signal into an analog signal than it is to do the reverse.
Therefore, we will begin with DAC circuitry and then move to ADC circuitry.

Successive-Approximation ADCs A successive-approximation converter, is composed of a


digital-to-analog converter (DAC), a single comparator, and some control logic and registers.
When the analog voltage to be measured is present at the input to the comparator, the system
control logic initially sets all bits to zero. Then the DACs most significant bit (MSB) is set to
1, which forces the DAC output to 1/2 of full scale (in the case of a 10-V full-scale system,
the DAC outputs 5.0 V). The comparator then compares the analog output of the DAC to the
input signal, and if the DAC output is lower than the input signal, (the signal is greater than
1/2 full scale), and the MSB remains set at 1. If the DAC output is higher than the input
signal, the MSB resets to zero. Next, the second MSB with a weight of 1/4 of full scale turns
on (sets to 1) and forces the output of the DAC to either 3/4 full scale (if the MSB remained at
1) or 1/4 full scale (if the MSB reset to zero). The comparator once more compares the DAC
output to the input signal and the second bit either remains on (sets to 1) if the DAC output is
lower than the input signal, or resets to zero if the DAC output is higher than the input signal.
The third MSB is then compared the same way and the process continues in order of
Descending bit weight until the LSB is compared. At the end of the process, the output
register contains the digital code representing the analog input signal. Successive
approximation ADCs are relatively slow because the comparisons run serially, and the ADC
must pause at each step to set the DAC and wait for its output to settle. However, conversion
rates easily can reach over 1 MHz. Also, 12 and 16-bit successive-approximation ADCs are
relatively inexpensive, which accounts for their wide use in many PC-based data acquisition
systems.

The Output is shown to consist of serval lines, the number of which varies with the resolution
of the converter. Resolution describes the percentage of the percantage of input voltage
change required to cause a step change in the output. Figure 1.0 show the basic relationship
between number of bits and equivalent resolution.

The resolution of a sampler is the number of bits that are used to represent each signal. For
instance, a 12-bit sampler will output 12 bits of data for every sample. This means that there
are 212 possible digital values that each sample can be converted to. In general, the more bits
of resolution, the better (more faithful) the digital signal will be to the original. The
resolution, n, is related to the number of steps, m, by the following formula:

For this experiment, we are using 8 bit A/D converter that accept 0Volt to 4.0 Volt input
signal. The 4 Volt range would divided into 256 descrete steps of :

Quantization interval =

No of quantization intervallevel
voltage range

4
256
= 0.015625V
=15milivolts
It about 15 milivolts per step for the quantization interval. Thus, the higher the resolution, the
smaller the imput change required to move to the next output step.

OBJECTIVE

1. The output of analog to digital conversion via calculation, simulation and expertiment
have been verify used siccessive-approximation method.
2. The analog to digital resolution, quantization interval and quantization error have been
calculated.

As the objective above, the circuit has been constructed following the lab sheet that had been given.
The result has been obtain and record for each value based on the value change given. The simulation
interfacing with computer has been done and obtain the result using DAQ system interfacing with
circuit. The result has been compare between the simulations and practical, the result obtain is the
same. The laboratory has been achieved the objective.

PROCEDURE
1. The circuit for the experimental have been constructed based on figure 2.0.
2. The circuit have been constructed using Protues software and recorded the
measurement in table 1.0
3. The circuit is design in graphical programming diagram and linked to personal
computer by using interfacing LabVIEW

RESULTS

No.

Input Voltage

Binary Output

(Vin), V

Exp

Cal

Sim

1.0

001100112

001100112

001100112

1.5

010011012

010011012

010011012

2.0

011001102

011001102

011001102

2.5

100000002

100000002

100000002

3.0

100110012

100110012

100110012

3.5

101100112

101100112

101100112

4.0

110011002

110011002

110011002

Table 1.0: Results

CALCULATION
1) Vin = 1V
Step 1
The maximum input voltage must be divided by two.
Vmax imum input ana log voltage

Therefore

5
2.5V
2

Step 2
Let the input analog voltage is 1V, then test the input analog voltage by using algorithm as
mentioned earlier.
Let X=1V
Test

Voltage

reject

X 2.5

reject

ok

X 2.5 1.25
reject

reject

ok

reject

reject

ok

reject

reject

ok

X 2.5 1.25 0.625

ok

X 2.5 1.25 0.625 0.3125

ok

ok

X 2.5 1.25 0.625 0.3125 0.15625

Check

Opt.

2.5

No
Reject 2.5

1.25

No
Reject 1.25

0.625

Yes
Retain
0.625

0.9375

Yes
Retain
0.3125

1.09375

No
Reject
0.15625

reject

reject

ok

reject

reject

reject

ok

ok

reject

reject

reject

reject

ok

ok

reject

reject

ok

1.015625

No
Reject
0.078125

ok

0.9765625

Yes
Retain
0.078125

ok

1.

No
Reject
0.0390625

ok

X 2.5 1.25 0.625 0.3125 0.15625 0.078125

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625


ok

0.01953125
The actual digital output is read from MSB to LSB.
Therefore ,
1V = 001100112 (active high)
= 110011002 (active low)

2) Vin = 1.5V
Step 1
The maximum input voltage must be divided by two.
Vmax imum input ana log voltage

Therefore

5
2.5V
2

Step 2
Let the input analog voltage is 1.5V, then test the input analog voltage by using algorithm as
mentioned earlier.
Let X=1.5V
Test
ok

X 2.5
reject

ok

X 2.5 1.25

Voltage

Check

Opt.

2.5

No
Reject 2.5

1.25

Yes
Retain 1.25

reject

ok

ok

reject

ok

reject

reject

ok

reject

reject

ok

reject

reject

ok

reject

reject

ok

ok

ok

reject

ok

reject

reject

ok

ok

reject

X 2.5 1.25 0.625

ok

X 2.5 1.25 0.625 0.3125

reject

ok

X 2.5 1.25 0.625 0.3125 0.15625

reject

ok

ok

X 2.5 1.25 0.625 0.3125 0.15625 0.078125

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625


ok

0.01953125

1.875

No
Reject
0.625

1.5625

No
Reject
0.3125

1.40625

Yes
Retain
0.15625

1.484375

Yes
Retain
0.078125

1.523438

No
Reject
0.0390625

1.5

Yes
Retain
0.0195312
5

The actual digital output is read from MSB to LSB.


Therefore ,
1.5V = 010011012 (active high)
= 101100102 (active low)

3) Vin = 2V
Step 1
The maximum input voltage must be divided by two.
Vmax imum input ana log voltage

Therefore

5
2.5V
2

Step 2
Let the input analog voltage is 2V, then test the input analog voltage by using algorithm as
mentioned earlier.

Let X=2V
Test

Voltage

ok

X 2.5
reject

ok

X 2.5 1.25

Check

Opt.

2.5

No
Reject 2.5

1.25

Yes
Retain 1.25

1.875

Yes
Retain
0.625

2.1875

No
Reject
0.3125

2.03125

No
Reject
0.15625

1.9531

Yes
Retain
0.078125

reject

ok

ok

reject

ok

reject

reject

ok

reject

reject

ok

reject

reject

ok

reject

reject

reject

ok

ok

1.9921875

Yes
Retain
0.0390625

reject

ok

reject

reject

reject

ok

ok

2.0117175

No
Retain
0.0195312
5

X 2.5 1.25 0.625

ok

X 2.5 1.25 0.625 0.3125

reject

ok

X 2.5 1.25 0.625 0.3125 0.15625

reject

reject

ok

X 2.5 1.25 0.625 0.3125 0.15625 0.078125

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625


ok

0.01953125

The actual digital output is read from MSB to LSB.


Therefore ,
2V = 011001102 (active high)
= 100110012 (active low)

4) Vin = 2.5V
Step 1
The maximum input voltage must be divided by two.
Vmax imum input ana log voltage

Therefore

5
2.5V
2

Step 2
Let the input analog voltage is 2V, then test the input analog voltage by using algorithm as
mentioned earlier.
Let X=2.5V
Test

Voltage

ok

X 2.5
ok

ok

ok

reject

X 2.5 1.25
ok

X 2.5 1.25 0.625

Check

Opt.

2.5

Yes
Retain 2.5

3.75

No
Reject 1.25

3.125

No
Reject
0.625

2.8125

No
Reject
0.3125

2.65625

No
Reject
0.15625

2.578125

No
Reject
0.078125

ok

reject

reject

ok

reject

ok

reject

reject

reject

ok

reject

reject

ok

reject

reject

reject

ok

ok

2.5390625

No
Reject
0.0390625

reject

ok

reject

reject

reject

ok

ok

2.5195312
5

No
Retain
0.0195312
5

X 2.5 1.25 0.625 0.3125

ok

X 2.5 1.25 0.625 0.3125 0.15625

reject

reject

ok

X 2.5 1.25 0.625 0.3125 0.15625 0.078125

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625


ok

0.01953125
The actual digital output is read from MSB to LSB.

Therefore ,
2.5V = 100000002 (active high)
= 011111112 (active low)

5) Vin = 3V
Step 1
The maximum input voltage must be divided by two.
Vmax imum input ana log voltage

Therefore

5
2.5V
2

Step 2
Let the input analog voltage is 2V, then test the input analog voltage by using algorithm as
mentioned earlier.
Let X=3V
Test

Voltage

ok

X 2.5
ok

ok

X 2.5 1.25
reject

ok

ok

reject

ok

reject

reject

ok

reject

reject

ok

reject

X 2.5 1.25 0.625

ok

X 2.5 1.25 0.625 0.3125

reject

ok

X 2.5 1.25 0.625 0.3125 0.15625

reject

ok

ok

X 2.5 1.25 0.625 0.3125 0.15625 0.078125

Check

Opt.

2.5

Yes
Retain 2.5

3.75

No
Reject 1.25

3.125

No
Reject
0.625

2.8125

Yes
Retain
0.3125

2.96875

Yes
Retain
0.15625

3.046875

No
Reject

0.078125
reject

ok

reject

reject

ok

ok

ok

reject

ok

reject

reject

ok

ok

reject

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625

3.0078125

No
Reject
0.0390625

Yes
Retain
0.0195312
5

ok

0.01953125
The actual digital output is read from MSB to LSB.
Therefore ,
3V = 100110012 (active high)
= 011001102 (active low)

6) Vin = 3.5V
Step 1
The maximum input voltage must be divided by two.
Vmax imum input ana log voltage

Therefore

5
2.5V
2

Step 2
Let the input analog voltage is 2V, then test the input analog voltage by using algorithm as
mentioned earlier.
Let X=3.5V
Test
ok

X 2.5
ok

ok

X 2.5 1.25

Voltage

Check

Opt.

2.5

Yes
Retain 2.5

3.75

No
Reject 1.25

reject

ok

ok

reject

ok

reject

reject

ok

reject

reject

ok

reject

reject

ok

reject

reject

ok

ok

ok

reject

ok

reject

reject

ok

ok

reject

X 2.5 1.25 0.625

ok

X 2.5 1.25 0.625 0.3125

reject

ok

X 2.5 1.25 0.625 0.3125 0.15625

reject

ok

ok

X 2.5 1.25 0.625 0.3125 0.15625 0.078125

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625


ok

0.01953125

3.125

Yes
Retain
0.625

3.4375

Yes
Retain
0.3125

3.59375

No
Reject
0.15625

3.515625

No
Reject
0.078125

3.4765625

Yes
Retain
0.0390625

3.5

Yes
Retain
0.0195312
5

The actual digital output is read from MSB to LSB.


Therefore ,
3.5V = 101100112 (active high)
= 010011002 (active low)

7) Vin = 4V
Step 1
The maximum input voltage must be divided by two.
Vmax imum input ana log voltage

Therefore

5
2.5V
2

Step 2
Let the input analog voltage is 2V, then test the input analog voltage by using algorithm as
mentioned earlier.

Let X=4V
Test

Voltage

ok

X 2.5
ok

ok

X 2.5 1.25

Check

Opt.

2.5

Yes
Retain 2.5

3.75

Yes
Retain 1.25

4.375

No
Reject
0.625

4.0625

No
Reject
0.3125

3.90625

Yes
Retain
0.15625

3.984375

Yes
Retain
0.078125

reject

ok

ok

reject

ok

reject

reject

ok

reject

reject

ok

reject

reject

ok

reject

reject

ok

ok

ok

4.0234375

No
Reject
0.0390625

reject

ok

reject

reject

ok

ok

reject

4.0039062
5

No
Reject
0.0195312
5

X 2.5 1.25 0.625

ok

X 2.5 1.25 0.625 0.3125

reject

ok

X 2.5 1.25 0.625 0.3125 0.15625

reject

ok

ok

X 2.5 1.25 0.625 0.3125 0.15625 0.078125

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625


ok

0.01953125

QUESTIONS
1) Resolution, quantization interval and quantization error:
Resolution=

1
2n

Resolution=

1
23

1
8

= 0.125

Quantization interval, Q:

Q=

full scale voltage range


2n

Q=

5
3
2

Q=

5
8

Q=0.625 V / Step

Quantization error, Eq:


Eq=

Q
100
2 3

Eq=

0.625
100
2 3

Eq=18.04

2) Output voltage versus time for input voltage of 2.0 V.

Output voltage versus time input voltage of 2.0 V


3
2.5
2

Voltage (V)

1.5

2.5
1

1.88

2.03

1.95

1.99

2.01

t4

t5

t6

t7

t8

1.25

0.5
0

2.19

t1

t2

t2

t3

Time (s)

3) Advantages and disadvantages of successive-approximation ADC.

ADVANTAGES
1) No clock signal is used because no
timing or sequencing required

2) The conversion time between output


digital with respond to the anlog
input is very short if low bits.
Therefore the propagation delay also
to short.

DISADVANTAGES
1) Higher bits more numbers of resistor
and OPAMP will use. The circuits
more become complexity but binary
output more accurate
2) The cost will increase for high bits
3) Long propagation delay for high bits
4) Slow a bit.

SIMULATION

1) Vin = 1V

2) Vin = 1.5V

3) Vin = 2V

4) Vin = 2.5V

5) Vin = 3V

6) Vin = 3.5V

7) Vin = 4V

PRACTICAL (LABVIEW)

1) Vin = 1V

2) Vin = 1.5V

3) Vin = 2V

4) Vin = 2.5V

5) Vin = 3V

6) Vin = 3.5V

7) Vin = 4V

ANALYSIS

Analog to digital conversion is an experiment to prove the successive


approximate method during practical. The ADC0804 which is CMOS circuit is
really sensitive to static voltages. The instrument must be calibrated properly to
avoid from error occurred. The important used of ADC is because to convert from
analog signal to digital. Besides, the nature signal is in analog form so it is
required to change into the digital form as the computer only can read 1s and 0s.

For theoretical, the calculation of ADC has been calculated. The


number of decimal places of the value obtained is important because it will affect
the result. It is recommended to use at least 4 decimal place when taking the
results calculated. Or else can take 7 decimal places of value obtained. The
calculated results has been compared with simulation and practical. The simulation
and practical is exactly same. But the problem is the calculation. The value of
decimal places taken affect the result of binary number. To avoid that thing
happen, the last value will take approximately same with the value compared. For
example in the calculation.
Let X=2V
Test

Voltage

Check

Opt.

ok

X 2.5
reject

ok

X 2.5 1.25

2.5

No
Reject 2.5

1.25

Yes
Retain 1.25

1.875

Yes
Retain
0.625

2.1875

No
Reject
0.3125

2.03125

No
Reject
0.15625

1.9531

Yes
Retain
0.078125

reject

ok

ok

reject

ok

reject

reject

ok

reject

reject

ok

reject

reject

ok

reject

reject

reject

ok

ok

1.9921875

Yes
Retain
0.0390625

reject

ok

reject

reject

reject

ok

ok

2.0117175

No
Retain
0.0195312
5

X 2.5 1.25 0.625

ok

X 2.5 1.25 0.625 0.3125

reject

ok

X 2.5 1.25 0.625 0.3125 0.15625

reject

reject

ok

X 2.5 1.25 0.625 0.3125 0.15625 0.078125

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625

X 2.5 1.25 0.625 0.3125 0.15625 0.078125 0.0390625


ok

0.01953125

The actual digital output is read from MSB to LSB.


Therefore ,
2V = 011001102 (active high)
= 100110012 (active low)

If the LSB used exactly same with the X=2V, the binary output will be 1. Hence, the value
obained is 011001112 (active high) and 100110002 (active low). The disadvantage of this
method is the LSB will affect the output produced. Same output produced in simulation
method and practical:

Although there is problem in calculation which is LSB, the problem can be overcome which
used the value same with the voltage comparison. As the example used 2V as comparison
voltage, the last calculation in table will produced 2V.

CONCLUSION

To conclude, the objective of the experiment has been achieved as the ADC circuit
has been proved in all method calculation, practical and simulation. The experiment is really
helpful to encourage students to do a lot of research and troubleshoot the problem occured.
The ADC is really sensitive and need properly circuit construction. The application of ADC is
worldwide as it is important in used of phone conversation which the voice is an analog signal
is convert into digital. The communication between phone and phone switches is done
digitally. The other application is an audio CD, what the CD player is doing is reading digital
information stored on the disc and converting it back to analog so the music can be heared.
The used of digital is important to minimise the noise and the data compression capability
such as WinZip to shrink down the file size

APPENDIX

Figure 1: Circuit Construction

Figure 2: 5 volt is supply to the ADC

Figure 3: 0 volt is supply to the ADC

Figure 4: 1 volt is supply to the ADC

Figure 4: 1.5 volt is supply to the ADC

Figure 5: 2 volt is supply to the ADC

Figure 6: 2.5 volt is supply to the ADC

Figure 7: 3 volt is supply to the ADC

Figure 8: 3.5 volt is supply to the ADC

Figure 9: 4 volt is supply to the ADC

Você também pode gostar