SLAA351A April   2007  – November 2018 MSP430F2232 , MSP430F2232 , MSP430F2234 , MSP430F2234 , MSP430F2252 , MSP430F2252 , MSP430F2254 , MSP430F2254 , MSP430F2272 , MSP430F2272 , MSP430F2274 , MSP430F2274

 

  1.   A Simple Glass-Breakage Detector Using an MSP430™ MCU
    1.     Trademarks
    2. 1 Introduction
    3. 2 Hardware Description
      1. 2.1 Device Specifications
      2. 2.2 Power Supply
      3. 2.3 Microphone
      4. 2.4 LED and Buzzer Alert
      5. 2.5 Interface to CC1100 or CC2500 Devices
      6. 2.6 Operational Amplifiers (OAs)
      7. 2.7 Internal Very-Low-Power Oscillator (VLO)
      8. 2.8 JTAG Interface
      9. 2.9 Current Consumption
    4. 3 Software Description
      1. 3.1 Initialization Routine
      2. 3.2 Timer_A
      3. 3.3 ADC10
      4. 3.4 Signal Analysis
        1. 3.4.1 First Stage of Processing
          1. 3.4.1.1 Signal Averaging, Peak Detection, and Zero Crossings
          2. 3.4.1.2 High-Pass Filtering
        2. 3.4.2 Second Stage of Processing
          1. 3.4.2.1 Frequency Composition Ratio
          2. 3.4.2.2 Peak and Zero-Crossing Count
          3. 3.4.2.3 Glass-Breakage Detect
    5. 4 Hardware Schematic
    6. 5 Test Setup
    7. 6 References
  2.   Revision History

ADC10

The MSP430F2274 has an integrated 10-bit analog-to-digital converter (ADC) capable of sampling rates of up to 200 ksps using the internal reference. ADC10 is turned on only at the beginning of the Timer_A ISR, to ensure low current consumption. In continuous conversion mode, the sampling frequency (fs) is set at a rate of 38.96 ksps at a typical CPU frequency of 12 MHz. The input channel to ADC10 is connected to different OAs, depending on the choice made to have the AAF. Once an active conversion is complete, the ADC10 is switched off. The ADC10 ISR is used to perform the signal analysis and determine a glass breakage. For real-time operation, the entire processing must be complete before the arrival of the next sample. This number of available CPU cycles between successive sampling instants is approximately 300.

The ADC10 ISR is active only after a valid sound event is detected. The complete signal analysis is done in this ISR. Each converted sample is converted to a bipolar signal by subtracting 512. Figure 7 shows the software flowchart in this ISR.

flowchart_adc10_isr_laa351.gifFigure 7. Flowchart of ADC10 ISR Functionality

The signal analysis routine forms a major part of this ISR and is dealt with in detail in Section 3.4. ADC10 is active until 60 ms of the incoming signal is passed through a stage of preliminary processing. Further processing of this data does not require the ADC10 to remain active, and it is switched off.