Lab 5 Fall 2023
.pdf
keyboard_arrow_up
School
University of California, San Diego *
*We aren’t endorsed by this school
Course
170
Subject
Aerospace Engineering
Date
Dec 6, 2023
Type
Pages
11
Uploaded by GeneralFlowerDragon7
MAE 170 [FA23]: LAB 5
Scanned Measurements and Averaging: Characterizing the
Spatiotemporal Output of a Speaker (
and resulting acoustic wave
propagation
)
Submit your answers to the questions posed in this lab to gradescope and turnitin via
the Canvas course website by 11:59 pm (midnight) the evening before your next lab
section.
The short answer questions will be graded at this deadline
.
Points for the
technical writing section will be given assuming a reasonably complete first draft
is turned in.
The final grade for your technical writing component will be made based
on the report turned in by 11:59 pm (midnight) the evening before your lab section after
next (i.e. one week after the drafts were turned in).
Learning objectives:
●
LLO5-1: Gain familiarity pressure transducers and sensors (e.g. speakers and
microphones)
●
LLO5-2: Understand the value of, and be able to conducted scanned
measurements
●
LLO5-3: Understand the value of feedback/control in measurement (including
servos)
●
LLO5-4: Understand motor driving/control automation with Arduino and Matlab
via G-Code
●
LLO5-5: Gain familiarity with application of uncertainty principles and proper
notation (significant figures, etc.)
●
LLO5-6: Be able to use signal conditioning (in this lab, time domain averaging
and filtering) to enhance signal quality (e.g. signal-to-noise ratio).
●
LLO5-7: Understand how, and be able, to communicate context and motivation
for your work in a technical writing scenario.
●
LLO5-8: Be able to generate a clear figure with high information density for
communicating the results of your work.
●
LLO5-9: Gain experience with making observations and providing supported
interpretations of experimental data.
●
LLO5-10: Become familiar with the universality of frequency domain analysis,
including within the spatial domain.
●
LLO5-11: Gain familiarity with sources of random vs. systematic error.
●
LLO5-12: Be able to process high dimensional (>2) datasets, and be able to
reduce the data into meaningful, visualizable forms (e.g. 2 and 3 dimensional
plots).
●
LLO5-13: Gain experience with norms and ethics in signal conditioning, data
analysis and data presentation.
1
PRE-LAB
View the
Lab 5 demonstration video
. Note this video was developed for an earlier,
remote version of MAE170, and you will be working with an updated version of the
scanning acoustic probe experimental setup herein.
Read the following via the custom course textbook:
●
Part A. 5, 6, 20
●
ASTM standard E177-14
●
ASTM standard E29-13
Consider reviewing some basics regarding wave propagation.
The following few
Wikipedia pages can provide an overview:
Wave
,
Sound
,
Acoustic Wave
.
Q1:
The
soundspeed
of
acoustic
waves
in
air
is
~340
m/s.
Calculate
the
wavelength of a 5 kHz acoustic wave in air.
2
IN-LAB
In this lab, we would like to
characterize how sound propagates in time and space
,
using a
speaker
to generate the wave. A
microphone
(e.g. a pressure sensor) will be
scanned, such that the experiment will be automatically repeated with the microphone
at different positions with respect to the speaker. The setup is shown in Fig. 1. The
scanning is accomplished using a
mostly-printed CNC kit
. To control the scanning, we
use
a
Matlab
code
that
sends
serial
commands
to
the
Arduino-based
“Rambo”
controller. The Rambo Arduino system controls four stepper motors, which move the
microphone’s position.
Figure 1:
Speaker characterization experimental setup.
The
Rambo Arduino
motor controller uses the same type of Arduino source code you
have used in your prior labs. The control script is called
Marlin, and can be downloaded
for free from GitHub
. The Marlin script has already been uploaded to your Rambo
Arduino, and it will wait for
G-Code
commands, via the serial port, to drive the stepper
motors.
G-Code
is
a
standard
commonly
used
for
3D
printing,
amongst
other
3
automation applications.
To generate sound from the speaker, we use the Arduino
tone()
command via the
following Arduino script.
float Tmillis=0, freq=0;
String freq_str=" "; // initialize frequency string variable
void setup() {
Serial.begin(115200); // start serial reader
}
void loop() {
while (Serial.available() > 0) { // loop while there are strings in read buffer
freq_str = Serial.readString(); // read string
freq=freq_str.toFloat(); // convert string to float type
Tmillis=1/freq*1000*10; // calculate duration for 5 cycle pulse of given frequency
tone(9,freq,Tmillis); // generate tone at given frequency for above duration on pin 9
}
}
In the above script, the Arduino uses pulse width modulation to generate a 5 cycle long
pulse at a specified frequency from digital pin 9. For this experiment, we will use 5 kHz,
as per the following Matlab script.
To measure the acoustic wave generated by the speaker, we use our microphone,
which contains a built-in amplifier. This microphone requires a 5 V power supply, which
we will provide from your station’s breadboard.
Thereafter, we will work with the following two signals, both sent to your oscilloscope,
The signal sent from pin 9 to the speaker will be referred to as your “reference signal”,
and go to Channel 1 on your oscilloscope. The output signal from your microphone will
be sent to Channel 2 on your oscilloscope.
The Matlab script available on Canvas is used to control the scanning stage, drive the
speaker, and extract data from the oscilloscope. The origin of the scanning stage is
presumed to be in the top right, with the speaker in the middle of the left side of the
stage, as per the layout shown in Fig. 1.
Ensure that your speaker is placed 30 cm
away from the microphone in the direction of the speaker axis (x-axis) and 15 cm
away from the microphone perpendicular to the speaker axis (y-axis).
The script will generate a figure as shown in Fig. 2.
4
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help