I need a quality sound sensor

Hello,
I am looking for a quality sound sensor for my robot project. I expect a reaction to e.g. clapping, raised voice, whistling, etc., but at a distance of e.g. 1-3m (all modules react at a distance of approx. 30 cm)
I would need both analog and digital output.
Modules GY4466, KY-037/38 etc. do not work according to my idea. They have a high sensitivity to any sound but in a very small range of output values.
Thanks for the idea.

You could consider this one:
https://www.dfrobot.com/product-1663.html

It does a logarithmic conversion, to give an output proportional to the sound pressure level in dBA.

There is a Wiki for it here.

See DrDiettrich's comment in post #3 about using software to set a trigger level.

I think that it's a matter of software to set the trigger level according to environmental noise. Cheap modules have a fixed trigger level that fits only a small distance range. You may need a microphone and a programmable amplifier.

thank you
wouldn't it help to replace the microphone? I see the same for all modules.
It's just an idea.

What's wrong with the GY4466?

I don't know if GY4466 is suitable for this purpose. Maybe it is sensitive enough but the amplifiers are weak.

It just has a pre-amplifier on the board. If you need more output power then use an audio amplifier.

Apparently, it will be necessary to somehow amplify the signal. I'm not a pro in electronics and I don't understand much.
My idea - the robot is 3m away from me in a quiet room - I clap my hands hard - the robot will react.

I have a clapper that works from 10 feet away and I think all it has in it is a microphone and a transistor, so I'm sure the Gy4466 would work.

How do you read an analog signal? I mean Arduino. Do you use any special code?

analogRead()
https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/

Yes, but what code to process the read value? The me analog value fluctuates in the range of approx. +/- 5. With a big change in the sound, the value changes by about 2 or 3 (distance of the sound source approx. 20 cm). At greater distance there is no change in value.

The MAX9814-based modules are essentially a microphone with integrated pre-amp plus audio amplifier.

These boards are analog output so threshold detection would be have to be done in microcontroller software as opposed to the simple "clap sensor" modules which have a digital output.

How are you measuring this value?
Are you using an oscilloscope?

That's the hard part, especially if you are trying to distinguish between a clap and other sounds. :wink:

Something is wrong... You should get bigger changes in the readings.

You might be reading mostly noise (it can be electrical and/or acoustic noise) and the sound is not loud enough to overcome the noise. If I crank-up the stereo I can get "good readings".

...With the sound sensor I have, I have to turn-up the a little TV louder than I normally listen in order to read anything over the electrical noise. It's worse with USB power from the computer (1) than with a separate power supply.

Also, analogRead() only reads for an instant every time through the loop. A clap is short duration so you might miss it, and most of the time you WILL miss the loudest peak of the sound. The more things you're doing in the loop the less chance of catching the sound.

There is an analog circuit called a Peak Detector (or envelope follower) that stretches-out the peak making it easier to "catch". Some sound sensors have that built-in. But then there is no possibility of analyzing the sound... You are only reading loudness.

(1) USB power tends to be noisy. Digital signals are immune but if that noise gets into the mic preamp, it gets amplified.

I am currently testing the original Hiwonder sound module (it is part of the robot).
1st photo output - control buzzer beeps in the background - waves are visible
2nd photo output - I just put my hand on the module, almost no reaction when it whistles.

¨

It looks like the second photo showed more of a respunse than the first.

But this is not the GY4466 module, so what are you trying to show?

The module does not respond to sound but to hand placement. Very little response to whistling.
The GY4466 has a similar response. He hardly reacts to sound.

As I already mentioned, you need an amplifier
Maybe one of these

You may also find that an old solution to a modern problem could help you increase the sensitivity. Maybe a horn or cone over the sensor might help.
Man-with-ear-trumpet