Recognizing loud sounds.


hello everyone,

i want build arduino controlled machine that  recognizes if shouting , react that.
it should messure the length of shout.

i thought of this:

microphone ->preamp -> arduino
(if sound going louder xy start messure time, if sound not  louder xy anymore stop messure time
-> 30% of messured time = doing nothing
-> trigger relais 100% of messured time)

i hope understand that, english isn't on sundays :)

it seems easy thing me, it?!

ah btw. want standalone, without pc. dont know if makes difference.

you see pretty new arduino, maybe know existing codes used it? or general advice how realize interpreting of audio in signal etc.

best max


hi max, welcome (i can't see in profile)

think have reasonable idea how it. have checked tutorial section allready, there several samples contain code parts recognize in project.

learn how measure time wilt millis() 

here code started...

code: [select]

void setup()
{
  serial.begin(115200);
  serial.println("soundmeter 0.1");
}

void loop()
{
  // measurement
  unsigned long starttime= millis();
  while (analogread(a0) > 300);  // 300 threshold tuned 
  unsigned long duration = millis() - starttime;

  serial.print("duration:\t ");
  serial.println(duration);

  if (duration > 10000) // 10 seconds minimum value tuned
  {
     // wait 30%
     
    // switch on relay 100%
   

  }
}


now it's turn finish ;)



Arduino Forum > Using Arduino > Audio > Recognizing loud sounds.


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial