Go Down

Topic: best/cheapest sound amplitude sensor and/or code? (Read 2080 times) previous topic - next topic


hi all

whats the easiest, cheapest sound amplitude sensor out there?

i just want something that detects sound amplitude and responds accordingly.

also if anyone knows nay good sound sensor code examples (not Knock - that seems more aimed at vibration), they'd be much appreciated :)

cheers, auto


Check on Sparkfun: http://www.sparkfun.com/products/9964
Or you can build one using breadboard, electret mic and OPA, and just download code from them :)


It rather depends on what you mean by amplitude - instanteous, averaged, and what bandwidth you are talking about...  Best and cheapest are mutually exclusive I think.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


Hi - thanks, I might take a look at that breakout board.

Can anyone recommend code for detecting sounds exceeding certain absolute values?

Something like if sound > 100db then the LED will light up....


Decibels for the purposes of human hearing are not the same as decibels in the electronic domain - for human hearing the ear's frequency response is compensated for.   So if you want accurate measurement of sound volume from a human PoV you'll need to emulate this frequency response curve.

However if you are only interested in a rough level you only really need a peak level detector along the lines of:
Code: [Select]

 int value = analogRead (AUDIO) - zero_level ;
 if (abs(value) > threshold)
   digitalWrite (LED, HIGH) ;
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up