table of contents - produktinfo.conrad.com · 3 1.0 introduction to virtualbench virtualbench is a...
TRANSCRIPT
2
Table of Contents
1.0 Introduction to VirtualBench ............................................................................................................................................ 3
1. 1 VirtualBench in the Laboratory .................................................................................................................................... 3
1.2 VirtualBench Specifications ........................................................................................................................................... 4
1.3 Introduction to VirtualBench Getting Started Guide Lab Exercises .............................................................................. 7
1.4 Multisim Circuit Simulation in the Laboratories ........................................................................................................... 7
2.0 Using the Digital Multimeter and Function Generator ..................................................................................................... 8
2.1 Reviewing the Circuit Theory With Simulation ............................................................................................................. 8
2.2 Component Demonstration ........................................................................................................................................ 11
Exercise 2.1: Measuring Resistance .............................................................................................................................. 13
Exercise 2.2: Measuring DC Voltage ............................................................................................................................. 14
Exercise 2.3: Measuring AC Voltage .............................................................................................................................. 16
Exercise 2.4: Calculating Power .................................................................................................................................... 18
2.3 Interface Theory .......................................................................................................................................................... 19
3.0 Function Generator and Mixed-Signal Oscilloscope ....................................................................................................... 22
3.1 Reviewing the Circuit Theory With Simulation ........................................................................................................... 22
3.2 Component Demonstration ........................................................................................................................................ 27
Exercise 3.1: Building the Amplifying Circuit and Measuring Waveform Amplitude ................................................... 27
Exercise 3.2: Building the RC Circuit and Measuring 10%-90% Rise Time of Waveforms ............................................ 36
3.3 Interface Theory .......................................................................................................................................................... 42
4.0 Programmable DC Power Supply .................................................................................................................................... 43
4.1 Reviewing the Circuit Theory With Simulation ........................................................................................................... 43
4.2 Component Demonstration ........................................................................................................................................ 45
Exercise 4.1: Using the MSO and DC Power Supply ...................................................................................................... 47
4.3 Interface Theory .......................................................................................................................................................... 51
3
1.0 Introduction to VirtualBench VirtualBench is a radically practical approach to instrumentation. By combining the most essential instruments into one device, VirtualBench integrates with PCs and tablets to offer a convenient yet powerful solution for measurement and instrumentation. It opens up new possibilities for how engineers can interact with and automate benchtop test equipment through an intuitive user interface that works across the PC and iPad. VirtualBench includes a mixed-signal oscilloscope, a function generator, digital I/O, a digital multimeter, and a DC power supply all inside a single device for educators and researchers.
1. 1 VirtualBench in the Laboratory
VirtualBench is designed for measurement, instrumentation, and electronics laboratories at colleges and universities. With the compact form factor of VirtualBench, students can use a mixed-signal oscilloscope, function generator, DMM, and DC power supply in electronics labs as part of electrical, computer, and mechanical engineering curricula. In the next chapters, review a few standard examples to discover how you can take advantage of VirtualBench instruments to effectively teach in an electrical and computer engineering laboratory setup.
Figure 1.1. Introduction to VirtualBench
4
1.2 VirtualBench Specifications Note: Find detailed specifications in the specification document. Refer to this document for triggering options, USB and wireless connectivity, calibration information, and operation/safety requirements. Specifications are valid following 30 minutes of warm-up and for a typical temperature of 25 °C unless otherwise noted.
The following sections offer a quick overview of the hardware specifications for the various VirtualBench instruments. 1.2.1 Mixed-Signal Oscilloscope
Figure 1.2. Mixed-Signal Oscilloscope
Analog Channels: 2 Bandwidth: 100 MHz Maximum Sampling rate: 1 GS/s for 1 channel and 500 MS/s per channel Digital Channels: 34 Measurements
o Oscilloscope Time: Period, frequency, positive duty cycle, negative duty cycle, positive pulse width, negative pulse width, rise time, fall time, rise rate, fall rate
o Oscilloscope Voltage: High, low, amplitude, maximum, minimum, peak-to-peak, overshoot, undershoot, RMS, mean, cycle RMS, cycle mean
o Logic Analyzer Time: Period, frequency, positive duty cycle, negative duty cycle, positive pulse width, negative pulse width
o Math: A+B, A-B, A*B, FFT
5
1.2.2 Function Generator
Figure 1.3. Function Generator
Channels: 1 Waveforms: Sine, square, triangle, and arbitrary Update rate: 125 MS/s
1.2.3 Digital I/O
Figure 1.4. Digital I/O
Channels: 8 Logic Level
o Input: 5 V TTL o Output: 3.3 V TTL
6
1.2.4 Digital Multimeter
Figure 1.5. Digital Multimeter
Functions: AC/DC voltage, AC/DC current, resistance, diode Resolution: 5½ digits Sample Rate: 5 S/s
1.2.5 DC Power Supply
Figure 1.6. DC Power Supply
Outputs
o 0 V to 6 V/0 A to 1 A o 0 V to 25 V/0 mA to 500 mA o 0 V to -25 V/ 0 mA to 500 mA
7
1.3 Introduction to VirtualBench Getting Started Guide Lab Exercises
The VirtualBench Getting Started Guide includes three example exercises to help you learn the basics of VirtualBench and integrate its unique capabilities into your laboratory. These three exercises, outlined below, are common in an introductory analog circuits class. Note that these exercises are designed to help you gain a better understanding of how to operate the VirtualBench device. Section 2: Take Circuit Measurements With the Digital Multimeter and Function Generator In this exercise, simulate and physically build a resistive circuit to compare theoretical and actual power measurements. The section includes using the following:
Function generator to provide both DC and AC signals Digital multimeter to calculate DC and AC power
Section 3: Function Generator and Mixed-Signal Oscilloscope
In this exercise, simulate and physically build an amplifier and RC circuit to compare theoretical and actual behavior. The section includes using the following:
Function generator to alter the type of input applied to the physical circuit Power supply to power the physical circuit Oscilloscope to acquire and analyze the output waveform
Section 4: Programmable DC Power Supply
In this exercise, simulate and physically build the amplifier circuit from exercise 1 to compare theoretical and actual behavior when using selected values for the DC power supply. The section includes using the following:
Power supply to power the physical circuit with selected DC power Function generator to supply a waveform to the physical circuit Mixed-signal oscilloscope to monitor the input and output of the physical amplifier circuit
1.4 Multisim Circuit Simulation in the Laboratories
Throughout these laboratories, discover how you can use circuit simulation as part of your teaching approach. All circuit topologies are defined and simulated using Multisim, an integrated schematic capture and SPICE simulation environment developed specifically for educators and students. For more information on Multisim, view ni.com/multisim. Download a free evaluation at ni.com/multisim/try.
8
2.0 Using the Digital Multimeter and Function Generator
VirtualBench includes a 5½-digit digital multimeter (DMM), which is capable of taking voltage, resistance, and current
measurements, as well as a function generator (FGEN) that can output both AC and DC signals. In this section, use both
the DMM and FGEN to explore taking power measurements of a resistive circuit.
Learning Objectives: You will understand these core concepts for VirtualBench after completing the activities in this
chapter:
1. How to generate both DC and AC signals using the FGEN
2. How to calculate DC and AC power with the DMM
3. When to take RMS measurements
2.1 Reviewing the Circuit Theory With Simulation
Follow along with these simulation experiments by using file VirtualBench Section 2_DMM and FGEN Resistor
Network.ms13.
To calculate the power drawn by a circuit, measure two of the following three characteristics: voltage, current, or
resistance. Of these three measurements, voltage is the easiest to measure since you can measure the voltage across
your power source. From Kirchhoff’s law, you know that this is equivalent to the voltage drop across your entire circuit.
Next, you can decide whether it is easier to calculate the resistance of your circuit or take a current measurement. Since
taking current measurements involves breaking the circuit into sections to measure the current flowing through each
branch, it is often easier to measure the total resistance of the circuit instead.
Now that you have decided to calculate power by taking voltage and resistance measurements, consider the circuit in
Figure 2.1.
Figure 2.1. Resistive Network Schematic in Multisim
9
In this circuit, you have several resistors in a series parallel combination. Though you can calculate the effective
resistance of the circuit, you would find it tedious, especially when you have to consider the tolerance values of each
resistor. Instead, use the DMM to measure the total resistance of the circuit as show in Figure 2.2.
Figure 2.2. DMM Resistance Measurement With 5 Percent Tolerances
Using the DMM, you can easily view the actual resistance of your circuit quickly without having to conduct several
calculations and tolerance estimations. The total resistance according to Figure 2.2 is 176.855 Ω.
Once you have taken your resistance measurement, you can take your voltage measurement. When taking voltage
measurements with a DMM, consider whether your source is AC (alternating current) or DC (direct current) and set your
DMM to the correct mode. For this chapter, use an FGEN as your voltage supply and take the measurement using your
DMM as shown in figures 2.3a and 2.3b.
10
Figure 2.3a. Multisim Circuit Simulation With DC Voltage Measurement
Figure 2.3b. Multisim Circuit Simulation With AC Voltage Measurement
11
Once you have both your voltage and resistance measurements, you can then calculate power using the formula below:
where P represents power, V represents the measured voltage, and R is the measured resistance. Table 2.1 lists your
results based on the circuit in Figure 2.3.
Average Power
Measured Resistance Measured Voltage Voltage Source
141 mW 176.85 Ω 5 Vdc 5 Vdc (DC)
17.7 mWrms 176.85 Ω 1.768 Vrms 5 Vpp at 60 Hz (AC)
Table 2.1. Multisim Circuit Simulation Results
2.2 Component Demonstration
Follow these steps to calculate the power measurements of a resistor network using the VirtualBench DMM and FGEN.
Parts List
One BNC-to-alligator cable
Two DMM probes
One breadboard
Eight 47 Ω 5 percent tolerance resistors
Three 1 kΩ 5 percent tolerance resistors
Build the resistor network: Refer to the schematic diagram and example breadboard layout shown in figures 2.4 and
2.5. The resistor network requires the following connections to VirtualBench:
1. R1 -> FGEN positive lead (red/gray wire in Figure 2.5)
2. R1 -> DMM positive probe (dark red wire in Figure 2.5)
3. R11 -> FGEN negative lead (black/gray wire in Figure 2.5)
4. R8 -> DMM negative probe (black wire in Figure 2.5)
12
Figure 2.4a. Resistor Network Schematic: XMM1 Represents the DMM and XFG1 Represents the FGEN
Figure 2.4b. Resistor Network Circuit on Breadboard
13
Figure 2.5. Physical Circuit Connections to VirtualBench
Run the VirtualBench Application
Follow these steps to use the VirtualBench device to measure resistance, DC voltage, and AC voltage.
Exercise 2.1: Measuring Resistance
1. To take your resistance measurement, first disconnect the positive and negative leads of the FGEN from your
resistor network as shown in Figure 2.6.
Figure 2.6. Physical Circuit Connections for Resistance Measurement
14
2. Configure the DMM to take resistance measurements. First set the DMM measurement mode to “Resistance.”
After setting the measurement mode, next you need to set the range of the measurement; if the range is too
small, your results will be railed, but if the range is too large, your results might not have enough precision. From
the simulation results in Table 2.1, you know that the total resistance is around 175 Ω; therefore we need to set
the range to 1 kΩ. Figure 2.7 shows the DMM configuration.
Figure 2.7. Configuring DMM for Resistance Measurement, 1 kΩ Range
3. Measure the resistance by connecting the positive probe to the positive lead of resistor R1 and the negative
probe to the negative lead of resistor R10. Record your measured resistance in the field below.
a. Total Resistance (measured):_______________________
Exercise 2.2: Measuring DC Voltage
When measuring voltage, the DMM takes several measurements over a period of time and averages the results to get a
single value. This increases the accuracy of the device and averages out any noise on a signal. The VirtualBench DMM
provides up to 5½ digits of resolution.
1. Connect the positive lead of the FGEN to the positive lead of resistor R1 and the negative lead of the FGEN to
the negative lead of resistor R8 as shown in Figure 2.5.
2. The VirtualBench FGEN can output ±12 Vdc. In this exercise, use the FGEN to output a DC signal of 5.00 Vdc.
Figure 2.8 shows the FGEN with these settings configured.
15
Figure 2.8. FGEN Configured for DC Voltage With 5.00 Vdc Offset
3. Configure the DMM to take a voltage measurement. Set your DMM measurement mode to “DC Voltage.” After
setting the measurement mode, you will need to set the resistance. From the simulation results in Table 2.1, you
know that the voltage should be around 5 V. Therefore, set the range to 10 V, which allows you to capture the
measurement without any voltage saturation.. Figure 2.9 shows the DMM with the proper mode and range
configured.
Figure 2.9. DMM Configured for DC Voltage Measurements With 10 V Range
4. Enable the FGEN output by clicking the FGEN power button shown in Figure 2.10.
16
Figure 2.10. FGEN Output Enabled
5. Measure the voltage by connecting the positive probe to the positive lead of resistor R1 and the negative probe
to the negative lead of resistor R10 (refer to Figure 2.5 for connections). This measures the voltage drop across
the entire circuit. Record your measured voltage in the field below.
a. Total DC Voltage Drop (measured):_______________________
6. After taking the voltage measurement, turn off the FGEN by pressing the power button to disable the output.
Exercise 2.3: Measuring AC Voltage
In the previous exercise, you measured a DC (direct current) signal. These signals are relatively stable and unchanging
with respect to time. You do not need to use any special techniques to measure them.
Comparatively, an AC (alternating current) signal does periodically oscillate over time. Since AC signals vary over time, it
is more useful to talk about average voltage measurements and power levels.
If you tried to take a regular average of an AC signal, you notice that no matter how you change the amplitude, you
always see a measurement close to 0 V. This happens because, as mentioned above, an AC signal alternates periodically
over time and any measurement that averages over time cancels out.
To take a proper voltage reading of an AC signal, an averaging method known as the root mean square (or RMS) value is
commonly used. In electrical engineering, the RMS value of a periodic current can be considered as the DC voltage that
delivers the same average power to a resistor as the periodic current. Now, consider a periodic sine wave of the form:
where a represents the amplitude and f represents the frequency of the sine wave. The RMS value is then given by the equation below:
again, where a is the amplitude of the sine wave. Now repeat the measurements you made earlier with RMS
measurements and an AC signal.
17
1. The VirtualBench FGEN can output ±12 Vpp at a maximum frequency of 20 MHz. In this exercise, use the FGEN
to output an AC sine wave with 5 Vpp at 60 Hz with no DC offset voltage. Figure 2.11 shows the FGEN with these
settings configured.
Figure 2.11. FGEN Configured for 60 Hz, 5 Vpp, 0 DC Offset, Sine Wave
2. Now change the DMM measurement mode from DC Voltage to AC Voltage. This configures the DMM to take
RMS measurements instead of regular averaging. From your simulation, you know that the expected voltage is
around 1.768 Vrms. Therefore, set your DMM to the 10 V range. Figure 2.12 shows the DMM configured for
taking AC voltage measurements in a 10 V range.
Figure 2.12. DMM Configured for AC Voltage Measurements With 10 V Range
3. Enable the FGEN output.
4. Measure the RMS value of the voltage drop (Vrms) of your AC-powered circuit and record it in the field below:
a. Total AC Vrms (measured):_______________________
18
5. Disable the FGEN output.
Exercise 2.4: Calculating Power
Using the equation for power and your results from the previous exercises, calculate the power drawn by the circuit
when using a DC and an AC signal source. Fill in Table 2.2 with your results.
Average Power Measured Resistance Measured Voltage Voltage Source
DC signal source
AC signal source
Table 2.2. Measured Circuit Results
Recall that at the beginning of this section, you saw a similar table using a simulated circuit. How do your measurements
compare with the measurements made on the simulated circuit? Are they approximately equal or are they different?
Why do you think this happens?
Expected Results
From the three measurement exercises, you should expect the following results:
Exercise 2.1: The resistance measurement should be very close to the simulated resistance measurement.
Exercise 2.2: The DC voltage measurement should be significantly lower than the simulated DC voltage
measurement.
Exercise 2.3: The measured RMS voltage should be significantly lower than the simulated RMS voltage
measurement.
Exercise 2.4: Since power is directly proportional to voltage, the calculated average power should be less than
the average power calculated with the simulated results.
Observed Results
Figure 2.13 shows the different measurement results from the three measurement exercises.
Figure 2.13. (a) Measured Resistance, (b) Measured DC Voltage, and (c) Measured AC Voltage
19
Measured Average Power
Simulated Average Power
Measured Resistance
Simulated Resistance
Measured Voltage
Simulated Voltage
Voltage Source
86.5 mW 141 mW 176.6 Ω 176.85 Ω 3.909 V 5 V DC signal source
10.8 mWrms 17.7 mWrms 176.6 Ω 176.85 Ω 1.381 Vrms 1.768 Vrms AC signal source
Table 2.3. Observed Measurements Versus Simulated Measurements
Table 2.3 compares the simulated results versus some test measurements. As expected, the measured results match the
expected results. The measured voltage measurements are about 78% of the simulated voltage measurements and the
measured power calculations are about 61% of the simulated power calculations. Do your results match these test
results? In your opinion, what causes this voltage difference?
2.3 Interface Theory
Comparing your observed results with your simulated results, you can see that the two measurements are off by a
significant amount of voltage. If you just consider the case where you used a DC signal source, you provided 5 V to the
circuit but only measured 3.91 V across your circuit. Where did your missing volt go? Kirchhoff’s voltage law states that
the directed sum of the voltages around any closed circuit has to be zero; therefore the missing volt was most likely
dropped across some other element.
From your results, you know that 3.91 V is dropped across your measured 176.6 Ω in the resistor network. Since there is
no other resistive element in your resistor network that you have not accounted for with your measured resistance,
there must be another resistive element in between your resistor network and your signal source. In this case, you are
using the VirtualBench FGEN as your signal source. Figure 2.14 shows a portion of the FGEN specifications document.
Figure 2.14. VirtualBench FGEN Specifications
From Figure 2.13, you can see that the FGEN has several different waveforms, can update at a rate of 125 MS/s, and has
14 bits of resolution. However, for your circuit, the most important specification is the output impedance. The
VirtualBench FGEN has an output impedance of 50 Ω, meaning that any circuit powered by the FGEN would have to add
50 Ω to the total resistance. If you go back to your simulated circuit to model the FGEN correctly, you need to add a 50 Ω
resistor in series with the rest of the resistor network as shown in Figure 2.15.
20
Figure 2.15. Circuit Model Corrected for FGEN Output Impedance
Just considering the case where you used a DC signal source, you can now simulate the circuit again. Figure 2.16 shows
the results of your new circuit model.
Figure 2.16. DC Voltage Measurements of the Corrected Circuit Model
From Figure 2.16, you can see that you now measure 3.898 V across your simulated circuit, which is much more aligned
with the measurements that you took with the DMM (3.909 V). Repeating the same process with your AC signal (5 Vpp,
60 Hz sine wave), you can see from Figure 2.17 that you now measure 1.378 Vrms across your simulated resistor network,
which is again closer to the actual value you measured with the DMM.
21
Figure 2.17. AC Voltage Measurements of the Corrected Circuit Model
Table 2.4 shows the simulated measurements of the corrected circuit and your actual measurements side by side. The
measurements are now closer to what you expected to see. If you would like to verify these results for yourself, please
use the VirtualBench Section 2_DMM and FGEN Resistor Network Corrected.ms13 file.
Simulated Voltage (Corrected)
Measured Voltage Voltage Source
3.898 V 3.909 V DC signal source
1.378 Vrms 1.381 Vrms AC signal source
Table 2.4. Corrected Circuit Voltage Measurement Comparisons
To conclude, when using any signal source, always check for any output impedance when modeling the source.
22
3.0 Function Generator and Mixed-Signal Oscilloscope
VirtualBench contains both a function generator (FGEN), which is capable of producing standard patterns such as sine, triangle, and square waves, as well as a mixed-signal oscilloscope (MSO), which can capture acquired records of various waveforms.
The FGEN is capable of producing sine waves with a frequency of up to 20 MHz at a maximum voltage of 12 V into a high-load impedance. The MSO has a 1 MΩ input impedance, a maximum input range of 40 Vpp, and an analog bandwidth of 100 MHz (with a sample rate of 1 GS/s).
These two VirtualBench instruments are useful for instructors, students, engineers, and scientists for generating controlled signals and taking measurements in circuits and measurements laboratories.
Learning Objectives: You will understand these core VirtualBench concepts after completing the activities in this
chapter:
1. How to generate sine, square, and triangle patterns using the FGEN 2. How to take acquired records with the oscilloscope (MSO) and analyze waveform characteristics such as
amplitude and rise time
3.1 Reviewing the Circuit Theory With Simulation
Follow along with these simulation experiments by using these files: VirtualBench Section3_Amplifying Circuit
Design.ms13 and VirtualBench Section3_RC Circuit Design.ms13.
An operational amplifier (op-amp) is a high-gain voltage amplifier with a differential input and a single-ended output. Op-amps produce output potentials that are typically hundreds or thousands of times greater than the potential difference between their input terminals. They can be used for several different types of applications, from simply amplifying voltage signals to inverting voltage signals to even acting as voltage followers. In this chapter, build a non-inverting amplifying circuit to take oscilloscope measurements of a waveform amplitude. Also create an RC circuit to measure rise time.
Before building the circuits, first simulate them using Multisim as shown in figures 3.1–3.3.
23
Figure 3.1. Multisim Non-inverting Amplifying Circuit
In Figure 3.1, you can see a positive and negative power supply, which is necessary to allow the op-amp circuit to provide a negative voltage at its output. You can also see that the circuit has two resistors: R1 (1 kΩ) and R2 (100 Ω).
As configured, this op-amp should present a voltage at its output (V Out) that is (1+ R1/R2) times greater than the voltage at input (V In). Because R1 is 10 times greater than R2, the output should be approximately 11 times greater than the input. Therefore, a sine wave with peak input voltage of 100 mV should yield a sine wave with the same frequency and a peak voltage of 1.1 V at V Out.
Because this result is theoretical, you should expect something slightly different when dealing with a real circuit. Fortunately, Multisim simulations take a number of these nonideal factors into account when simulations are performed. Examine this during the discussion of the results presented from the virtual oscilloscope in the Multisim simulation as seen in Figure 3.2.
24
Figure 3.2. Multisim Oscilloscope Capture and Results for Amplifying Circuit
In Figure 3.2, the peak voltage read at Channel_A is the input voltage with a value of 98.125 mV. This value is not quite the 100 mV peak you specified because Multisim takes into account a small voltage drop at the scope input. Also see that Channel_B contains a peak voltage of 1.080 V. This represents the voltage at V Out. When you divide 1.080 V by 98.125 mV, you get 11.006. This is close to the gain of 11 that you previously calculated.
Next simulate an RC circuit to apply a lowpass filter to the output voltage. See Figure 3.3 for the layout of this circuit.
25
Figure 3.3. Multisim RC Circuit
In this circuit, the FGEN output is a square wave with an amplitude of 5 V and a frequency of 100 Hz. At the output of the FGEN, there is a 1 kΩ resistor in series with a 1 µF capacitor. This series RC circuit increases the time constant of the circuit.
This means that the 10%-90% rise time of the square waveform, as measured across the capacitor, will be increased.
The time constant, τ=RC, of this circuit has a value of approximately 1 ms. You know that the 10%-90% rise time of a square waveform can be characterized by the following equation: tr ≈ 2.2τ.
This means that the 10%-90% rise time of the output should approximately be equal to 2.2 ms. In Figure 2.4, you have taken an oscilloscope capture of the circuit simulation.
26
Figure 3.4. Multisim Oscilloscope Capture and Results for RC Circuit
As shown in Figure 3.4, you can use horizontal cursors T1 and T2 to find the 10% and 90% levels on Channel B as accurately as possible. Since the maximum level is 5 V, these values should be 500 mV and 4.5 V, respectively. However, because the scope horizontal resolution is limited, you had to align the cursors as close as possible to these values at 558.929 mV and 4.490 V. Taking the time difference between these two cursors, you can see that the 10%-90% rise time is approximately 2.121 ms. This value is very close to the estimate of 2.2 ms.
27
3.2 Component Demonstration
Follow these steps to use the VirtualBench FGEN and MSO to implement the previous simulated circuits in real life. Build the previously investigated circuits (figures 2.1 and 2.3) to do this.
Parts List
One UA741CN op-amp
One 1 µF capacitor
Two 1 kΩ resistors
One 100 Ω resistor
Jumper wires (multiple)
One breadboard
Running the VirtualBench Application
Follow the steps in the two exercises to use VirtualBench to generate and acquire different waveforms as well as analyze the various waveforms.
Exercise 3.1: Building the Amplifying Circuit and Measuring Waveform Amplitude
1. Configure the breadboard layout and VirtualBench connections for the amplifier circuit as explained in the “Build the amplifier circuit” section below.
Build the amplifier circuit: Refer to the schematic diagram (Figure 3.5), example breadboard layout (Figure 3.6), and example VirtualBench connections (Figure 3.7). The amplifier circuit requires the following connections to the VirtualBench device:
Figure 3.5. Amplifier Circuit Schematic
28
Connect the V_POS (pin 7 of op-amp) to the +25 V supply of the VirtualBench power supply (red wire on breadboard)
Connect the V_NEG (pin 4 of op-amp) to the -25 V supply of the VirtualBench power supply (light green wire on breadboard)
Connect the GND of the ±25 V supply to the ground of amplifier circuit (black wire on breadboard)
Place R1 (1 kΩ) between V Out (pin 6 of op-amp) and pin 2 of the op-amp (teal and purple jumper wires on breadboard)
Place R2 (100 Ω) between junction connecting R1 to op-amp pin 2 and ground
Connect V In (pin 3 of op-amp) to the positive output from the VirtualBench FGEN (yellow wire on breadboard); connect negative output from FGEN to ground (black wire on breadboard)
Connect the output from the VirtualBench FGEN to the CH1 of the VirtualBench MSO (yellow wire on breadboard)
Connect V Out (pin 6 of op-amp) to the positive input on CH2 of the VirtualBench MSO (blue wire on breadboard)
Connect the negative input on CH1 of the VirtualBench MSO to ground (dark green wire on breadboard)
Connect the negative input on CH2 of the VirtualBench MSO to ground (dark green wire on breadboard)
Figure 3.6a. UA741CN Connection Diagram
29
Figure 3.6b. Breadboard Layout for Amplifier Circuit
Figure 3.7. Physical Circuit Connections to VirtualBench for Amplifier Circuit
30
2. Launch the application. 3. Enable channels 1 and 2 of the MSO by clicking the square icons next to the channel names. Set the vertical
settings for each channel to 500 mV/div.
Figure 3.8. Disabled MSO Inputs (left) and Enabled Inputs (right)
4. Configure the MSO to have Normal record acquisition and set the horizontal timing to 10 ms/div (both shown in Figure 3.9). Configure the Trigger Type to Edge, the Channel Source to 1, and the Edge Detection to Rising (as shown in Figure 3.10). Finally, set the Trigger Level to 0 V (as shown in Figure 3.11).
Figure 3.9. Configuring MSO Record Acquisition Mode and Horizontal Timing Settings
Figure 3.10. Configuring MSO Trigger Type, Source, and Detection Edge
31
Figure 3.11. Configuring MSO Trigger Level
5. Turn on the DC power supply outputs by clicking the on/off button at the bottom of DC power supply segment. Configure the -25 V supply to supply -5 V. Configure the +25 V supply to supply 5 V. Set the current outputs on both supplies to 0.5 A.
Figure 3.12. Configuring DC Power Supply
6. Turn on the FGEN output by clicking the on/off button at the top of the FGEN segment. Set the output frequency to 100 Hz. Set the amplitude to 0.2 Vpp and the DC offset to 0 V. Set the output waveform to be a sine wave.
32
Figure 3.13. Configuring Function Generator
7. You should now see that there are two signals in the MSO display. The channel 2 signal should be higher than the channel 1 signal. Verify that your signals look like the ones in Figure 3.14.
33
Figure 3.14. MSO Display With Signals Active
8. Now that you have achieved the two signals you were looking for, you need to configure measurements on the two signals. Select the icon in the MSO display that looks like a meter stick to choose which measurements to perform on the waveforms acquired by the MSO.
Figure 3.15. Opening the MSO Measurements Toolbar
34
9. In the Measurements toolbar, configure Amplitude and High measurements under the Voltage category for both channels 1 and 2. Once you have selected these items, they should remain visible at the bottom of the MSO display until you deselect them.
Figure 3.16. Configuring Amplitude Measurements on Both Channels
10. Make note of the amplitudes for channels 1 and 2 as well as the highs for channels 1 and 2. Divide the amplitude on channel 2 by the amplitude on channel 1.
a. Gain of Circuit—Channel 2/Channel 1 (measured):_______________________
Is this value close to the gain of 11 that you predicted earlier? Note that it is not exactly 11. This is because of imperfections in the op-amp as well as the nonzero tolerances of the resistors. 11. Observe how the gain changes when you configure a square or triangle FGEN output instead. You can change
the output waveform type by pressing the icons at the bottom of the FGEN segment. The amplitudes and gains should still be similar to what they were with the sine wave output.
Figure 3.17. Square and Triangle Wave Outputs
35
12. Export the VirtualBench data to a .CSV file by clicking the “Export Data” icon shown in Figure 3.18. Alternatively,
you can export the data by navigating to File»Export Data.
Figure 3.18. Export Data Icon
Expected Results
In theory, you should have expected an analog gain of exactly 11, according to the equation for op-amp gain. This should remain true whether you are generating a sine, square, or triangle wave.
Observed Results
In reality, you did not get these results exactly, especially when generating a square or triangle wave. This is ultimately because of the real-life performance of the op-amp as well as the nonzero tolerances of the resistors used to determine the V Out/V In ratio.
Note, however, that the observed gain should be within ±10 percent of the expected gain.
36
Exercise 3.2: Building the RC Circuit and Measuring 10%-90% Rise Time of Waveforms
1. Configure the breadboard layout and VirtualBench connections for the RC circuit as explained below. Refer to the schematic diagram and example breadboard layout (Figure 3.19) as well as the example connections to VirtualBench (Figure 3.20).
Figure 3.19a. RC Circuit Schematic
Figure 3.19b. Breadboard Layout for RC Circuit
The RC circuit requires the following connections to the VirtualBench device (Figure 3.20):
Connect the positive output from the VirtualBench FGEN to the positive end of R1 (1 kΩ) (red wire on breadboard)
Connect the positive end of C1 (1 µF) to the negative end of R1
Connect the negative end of C1 to ground
Connect the negative output from the VirtualBench FGEN to ground (black wire on breadboard)
Connect the positive input from CH1 of the VirtualBench MSO to the positive end of R1 (yellow wire on breadboard); connect the negative input from CH2 of the MSO to ground (green wire on breadboard)
Connect the positive input from CH2 of the VirtualBench MSO to the positive end of C1 (blue wire on breadboard); connect the negative input from CH2 of the MSO to ground (green wire on breadboard)
37
Figure 3.20. Physical Circuit Connections to VirtualBench for RC Circuit
2. Launch the VirtualBench application.
3. Enable channels 1 and 2 of the MSO by clicking the square icons next to the channel names. Set the vertical settings for each channel to 5 V/div. Configure an offset of 7.5 V for channel 1 and an offset of -7.5 V for channel 2.
38
Figure 3.21. Configuring Vertical Settings for MSO
4. Configure the MSO to have Normal record acquisition once a trigger is received. Also set the Horizontal timing to 10 ms/div. Configure the Trigger Type to Edge, the Channel Source to 1, and the Edge Detection to Rising. Also set the Trigger Level to 1 V.
39
Figure 3.22. Configuring MSO Horizontal and Trigger Settings
5. Turn on the FGEN output by clicking the on/off button at the top of the FGEN segment. Set the output frequency to 100 Hz. Set the amplitude to 5 Vpp, the DC offset to 0 V, and the duty cycle to 50%.
40
Figure 3.23. Configuring FGEN
6. You should now see that the MSO display contains two signals. The signal for channel 2 should be distorted compared to the channel 1 signal. Instead of appearing as a clean square wave, it is rounded.
41
Figure 3.24. MSO Display With Signals Active
7. Now that you have achieved the two signals you are looking for, you need to configure measurements on the two signals. Again, do this by selecting the icon in the MSO display that looks like a meter stick (as in Figure 3.15).
8. In the Measurements toolbar, configure a Rise Time measurement under the Time Category for both channels 1 and 2. Once you have selected these items, they should remain visible at the bottom of the MSO display until you deselect them.
Figure 3.25. Configuring Rise Time Measurement on Both Channels
9. Make note of the 10%-90% rise times for channels 1 and 2. a. 10%-90% Rise Time (measured) :_______________________
Are these values close to your theoretical calculations from the previous section? If you remember that the 10%-90% rise time on the output should be approximately 2.2 ms, you should notice that the rise time of the signal on channel 2 is close to the value of 2.2 ms that you anticipated.
10. Export the VirtualBench data to a .CSV file as shown in Figure 3.18.
42
Expected Results
In theory, you should have expected a 10%-90% rise time of 0 s on the input signal from the FGEN (channel 1). You should have also read a 10%-90% rise time that is approximately 2.2 ms as measured across the capacitor (channel 2).
Observed Results
In reality, you got something close to the expected value for 10%-90% rise time as measured across the capacitor (channel 2). Of course, your observed value was not exactly 2.2 ms, but this was because of nonzero tolerances in the 1 kΩ resistor and 1 µF capacitor as well as your use of an equation for rise time that is an approximation based on the RC time constant.
3.3 Interface Theory
Comparing your observed results with your simulated results for both application circuits, you can see that you were fairly close to achieving your expected results with the physical circuits and VirtualBench. As noted previously, the small differences from observed to simulated and expected results are because of the nonideal nature in real-world devices.
With this in mind, instructors, students, engineers, and scientists should feel comfortable moving forward with first selecting components to realize an application circuit, then simulating the circuit, and finally interfacing with it using the various functions of the VirtualBench device, such as the FGEN, MSO, and DC power supply.
Now you can begin to design and test more complicated circuits that use operational amplifiers, capacitors, resistors, inductors, or active components such as diodes and transistors.
43
4.0 Programmable DC Power Supply
VirtualBench includes a programmable DC power supply with three independent channels capable of providing 0 V to 6
V at 1 A, 0 V to 25 V at 500 mA (isolated), and 0 V to -25 V at 500 mA (isolated). You can modify the power levels of each
channel through the VirtualBench application or the NI-VirtualBench driver API. Figure 4.1 shows the VirtualBench DC
power supply connector.
Figure 4.1. VirtualBench DC Power Supply Connector
Learning Objectives: You will understand these core VirtualBench concepts after completing the activities in this
chapter:
1. How to modify the selected values for the DC power supply
2. How to generate a signal using a function generator
3. How to observe circuit response by using an oscilloscope
4. How to export data to a .CSV file
4.1 Reviewing the Circuit Theory With Simulation
Follow along with these simulation experiments by using file VirtualBench Section4_Voltage Level Detector
Simulation.ms13.
A voltage level detection circuit uses an operational amplifier (op-amp) as a comparator that compares an input voltage
(V_IN) to a reference voltage (V_REF), as shown in Figure 4.2. The oscilloscope response is shown in Figure 4.3. The input
to the circuit is a 10 Hz, 5 V sine wave (V_IN).
44
Figure 4.2. Multisim Circuit Simulation
Figure 4.3. Multisim Circuit Simulation Results (response above, stimulus below)
45
4.2 Component Demonstration
Follow these steps to demonstrate the correct operation of an op-amp and the VirtualBench DC power supply, function
generator (FGEN), and mixed-signal oscilloscope (MSO).
Parts List
One UA741CN op-amp
One breadboard
Jumper wires
Build the interface circuit: Refer to the schematic diagram (Figure 4.4) and recommended breadboard layout (Figure
4.5) as well as the VirtualBench setup (Figure 4.6).
Figure 4.4. Demonstration Circuit for Op-Amp
The interface circuit requires the following connections to the VirtualBench device.
Op-amp positive power supply -> DC power supply +25 V pin
Op-amp negative power supply -> DC power supply ground pin
Op-amp noninverting input (V_in) -> FGEN positive lead
Op-amp inverting input (V_ref) -> DC power supply +6 V pin
Op-amp inverting input (V_ref) -> MSO CH 1
Op amp output (V_out) -> MSO CH 2
MSO CH 1 ground -> DC power supply signal ground
MSO CH 2 ground -> DC power supply signal ground
46
Figure 4.5. UA741CN Connection Diagram
Figure 4.6. Physical Circuit Connections
47
Exercise 4.1: Using the MSO and DC Power Supply
1. Enable Channel 1 and Channel 2 in the MSO section by clicking the square icon next to the channel names.
Figure 4.7. MSO Probes Disabled (left) and Enabled (right)
2. Set DC power supply settings:
a. +6 V rail: 2 V
b. +25 V rail: 5 V
c. -25 V rail: 0 V
3. Enable the DC power supply by clicking the DC power supply power button on the VirtualBench application.
Figure 4.8. DC Power Supply Settings Enabled
4. Set FGEN settings:
a. Frequency: 10 Hz
b. Amplitude: 5 Vpp
c. DC offset: 2.5 V
d. Shape: Sine wave
5. Enable the FGEN by clicking the FGEN power button on the VirtualBench application.
48
Figure 4.9. FGEN Settings Enabled
6. Scale the horizontal settings of the MSO display to accurately represent the frequency of the signal. For a 10 Hz
stimulus signal, MSO horizontal settings set to 50 ms/, as shown in Figure 4.10, produce a clear and well-spaced
waveform.
Figure 4.10. MSO Horizontal Settings
49
7. Observe the MSO readings, specifically the shape and range of the output signal.
8. Enable the cursors by clicking the cursor icon shown in Figure 4.11. The cursor menu provides the user with the
option to select the measurement type and channel. Measure the maximum and minimum values of the output
signal and record the voltage levels in the fields below.
a. Square Wave Peak Voltage (V): _______________________
b. Square Wave Minimum Voltage (V): _______________________
Figure 4.11. MSO Cursor Menu
9. Export the VirtualBench data to a .CSV file by clicking the “Export Data” icon shown in Figure 4.12. Alternatively,
you can export the data by navigating to File»Export Data.
Figure 4.12. Export Data Icon
50
Expected results: Channel 1 of your MSO should display the 10 Hz sine wave being fed to the V_in pin of the op-amp,
while channel 2 should display a square wave resulting from the voltage level detector circuit (V_out).
Whenever the sine wave, observed on channel 1 of the MSO, is below 2 V, then you should expect the signal observed
on channel 2 of the MSO to be at 0 V. Alternatively, whenever the sine wave is above 2 V, then you should expect the
signal observed on channel 2 of the MSO to be at 5 V. Ideally, the high values are exactly 5 V, the low values are exactly
0 V, and the rise/fall times of the stimulus signal are minimal.
Observed results: The op-amp used is not capable of pulling the output to the exact values supplied to the V_supply ±
inputs. Therefore, in the output waveform (V_OUT), you may observe a high value of approximately 4.5 V and a low
value of approximately 1.5 V, as shown in Figure 4.13. For most digital input devices, logic low levels tend to be 0 V to
0.8 V, which would cause your signal to be incorrectly interpreted.
Therefore, to create an output signal that abides by typical logic level definitions, you should set the negative V_supply
input to something lower than 0 V, for example -1.25 V. This causes the voltage level detector to pull the output closer
to 0 V when the stimulus signal is lower than the 2 V reference voltage, as shown in Figure 4.14.
Figure 4.13. Raw Physical Circuit Test Results
51
Figure 4.14. Physical Circuit Test Results With Modified Supply Voltage
4.3 Interface Theory
Without a feedback mechanism, the op-amp acts as a comparator. The inverting input (V_ref) serves as a reference
voltage to compare the noninverting input to (V_in).
If V_in is above V_ref, then the output (V_out) saturates to the op-amp’s positive power supply (+5 V). Otherwise,
V_out saturates to the op-amp’s negative power supply (0 V).
This circuit is extremely simple, and the behavior near 2 V cannot be guaranteed. Most digital systems have
indeterminate ranges in which the correct interpretation of the digital state is not guaranteed. Different standards exist,
each with their own logic level ranges.
In your circuit, the voltage level detector circuit built in Section 4.2 simply reads in an analog signal and saturates to near
0 V or near 5 V, depending on whether the input is less than 2 V or higher than 2 V.
©2014 National Instruments. All rights reserved. Multisim, National Instruments, NI, ni.com, and VirtualBench are trademarks of National
Instruments. Other product and company names listed are trademarks or trade names of their respective companies.