EENG 383
Lab 10 - Audio recording and playback
Requirements
Working in teams of two, read through the following lab activity and perform all the actions prescribed. You do not need to document bullet items. Make a record of your response to numbered items and turn them in a single copy as your teams solution on Canvas using the instructions posted there.
Include the names of both team members at the top of your solutions. Use complete English sentences when answering questions. If the answer to a question is a table or other piece of art (like an oscilloscope trace or a figure), then include a sentence explaining the piece of art. Only include your answers, do not include the question-text unless it is absolutely needed.
Objective
To familiarize you with the digital to analog (DAC) conversion method
that converts a PWM waveform into an analog waveform using a low
pass filter.
External Hardware
Take a moment to verify that the discrete component (capacitor and resistor)
values from the low pass filter schematic (shown below) match those found
on your development board.

Look at Figure 2 at the wikipedia page on the
Sallen–Key topology low pass filter. Note the wikipedia article
refers to corner frequency as f
o
- What is the calculated corner frequency of our (2nd order)
low pass filter?
- Draw a rough (theoretical) sketch of the frequency response graph
for our second order low pass filter using the graph below.

Finally, let's take a look at performance of the low pass filter
by plotting its frequency and phase response. In other words, let's
draw a Bode plot for the filter.
You are going to use a function generator to provide an input
signal to low pass filter on your development board. Be careful
otherwise you might damage your board. To start, you will want
to make sure that the sine wave that you will be feeding into the
LPF oscillates between 0V to 3.0V. The following image and
instructions will walk you through this process.
-
Connect a proper signal generator cable to the function generator
yellow BNC connector labeled "CH1",
-
If the [Sine] function key is not illuminated, press the [Sine] key
to illuminate it,
-
Press the [Amp] soft key twice to highlight "HiLevel",
-
Enter 3.0 on the numeric keypad, and then press the "V" softkey
-
Press the [loLevel] soft key once,
-
Enter 0 on the numeric keypad, and then press the "V" softkey
-
Press the [Freq] soft key once,
-
Enter 1.0 on the numeric keypad, and then press the "kHz" softkey
-
Connect a proper oscilloscope probe to the channel 1 input of
the oscilloscope. Adjust the vertical scale to 1V/div and the
horizontal scale to 500us, make sure that channel 1 is DC coupled,
and that the trigger level is around 1.65V,
-
Connect the function generator and oscilloscope cables, black clip
to black clip and red clip to scope probe,
-
Adjust the scopes so that they display frequency and the peak-to-peak
amplitude of the waveform.
- [Meas] → Clear Meas → Clear All
- [Meas] → Source → 1 →
- [Meas] → Type → Peak-Peak →
Add Measurement
- [Meas] → Type → Freq
- [↑ Back]
Note the items in red are paramount to the safety of your development board.
The setup image shown above, is a properly setup function generator.
If you are uncertain if your function generator is properly setup,
please call for verification,
You are now going to use the function generator to send sin waves with
varying frequencies into the LPF input and measure the amplitude and
phase shift of the output waveform. When you have set up everything
correctly it should look like the following picture. The steps in the
instructions will walk you though the setup.

- Install a jumper over the single RC2 pin of the "RC2/LPF_in" header
leaving the LPF_in pin available,
- Attach the black ground clip of the function generator to the ground
loop of the development board,
- Attach the red signal clip of the function generator to the LPF_in
pin of JP2. It may simplify things to use one of your jumper
wires.
| Ch1 probe | LPF_in on JP2 header
|
| Ch1 ground clip | Dev board ground loop
|
| Ch1 (scale) | 1V
|
| Ch2 probe | LPF_out on L2A header
|
| Ch2 ground clip | Disconnect
|
| Ch2 (scale) | 1V
|
| Horizontal (scale) | 1 ms
|
| Trigger mode | Auto
|
| Trigger source | 1
|
| Trigger slope | ↑
|
| Trigger level | 1.65V
|
- [Meas] → Type → Phase
- [Meas] → Setting → Source1: 2
- [Meas] → Setting → Source2: 1
- [Meas] → Add Measurement
- [Meas] → Type → Ratio - Full Screen
- [Meas] → Add Measurement
- [↑ Back]
- As the input frequency gets higher (around 2kHz) and the output
waveform decrease in amplitude, measuring the attenuation and phase change
will become almost impossible. When this happens:
- Switch channel 2 into AC coupling, by pressing the
channel 2 button and select Coupling: AC. Move the channel 2 ground
reference up to the middle of the upper half of the display,
- Use the acquire function to average together several
channel 2 waveforms. Acquire → AcqMode → Averaging
→ #Avgs: 128. You will notice that the waveform updates
occur much more slowly and morph whenever you change the
frequency. However, you will be able to measure incredibly
small amplitudes (down to about -60dB) in this mode,
Save the image on the screen
- [Save/Recall] → Save → Format
→ 24-bit Bitmap image (*.bmp)
- [Save/Recall] → Save → Press to Save
When you have your scope setup correctly, you should see something like the
following image.

- Include a screen shot with the function generator set to 500Hz. Make
sure that the screen shot includes the attenuation and phase measurements.
Now you are ready to collect the data to draw your Bode plot. Start by
downloading the filterWorkSheet.
Open the spreadsheet. Set the function generator to each frequency listed
in column B and record the gain and phase measured by the oscilloscope
in the columns "Meas Gain" and "Meas Phase" respectively. As you add
values you should see the Bode plots fill with data. If a cell in the
Freq column does not have an entry, find the frequency (by adjusting the
function generator) that generates the gain or phase listed in that row.
Note