EE 289 LAB 11
Testing Systems via VAB
Overview
Earlier you learned how to start VAB and open a worksheet. Today we are going to open several worksheets, each a different system, and investigate the systems. You will be asked to test each system with three different types of signals:
- Your voice,
- Your whistle (which is rather close to a sine wave), and
- Some music (music has a wider range of frequencies than your voice, so it is a better test of the system.)
All three of these inputs will produce a sound as an output; therefore, you will be using your ears to test the output. Listening is a good subjective way to test a system; however, we also need some objective way to measure the outputs. Then we are going to add a few blocks to the system that will visually display the signal. First we will look at how the amplitude of the waveform of your voice changes as time goes on, and then we will look at the frequencies in your voice.
Worksheets / DescriptionMic Speaker Display.Lst / See and hear your voice.
Freq Display.Lst / As above, but also shows the frequencies.
Simple Text Chat.Lst / IRC style communication over the internet
Camera Check.lst / Takes video input from the PC camera and displays it on the screen
Instructions
Start VAB and open Mic Speaker Display.Lst. You should see:
Figure 1: Seeing your Voice - DSP
The Microphone block ()and Speaker blocks () are the same as before. What has been added is a display. This display will show you how your voice signal changes with time. The left Buffer block () saves up some data and then moves it from the DSP board, through the parallel port, to the PC. The right Buffer block () saves up the data until there is enough to show on the display, then it sends it to the display. Click the Run button () and talk into the microphone. The picture above was taken while whistling. Notice that a whistle looks a lot like a cosine wave.
Controlling the display
If you talk or whistle loudly your display may look like:
Figure 2: VAB Display - Loud Whistling
You are getting a cosine wave. However, it is so big you can not see it all. Click the Scale button () to see the whole waveform. The Scale button automatically scales the display so the whole waveform is visible.
Figure 3: VAB Display - Scaled Waveform
Notice that the scale on the y-axis has changed. Now you can see what is happening. If your display is too small,
Figure 4: VAB Display - Low input signal
click the Scale button again.
Figure 5: VAB Display - Scaled Waveform
In this case the scale changed, but the waveform is still clipped. There was no talking or whistling at the time this picture was taken, so all we see is noise. When the Scale button was clicked it auto-scaled for the waveform that was present at the time, but being noise, another waveform was soon displayed, but this waveform had a larger peak so it was clipped.
If you click the Auto button () VAB will keep scaling the waveform as the signal comes in. Clicking the Auto button a second time will turn auto scaling off. It might be preferable to leave auto scaling off because if the waveform changes in size and not shape, the display will look much the same. The only thing that will change is the y-scale.
You may also notice that in the plot above, the 0 value of the y-axis is not in the middle. If you would like it there, even when auto scaling, click the Center button ().
Figure 6: VAB Display - Centered Waveform
It will keep 0 in the middle of the y-axis.
The Frequency button () will be discussed later.
Try the following input signals:
1.Talk and observe the waveform. What does it look like if you hold a vowel? Ahhhhhh. Try an f or an s. Do they look different than the vowel? Try singing. How does it look.
2. Try a vowel again and hold it by clicking on the Stop button (). Can you measure its period? If so, find the frequency by dividing 1 by the period (). You can use the calculator on the VAB command bar. Measure the frequencies of several people and fill in the chart below.
Name / Period / Frequency3. Finally try playing some music through the system. Play your favorite MP3 file on the host computer and run the output of the sound card to the input of the DSP board. Do you see differences in the display depending on the type of music that is playing? Give a description of the waveform for the following instruments.
Instrument / Description of waveformPiano
Guitar
Cymbal
Other
Frequencies: Yet Another Way to See Your Voice
Hearing a signal can tell you a lot about the signal. Seeing a time plot can tell you even more, but it is often not easy to see the tie between hearing the signal and seeing its time plot. In this final step we will look at a signal in yet another way, plotting its frequency content. Open Freq Display.Lst. You have to first press the Stop button () on the previous worksheet. You should see:
Figure 7: Seeing your Voice - Frequency display
The top display shows Input vs. time as before. The bottom display shows the frequency content of the signal. What is the frequency content? Try the following:
1. Hit the Run button () and whistle into the microphone. Be sure the wind from your mouth is directed away from the microphone, otherwise you will pick up the wind noise. Do you see a spike on the frequency display? (You might have to click the Scale button.) The left-right position of the spike tells the frequency of your whistle. What is the frequency?
2. Repeat the vowel experiment from above this time measuring the frequency with the frequency display and computing the period (). Fill in the chart below.
Name / Frequency / Period3. Try talking and playing music through the system. What do you observe?
Simple Text Chat
The final system to check is Simple Text Chat. It allows you to chat with one of your classmates running the same worksheet. Open it and you should see:
Figure 8: Simple Text Chat.Lst
Setting it Up
To run this worksheet, you will need a couple of things:
- Two computers connected to the internet or you schools LAN
- The IP address of both of the computers
To get your IP address, bring up a command prompt and type ipconfig. (Ask your teacher if you cannot find this). You should see something like:
Figure 9: IP Information in Windows
The numbers on the lines labeled ‘IP Address’ is your IP address which is used by the network to identify your computer (more on this in Chapter 8). Give this number to the student running the other computer and get theirs. Double click the Internet Transmitter block on your computer and enter the IP address of the computer you are sending to in the Address field.
Figure 10: Internet Transmitter Parameters
For the port, pick a number (say 768 or 1911) and enter it. Tell the student at the other machine this number also and get theirs (they should be different). Enter this number in the parameter box for your Internet Receiver block.
Run the worksheets on both computers and start typing. You should see what you type in the box labeled ‘Text Being Sent…’ and what the other group types in the box labeled ‘Text Being Received…’
Testing your camera
In addition to sound input, we would like to be able to examine and process visual inputs, such as still images and video. Using a PC camera, we can use pictures and video from our surroundings to do just that.
Before using your camera, be sure that it is connected to your computer and that all necessary software is installed. Once the camera is hooked up and ready to go, run the Camera Check.Lst worksheet to be sure that VAB can take in video from your camera and display it on your monitor. In addition to checking the PC camera setup, this worksheet introduces two important blocks for use with images: the Video Input block and the RGB display block.
Conclusion
We can test and build complex systems using VAB with minimal effort.
Copyright © 2002 The INFINITY Project