Is there a library to measure sound frequency using the ky-038 sensor?

Hi,
How can I check if sound of frequency 3600Hz is being played, using the ky-038 sound sensor?
I've been looking at different forums and libraries but couldn't find anything...

The very first thing Google found was this sentence:
"This sensor emits a signal if the microphone of the sensor detects a noise. The sensitivity of the sensor can be adjusted by means of a controller.".

Obviously the device does not and cannot measure anything except the LOUDNESS of a sound.
Sorry. Need something else for a sensor,and then some way to separate one sound from all the others being heard by the sensor.

Hi @world_tan
FYI

Convert the analog signal of the sensor with an ADC to numerical values, then apply a FFT function to a number of samples. This is the approved way for any frequency analysis, since many decades.

FFT stands for Fast Fourier Transform. There is a library arduinoFFT, but I have no idea if it powerful enough to do what you want. Audio frequency analysis is not too demanding, so it should be feasible with a somewhat faster CPU.

You are in for a lot of fun. Signals analysis is very interesting, and you can use a good library without getting too deeply involved in the maths behind FFT.

Cheers,
Ekki

Yep, should do OK:

ArduinoFFT - Open Music Labs Wiki

I have used the lib years back as a VU'ish spectrum meter.

This may be preferred over FFT for monotone
Goertzel Algorithm - Arduino Project Hub

But, one could throw h/w pre-processing ahead of the Arduino

MSDET - Tone Detector (mix-sig.com)

Autocorrelation is very simple, and for audio tones outperforms the FFT analysis.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.