Sound Detection question

While I’ve made several Arduino-based projects with varying levels of complexity, I’ve never delved into measuring and processing sound and before potentially going down a rabbit-hole I wanted to ask a general question on this forum:

I would like to add a microphone to a popcorn popper that detects when the popping starts. I want to use simple hardware for this and only plan on having an ATMega-based 16 MHz microprocessor, nothing more powerful. The actual project is a homemade coffee roaster and I want to be able to detect the “first crack” and “second crack” of the coffee beans with a high level of background noise (the fan and rotating beans in the chamber); but the sound profile is pretty much the same as that of popcorn popping and I’m sure many more people here have popped popcorn than have roasted coffee :slight_smile:

Is this feasible? Or do I need real processing power to do this? Is a simple SparkFun sound detector board sufficient?

It is extremely difficult to reliably recognize specific sounds, especially if there is high background noise.

This would probably be a machine learning project, requiring lots of training data.

The “popping” sounds don’t need to be detected as such, they will be the only sounds louder than the background noise. Imagine a microphone on a popcorn popper - the machine goes on and there’s high volume from the fan, but at some point there will be spikes in volume that raise the average incoming volume and I’d like to capture when that event starts and when the volume goes back down to the previous level (i.e. when the popcorn has popped). I’m not sure I need advanced machine learning for that - I remember the old “clapper” device from the 80’s which made do without that…

Might be able to do it with a band pass filter that’s tuned to the sound of popping corn. False positives would be possible but you might be able to tune things well enough to get those down to a reasonable amount.

I had to google the filter code, but it looks doable with an 8-bit Arduino so I’ll order a breakout board and prepare to roast some coffee :slight_smile: Thanks.