which electret amplifier for clap detection

If I set my computer mic to record into audacity, and talk, have some low volume music on, and bustle about somewhat noisily, and then clap my hands at various times, the corresponding spikes in the audacity waveform are unmistakable (if I drew a horizontal line across the whole waveform, and consider breaching that line a "clap detected", that would be accurate enough for my purposes).

I've hooked this up to a pair of small headphones, and it appears to "make the quiet loud, and make the loud quiet" (random scratchings from around the room feel like they're scratching your eardrums, while a "clap" feels muffled). This makes me think it's a bad candidate as a foundation for my clap detection.

Note-
I have not attached it to an oscilloscope, because I don't have one, and
I haven't attached it to a computer because I was told it couldn't output the power to do so, and
I haven't attached it to an arduino because I was told it doesn't output in the correct voltage range,
so I'm just going off "how it sounded".

I'm thinking of next trying this, but it seems to be a very similar amplifier (MAX9814 vs MAX9812L), so I'm not sure why it would be different (if the only difference between the two is ability to adjust gain, then I don't want to waste my time).

Another thing I noticed in the NOYITO description is it has a "built-in low noise microphone bias"- is this what I was hearing from the NACRO ("quiet->loud, loud->quiet")? Or is that referring to "low electrical noise"?

At the end of the day, I want a mic + preamp that doesn't try to do any noise modification for the comfort of human listening- I'd prefer if a "clap" were to just "clip" the wave in some detectable-by-arduino-input-pin sort of way.

I've also tried these, and have had trouble setting them to a threshhold that is broken by a clap, but not by moderate talking, which makes me think there's some similar kind of noise modification (either intentional or not) going on (or maybe the timing of the large clap-spike on audacity is significantly faster than the sample rate capable by this mic?)

The fallback I have is to use a pi with a decent computer mic, and then just do as I suggested in the opening sentence: detect when the waveform breaches some threshhold.

I'm wondering if these thoughts seem on-track, or if there's some simple arduino preamp/mic setup that would more appropriately fit my needs.

I've hooked this up to a pair of small headphones, and it appears to "make the quiet loud, and make the loud quiet"

Automatic gain control is going to mess you up! Plus, and from what you're saying it's not be working right because it should be trying to push everything toward the same volume*, not "inverting" the volume by making loud sounds quiet and quiet sounds loud. But still, that's NOT what you want.

With 3rd-party amazon suppliers (or ebay or Alibaba, etc.) you usually don't get complete specs or a datasheet. If you are in the U.S., I'd recommend SparkFun, or Adafruit, or some other legitimate supplier. (If they have what you want). For regular components (resistors, capacitors, ICs, etc.) there are suppliers like Digi-Key or Mouser.

There are 3 (or more) kinds of microphone boards -

  1. A "basic" sound sensor puts-out and amplified & biased** audio signal. That might work, but you have to read in a "fast loop" to "catch" a clap. If you don't read at the right moment you can miss it.

  2. Some boards have an adjustable (with a pot) the threshold/sensitivity level and they simply put-out a digital-high when the sound is louder than the threshold. That could work for you as long as no other sounds are loud enough to cross the threshold. This may also require a fast loop, or you can use an interrupt so you never miss a pulse.

  3. Some boards have a peak detector*** (AKA envelope follower) that puts-out a DC voltage proportional to loudness. In this case you don't need a super-fast loop. You can get the "peak loudness" by reading about 10 times per second instead of reading the audio waveform thousands of times per second.

  • Automatic gain control usually doesn't work very well anyway... i.e. If you're using a video recorder, the gain gets cranked-up when it's quiet which boosts the background noise. Then when a loud sound comes-along it gets amplified to super-loud and you get distortion for a short time before it has time to react. It can help in some situations but it will really screw-up music!

** The output has a DC bias (usually 2.5V) because the Arduino can't directly-read the negative half of the audio signal. 2.5V reads about 512 on the 10-bit ADC so if you wish you can subtract that out to get the positive & negative amplitudes.

*** I make sound activated lighting effects and I always use a peak detector circuit (directly connected to an audio signal. No microphone.)

Ah this is awesome information- thank you!

#3 sounds like exactly what I'm looking for- do you know of

  1. any purchasable chips which offer this functionality in a way compatible with an arduino, or
  2. any resources on how to make such a thing myself?