Grand Valley State University
Padnos School of Engineering
EGR 345 Lab 2
10KW and 2KW resistors
One LED
2.
Procedure
2.1
Input Waveform
The
signal generator on the circuit trainer was connected to an analog input on the
DAQ board (ACH0) and the AIGND pin was connected to the ground of the circuit
trainer. A VI was created in LabVIEW to
input the waveform and display it on a waveform chart. This VI is shown in Fig. 1. The filename is lab2_2.VI.
Figure
1: LabVIEW program to input and display a waveform
Diagram:

Front Panel:

The
signal generator was set to output a low frequency sinusoidal waveform. The program in Fig. 1 was run and
observations were recorded.
2.1.1 Observations
Initially,
the waveform chart showed a sinusoid wave with the peaks and valleys cut
off. The output level of the signal
generator was reduced until the waveform appeared correctly with rounded peaks
and valleys.
2.2 Voltage Control
The
digital multi-meter’s positive lead was connected to the analog output pin
DAC0OUT (pin 10) on the DAQ card. The
negative lead was connected to the AGND (pin 11) pin. A LabVIEW program was created to control the voltage level of the
analog output. This program is shown in
Fig. 2. The filename is lab2_3.VI.
Figure
2: LabVIEW program to control voltage level
Diagram:
Front Panel:

The program in Fig. 2 was run, and the knob on the front panel was manipulated. The observations recorded are described in the next section.
2.2.1
Observations
As the knob was manipulated, the front panel meter read the same value as the knob. The digital multi-meter also read the same value as the knob, within .05 V.
2.3 Digital
Input/Output
For this portion of the lab, the circuits shown in Fig. 3 were constructed on the circuit trainer board and connected to the indicated pins on the DAQ card.
Figure 3: Digital Circuits. DAQ card pin #’s in parenthesis
Input: Output:
2K
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
+5V PB0 (22)
![]()
![]()
![]()
![]()
![]()
PA0 (14)
![]()
![]()
![]()
![]()
![]()
![]()
DGND (13)
![]()
DGND(13)
10K
The LabVIEW program shown in Fig. 4 was constructed and run.
Figure 4: LabVIEW Digital I/O program
Diagram:

Front Panel:
![]()
Observations were recorded as the program ran.
2.3.1
Observations
When this program was running, manipulating the toggle switch on the Front Panel to the “on” position caused the LED on the circuit board to light. When the switch on the circuit board was placed in the “on” position the light on the Front Panel lit up.
3. Conclusions
Through the completion of this lab exercise we have learned the basic tools necessary to perform data acquisition and control using a PC with LabVIEW software. Specifically we have learned how to use the analog and digital inputs on a DAQ card.