Double Acoustic Stopwatch and Sound Speedown experiment
Get the time between two acoustic events measured by smartphone and arduino Nano 33 sense board BLE and determines the sound speed.
This experiment allows to measure by two distante sensors the time between two loud acoustic signals produced sequentially near to each sensor location. These can be clicks, beeps, claps etc. as long as they are louder than the environment. You might want to adjust the threshold, giving the level at which the stop watch is triggered (ranging from 0 to 1 for smartphone).
After launching the experiment (run), the clock will start on the first noise exceeding the threshold and will be stopped on the second noise. To repeat the experiment, clear the data and start again. Make sure that the first noise is short as a long sound might be immediately detected as a stop. New: Two more claps clear the data and let you restart the smartphone clock again.
Then the sound speed is calculated by the difference of the time intervals measured by sensors: distance*2 / abs(time1 - time2).
T2Sredthresholdmindelayrecordingrateii2tlimitmaxlasttlistdtlisttindextcounttcount-1t0t1t0effectivet1effectivetmaxdt01countindexCH1CH2CH3CH4CH5CH0phonedistancespeedarduino_threshold
dt01
phone
CH1
speed
recording
recording
i
index
i2
rate
max
threshold
t
0
tlist
last
mindelay
limit
t
t
0
t
0
t
tlist
0
tlist
tcount
1
index
count
index
rate
tcount
1
dt01
tcount
3
tcount
3
0
phone
CH1
distance
0
1
tlist
1
1
tlist
t1
0
tmax
t1
t0
0
tmax
t0
t1effective
t0effective
tlist