Table of Contents
- How Glass Break Detection Works
- Microphone and Piezo Options
- Arduino Frequency Analysis
- Sensitivity Tuning
- False Alarm Rejection India
- FAQ
How Glass Break Detection Works
A glass break sensor detects the characteristic sound of breaking glass using an electret microphone. Glass breaking produces a distinctive two-part sound: a sharp high-frequency spike (3-8kHz) from the initial impact, followed by a sustained lower-frequency sound (100-2000Hz) from falling glass shards. Professional glass break detectors (Rs 1,000-3,000 from Honeywell, Crow, Bosch) use dual-frequency detection to reduce false alarms. A DIY Arduino version with FFT analysis achieves similar performance for Rs 200-500 in components.
Microphone and Piezo Options
- Electret microphone module (Rs 20-50): Wide frequency response (20Hz-20kHz), best for glass break detection. Includes onboard amplifier. Connect to Arduino analog input.
- Piezo contact sensor (Rs 15-40): Mounted directly on window glass. Detects vibration rather than sound – more sensitive but prone to false alarms from wind rattling the glass. Best for windows in quiet rooms.
- KP-601 dedicated glass break sensor (Rs 200-400): Pre-tuned for glass break frequencies with adjustable sensitivity. Outputs normally-closed contact, directly compatible with alarm panels.
Arduino Frequency Analysis
#include <arduinoFFT.h>
#define SAMPLES 64
#define SAMPLE_FREQ 8192
double vReal[SAMPLES], vImag[SAMPLES];
arduinoFFT FFT=arduinoFFT();
void detectGlassBreak(){
// Sample microphone
for(int i=0;i<SAMPLES;i++){
vReal[i]=analogRead(A0); vImag[i]=0;
delayMicroseconds(1000000/SAMPLE_FREQ);
}
FFT.Windowing(vReal,SAMPLES,FFT_WIN_TYP_HAMMING,FFT_FORWARD);
FFT.Compute(vReal,vImag,SAMPLES,FFT_FORWARD);
FFT.ComplexToMagnitude(vReal,vImag,SAMPLES);
// Check energy in glass break frequency bands
// Bins 5-15 = 640-1920Hz (falling glass)
// Bins 24-40 = 3072-5120Hz (impact peak)
double lowBand=0, highBand=0;
for(int i=5;i<15;i++) lowBand+=vReal[i];
for(int i=24;i<40;i++) highBand+=vReal[i];
if(lowBand>200 && highBand>500) triggerAlarm();
}
Sensitivity Tuning
Adjust the detection thresholds (200 and 500 in the code above) based on your environment. To calibrate: break a glass sample near the sensor and record the peak values in both frequency bands. Set thresholds at 50% of the observed values to allow for variation in glass types and distances. Effective detection range is typically 3-6m for professional sensors, 2-4m for DIY microphone builds in typical Indian rooms.
False Alarm Rejection India
Common false alarm sources in Indian environments and how to reject them:
- Utensils dropping in kitchen: Metallic impact produces different frequency signature – add dominant frequency check to confirm glass-specific spectral shape.
- Firecrackers (Diwali season): Broadband noise without the specific high-frequency spike pattern. Require both low-band AND high-band energy above threshold simultaneously.
- Pressure cooker whistle: Sustained single-frequency tone, not the dual-frequency transient of glass break. Transient duration filter (must complete within 3 seconds) rejects sustained sounds.
- Children shouting or TV noise: Low-frequency only, without the 3-8kHz spike. Dual-band requirement effectively rejects all voice and most music.
Frequently Asked Questions
What is the detection range of a DIY glass break sensor?
An electret microphone in a typical Indian room (with tile/marble floors and hard walls that reflect sound) achieves 3-5m detection range. Soft-furnished rooms (carpets, curtains, sofas) absorb sound and reduce range to 2-3m. Professional dedicated glass break sensors (KP-601, Honeywell FG-701) achieve 4-9m range. Mount the microphone in the centre of the room for maximum coverage.
Can a glass break sensor detect tempered safety glass?
Tempered glass (used in Indian sliding doors, shower screens, and vehicle windows) shatters into small rounded pieces rather than large shards. The shattering sound is different from float glass (used in windows) – higher frequency dominant peak, shorter duration. Tune your detection parameters by breaking a sample of the specific glass type you want to protect.
My glass break sensor keeps triggering on the doorbell – why?
Indian doorbells (especially chime-type with metal resonators) can produce frequencies in the glass break range. Add a location check: require the sound to come from the direction of the window (possible with two microphones in different-phase comparison), or add a 500ms duration filter (doorbell chime is shorter than glass breaking). Alternatively, use a contact piezo sensor on the window glass itself which is much less sensitive to airborne sounds.
Will glass break sensors work through curtains or frosted glass film applied to windows?
Curtains do not significantly affect airborne sound detection by microphone. Contact piezo sensors on the glass surface still detect vibration through window films (frosted, security, tinted). Heavy curtains with sound-absorbing fabric may reduce microphone detection range by 1-2m. Window security film itself does not affect glass break detection – it changes how the glass breaks but still produces detectable sounds.
Add comment