PTI Section 9 Analog Digital

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Section 9: Analog and Digital Combinations

Section Contents
This section contains the following:
• “Introducing Mixed Circuits” on page 9-2
• “Processing Analog Input to Digital and Back” on page 9-3.

Worksheets in this Section


The worksheets in this section start on page 1 of Worksheet 9-1:
• “Worksheet 9-1: Analog to Digital Conversion (ADC)”
• “Worksheet 9-2: Digital to Analog Conversion (DAC)”.

Circuits for this Section


The following is a list of the file names of circuits used in this section and a brief description of each.

File (.ms10) Description


ADC-DAC A complete A/D and D/A circuit sampling; reconstructing a sine wave.
AnalogToDigital The Analog to Digital Converter.
Converter
DigitalToAnalog The Digital to Analog Converter.
Converter
9-2 Practical Teaching Ideas with Multisim

Introducing Mixed Circuits


In order to analyze control system technology, students must have exposure to combinations of
analog and digital circuitry. Multisim provides these combinations in its simulated environment.

The circuit files presented in this section include analog to digital conversion, digital to analog
conversion and analog to digital then back to analog conversion. The sample files,
AnalogToDigitalConverter.ms10, DigitalToAnalogConverter.ms10 and ADC-DAC.ms10 may be modified
to better suit your individual course requirements. DigitalToAnalogConverter.ms10 uses Multisim’s
Bus feature to make some of the wiring connections automatically before the circuit is completed. A
worksheet is provided for each file.

Goals
• to provide examples of digital and analog combined circuitry in a Multisim environment
• to introduce the 7-segment BCD display and the LED indicator.

Prerequisites
You will need the following circuit files:
• AnalogToDigitalConverter.ms10
• DigitalToAnalogConverter.ms10
• ADC-DAC.ms10.

Students are expected to have:


• A basic introduction of the operation of analog to digital to analog converters
• A familiarity with the Multisim environment including the use of assorted analog and digital test
equipment.

Relevant Worksheets
• “Worksheet 9-1: Analog to Digital Conversion (ADC)”
• “Worksheet 9-2: Digital to Analog Conversion (DAC)”.
Section 9: Analog and Digital Combinations 9-3

Processing Analog Input to Digital and Back

Application
This is similar to, but simpler than, circuits used for digital recording and playback for audio tape,
CDs and video.

Prerequisites
You will need file ADC-DAC.ms10.

Figure 9-1: ADC-DAC.ms10

Operation
• The Function Generator drives the SOC (start of conversion) and the rate at which the input
analog signal is sampled
• The digital value is shown (in hexadecimal) on the two 7-segment displays and fed to the Digital
to Analog converter for conversion back to analog.
9-4 Practical Teaching Ideas with Multisim

Procedure
1. Open file ADC-DAC.ms10.
2. With input potentiometer at 50%, calculate the value of the peak-to-peak analog input
voltage. (Show calculations.)

V(in) = ________ v(p-p)


3. Set the sample rate (Function Generator) to 1 kHz.
4. For an input frequency of 100 Hz, calculate the number of samples which will be taken of
each input cycle.
No. of samples = _________
5. Make a rough sketch, to time and amplitude scale, of the output waveform that will be
expected.

6. Set the sample rate and input frequency to the values used above and solve the circuit.
7. Sketch the output waveform.

8. Comment on the relationship between predicted and measured output.


Section 9: Analog and Digital Combinations 9-5

9. Experiment with this A-D and D-A process by changing the sample rate. (Leave input
frequency and amplitude as-is.) Comment on the relationship between sample rate and
"distortion" of the output waveform.

NI ELVIS Exercise
Starting Point

Create the circuit shown in ADC-DAC.ms10. There are many wires that connect to the ADC chip, so
use caution when connecting everything to this chip. Pay special attention to the order of the bits and
which of the 7-segment display driver chips you’re connecting them to.

Questions
There is one input and one output to this circuit. The voltage you use as an input should be seen on
the output wire since you are converting your input into digital and then converting that digital value
back to an analog value.

One thing you will notice in your output is stepping caused by the fact that your digital signal has a
set resolution. What size will the steps be? What could you do to decrease the size of the steps (a.k.a.
increasing your resolution)?
9-6 Practical Teaching Ideas with Multisim
Page 1 of 4

Worksheet 9-1:
Analog to Digital Conversion (ADC)

Name:__________________________ ID Number:___________________ Class:___________

Starting Point
Open file AnalogToDigitalConverter.ms10.

© 2007 National Instruments Corporation. Permission is granted to duplicate this page for classroom use.
Page 2 of 4 Worksheet 9-1

Notes
• A potentiometer provides the analog input. It represents any resistive sensor, which could be
sensing pressure, temperature, fluid level or any other parameter in a control system.
• Vin = (Digital output in DECIMAL)*Vref/256.
• Output is shown in binary by the LEDs and in hexadecimal by the 7-segment displays.
• Pressing the A key to increase input and pressing SHIFT-A to decrease input changes input. You
can also hover your cursor over the potentiometer and drag the slider bar that appears.
• Pulling the SOC terminal momentarily to ground by pressing the SPACE bar twice initializes SOC
(Start of Conversion). This is necessary each time the input is changed.

Questions
1. This is an 8-bit A/D converter. With a reference voltage of 5 V, what voltage does each bit in the
digital output represent? Show calculations.

2. If the digital output is 6F (hex), what is the value of the analog input? Show calculations.

© 2007 National Instruments Corporation. Permission is granted to duplicate this page for classroom use.
Worksheet 9-1 Page 3 of 4

3. Calculate the possible error to be expected for this A/D converter.

4. Make sure the SOC terminal is connected to Vcc (+5 V). Solve the circuit.

5. What is the digital output in hex?

a) Calculate the analog input voltage. Show calculations.

Vin = __________ V

b) The setting of the input potentiometer is _________%. From the pot setting, calculate the
analog input voltage.

Vin = __________ V

c) Compare the two readings. Are they within the expected error calculated above?

© 2007 National Instruments Corporation. Permission is granted to duplicate this page for classroom use.
Page 4 of 4 Worksheet 9-1

d) What is the input Voltmeter reading?

6. How do the calculated readings above compare with the reading of the Voltmeter? Comment.

7. Take several more readings for inputs at or below 1.0 V and above 4.0 V. Record all readings,
including the Voltmeter, and calculate the input voltages. Comment on the accuracy of the A/D
converter compared to the analog Voltmeter.

© 2007 National Instruments Corporation. Permission is granted to duplicate this page for classroom use.
Page 1 of 4

Worksheet 9-2:
Digital to Analog Conversion (DAC)

Name:______________________ ID Number:___________________ Class:_______________

Starting Point
Open file DigitalToAnalogConverter.ms10.

Notes
• Vin is set by switches A through H and is shown in both hex and binary
• The conversion reference is 10 V.

© 2007 National Instruments Corporation. Permission is granted to duplicate this page for classroom use.
Page 2 of 4 Worksheet 9-2

Before you begin this part of the lab you must place a bus in the workspace and make the appropriate
connections to it. To do this, select Place/Bus from the main menu. Left-click on the workspace
directly above the VADC IC. Drag the bus horizontally across until it is exactly parallel to the VADC
and double-click. Highlight the VADC by left-clicking on it. Select Place/Bus Vector Connect to make
the connections. The Bus Vector Connect dialog will appear. Highlight D0-D7 by highlighting D0
then pressing SHIFT-D7. Click the left down-arrow key to place all selected pins to the lower-left field
in the Bus Bus Vector Connect dialog box. Select Bus1 then click Auto-assign. Click OK to close the
dialog; the connections to the bus are made automatically. Click on each wire and change the color
according to the list provided in the Circuit Description Box.

Click on each color-coded wire and connect them to the appropriate bus connection according to the
following list: D0 connect to dark green; D1 connect to baby blue; D2 connect to brown; D3 connect
to pink; D4 connect to light green; D5 connect to blue; D6 connect to yellow; D7 connect to red

Run the simulation by clicking on the swich or selecting Simulate/Run from the main menu.

Questions
1. This is an 8-bit D/A converter. With a reference voltage of 10 V, what voltage does each bit
represent in terms of the analog output? Show calculations.

2. If the output is 3.62 V, what is the value of the digital input? Show calculations.

3. Calculate the possible conversion error to be expected for this D/A converter.

4. Comment on the relationship between reference voltage and accuracy of conversion.

© 2007 National Instruments Corporation. Permission is granted to duplicate this page for classroom use.
Worksheet 9-2 Page 3 of 4

Procedure
1. Open file DigitalToAnalogConverter.ms10.

2. Set the digital input to 38 in hex. Solve the circuit. Analog output is __________ V.
a) For the digital input used, calculate the analog outputs possible, considering the conversion
accuracy calculated above (up to three possible). Show calculations.

Vout = __________ V

Or
Vout = __________ V

Or
Vout = __________ V

b) Is the output reading within the expected error calculated above?

3. Take several more readings for inputs at or below 0F (hex) and above C0 (hex). Record all
readings.

4. Comment on the accuracy of the D/A converter.

5. Change the reference voltage to 5 V, make several readings as in step 2 and comment on the
effect of reference voltage on conversion accuracy.

© 2007 National Instruments Corporation. Permission is granted to duplicate this page for classroom use.
Page 4 of 4 Worksheet 9-2

© 2007 National Instruments Corporation. Permission is granted to duplicate this page for classroom use.

You might also like