Sound Controlled Smoke Detector Group 67 Meng Gao, Yihao Zhang, Xinrui Zhu 1
Introduction 2 Don’t let fire alarm ruin your romantic dinner
Objective Activate alarm and power on Arduino if fire hazard is detected Capture voice and analyze the feature Turn off fire alarm when a preset pattern of sound is detected 3
Demonstration 4
5
6
Project Overview Hardware Microphone & Low Pass Filter Microcontroller Power Software Fast Fourier Transform (FFT) Mel-frequency cepstral coefficients (MFCCs) Dynamic Time Warping (DTW) Data Training 7 Smoke Detector Buzzer Arduino LPF (with mic)
8
Power V for microphone and LPF Virtual Ground for microphone and LPF
10 Arduino Active Arduino Idle Arduino power-down Mic & LPF 5 V Mic & LPF 1.2 V Power (mA/Hour)20 [4] [4] [4] Minimum Current per voltage regulator: 10 mA Active mode: 32 mA/Hour Off mode: 20 mA/Hour Without voltage regulator ~ mA/Hour Power Consumption
Low Pass Filter (AC Coupled) Cut-off Frequency: 1000 Hz Gain: 200 (or, 46 dB) Butterworth filter Sixth order 11 [1]
12
13
14
Fire Alarm Commercial fire alarm Outputs a 2.6 Hz square wave 15
Hardware Requirement and Verification 16 Fire Alarm Microphone Off the shelf component Power Provides 5 ± 0.5 V at 30±3mApassed Dial down power to 1.2 ± 0.1 V when not in use passed Provides 2.5 ± 0.5 V virtual groundpassed Provides 3.3 ± 0.3 V at 10±1mApassed Low Pass Filter Cut off (43 ± 3 dB gain) frequency at 1000 ± 100 Hz passed 46 ± 3 dB gain from 200 Hz to 800 Hz Passed: 200 Hz to 750 Hz Failed: 750 Hz to 800 Hz Gain below 30 dB from 2500 Hz onward passed
17
Algorithm for Clap Detection Sound Energy Detection 18 Power Spectral Analysis(FFT) Calculate ProbabilityClassify(>70%?)
Arduino 19 Fire Detector Buzzer Mic
Micro-controller Requirements and Verification 20 Basic Functionality Receives analog input passed Outputs 3000±100 Hz digital output passed FFT detects input wave frequency, accurate up to ±50 Hz passed Clap Pattern Recognition Correctly stop alarm when clap three times(accuracy reach 60±10%) passed Correctly keep alarm when did nothing (accuracy reach 90±10%) passed Correctly retriggers alarm when the alarm is on for more than 10 min(accuracy reach 100±10%) passed
Matlab Speech Recognition Model 21 Speech + “cooking” + noise RecordDTWMFCC 13*98 Coefs Calculate Prob to be “cooking” Prob to be noise Classifier Classified as the one with highest probability
Mel-frequency Cepstrum Coefficient (MFCC) 22 ●High Popularity, Low Resource Requirement (CMU Spinx) ●Envelop of the short time power spectrum ●Returns 13 coefficients for each time frame
23 CookingNoise
Dynamic Time Warping (DTW) Optimal match between two sounds ○For each frame, Insert, Delete or Keep ○Eliminate zeros for better results 24 Reference soundInput soundResult
Data Training Over 200 “cooking” sound clips Over 500 clap sound clips collected in lab Use python to implement data training algorithm 25 Cooking recognized as Cooking: 50/52Noise recognized as Cooking: 1/100 Cooking recognized as noise: 2/52Noise recognized as Noise: 99/100 Result:
Summary Spend a lot of time to learn new technologies (MFCC, DTW) Choose wrong DSP and waste some time on that Successfully made clap pattern controlled fire detector work Successfully implemented Speech Recognition on Matlab 26
Future Work Hardware Improve LPF accuracy and noise floor Wall power with battery backup Software Improve classifier accuracy Keyword detection on microcontroller 27
Thanks... Our Professor: Thomas Galvin Our TA: Luke Wendt ECE 445 Staff ECE Shop Everyone else who offered help along our way. 28
Citation [1]“ Active Low ‐ Pass Filter Design”, Texas Instruments, Dallas, Texas Available: [Accessed 2 March 2016] [2]C. Byrne, “How To Cook The Perfect Steak For Your Valentine”, Feb Available: valentine?utm_term=.ht7VM0kB9#.vhxRKD3wZ [Accessed 29 April 2016] valentine?utm_term=.ht7VM0kB9#.vhxRKD3wZ [3]D. Ellis (2003). Dynamic Time Warp (DTW) in Matlab Web resource, available: [4]”8-bit Atmel Microcontroller with 16/32/64KB In-System Programmable Flash”, Amtel, San Jose, California. Feb Available: ATmega _datasheet.pdf 29
30 PCB Design
31