My ignorance here is vast but I think I have a project which the Teensy is hyper overkill for (I hope).
The basic idea is that a musical instrument (a chime) will be played, the fundamental frequency of the note played is detected (of seven possible input frequencies) and if one is detected an action will be taken (change the color of a ws2812 LED by sending serial data to it, or move a servo a certain number of steps).
Since the intended environments will be noise heavy and cords are acceptable, I've opted away from a microphone and use a clip on piezo contact pickup, with the signal fed into an op amp (I understand that a piezo contact mic can output an insane voltage when dropped or tapped) to protect the Teensy pin. The op amp (lm741, which I understand is not ideal but I have an lm324 if that's more appropriate. I don't think it should matter since this isn't an audio replication application its just an analysis) is running from the same 0-5v as the Teensy as the with the non-inverting input tied to 3.3v out. The frequencies I'm interested in from this particular instrument are all in a very small range, 2000khz to 3750 khz basically. Would it make sense to band pass filter around that range to help avoid unwanted noise pickup?
Here's my schematic, there's no values filled in because I am having trouble even determining which formula I should be using in this situation, what gain I'd even want. Forgive my coctail-napkin-aided-drafting schematic.
I understand that a microphone would probably provide a higher resolution, but I find microphone selection pretty daunting, is it as simple as a couple cent electret mike installed in the instrument near its "voicehole"?
The basic idea is that a musical instrument (a chime) will be played, the fundamental frequency of the note played is detected (of seven possible input frequencies) and if one is detected an action will be taken (change the color of a ws2812 LED by sending serial data to it, or move a servo a certain number of steps).
Since the intended environments will be noise heavy and cords are acceptable, I've opted away from a microphone and use a clip on piezo contact pickup, with the signal fed into an op amp (I understand that a piezo contact mic can output an insane voltage when dropped or tapped) to protect the Teensy pin. The op amp (lm741, which I understand is not ideal but I have an lm324 if that's more appropriate. I don't think it should matter since this isn't an audio replication application its just an analysis) is running from the same 0-5v as the Teensy as the with the non-inverting input tied to 3.3v out. The frequencies I'm interested in from this particular instrument are all in a very small range, 2000khz to 3750 khz basically. Would it make sense to band pass filter around that range to help avoid unwanted noise pickup?
Here's my schematic, there's no values filled in because I am having trouble even determining which formula I should be using in this situation, what gain I'd even want. Forgive my coctail-napkin-aided-drafting schematic.
I understand that a microphone would probably provide a higher resolution, but I find microphone selection pretty daunting, is it as simple as a couple cent electret mike installed in the instrument near its "voicehole"?