Sound Reactivity Question

Status
Not open for further replies.

Jvyy

Member
I'm curious if anyone has any input on this. I am currently working on a sound-reactive project but starting slowly step by step and am stuck on this particular question...

Do I necessarily need to use an audio shield (https://www.pjrc.com/store/teensy3_audio.html) to do sound reactivity or could I simply use a microphone module and use the library instead?
 
yes - if the module translates correctly to the needed ADC-Voltage-level (1.2V range). The audio-shield is not needed - but i'd use it because more features like line in/out mic-in, headphone-amplifier.. higher quality..
 
A microphone module can indeed by used directly to a ADC pin. No need for the audio shield if you don't need high quality sound.

Here's a thread about a modification to one of Adafruit's popular mic modules for use with Teensy.

https://forum.pjrc.com/threads/4046...io-Lib-results?p=126317&viewfull=1#post126317

Sadly, the very best mic module is no longer available. But if you wanted to make it a DIY project, I'd recommend using this design.

https://www.tindie.com/products/NeutronNed/max9814-microphone-module-for-teensy/

Adafruit's mic is a close second if you add the 220 ohm resistor and 100 uF capacitor as I described on that thread.
 
Something else to consider is a couple software limitations. The on-chip ADC is limited to only 1 audio channel. That's a great fit for a single mic module, but many times we've had people mistakenly assume the ADC can do stereo. This is purely a software limitation and may change in the future for the chips which actually do have 2 ADCs on-chip.

The audio input also completely hogs the ADC hardware, so you can use analogRead(). Again, a software limitation that may someday improve for the chips where there are 2 ADCs, but today using a mic or other audio signal with the ADC means giving up any other analog input capability.

If you really need a knob while using the ADC for audio, the Encoder library is probably the way to go.
 
Something else to consider is a couple software limitations. The on-chip ADC is limited to only 1 audio channel. That's a great fit for a single mic module, but many times we've had people mistakenly assume the ADC can do stereo. This is purely a software limitation and may change in the future for the chips which actually do have 2 ADCs on-chip.

The audio input also completely hogs the ADC hardware, so you can use analogRead(). Again, a software limitation that may someday improve for the chips where there are 2 ADCs, but today using a mic or other audio signal with the ADC means giving up any other analog input capability.

If you really need a knob while using the ADC for audio, the Encoder library is probably the way to go.

Do you perhaps know what kinds of limitations I would run into in regards to using a microphone module to do sound reactivity within a loud environment such as a music festival? I noticed that Ned's modified microphone module is seem to be the perfect piece for the Teensy module and am hopefully going to ask someone much more experienced than I to assist me on remaking the same module as I have no idea how to do that sort of work (but am slowly learning!). Thank you for the two suggestions!
 
Something else to consider is a couple software limitations. The on-chip ADC is limited to only 1 audio channel. That's a great fit for a single mic module, but many times we've had people mistakenly assume the ADC can do stereo. This is purely a software limitation and may change in the future for the chips which actually do have 2 ADCs on-chip.

The audio input also completely hogs the ADC hardware, so you can use analogRead(). Again, a software limitation that may someday improve for the chips where there are 2 ADCs, but today using a mic or other audio signal with the ADC means giving up any other analog input capability.

If you really need a knob while using the ADC for audio, the Encoder library is probably the way to go.

I will most likely ever will need only to use the audio channel to be for the microphone module. But I may run into this issue in the future if I forget but will keep note of the limitation within the software.
 
Have you looked at the i2s microphones that are now available? These microphones provide input in a digital form using the i2s bus (not i2c). The audio shield provides input in this form, but if all you needed was the microphone and not the rest of the audio shield, it might be simpler to use that. Note, I am a software guy, not a hardware or sound guy, so I might be completely off base here.

 
I was lucky enough to take a look at Neutronned's microphone module and am now waiting and going to be in the process of making my own copy of his module that he once sold. Is there any tips on how to implement this? Please note that my only purpose for sound reactivity is to use a microphone to listen to sound and process it through the software and do reactive effects. I will never need or desire for plugging a sound source input to it. So if that's all I need, an audio adapter will not be necessary and I can freely use the Teensy 3.6 + OctoWS2811 adaptor freely without conflict right?
 
So if that's all I need, an audio adapter will not be necessary and I can freely use the Teensy 3.6 + OctoWS2811 adaptor freely without conflict right?

Yes, confirmed, no conflicts there - as long as you choose one of the pins not consumed by OctoWS2811. In fact, the SpectrumAnalyzer example in OctoWS2811 shows exactly this usage scenario, so maybe open that example to see how it's done. If your sound reactions will involve frequencies, maybe that example can give you a good starting point?

Modifying Adafruit's microphone is probably simpler. The performance should be on-par with Ned's design if you add the resistor and capacitor to filter the 3.3V power.

With a large LED project, you want to be sure to connect the mic to AGND and 3.3V at the board and keep those wires and the analog signal away from the massive power of so many LEDs with little PWM controllers built inside. Even though the frequency is much higher than the audio band, without a low-pass filter in the signal path it can get into the ADC and alias into the audio band. Ned's board has a simple filter (R4, R5, C4) which did this function, and if you really need this you could add that to Adafruit's output too.
 
Have you looked at the i2s microphones that are now available? These microphones provide input in a digital form using the i2s bus (not i2c). The audio shield provides input in this form, but if all you needed was the microphone and not the rest of the audio shield, it might be simpler to use that. Note, I am a software guy, not a hardware or sound guy, so I might be completely off base here.


I'd also go with I2S microphone. There's also this one: https://store.arduino.cc/usa/ics43432-i2s-digital-microphone

I'm not a fan of Adafruit's I2S microphone, read my screed about it here: https://forum.pjrc.com/threads/47010-I2S-Microphone-(SPH0645LM4H-B)?highlight=i2s
 
Status
Not open for further replies.
Back
Top