One objective in this lab is to learn how to use the Fast Fourier Transform (FFT) capabilities of the oscilloscope to analyze the frequency content of signals. The other objective is to learn how to use the A/D and D/A capabilities in the labs. Finally, the design project for this course will be introduced.
A formal report is not required for this lab. However, before leaving lab today, you must demonstrate to the lab instructor that you can use the FFT on the oscilloscope and perform A/D and D/A conversion.
Begin by connecting the function generator to the oscilloscope. Set the function generator to produce a sine wave with amplitude 100 mV and frequency 1 kHz. Display the sine wave on the oscilloscope, and save this "time-domain" view of the signal as setup 1 using the SETUP key on the scope.
We can display the sine wave in the "frequency domain" using the FFT function on the oscilloscope. Instructions will be provided in lab. Familiarize yourself with the various items that can be specified for the FFT display, such as the scaling of the horizontal axis (frequency), and the format of the vertical axis (linear or logarithmic = dB). For the WINDOW option, please choose "Hanning." Save this "frequency-domain" view of the signal as setup 2. Now you can view signals in the time-domain by recalling setup 1, and setup 2 will produce a frequency-domain view of the signal.
Please do the following exercises.
The FFT is an important and useful tool to analyze the frequency content of signals. You should now be able to use the oscilloscope to perform the FFT operation.
Note: The DTMF code is for wireline phones. You may want to test your cell phone to see what tones are used when you dial.
Analog-to-digital (A/D) and digital-to-analog (D/A) conversion circuits are important in the analysis of signals and systems. The computers in Dana 307 contain Keithley A/D and D/A cards (some of the other EE labs have similar cards). We would like you to know how to use these cards with Matlab in case you need them for your design project in this course.
The following procedure is used for the Keithley cards.
>> ai=analoginput('keithley')The getsample command will get one sample. The getdata command will get a vector of NS samples. It is usually not necessary to use both commands.
The following Matlab function conveniently combines these commands:
get_sig.mTo run this function, save the get_sig.m file in your folder. Then from the Matlab command window, you can type, for example,
>> x = get_sig(2000, 4000);This will get 4,000 samples from the A/D card with sampling rate 2,000 samples per second.
>>ao=analogoutput('keithley')The putsample command will set the output to a constant value of level volts. The putdata command will output the data vector. It is usually not necessary to use both commands.
You can also use the soundcard on the PC to sample and output signals. These are most convenient for audio signals. You can access the soundcard from Matlab with the commands
>>ai=analoginput('winsound')Try to record a sentence using the soundcard and microphone, and then play the sound back at twice and one-half the original sampling frequency.
Browse Lab 7 and begin to formulate ideas for your design project. Please describe your plans for the project in lab on October 25 or 30.