Professional Documents
Culture Documents
Study of Directivity and Sensitivity of A Clap Only On-Off Switch
Study of Directivity and Sensitivity of A Clap Only On-Off Switch
On-Off Switch
For the figure 5. the transfer function is given by, Fig. 7: Clap Detector-Hardware
Vo sCR
= 2 2 2
(3)
Vi 1 + s C R + sCR(2 − K) A. Time Domain Analysis
where, K is given by, The continuous time analog time domain signal from the
amplifier circuit was fed to the analog read pin of Tiva TM4C
R4 module. The clap signals correspond to a frequency range of
K= (4)
R5 2kHz to 3kHz, and hence the signals were sampled at a rate
of 10k samples per second, satisfying the Nyquist criteria. Ini-
And bandwidth is given by, tially training sequences were generated by repeatedly clapping
predefined number of times. The training sequence so obtained
fH − fL = (2 − K) (5) was recorded and analyzed for its time domain specification.
These specifications along with each signals is pre-loaded as a
However, desired result was not obtained even after the training data in the Tiva module. For our application we have
amplified analog signal was filtered using high Q band pass chosen the training data to be 10. Once the training data is
filter as undesired signals like desk banging etc where not loaded, the real time testing data is fed to the analog pin of
getting properly filtered. Hence, we resorted to process the Tiva. The sample rate (approx. 10K samples) and the number
signals on Tiva TM4C board and analyze the samples. of samples (128) is kept same so as to correlate the data
without zero padding.Time domain correlation is done using
III. H ARDWARE I MPLEMENTATION Pearson’s formula.
V. A LGORITHM
Initially, the clap signals are amplified by a non-inverting
amplifier of sufficient gain. This amplified signal is fed to the
Tiva TM4C. Tiva is programmed to sample the analog input
at the rate of approx. 10k samples per second. These samples
so obtained are analyses in frequency-domain as well as time-
domain. Initial analysis is done in frequency domain, were
we filter out the incoming signals which do not fall in the
range of clap-signals. This is done by specifying appropriate
thresholds for the amplitudes in the frequency domain during
the training process. Once we have filtered out all the signals
which are out of band of the clap frequencies, we switch to
time-domain analysis. In time domain we correlate the real
time samples with the pre-loaded training sequence. After
computing the correlation co-efficient, appropriate threshold is
specified on the value of correlation coefficient so obtained
during the training process. If the value of correlation co-
efficient is greater than the threshold then we say that a clap
is detected. Figure 8 depicts the flow chart of the algorithm
that we have implemented.
Correlation Table
Testing Signals Freq(KHz) Near1 Near2 Near3 Near4 Near5 Far1 Far2 Far3 Far4 Far5
Pen-drop 1.782 -0.035 0.021 -0.042 0.015 -0.154 0.039 0.024 0.013 -0.182 0.115
Click 4.610 -0.029 0.058 0.282 -0.015 0.207 -0.029 0.059 0.0282 -0.015 0.206
Bang 1.440 -0.071 -0.038 -0.022 0.161 -0.084 -0.071 -0.038 -0.020 0.61 -0.084
Whistle 5.042 -0.024 -0.003 -0.064 0.126 0.047 -0.024 -0.003 0.064 0.126 0.047
Clap1 2.881 0.019 0.006 -0.069 0.255 0.010 0.017 0.006 -0.069 0.255 0.010
Clap2 2.305 -0.043 0.221 0.248 -0.027 -0.027 -0.043 0.221 0.248 -0.027 -0.027
ACKNOWLEDGMENT
We would like to thank Prof. Siddharth Tallur for constantly
helping and motivating us constantly in completion of the
project. And Prof. Joseph John for giving insights on micro-
phone operation. We also like to thank WEL Lab staffs, in
particular Maheshwar Mangat Sir for his valuable inputs.
R EFERENCES
[1] Wasim Ahmad and Ahmet M. Kondoz, Analysis And Synthesis Of Hand
Clapping Sounds Based On Adaptive Dictionary, in Proceedings of
the International Computer Music Conference University of Surrey,
Guildford, United Kingdom 2011.
[2] Seyi Stephen Olokede,Design of a Clap Activated Switch, in Leonardo
Journal of Sciences, College of engineering and technology Olabisi
onabanjo university,Ibogun,Ogun State 2008.
[3] Bruno H. Repp,Sound Of Two Hands Clapping-An Exploratory Study, in
The Journal of the Acoustical Society of America, Haskins Laboratories,
Connecticut 1986.