GAINAMPLIFIERANTIALIASINGFILTERSAMPLINGFREQUENCYBUZZERFigure 3 A microphone captures sound events, and an antialiasing filter following again amplifier handles signal amplification and filtering of high-frequency components.ADCSIGNALANALYSISro crossings and high peaks. These characteristics, althoughthey provide good information, seem to mimic white noise,and it is a challenge for designers to distinguish between thewaveform’s characteristics and white noise.The frequency response involves similar challenges. Theglass-breakage signal’s components spread over the entirespectrum with fairly equal energy, which is typical of whitenoise. However, a peak occurs at approximately 200 to 300Hz; this peak—the frequency component of the sound causedby the initial impact to the glass during breakage—providesthe much-needed distinction. The impact is a low-frequencysignal among all the high-frequency glass-breakage soundsthat follow. You can view this impact, or thud, as the soundthat occurs when an object hits the glass. It is difficult to recognizethis information in the time-domain waveform, butyou do know that this sound precedes all other sounds duringbreakage.SYSTEM COMPONENTSA glass-breakage detector must always be on and shouldbe able to process any sound activity in real time. However,you can turn off some of the detector’s blocks or put them intolow-power modes when they are not operating. A microphonecaptures sound events, and an antialiasing filter followinga gain amplifier handles signal amplification and filteringof high-frequency components (Figure 3). The antialiasingfilter rejects any frequencies above the audiblerange of 20 kHz and avoids violating the Nyquist criterionduring digitization of an analog signal.The blocks within the dashed lines are parts of the processor,which can be an ASIC, a microcontroller, or a DSP.The ADC converts the analog signal to a digital sample forprocessing in the digital domain. The sampling frequency,F S, depends on the frequency content of the signal. Becausethis circuit uses a 20-kHz antialiasing filter, the sampling ratemust be at least 40 kHz to preserve the original signal’s contentand integrity. The signal-analysis block encompasses allof the signal processing necessary for the detection or rejectionof glass breakage. Once this detection completes, thedecision block activates an indicator, such as an LED or abuzzer, to indicate glass breakage.HARDWARE SPECSMost glass-breakage detectors operate from batteries; forsufficient battery life, the design should have low power consumption.The choice of all hardware components in this designdepends on their ability to contribute to the low-powerdesign. An analog signal starts at the microphone and endsat the ADC. The choice of the microphone is importantDECISIONbecause its performance contributes tothe success of any glass-breakage detector.The microphone should also beable to capture and preserve key soundcomponents, such as impact and otherhigh-frequency components that the detectoralgorithm uses. The microphonemust be on most of the time to captureany sound activity and hence must consumeless power to bring down the overallsystem current. The gain amplifier—usually an operational amplifier in inverting or noninvertingmode—has a gain higher than unity. The op amp must providesufficient gain to the sound—on the order of tens of millivolts—themicrophone captures. The op amp must alwaysremain on and must have a small turn-on current. The antialiasingfilter is also an op amp, filtering in the analog domain,and is usually a simple first- or second-order-unity-gainlowpass filter.The most important choice in this design is that of the signalprocessor. You can use ASICs, microcontrollers, or DSPs,depending on the application. Like smoke detectors, mostglass-breakage detectors are placed inside homes or officesat locations that ensure security and safety. However, theyrequire battery power so that you can place them anywherewithout worrying about their proximity to power outlets andto ensure that they will continue to operate in the absence ofpower on the mains.You must choose a low-power, programmable, easy-to-use,STARTACTIVITY-DETECTIONALGORITHMACTIVITY?YESTHUD-DETECTIONALGORITHMTHUD?YESGLASS-BREAKAGE-DETECTIONALGORITHMGLASSBREAKAGEYESBUZZER ONFigure 4 The high-level software flow of the algorithm includesactivity detection, thud detection, and glass breakage in theorder of occurrence in time.NONONO40 EDN | SEPTEMBER 9, 2010
and inexpensive processorwith good processing capabilitiesfor real-time operation.The microcontrolleris the best of these choicesbecause it meets all of theserequirements. Some microcontrollersalso integrateanalog peripherals, whichfurther reduce overall systemcost.TABLE 1 CURRENT AND TIMING CONSIDERATIONSCondition/mode Peripherals on Clocks Current On timeLow-Power Mode 3 Timer on (up mode) MCLK=DCO=off 0.6 μA 2.5 msecSMCLK=DCO=offACLK=VLO≈12 kHzTACLK=ACLK=VLOActivity detection/AM1 (Active Mode 1)Microphone onOp amp 0 onMCLK=DCO=12 MHzSMCLK=DCO=12 MHzACLK=VLO≈12 kHz4.8 mA 20 μsecThud detection/AM2 (Active Mode 2)Glass-breakagedetection/AM3 (Active Mode 3)Microphone onOp amp 0 onOp amp 1 onTimer on (up mode)ADC 10 onMicrophone onOp amp 0 onADC 10 onMCLK=DCO=8 MHzSMCLK=DCO=8 MHzACLK=VLO≈12 kHzTBCLK=SMCLK=8 MHzMCLK=DCO=12 MHzSMCLK=DCO=12 MHzACLK=VLO≈12 kHz4 mA 32 msec5.8 mA 60 msecS<strong>OF</strong>TWARE SPECSAn antialiasing filterwith a 20-kHz cutoff frequencyfilters the analogsignal from the microphone.To digitize this signal,the sampling rate must be greater than 40 kHz, and theADC must be able to support that rate. For real-time operation,the filter must complete the required processing betweensuccessive-sampling instants. For example, if the maximumCPU frequency is 12 MHz, the number of CPU cyclesbetween successive samples is only 300, which is tightfor signal processing. You can choose a processor that supportsa higher CPU clock for increased CPU cycles. Doing sowould increase power consumption, however, and thereforedecrease battery life. Hence, one must make a trade-off betweenthe algorithm’s complexity level and battery life.The thud occurs at the beginning of a glass-breakage sound.This thud signal is present in most sounds, such as the noisethat occurs when a door or cabinet closes, an object hits theground, or someone claps his or her hands or knocks on adoor. However, these sounds lack the high-frequency componentsof typical glass-breakage signals. Other sounds, such asthe noise a coffee grinder makes, loud music, motorcycles inmotion, or the noise a wineglass makes when it breaks, havesimilar high-frequency components but no thud component.Circuits Layout SSO Ringing Probes Power Crosstalk GroundingEMC Noise Jiftter RLGC Thermal Stripline RoutingSignal Integrity —Dr. Howard Johnsonand hisextraordinary Black Magic seminars...Huntsville, AL 25-2627-28OctOctHigh-Speed Digital DesignAdvanced High-Speed Signal Propagationwww.sigcon.comUse Promo code EDN10SEPTEMBER 9, 2010 | EDN 41