Southern IllinoisUniversity - Carbondale

Department of Technology

Electrical Engineering Technology Program

ET 438b

Sequential Digital Control and Data Acquisition

Automated Frequency Response Testing Project Design Document

Table on Contents

Project Overview

Organization, Management, and Evaluation of the Project

Task List

Technical Details of the Project

Graphical User Interface (GUI) and Displayed Variables:

Data Acquisition Board General Specifications

Task 1 - Function Generator Voltage-to-Frequency Characteristic

Objective

Procedure

Linear Least-Squares Curve Fitting

Desired Results

Table 1-1 Range 1 Data

Table 1-2 Range 2 Data

Table 1-3 Range 3 Data

Task 2 -Construction of Test Amplifier

Objective

Procedure

Task 2 Amplifier Measurements

Task 3-Input Voltage RMS Conversion and Scaling

Objective

Design Criteria

Task 3 Lab Measurements

Table 3-1 Input Voltage Scaling Test

Table 3-2 Input Voltage Frequency Response

Task 4-Output Voltage Scaling and RMS Conversion

Objective

Design Criteria

Desired Results

What to Present for Evaluation

Task 4 Lab Measurements

Table 4-1 Output Voltage Scaling Test

Table 4-2 Input Voltage Frequency Response

Table 4-3 Input Voltage Frequency Response

Table 4-4 Input Voltage Frequency Response

Task 5 – Design of a Sinusoidal Voltage-Controlled Oscillator (VCO)

Technical Details and Desired Results

Task 5 Supplement

Task 5 Lab Measurements

Table 5-1 Harmonic Distortion Levels

Table 5-2 Total Harmonic Distortion Calculation

Task 6-Frequency-to-Voltage Conversion of Input Signal

Objective

Prelab Preparation

Technical Specifications and Design Alternatives

Analog Frequency-to-Voltage Conversion

Design Note Concerning Accuracy

For Alternative 1: Analog Frequency-to-Voltage Conversion

Desired Results

What to Present for Evaluation

For Alternative 2: Frequency Measurement Using Digital Counters

Desired Results

Task 6 Lab Measurements

Table 6-1 – Range 1 Measurements

Table 6-2 – Range 2 Measurements

Table 6-3 – Range 3 Measurements

Task 6 Lab Measurements

Table 6-1 – Range 1 Measurements

Task 6 Lab Measurements

Table 6-2 – Range 2 Measurements

Table 6-3 – Range 3 Measurements

Task 7-User Interface and Data Conversion Using LabVIEW

Objective

Prelab Preparation

Basic Control Process Steps for Data Acquisition Software

Desired Results

What to Present for Evaluation

Introduction

The first half of the semester will be the study of physical variable measurements, the conversion of these measurements to digital signals, and the recording of these measurements. A computer-based data collection system will be used to demonstrate the concepts presented in the lecture. This system consists of computer hardware and software that allows the developer to input both analog and digital information and then output digital control signals to implement on/off control. The digital outputs can also be used to drive a digital-to-analog converter chip for reproduction of analog signals.

The project selected for implementation is a automated frequency response testing system. This system can be used to check the frequency response of small-signal amplifiers and audio power amplifiers. The project will make use of commercial test instruments and custom designed analog and digital circuits to bring signals into the system and output control signals to the equipment under test (EUT). A high level data flow programming language will implement the user interface and computations required. Figure 1 shows the basic block diagram of the desired system.

Figure 1. Block Diagram of the Frequency Response Testing System.

Project Overview

A single chip voltage control oscillator (VCO) is the signal source for the frequency response testing system. This device will be provided along with application notes that show typical designs. The VCO input can take either an ac or dc voltage that will change the frequency of the output voltage depending on the magnitude of the VCO input. An analog control signal will be sent from the controlling PC to the VCO such that the VCO frequency will vary over a range of 20 Hz - 20 kHz. The input voltage level from the VCO is set manually, but must be monitored by the data acquisition system. This is a sinusoidal signal that must be scaled and modified to within the range of the acquisition hardware analog inputs. The output voltage of the equipment under test is also monitored by the system. This signal must also be scaled to be within the physical limits of the data acquisition hardware provided. The frequency from the function generator must be measured. Additional signal conditioning will be necessary to convert this variable into a range of voltages that is compatible with the hardware. The frequency measurement will be done on the input of the equipment under test (EUT).

Software will be written so that the incoming signals will correctly represent the actual physical measurements. It is necessary to convert the sine input signals into RMS voltage levels. This can be done using a combination of analog signal conditioning and software, or be done totally in software. The software should convert the input and output voltage readings into a gain, given in decibels, for the y-axis of the frequency response plots. The values of frequency and decibels collected from the test will be stored to a file on the PC as well as being displayed both graphically and numerically on the tester's user interface. Simple on/off controls will allow the user to start the test. This control will be implemented in software.

Organization, Management, and Evaluation of the Project

This project’s size dictates that it be done as a group effort over several weeks during the semester. The groups will consist of 3 to 4 people. The initial schedule for the construction, testing and documentation of this project will be 10 weeks. This is not a long time! The only way that this project can be completed satisfactorily is for project to be divided into subsystems with different members of the group working on the parts. The course instructor has identified different tasks and design milestones that must be finished to complete the project. These subsystems can be considered as individual labs, but will not be reported in the traditional way since the outcome of this exercise is the design and documentation of the overall system. The group members are responsible for the division of the tasks among themselves. These assignments will then be given to the course instructor and laboratory T.A. These assignments must be turned in by the second lab meeting of the semester. Individuals assigned these subtasks will be required to provide documentation to demonstrate their progress at regular intervals throughout the semester. The type of documentation and demonstration will depend on the task. The requirements for the successful completion of the task will be described later. The individual and group grade will be determined by a combination of overall group performance and the individual's performance within the group. How well the individuals and groups meet the requirements for each of the task and integrate these stages into a complete system will also determine the student's grade.

Task List

The major subtasks for the completion of the automated testing project are listed below. These tasks outline one method for the completion of the design. The technical details for the tasks are given later. Material presented in the lecture and during discussions in lab meetings will provide the group members with the background knowledge necessary to complete these tasks. Some of the tasks can be completed with the knowledge and skills that are expected for a course of this level. It may also be necessary for the persons of the group to use their own initiative to find solutions to problems that are not listed here. This may require using their own design ideas and researching topics. If a group or one of its members has excessive difficulty in completing the task(s), they should notify the course instructor or lab T.A. This is a design project, so asking people who have more experience to troubleshoot or help with an unforeseen problem of the design is encouraged.

Task 1-Voltage Control Oscillator Voltage-to-Frequency Characteristic: Use multimeters, dc power supplies, digital scopes, and the lab designed VCO to determine the voltage/frequency characteristic of the sinusoidal sources. This information will be used to determine the gain of the function generator so that the control level from the automated test system can be determined. Use least-squares curve fitting to find the equation that describes the data. Develop a LabVIEW virtual instrument to control the analog output and send a voltage to the VCO.

Task 2-Construction of Test Amplifier: Design and build the equipment under test for use with the automated test setup. The EUT for the design will be a simple two stage OP AMP circuit that will have a low frequency cut off, high frequency cut off and a mid-band gain given as design parameters. A circuit simulation or actual lab test should be performed on the design to determine its operation before it is used in the automated test setup. Test data taken in this task are compared to the automated system.

Task 3-Input Voltage RMS Conversion and Scaling: Design a scaling circuit for the acquisition of the input voltage ac signal. Signal conditioning will include the hardware and/or software necessary to convert the voltage into a value that can be used in a decibel calculation. A LabVIEW program will display of the circuits output on a PC.

Task 4-Output Voltage RMS Conversion and Scaling: Design a scaling circuit for the acquisition of the output voltage ac signal. Signal conditioning will include the hardware and/or software necessary to convert the voltage into a value that can be used in a decibel calculation. A LabVIEW program will display of the circuits output on a PC.

Task 5-Design and Test of Voltage Control Oscillator: Design a VCO that takes a dc voltage input within the range of the data acquisition board's analog output and has an output frequency of 20 Hz to 20 kHz in three ranges. These ranges are: 15-400 Hz, 150-4000 Hz, and 2000-40,000 Hz. The VCO output should be a low distortion sine wave that has a range of 10 mV to 10 V peak.

Task 6-Input Frequency Measurement: Determine how to make frequency measurements using the available inputs and outputs of the data acquisition hardware. Option 1: Consider using a linear IC that converts the frequency to an analog voltage (LM2907 or equivalent). The design should include three ranges that accurately cover the output ranges of the VCO design in Task 5. A LabVIEW program will control the ranges and display the measured frequency on a PC.

Option 2: Use the digital counters in the data acquisition board to measure frequency. This option requires signal conditioning of a sine or square wave into a TTL signal level. It also requires the creation of LabVIEW software to access the hardware and convert the counter readings into frequency.

Task 7-User Interface Design: Design a program in LabVIEW that implements the functions of the automated test system. Develop the program that will collect the data, display the information on the user interface, and save the results to disk using the data collection software provided. Create the user interface based on given specifications. This task must use scaling information from all the tasks above to displaycorrectly the information to the user. A working knowledge of the data collection software must be developed.

Technical Details of the Project

Generate frequency response curves for an electronic amplifier circuit by using an automated test setup to change the frequency of a function generator chip while measuring the input and output voltages. The frequency response tester will produce a graph of the results as the measurements are being made. Save the data to a disk file for further processing.

Input Maximum Voltage: 250 mV peak ac (set manually to 200 mV before testing starts)

Input Voltage Tolerance: ± 5%

Output Maximum Voltage:12.5 V peak ac (varies with frequency response of EUT, 10 V peak is the maximum mid-band value)

Output Voltage Tolerance: ± 5%

Power Supply minimum voltages: 15 Vdc

FrequencyRange:20 - 20 kHz

Desired frequency test points ( ±10%)

20 Hz, 40 Hz, 80 Hz, 160 Hz, 200 Hz, 400 Hz, 800 Hz, 1,200 Hz, 1,600 Hz, 2,000 Hz, 4,000 Hz, 8,000 Hz, 10,000 Hz 12,000 Hz, 16,000 Hz, 20,000 Hz.

Graphical User Interface (GUI) and Displayed Variables:

The GUI for the frequency tester is shown in Figure 2. This interface can be easily constructed using the LabVIEW software installed on the computers with the data acquisition systems.

Figure 2. GUI for Frequency Response Tester.

The testing will start when the on/off switch is turned to the "on" position. The data collection program will then run until the last data point, 20,000 Hz, is collected. The RMS value of the input and the output voltage will be displayed on the screen.

The current test frequency will also be displayed on a digital display. The desired and the measured frequencies will be displayed for each test frequency. A percent error calculation will be made and displayed at each test frequency. As the frequency increases through all the ranges, an indicator will light to show the frequency range used.

When the test is completed the, frequency and dB will be displayed on graph. An LED will be activated to show that the test is completed. The frequency axis (x-axis) must have a logarithmic scale. The gain, in dB, and frequency data will also be saved to disk.

Data Acquisition Board General Specifications

Two models of data acquisition boards exist in the laboratory computers. Check the model that in on the computer used for the project. They are both made by National Instruments (NI)

Model: NI 6024E

8 digital input/output points

16 channels of single-ended 12 bit analog input 250 kS/s

(Programmable input ranges ±0.05 to ±10 V)

200 kHz maximum sampling rate

2 analog outputs (±10 Vdc limits)

Model: NI 6221

24 digital input/output points

16 channels of single-ended 12 bit analog input 250 kS/s

(Programmable input ranges ±0.05 to ±10 V)

200 kHz maximum sampling rate

2 analog outputs (±10 V dc limits)

Task 1 - Function Generator Voltage-to-Frequency Characteristic

Technical Details and Desired Results

Objective

Use multimeters, digital scopes,dc power supplies and a single chip VCO function generator prototype to determine the voltage/frequency characteristic of a function generator.

Procedure

1.)Connect the VCO prototype to the power supply and check its functionality. Activate the lowest range by placing a voltage signal on the coil of the ranging relay. Connect a potentiometer to the input such that a variable dc voltage is developed across the VCO input. Adjust the frequency to a midrange value.

2.)Connect a multimeter to the output of the VCO prototype. With the multimeter set to ac, set the output level of the VCO to 141.4 mV RMS. Change the function of the multimeter to the frequency measurement mode or connect a scope with frequency measurement capabilities to measure the VCO output frequency

3.)Connect a multimeter to the wiper arm of the potentiometer so that the input voltage can be measured.

4.)Adjust the dc input at the wiper arm until the frequency reading matches each of the values listed in Table 1-1. Record the value of dc voltage that gives the desired frequency for every value in the table. Perform this experiment twice once for frequencies that start at the maximum value and are decreased by the VCO input, then for increasing values of frequencies.

5.)Adjust the range by disconnecting the voltage signal applied to the lowest range relay coil and reconnect it to the middle range. Repeat steps 2-4 and record the results in Table 1-2.

6.)Set the VCO to the highest range by disconnecting the voltage signal applied to the middle range relay coil and connecting it to the high range coil. Repeat steps 2-4 and record the results in Table 1-3.

7.)Write a LabVIEW program that will activate a digital output to energize the correct range and then output an analog voltage to control the frequency.

Linear Least-Squares Curve Fitting

Experimental data inherently has error. This error can be all associated with the dependent variable (y) of a graph. The actual relationship between the independent (x) and dependent variables is approximated by the measurements. A least-squares curve fit of the data estimates the actual relationship by minimizing the sum of the square of the errors between the measurements and the actual relationship. The equation for linear relationships in general form is:

where:m is the slope of the line

b is the y-intercept of the line

The following two equations find estimates of these parameters using the measured x and y values of the data set.

whereXi = the independent variable values of the data set,

Yi = the dependent variable values of the data set,

N = the number of measurements in the data set.

This gives two equations for the two unknowns m and b that can be solved using calculators or computer programs.

Desired Results

1.)Using the results in Tables 1-1, 1-2 and 1-3, construct three graphs of the voltage-frequency response of the function generator tested by plotting both the increasing and decreasing frequency voltage values on the same plot. Use Excel or MathCAD to produce the graphs. Place measured frequency on the y-axis and VCO voltage on the x-axis.

2.)Determine the maximum hysteresis of the readings by taking the difference between the decreasing frequency readings and the increasing frequency readings at the test frequencies.