ENEE 206

April 20, 2004



Laboratory 18 - Analog to Digital Converters

A. Lab Goals

In this lab you will build and test simple A/D converters.

B. Background Reading

Look at the Web page and read over the data sheet for the DAC0807 D/A converter chip.

C. Definitions

D. Laboratory Equipment

Both an oscilloscope and a DLA will be used to measure the properties of the D/A and A/D converters built for this lab.

E. New Hardware

Two new chips will be used for this lab. The first is a quad D-flip-flop. The part number for this 16 pin device is 74175 and the pin diagram is given in Appendix C.

Positive-edge triggered D flip-flop 74175.

One clock controls all flip-flops. There is only one clear, which is active low and resets all flip-flops. There is no corresponding set function. Both the outputs and their complements are available as outputs.

The second chip is a pre-packaged D/A converter. The part number is DAC0807 and the pin out is given in Fig. 18.1b. The descriptions of the 16 pins are given below: Eight pins make up the digital number: N = A1A2.....A8 so A8 is the least significan digit and A1 is the most significant bit. The DAC0807 actually only has 7 bits of accuracy, so A8 is suspect. The DAC0806 has 6 bits of acuracy and the DAC0808 has a full 8-bits of acuracy (to 0.19%). The difference in the three units is primarily the price. Once the digital input levels change, it takes at most 150 ns for the analog output to settle to the new value. Pin 1 has no connection; the ground pin is self-explanatory. The limits on the positive and negative source voltages VCC and VEE are +18 V and -18 V, respectively. The operation of the compensation pin is beyond the scope of this course. The two reference voltages Vref+ and Vref- are used to define a precision reference current to which the output signal is "tied". The output signal is actually the current which comes out of pin 4.

A simplified internal schematic of the DAC0807 is given in Fig. 18.1.
The reference current is generated in the lower circuit. The 8 digital inputs each drive a current switch. These switches are connected at varioous points along an R-2R ladder to povide the sources which will generate the proper output current.

A typical connection for the DAC0807 is shown in Fig. 13.2.
The supply voltages are +/- 6 V. A 0.1 mF capacitor is placed between the compensation pin and VEE. The negative reference voltage (pin 15) is tied to ground through a 5 kW resistor. The output current is given by:
Io = -Iref(A1/2 + A2/4 + .... + A8/256).

The output current is connected to the inverting terminal of an op-amp. The terminal is at virtual ground, so the output voltage is just:
VD/A = 10(A1/2 + .... + A8/256) V.

F. Circuit Analysis

How can we actually build an A/D converter? One way is shown in Fig. 18.3.
The core of the A/D converter is a D/A converter. We could use the DAC0807 descibed in the previous section for high precision, or we could just use a simple D/A converter based on an R-2R ladder as we considered in Lab 10. A typical 4-bit D/A is shown in Fig. 18.4.
The non-inverting amplifier is connected to the passive D/A "output" to achieve the desired maximum output level and to provide isolation for the passive load. An alternative configuration for the D/A connverter would involve using the multiple source inverting amplifier described in the notes for Lab 16.
The "digital generator" circuit is simply a clock-driven divide-by-n counter that cylcles through all the possible input combinations (in increasing order).
Figure 18.5 shows the principle connections for a synchronous divide-by-256 counter. As the digital input of the D/A is cycled through all possible combinations, the analog output varies from zero up to its maximum value. What we want to do is to compare the analog signal we want to transform to a digital signal with the swept analog output from the D/A. When the two outputs are as close as possible, we want to output the digital number which produced the proper analog signal.

To simplify matters, we won't find the D/A output voltage which is larger than the analog signal. An op-amp hooked up as in Fig. 18.6, without any feedback branch, can provide the necessary signal.
Because of the high gain, whenever Vin > VD/A, the output VC' of the comparator will be saturated at -VEE. As soon as Vin < VD/A, the output VC' will swing up and be saturated at VCC. If we set VCC and VEE to be +6 V and -6 V respectively, we can't use the output of the op-amp directly as the clock for our hold circuit (which will be the 74175 D flip-flops) because we shouldn't put -6 V on the TTL chip. Instead we can use the diode resistor combination to clamp VC to at least -Vg. The resistor should be large enough so that the op-amp doesn't sink too much current when VC' is -6 V, but small enough so that VC is still clearly a logical one when VC' = +6 V.

The resulting signals for a 3-bit A/D converter are shown in Fig. 18.7.
VD/A steps repeatedly from zero to its maximum value. Vin is presumabley a constant (or at least slowly-varying) voltage. Whenever VD/A exceeds Vin, VC' transitions to positive saturation. Whenever VD/A resets to zero, VC' transitions back to negative saturation.

PSpice Simulation of 4-bit A/D Converter





G. Helpful Hints

  1. Because this lab report is turned in at the end of the lab, be absolutely certain that you have read entire lab handout carfully, so that you can finish everything on time.
  2. You may want to insert a buffer (2x7404 or 7407) between the compararor circuit ourput to the quad flip-flop.

Laboratory 18 Description - Analog-to-digital Converters

Objective:

To build simple A/D converters. For Lab 18A, design the 4-bit D/A converter (in part I) using a ladder and a non-inverting amplifier to adjust the gain. For Lab 18B, design the 4-bit D/A converter using only inverting and adder/summerr amplifiers.only


Available Hardware:

TTL component boxes - see Appendix G.

Pre-lab preparation:

    Part I - 4-bit D/A converter

  1. Design a 4-bit D/A converter using a resistor ladder. Assume that the voltage for a logical one is between 3.3 and 5 V and design an amplifier with a variable gain (via potentiometer) so that an input of "1111" results in an output volrage of 5 V and an input of "0000" results in a voltage of 0 V. Assume the op-amp supplies are +/- 6 V.
  2. Draw the wiring diagrm.
  3. Use PSpice to simulate the circuit. Use a divide-by-16 couter to drive the four inputs. Use a clock frequency of 1 kHz. Plot the analog inputs, the intermediate output signal, and the final output signal simultaneously.

    Part II - 4-bit A/D converter

  4. Design a 4-bit A/D converter that uses the D/A converter from Part I. Use a counter to generate the digital numbers, a register (or set of flip flops) to hold the result, and a comparator to generate the clock pulse. Note: the compatator output must be between -1 V and +6 V. Use a potentiometer attached to +5 V and ground to generate the input analog signal.
  5. Draw the wiring diagram.

    Part III - 7-bit D/A converter

  6. Look up the data sheet for the DAC0807 D/A chip via the web page. Modify the "typical application" figure so that an input of "1111111" results in an output of 5 V and an input of "0000000" resultls in an outout of 0 V.
  7. Draw the wiring diagram.

    Part IV - 7-bit A/D converter

  8. Design a 7-bit A/D converter that uses the DAC0807 D/A chip.
  9. Draw the wiring diagram. See a sample schematic diagram.


Experimental Procedure:

If this is the final experiment.......
During this experiment, be certain that you:

    Part I - 4-bit D/A converter

  1. Build the 4-bit D/A converter circuit. Drive the circuit with a 4-bit binary counter. Set the clock frequency from the Sync Out of the function generator to 1 kHz.
  2. Make a plot which shows the output voltage from the D/A converter and the clock signal used to drive the counter.

    Part II - 4-bit A/D converter

  3. Build the 4-bit A/D converter circuit.
  4. Adjust the analog input signal to Vino.
  5. Attach a copy of the oscilloscope plot which has the D/A output, the comparator output, and the analog input signal.
  6. Attach a copy of a digital logic analyzer output which shows the output from the counter and the output from the A/D.

    Part III - 7-bit A/D converter

  7. Build the 7-bit A/D converter circuit. Set the clock frequency to 16 kHz.
  8. Adjust the analog input signal to Vino.
  9. Attach a copy of the oscilloscope plot which has the D/A output, the comparator ooutput, and analog input signal.
  10. Attach a copy of a digital logic analyzer output which shows the output from the counter and the output from the A/D.

Post-lab analysis:

If this is your final lab ...
If this is not your final experiment, perform the post-lab analysis as usual and turn in your lab report the following week.
Generate a lab report "following" the sample report available in Appendix A. Mention any difficulties encountered during the lab. Describe any results that were unexpected and try to account for the origin of these results (i.e. explain what happened>. In ADDITION, answer the following questions:

    Part I - 4-bit D/A converter

  1. What are the ACTUAL values of the resistances used in your D/A converter? How do the actual values effect the analog output voltages of the S/A?
  2. How might one improve the performance of the D/A converter?
  3. How do the measured results compare with the PSpice simulations?

    Part II - 4-bit A/D converter

  4. Given a digital output of m + 3, what is the estimate of the analog voltage input and what is the uncertainty? Get your answer from the measurements and not from the ideal model.
  5. Can you get the comparator output to "malfunction"? If so how?
  6. What are the comparator output voltages for both cases (when the analog signal is larger than and smaller than the D/A output)?

    Part III - 7-bit A/D converter

  7. What has the better resolution, the DAC0807 or the oscilloscope screen? Justify (quantify) your answer.
  8. What are the digital outputs (according to the DLA) that correspond to the input voltages listed to the right? Vin = 0.1 V, 1.0 V, 1.6 V, 2.8 V, 3.3 V, 4.1 V, 4.9 V.

    Part II or III - A/D converters

  9. Besides the D/A converter, how might one improve the performance of the A/D converter?

    Part II and III - A/D converters

  10. Compare the performance of the two D/A converters.




University of Maryland