Very short tune recognition howto?

Hello everyone! I need some advice on my small project.
First of all I am using an arduino uno r3 + this sound sensor here (czn-15e).

image

I have a digital tone on my doorbell which goes D5(250ms), B4(250ms), G#4(250ms) without silent spaces in between. I want an LED to light up for a couple of seconds when the doorbell rings and then turns off.
What is the best approach here? What should be considered?
I found a good tutorial on how to sense a sound sensor with arduino here:

SOUND SENSOR DATA ON ARDUINO SERIAL PLOTTER - Arduino tutorial #30 - YouTube

The LED part will be also no problem. Now how do I make the trigger reliably cause now I have a complete mess going on.
Any advices are very much appreciated. Thanks

Show what You have achieved so far. Code and schematics, please.

What is your programming experience and do you have any background in signal processing?

In this post I showed some code to do single tone recognition using a single bandpass filter centered on that tone. This could be extended to detect a sequence of tones by running three bandpass filters at the desired frequency sequentially. So a state machine that looks for D5, then changes state to look for B4 and goes back to "look for D5" if not detected in time period or goes to "look for G#4" if detected, etc. There exist online design tools that produce C code for the filters.

An FFT approach might also be applicable, but probably won't run fast enough on an UNO R3.

There exist implementations of multiple simultaneous frequency detection using the Goertzel algorithm that can run on an UNO R3 in continuous real time.

1 Like

That module will detect any sound, it cannot be made to detect sertain frequencies.
So if a dog barks it will also turn on the LED.
Is that OK?

Thank you MrMark this is enough information to start with. I will check all the links and try my best with this project. Sounds like a lot of fun! By the way my programming experience is I feel comfortable with C and C++ and unfortunately no practical experience with signal processing besides basics from University (I studied electrical engineering).

Have a look at seeing you can take an output from the bell push itself , or why not just build a new one with Arduino - it is capable of making tones ?

Iā€™d forget the band pass filter part , there will still be false readings from other sources .

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