analog – to – digital conversion

37
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.

Upload: arif-syazwan

Post on 27-Sep-2015

58 views

Category:

Documents


11 download

DESCRIPTION

Analog – to – Digital Conversion Lab report

TRANSCRIPT

INTRODUCTIONFor 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.Ananalog-to-digital converteris a device that converts a voltage to a digital number that can be read by digital system. The conversion involvesquantizationof 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. Ananalog-to-digital converter, or ADC, performs the former task while adigital-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 212possible 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 =

= 0.015625V=15milivoltsIt 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.

PROCEDURE1. 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.03. The circuit is design in graphical programming diagram and linked to personal computer by using interfacing LabVIEW

RESULTSNo.Input Voltage(Vin), VBinary Output

ExpCalSim

11.0001100112001100112001100112

21.5010011012010011012010011012

32.0011001102011001102011001102

42.5100000002100000002100000002

53.0100110012100110012100110012

63.5101100112101100112101100112

74.0110011002110011002110011002

Table 1.0: Results

CALCULATION1) Vin = 1VStep 1The maximum input voltage must be divided by two.

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

2.5No Reject 2.5 0

1.25No Reject 1.25 0

0.625Yes Retain 0.625 1

0.9375Yes Retain 0.31251

1.09375No Reject 0.156250

1.015625No Reject 0.0781250

0.9765625

Yes Retain 0.0781251

1.No Reject 0.03906251

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

2) Vin = 1.5VStep 1The maximum input voltage must be divided by two.

Therefore 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.5VTestVoltageCheckOpt.

2.5No Reject 2.5 0

1.25Yes Retain 1.25 1

1.875No Reject 0.625 0

1.5625No Reject 0.31250

1.40625Yes Retain 0.156251

1.484375Yes Retain 0.0781251

1.523438No Reject 0.03906250

1.5Yes Retain 0.019531251

The actual digital output is read from MSB to LSB.Therefore ,1.5V = 010011012 (active high) = 101100102 (active low)

3) Vin = 2VStep 1The maximum input voltage must be divided by two.

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

2.5No Reject 2.5 0

1.25Yes Retain 1.25 1

1.875Yes Retain 0.625 1

2.1875No Reject 0.31250

2.03125No Reject 0.156250

1.9531Yes Retain 0.0781251

1.9921875Yes Retain 0.03906251

2.0117175No Retain 0.019531250

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

4) Vin = 2.5VStep 1The maximum input voltage must be divided by two.

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

2.5Yes Retain 2.5 1

3.75No Reject 1.25 0

3.125No Reject 0.625 0

2.8125No Reject 0.31250

2.65625No Reject 0.156250

2.578125No Reject 0.0781250

2.5390625No Reject 0.03906250

2.51953125No Retain 0.019531250

The actual digital output is read from MSB to LSB.Therefore ,2.5V = 100000002 (active high) = 011111112 (active low)

5) Vin = 3VStep 1The maximum input voltage must be divided by two.

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

2.5Yes Retain 2.5 1

3.75No Reject 1.25 0

3.125No Reject 0.625 0

2.8125Yes Retain 0.31251

2.96875Yes Retain 0.156251

3.046875No Reject 0.0781250

3.0078125No Reject 0.03906250

3Yes Retain 0.019531251

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

6) Vin = 3.5VStep 1The maximum input voltage must be divided by two.

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

2.5Yes Retain 2.5 1

3.75No Reject 1.25 0

3.125Yes Retain 0.625 1

3.4375Yes Retain 0.31251

3.59375No Reject 0.156250

3.515625No Reject 0.0781250

3.4765625Yes Retain 0.03906251

3.5Yes Retain 0.019531251

The actual digital output is read from MSB to LSB.Therefore ,3.5V = 101100112 (active high) = 010011002 (active low)

7) Vin = 4VStep 1The maximum input voltage must be divided by two.

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

2.5Yes Retain 2.5 1

3.75Yes Retain 1.25 1

4.375No Reject 0.625 0

4.0625No Reject 0.31250

3.90625Yes Retain 0.156251

3.984375Yes Retain 0.0781251

4.0234375No Reject 0.03906250

4.00390625No Reject 0.019531250

QUESTIONS1) Resolution, quantization interval and quantization error:

= = 0.125

Quantization interval, Q:

Quantization error, Eq:

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

3) Advantages and disadvantages of successive-approximation ADC.ADVANTAGESDISADVANTAGES

1) No clock signal is used because no timing or sequencing required1) Higher bits more numbers of resistor and OPAMP will use. The circuits more become complexity but binary output more accurate

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.2) The cost will increase for high bits3) Long propagation delay for high bits4) 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=2VTestVoltageCheckOpt.

2.5No Reject 2.5 0

1.25Yes Retain 1.25 1

1.875Yes Retain 0.625 1

2.1875No Reject 0.31250

2.03125No Reject 0.156250

1.9531Yes Retain 0.0781251

1.9921875Yes Retain 0.03906251

2.0117175No Retain 0.019531250

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