This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Glass break



hi,

working on the code of glass break algorithm being provided by TI. right now the operation performed by the code is not stable.

i am trying to control the thud ,as so far thud is being continuously detected by the code.so i made some calibration and stopped the continuous detection  so now the whenever the glass break sound is played only then thud is detected.

but this calibration values are not  stable. i am just adding an offset to op-amps values for the calibration. so i calculated this calibration values at certain voltages. But after some time the calibration  values changed to something different  so anybody knows the reason behind it?

  •  From your word you isolated the problem solved it but you are not capable of solving it.

     From our perspective we only know your word and nothing about what are you using and what you expect or what is wrong and why...

     Are not too much information missing to try something can help just understand then if possible suggest some cure to?

  • Anup,

    now there are three threads running concernig your glass break detector. Here are the other ones:

    I was already asking this morning if the second one is yours, too. And now you opened a third one. You will not get more answers by opening more threads. Please select one of them. And it is quite difficult to give you an answer because you do not provide much information. Maybe input some code and describe your problem a little bit more in detail. But please use the syntax highlighter when posting code.

    Dennis

  • Dennis Eichmann said:
    I was already asking this morning if the second one is yours, too. And now you opened a third one. You will not get more answers by opening more threads. Please select one of them. And it is quite difficult to give you an answer because you do not provide much information.

     Hi Dennis, ok every thread has no information than one, Olimex glass break detector work fine so maybe it is damaged or maybe our poster is not using as recommended, full calibration procedure is described and good quality HIFI loudspeaker are necessary to have all energy over frequency spectrum needed to simulate real glass break. Low frequency are not correctly handled by commercial cheap systems.

    https://www.olimex.com/Products/MSP430/Starter/MSP430-GBD/open-source-hardware

     In first what loudspeaker are you using? Is SPL enough where device is?

     Is detector power source clean and stable?

    Is amplifier used also stable and produce same SPL all times?

  • thanks for replying roberto and dennis. so i will try to explain what i am doing and the problems that i have faced.

    first, i am using the same code as provided by ti in  order to detect the glass break.so all the filtering mechanism are right and i am using the kit being provided by olimex  which has only led and buzzer with it to notify the glass break.  so basically the code is some what this;

    /******************************************************************************
    ;   Robust Glass Breakage Detector "Main C file"
    ;
    ;   B. Nisarga/ K. Venkat
    ;   Texas Instruments Inc.
    ;   December 2007
    ;   Built with IAR Embedded Workbench Version: 4.10A
    ;*******************************************************************************/
    
    #include "msp430x22x4.h"
    #include <intrinsics.h>
    #define TACCR0_2ms   25                      // TACCR0 = 20 @ VLO=12khz
    #define HIGH_LVL    100                     // threshold to detect ACTIVITY
    #define LOW_LVL     -40                    // threshold to detect ACTIVITY 
    #define THUD_LVL     35                   // threshold to confirm valid THUD
    
    // Define and initialize global variables
    volatile unsigned int i, discard_count=0, sample_count;
    volatile int temp1;
    int output1;
    long average=0, sum =0;
    unsigned char discard_flag=1, activity=0, OA1_delay_ON=0;
    
    // Function prototypes
    int wdf_thud(int); 
    void signal_analysis_one(void);
    void signal_analysis_two(void);
    void init_glass_break(void);
    void INIT_wdf_2k(void);
    void delay_8MHz_no_AAF(void);
    void INITMEM(void);
    void INIT_WDF(void);
    
    void main(void)
    {
        WDTCTL = WDTPW + WDTHOLD;               // Stop watchdog timer
        
        P1DIR= 0xFF;                            // Configure Port pins
        P1OUT= 0;
        P2DIR= 0xFF; 
        P2OUT= 0;
        P3DIR= 0xFF;
        P3OUT= 0;
        P4DIR= 0xFF;
        P4OUT= 0;
                                                // Configure Clock system
        BCSCTL1= CALBC1_12MHZ;                  // Set DCO = 12MHz
        DCOCTL = CALDCO_12MHZ;     
        BCSCTL3 = LFXT1S_2;                     // ACLK = VLO
        
                                                // Configure ADC10
        ADC10CTL0 = ADC10SHT_1+ADC10SR;         // Sample and hold time = 8xADC10CLKS
        ADC10CTL1 = INCH_1+ADC10DIV_2+ADC10SSEL_3+CONSEQ_0; // input channel A1,
                                                // ADC10CLK=SMCLK/3, single-channel-
                                                // single-conversion mode    
        
                                                // Enable Op-amp 0
        ADC10AE0 = BIT0+BIT1+BIT2;              // A0+A1+A2 analog enable (OA0 i/ps and o/p) 
        OA0CTL1= OAFBR_6+OAFC_6+OANEXT;         // Inv PGA, Gain = -7, ext inv input
        OA0CTL0= OAN_1+OAADC1;                  // Output high Z, OA0 output to 
                                                // ADC10 input channel A1 
      
                                                // Enable Op-amp 1
        ADC10AE1 = 0x0A0;                       // A13+A15 analog enable (OA1 +ve i/p and o/p)
        OA1CTL1= OAFC_2;                        // Unity gain buffer mode
        OA1CTL0= OAP_3+OAADC0;                  // Output high Z, OA0 output to   
                                                // ADC10 input channel A13  
      
                                                // Configure Timer_A to generate 2.5ms device wake-up
        TACTL= TASSEL0;                         // TACLK = ACLK=VLO 
        TACCTL0 = CCIE;                         // Capture compare interrupt enable  
        TACCR0 = TACCR0_2ms;                    // Load TACCR0 with 2.5ms count
        TACTL |= MC_1;                          // Up mode, TA start
        
        while(1)
        {
            if(activity)                        // Check actvity flag
                __bis_SR_register(LPM0_bits + GIE);  // LPM0,  Global Interrupts Enable
            else
                __bis_SR_register(LPM3_bits + GIE);  // LPM3, Global Interrupts Enable
                
                P4OUT |=BIT0;                   // Microphone ON
                P2OUT |=BIT4;                   // Offset Voltage ON     
                OA0CTL0 |=OAPM_3;               // Fast mode for Gain Op-amp 
                delay_8MHz_no_AAF();            // Delay for gain opamp
    
                ADC10CTL0 |= ADC10ON;
                ADC10CTL0 |= ENC + ADC10SC;     // Enable ADC10 + start conversion 
                while((ADC10BUSY & ADC10CTL0)); // Check for conversion complete
                OA0CTL0 &= ~(OAPM_3);           // Gain-Op-amp OFF
                P4OUT &= ~BIT0;                 // Microphone OFF
                P2OUT &= ~BIT4;                 // Voltage offset OFF                 
                temp1= ADC10MEM-500;            // Conv result - op-amp ref voltage
                if(discard_flag)                // Discard first 200 samples
                {
                    if(++discard_count > 200)
                        discard_flag = 0;
                    ADC10CTL0 &= ~ENC;          
                    ADC10CTL0 &= ~ADC10ON;      // Power-off ADC10  
                    TACCTL0 = CCIE; 
                    TACCR0 = TACCR0_2ms;
                    TACTL |= MC_1;              // Re-enable Timer, Up mode    
                }
                else                            // Valid if discard_flag = 0
                {
                    // Compare sampled data with thresholds to detect activity
                    if((temp1 >= HIGH_LVL) || (temp1 <= LOW_LVL))
                    {
                        // ACTIVITY Detected
                        BCSCTL1= CALBC1_8MHZ;   // Set DCO  = 8MHz
                        DCOCTL = CALDCO_8MHZ;                     
                        P4OUT |=BIT0;           // Microphone ON
                        P2OUT |=BIT4;           // Offset Voltage ON     
                        OA0CTL0 |=OAPM_1;       // Fast mode for Gain Op-amp                     
                        OA1_delay_ON = 1;       // Set OA1_delay _ON flag
                        OA1CTL0 |=OAPM_1;       // Fast mode for filter Op-amp
                                                
                                                // Configure Timer_A to provide a delay 
                                                // of 3.2ms for filter to settle
                        TACCR0 = 32;            
                        TACCTL0 = CCIE;
                        TACTL |= MC_1;          // Up mode, TA start      
                         
                        __bis_SR_register(LPM3_bits + GIE); // LPM3, enable interrupts
                        
                        sum = 0;                
                        sample_count = 0;
                        activity =1;            // Set activity flag
                         
                        ADC10CTL0 &= ~ENC;      // Disable ADC and rec-configure
                        ADC10CTL0 = ADC10SHT_1+ADC10SR;   // Sample and hold time = 8xADC10CLKS   
                        ADC10CTL1= INCH_13+ADC10DIV_2+ADC10SSEL_3+CONSEQ_0; // input channel A13,   
                                                // single-channel-single-conversion mode   
                                                                  
                                                // Configure Timer_B to interrupt every 0.25ms 
                        TBCTL= TBSSEL_2;        // TBCLK = SMCLK = 8MHz        
                        TBCCTL0 = CCIE;         // Capture compare interrupt enable   
                        TBCCR0 = 1999;          // Load TACCR0 with 0.25ms count
                        TBCTL |= MC_1;          // Up mode, TA start                    
                    } 
                    else                      
                    {
                        // No ACTVITY Detected
                        ADC10CTL0 &= ~ENC;      
                        ADC10CTL0 &= ~ADC10ON;  // Power-off ADC10  
                        TACCTL0 = CCIE;         
                        TACCR0 = TACCR0_2ms;    
                        TACTL |= MC_1;          // Re-enable Timer_A for 2.5ms periodic wake-up
                    }
                }
        }
    }
    
    // Timer_A0 Interrupt Service Routine
    #pragma vector=TIMERA0_VECTOR
    __interrupt void TIMER_ISR(void)
    {
        if(!OA1_delay_ON)                       // Is Filter_Opamp delay ON?
        {
            TACTL &=~(MC_1);                    // Stop Timer_A
        }
        else
        {
            TACTL &=~(MC_1);                    // Stop Timer_A
            OA1_delay_ON=0;                     // Reset the OA1_delay_ON flag
        }
        
        __bic_SR_register_on_exit(LPM3_bits+GIE); // Clear LPM bits upon ISR Exit
    }
    
    // Timer_B0 Interrupt Service Routine
    #pragma vector=TIMERB0_VECTOR
    __interrupt void TIMERB_ISR(void)
    {
      
           ADC10CTL0 |= ADC10ON;
           ADC10CTL0 |= ENC + ADC10SC;          // Enable ADC10 + start conversion 
           while((ADC10BUSY & ADC10CTL0));      // Check for conversion complete  
            temp1= ADC10MEM-535;   //2.5V
      //      temp1= ADC10MEM-530;   //2.6V
                  //  temp1= ADC10MEM-515;   //2.7V
           //  temp1= ADC10MEM-495;    //2.8             // Conv result - op-amp ref voltage
        // temp1= ADC10MEM-475;    //2.9V 
                                             // Conv result - op-amp ref voltage
         // temp1= ADC10MEM-445;    //3.0                                                                                                                   ///caiberation values
            //temp1= ADC10MEM-530;
     
           sample_count++;                      // Increment sample_count
           wdf_thud(temp1);                     // Call the LWDF for thud detection
            if (output1 & 0x8000)               // Convert numbers with sign bit = 1 to -ve numbers
                output1 = ~output1 + 1;
            sum=sum+output1;                    // Accumulate LWDF output in variable sum
            if(sample_count==112)               // 128 samples accumulated? (32ms over?)
            {
                TBCTL &=~(MC_1);                // Stop Timer_B               
                sample_count=0;                 // clear sample_count
                average = (sum) >> 7;           // Average = sum/128
                sum = 0;                        // Clear sum
                if (average >= THUD_LVL)        // Compare average with Thud threshold      
                {
                  P1OUT^=BIT0;
                    // VALID THUD Detected
                    init_glass_break();
                }
                else
                {
                    // VALID THUD not confirmed
                    BCSCTL1= CALBC1_12MHZ;      // Set DCO = 12MHz
                    DCOCTL = CALDCO_12MHZ;                   
                    OA0CTL0 &= ~(OAPM_1);       // OA0 Gain-Op-amp OFF        
                    OA1CTL0 &= ~(OAPM_1);       // OA1 Filter OFF
                    ADC10CTL0 &= ~ENC + ADC10IE;// Power-off ADC10 & "disable interrupts" - not reqd
                    ADC10CTL0 &= ~ADC10ON;  
                                                // Re-configure ADC10
                    ADC10CTL0 = ADC10SHT_1+ADC10SR;  // Sample and hold time = 8xADC10CLKS                  
                    ADC10CTL1= INCH_1+ADC10DIV_2+ADC10SSEL_3+CONSEQ_0;// input channel A1,   
                                                // single-channel-single-conversion mode                    
                    P4OUT &= ~BIT0;             // Microphone OFF
                    P2OUT &= ~BIT4;             // Offset Voltage OFF     
                    INIT_wdf_2k();              // Clear all the WDF variables
                    activity=0;                 // Clear activity flag
                    TACCTL0 = CCIE; 
                    TACCR0 = TACCR0_2ms;
                    TACTL |= MC_1;              // Re-enable Timer_A for 2.5ms periodic wake-up
                    __bic_SR_register_on_exit(LPM0_bits);     // Clear LPM0 bits on ISR exit
                    __bis_SR_register_on_exit(LPM3_bits+GIE); // Enter LPM3 on ISR exit             
                }
            }       
    }
       
    // ADC10 Interrupt Service Routine 
    #pragma vector=ADC10_VECTOR
    __interrupt void ADC10_ISR(void)
    {
        //temp1= ADC10MEM-(460);                    // Conv result - op-amp ref voltage
      temp1= ADC10MEM-(530);  
      sample_count++;                         // Increment sample_count
        {
            signal_analysis_one();              
            if (sample_count ==2500)            // 2336 samples accumulated? (60ms over?)
            {
                signal_analysis_two();
                                                // Reconfigure ADC10
                ADC10CTL0 = ADC10SHT_1+ADC10SR; // Sample and hold time = 8xADC10CLKS 
                ADC10CTL1= INCH_1+ADC10DIV_2+ADC10SSEL_3+CONSEQ_0; // input channel A1,   
                                                // single-channel-single-conversion mode                   
                activity=0;                     // clear activity flag
                                                // Re-enable Timer_A for 2.5ms periodic wake-up
                TACCTL0 = CCIE; 
                TACCR0 = TACCR0_2ms;
                TACTL |= MC_1;                  // Up-mode, start Timer_A  
                __bic_SR_register_on_exit(LPM0_bits);     // Clear LPM0 bits on ISR exit
                __bis_SR_register_on_exit(LPM3_bits+GIE); // Enter LPM3 on ISR exit     
            }  
        }
    }
    void init_glass_break()
    {
        BCSCTL1= CALBC1_12MHZ;                  // Set DCO = 12Mhz
        DCOCTL = CALDCO_12MHZ;
        OA1CTL0 &= ~(OAPM_1);                   // Turn off OA1 (2 kHz AAF filter)
                                                // Initialize all variables used in 
        INITMEM();                              // Signal Analysis one and two
        INIT_WDF();
        sample_count = 0;                       // Clear sample_count
        ADC10CTL0 &= ~ENC;                      // Disable ADC10
        
                                                // Configure ADC10 continuous conv at
                                                // ~38.9 ksps sampling rate
        ADC10CTL0= ADC10SHT_3+ADC10SR+MSC+ADC10ON+ADC10IE; // 64 x ADC10CLKs, 
                                                // ref buff sampling rate supports upto ~50ksps,
                                                // multiple sample and conv, interrupt enable
        ADC10CTL1= INCH_1+ADC10DIV_3+ADC10SSEL_3+CONSEQ_2; // A1, ADC10CLK/4, ADC10CLK = SMCLK,
                                                // Repeat-single-channel 
        ADC10CTL0 |= ENC+ADC10SC;               // Start conversion 
    }
    
    
    

    so this is the full code for it . as told earlier i am using battery so i am trying to follow the application note of robust glass break. according to this note, thud is the sound which comes before the glass beak sound starts.so this cose is working fine for this part.

    but in this code, thud is being getting continuously detected. as a result system i unable to go to sleep and the battery consumption is high. i have checked this thing via toggling the led and THUD detection part. 

    so in order to remove this i tried adding some offset into the op-amps value and as a result i was able to get better result i.e thud detection was less frequent and there was glass breakage detection too.but the biggest problem is that for diffeernt voltage i have to use different offset values.so i calculated these values for 2.5V-3.0V. now it was working fine . 

    but the main problem is that this working code is unable to run at the calibration value . again thud detection is more frequent bringing me back to the same problem. 

    so my question is why this thing is happening? means at one time it is working for some set values and for other time it is not . and please any method to overcome it.

  • ANUP Sharma said:
    so this is the full code for it . as told earlier i am using battery so i am trying to follow the application note of robust glass break. according to this note, thud is the sound which comes before the glass beak sound starts.so this cose is working fine for this part.

     SO what the issue are you wroting about???

    ANUP Sharma said:
    but in this code, thud is being getting continuously detected. as a result system i unable to go to sleep and the battery consumption is high. i have checked this thing via toggling the led and THUD detection part. 

     Why this happen? No sound no detection, are some noise from microphone coming in? Are you in a loud audio noise or worst in an electromagnetic strong field area?

    ANUP Sharma said:
    so in order to remove this i tried adding some offset into the op-amps value and as a result i was able to get better result i.e thud detection was less frequent and there was glass breakage detection too.but the biggest problem is that for diffeernt voltage i have to use different offset values.so i calculated these values for 2.5V-3.0V. now it was working fine . 

     I feel this is a very bad Idea, input range of ADC is from 0 or LowRefIn to max VCC or Vref internal or external and cannot exceed VCC range so ADC has no more dynamics to sample input.

     Are you sure you understand what are you doing?

    ANUP Sharma said:
    but the main problem is that this working code is unable to run at the calibration value . again thud detection is more frequent bringing me back to the same problem. 

     What mean this, application was perfectly working, maybe you damaged items or item was damaged (very very rare), try ask Olimex about.

    ANUP Sharma said:
    so my question is why this thing is happening? means at one time it is working for some set values and for other time it is not . and please any method to overcome it.

     Which method? from your word all still is impossible to understand and what I seen is a distorted acquisition from ADC compressed by tampering offset from middle of Vref.

     Why?

  • thanks for replying roberto.

    i have tried to answer all your questions .please look at them and reply accordingly

    SO what the issue are you wroting about???

    my main concern is  that i need to save the battery so it will work for min. 3 months. this can only be achieved when the algorithm is properly implemented. as according to algo, system will stay in sleep for 2ms and after that it will check for thud and if there is no thud it will go back to sleep and if there is thud it will check for glass break. but in my case it always detecting thud as a result it system's on time will increase and power consumption will also increase.

     Why this happen? No sound no detection, are some noise from microphone coming in? Are you in a loud audio noise or worst in an electromagnetic strong field area?

    yeah strong em radiations can be the case but other than that there is no loud sound.i will check and confirm that ASAP.

    I feel this is a very bad Idea, input range of ADC is from 0 or LowRefIn to max VCC or Vref internal or external and cannot exceed VCC range so ADC has no more dynamics to sample input.

    ok. but in application note provided by TI they are also doing the same thing i.e subtracting some values from the offset.

     Are you sure you understand what are you doing?


    no the kit is fine as normal glass break detection is occurring there only problem exists with the detection of THUD.if it was faulty then it might not be able to detect glass break also. yeah and moreover yes values are changing i can even send the changed value table if you want.

  • ANUP Sharma said:
    no the kit is fine as normal glass break detection is occurring there only problem exists with the detection of THUD.if it was faulty then it might not be able to detect glass break also. yeah and moreover yes values are changing i can even send the changed value table if you want.

     Table is of no help to me...

     Please attach a scope probe with as short as possible leads to microphone pins sample if this is noise free or not so determine if Microphone is working and no noise captured from.

     Attach scope to analog input pin too and evaluate what is present there referred to half of vref too. Check if Vref is clean too, this output is used for biasing operational to mid of this voltage, all operational are dc coupled gain 1. Also check if dividing resistor connected to first opamp is noise free.

     Remember short lead on this measure, remove all cell phone if they are in that area, at almost 10 meters recommended to have noise free measurement.

     How much offset move away from set point? Is Vref Stable?

     Both measure must be done with a scope due are not forever on. If you need measure drift with a precise voltmeter then power board from external power and temporarily remove sleep code to have vref on for tracking purposes.

  • Roberto Romano said:

     Remember short lead on this measure, remove all cell phone if they are in that area, at almost 10 meters recommended to have noise free measurement.

     How much offset move away from set point? Is Vref Stable?

     Both measure must be done with a scope due are not forever on. If you need measure drift with a precise voltmeter then power board from external power and temporarily remove sleep code to have vref on for tracking purposes.

     Hi, I was expecting some measurement from you to evaluate if trouble come from hardware or not, maybe a capacitor has some drift or is not good, this can move offset but forever if all is ok DC gain is 1 and offset must be half of vref, is this ok?

  • thanks roberto,

    vref is not stable, i am using direct supply from battery.there is a very small offset change. can you tell me how to check for hardware errors in detail. vref is direct VCC. 

  • hi roberto,

     How much offset move away from set point? Is Vref Stable?

     Both measure must be done with a scope due are not forever on. If you need measure drift with a precise voltmeter then power board from external power and temporarily remove sleep code to have vref on for tracking purposes.

    so i am using external regulated  power supply. so Vref and your drift will not be there. but still having the same error i.e with time my  calibration value changes.

    and for the other readings i will notify u soon.

  • ANUP Sharma said:
    vref is not stable, i am using direct supply from battery.there is a very small offset change. can you tell me how to check for hardware errors in detail. vref is direct VCC. 

     It is not clear what happen, original design has AC coupled filter with DC gain 1 to have all operational biased to mid of VCC or MID of VREF, internal VREF is generally set to 1.5 or 2.5V, so please leave it on and measure value, also measure if first operational output is half Vref and also to ADC input voltage still is half of vref.

     ADC routine subtract this offset from reading to remove DC bias and have a zero average on AC input before filtering.

     Small offset from mid vref are ok but you reported have some final voltage in the range of 2-3V, this is saturating ADC so it cannot work and AC signal is distorted and small in range.

    so  please measure ADC input and then without AC signal please also report if read value from ADC is near mid scale and is around zero after offset subtraction.

  • hi roberto ,
    in code internal reference is not being used. we are using direct VCC for refrence.
  • moreover roberto, opamp0 's output is not constant .
    i.e when THUD is not being getting continuously detected then it stays a fixed value which is half of VCC/vref but when thud is being getting detected then ouput changes to +-100mv chnage from its vcc/2 point.
  • ANUP Sharma said:
    moreover roberto, opamp0 's output is not constant .

     Ok so finally we catch from where this come...

    Is Vref stable?

     attach debugger and stop program, measure Vref out is stable? Which value is?

    Measure Opamp output is stable to half vref? with a scope what it is superimposed to dc bias?

    ANUP Sharma said:
    i.e when THUD is not being getting continuously detected then it stays a fixed value which is half of VCC/vref but when thud is being getting detected then ouput changes to +-100mv chnage from its vcc/2 point

     What happen if you disconnect microphone? if it is not enough connect a 100nF capacitor from input to ground too.

    run again program and see if it still detect stud without microphone.

  • regarding the last question

    What happen if you disconnect microphone? if it is not enough connect a 100nF capacitor from input to ground too.

    run again program and see if it still detect stud without microphone.

    even if thud is detected what it will be signify?

  • ANUP Sharma said:
    even if thud is detected what it will be signify?

     Whitout a scope image of what it is at input and vref too I cannot say nothing, I again ask, please can you take some measure with a scope, take a picture and post here? So we cannot say just nothing, another way is to sample what is at ADC input but this help less than pointing to root cause. Did you have access to a scope?

  • yes... i will check and send the photos ASAP
  • hi roberto,

    these are the scope photos with and wtihout mic.

    fisrt image is without mic. input to opamp0/adc with only 1uf capacitor

    Second image is with mike but single triggering

    third image is with mike original image.

    1.

    fies

    2.

    3.

  • ANUP Sharma said:
    these are the scope photos with and wtihout mic.

     Hi Anup, this is really strange, try just load software provided by Olimex, if it work then load glass break from TI original and also see if it work, if not I suspect some change to original schematic where applied... I try check original TI and compare to Olimex, another good idea is to write on Olimex forum and ask about if Thud detection is compatible with hardware.

     I load document then I see if some hardware differences exists.

  • hi roberto,
    code provided by olimex and TI are same.so any other ideas on this one ?
    i will try contacting the olimex forum.
    you were suggesting for the use of capacitor along with mic right?
    if yes then ha value should i use?
  • ANUP Sharma said:
    i will try contacting the olimex forum.
    you were suggesting for the use of capacitor along with mic right?
    if yes then ha value should i use?

     No there is no noise on your scope traces.

     I am not sure where you measured this signals but I suspect it is the microphone input, so I see clearly mic biasing and it is 20uS wide for thud detection before to enable processor intensive software analysis of glass break...

     So please locate R5 and R6 C5 node then measure what is on this node with scope, and also please measure on same screen voltage on R3 R4 pin8 node. If bias here is correct post it then we can try other measure. please also post a scope picture where 10 to 20 pulses are visible to evaluate if noise is present or filter activate.

  • yes it is from the mic input...moreover it is detecting thud even without the mic ....i will send you the rest ASAP

**Attention** This is a public forum