MEMS microphones into Audio Shield???

robedney

Active member
I have a project, working, that uses a Teensy 4.0, Audio Shield, two electret mics with preamps and a 5 watt power amp. What's plaguing me at the moment is that the preamps are noisy -- background hash that I can't seem to get rid of. The preamps are line-in to the audio shield. If I disconnect the preamps and use a normal line in source (like my phone) everything sounds great, so it's definitely the preamps. Any suggestions to clean that up would be much appreciated.

As an alternative I'm thinking of using MEMS mics, which I'm guessing (based on my research) should be quieter. I've hunted around looking for info on connecting these to the sound shield but can't find anything that gives me a clear idea on how to do it. can anyone point me to a reference, or just tell me how to do it. This would be much appreciated!
 
Maybe we can help you clean up those preamps? But we'll need to be able to see them, like photos and a schematic. The mic datasheet or tech info could also help.

But for a first completely blind guess, maybe you're using condenser mics that need a DC bias for power AND maybe you're providing the mic power with a pullup resistor to a normal (aka noisy) power supply? However, if you're using a dynamic mic with low impedance, usually much more gain is needed and special circuits are commonly used for those types of low impedance mics.
 
Thanks Paul! First a brief description of the project:
"Sparky" is a hearing assist device that will shortly be fully open source, including software, STL files for 3D printed parts, a parts list and build guide. The website is nearly ready to go. I'm 74 years old, retired, deaf in one ear and have significant age-related hearing loss in the other one. Sparky -- with an OLED display and 4 button interface -- allows inputting a full Audiogram either from an audiologist or Sparky can administer a 7 band left/right audiometric exam on it's own -- with no reliance on a computer, smartphone or any other external device. It then saves the results. Sparky can work with standard wired earbuds or a bone-conduction headset that can be built with two transducers and 3D printed parts. Sparky is designed to compensate for those with limited dexterity or vision. Once setup, The user need only use one on/off switch and one big volume control -- although all sorts of other things can be accessed from the menu.

Everything about Sparky is currently working well -- aside from the noise. The noise level is actually tolerable for me to use Sparky -- my brain filters it out pretty quickly -- but it's going to be an issue for some. I'm comparing it against a $1250 Phonak hearing aid (that's for one, it would be $2500 for a pair). Sparky matches the Phonak in amplification, frequency loss compensation and improved speech intelligibility. It does this for about $150 in parts available from PJRC and Amazon. Sparky is also designed to be redesigned.

The whole idea here is to provide a hearing solution on the cheap for people who do not have access to or cannot afford standard hearing aids, anywhere on the planet.

The mic/preamp module is the MAX4466 Electret Microphone Amplifier Module available on Amazon. A pair of these are mounted in a removable head the pops into the top of Sparky. This can be detached, an extension cable added and the mics can be worn on the lapel, allowing the Sparky box to be stuffed into a pocket. I put the preamps in the removable head so that a line-level signal would be used through the extension cable.

The Max4466 is powered from the 3V pin on the Teensy (as is the OLED display). A four conductor jack/plug is used to connect the 3V, ground and left/right out signals. None of this seems to be the noise source as I've made direct connections and it's still there.

I've no real background in any of this stuff, have been learning as I go along and I'm stuck here! Pics here:
 

Attachments

  • main.jpeg
    main.jpeg
    132.8 KB · Views: 61
  • inside_box.jpeg
    inside_box.jpeg
    97.9 KB · Views: 64
  • mics.jpg
    mics.jpg
    69.5 KB · Views: 66
Wow, that's an impressive packing of everything into such a small case!

On the MAX4466 module, I found this photo on Amazon. Does this look like the one you have?

1719721676527.png


The very first thing to check is the gain knob setting. You probably want to set it has high as possible and adjust settings in your code to deal with the larger signal. Assuming noise remains constant, more signal means better signal to noise ratio.

I seem to recall hearing a couple times that people also had noise or artifacts introduced by the audio shield's DC blocking filter. If the gain is set high or near the upper end, I'll try to look for that info again. Might be a long shot, but should be quick and easy to try (compared to the difficult task of looking at wiring for possible ground loops).
 
The MAX4466 is not low noise by any criterion, it has a whopping 80nV/√Hz, whereas a run-of-the-mill low noise opemp will get you to more like 4nV/√Hz, a full 26dB quieter. Just because the marketing department put "low noise" or "microphone preamp" on the datasheet doesn't mean much it seems.

The MAX4466 is optimized for extremely low power consumption, as is clear in the description, never a good thing for low-noise performance. I think its target application is mobile phone and voice-recorder microphones where the signal level is high (you hold it to your face!).
 
Sparky looks like fun!

As mentioned earlier, I am part of the Tympan team, who were funded to make an open source hardware and software platform for audiological research (ie, hearing aids and whatnot). We have a lot of overlap with what you're doing, which is cool!


We've been at this for years. Our hardware is at rev F. It's built around a Teensy 4.1. The analog audio portion is built around a TI AIC3206. It has two MEMS mics on the PCB, or accepts external microphones.

We also have earpieces that connect to the Tympan. The earpieces are similar to behind-the-ear hearing aids. These earpieces use digital PDM microphones. The use of digital MEMS mics is very common these days. They are probably as quiet as you're going to get in a small low-cost device. To get quieter, you'd probably have to move into highly specialized microphones. We use the Invensense IM69D130 mics, but there might be even quieter ones out there now.

PDM mics cannot connect directly to the Teensy; they need some sort of interface chip [stricken due to being corrected in a responding post below. Cool.]. Luckily, our AIC3206 provides a PDM interface in addition to all of its analog inputs...so, using PDM mics was pretty easy for us.

If you choose to stick with analog microphones, and if you think you're limited by the noise floor of your analog preamplification, don't get fooled by the single-number values advertised as the self noise for the op amp. Those single-number values are usually for the self-noise at a frequency way above audio frequencies. At audio frequencies, the noise level can be different, sometimes radically so [*].

Instead, you'll need to dig into the datasheet, find the graph of noise versus frequency, and see what the noise level is down at audio frequencies. That'll tell you what you need to pick the best op amp for your needs.

Chip
[*] For a while, I was focused on seismic signals and infra sound signals, so I needed low noise around 1-10 Hz. Op amp self-noise definitely gets weird down there. So, for sure, I had to dig into the datasheets to get frequency-specific noise values to find a good one for that use. But at a normal audio frequency of, say, 1 kHz maybe my disillusioning experience is less true...maybe the noise at 1 kHz isn't too far off from the single-number values that are advertised. To be sure, I'd suggest that you a look at the noise-per-frequency graphs in a couple of datasheets and see!
 
Last edited:
Oh, and also...

Since you're using the Teensy Audio shield, you should be aware that it can have some funny noise behavior sometimes. For example, its digital high pass filter (typically enabled by default) can add a lot of noise. You'll want to explore disabling it as a way to noticeably lower the noise.


Chip
 
First of all thanks for all the help. I now realize that the Max 4466 is not the mic/preamp that I want to end up with. However, I've made some mods, some of which were randomly experimental, and I now have a noise level I can live with for the moment.

The first thing I did was to take Chips suggestion and disable the sound cards high pass filter. That helped a bit.
Next, I was initially feeding ground to the preamp via the two ground pins - tied together - of the line-in pins on the shield. On a whim I disconnect those and fed ground from the main (battery) ground where everything else gets it. For reasons unknown that got rid of some noise, particularly a faint "clicking" that I assume was digital.
Lastly, I have used these preamps before by popping of the mic, soldering on some leads and using a smaller dirt cheap electret -- and remembered less noise from that. So, I did it again, removed the mics the preamps come with and replaced with the smaller cousins. Again, a drop in noise. Go figure. Life is all about iteration.

I also decided that I needed a reference, so I got out my Zoom H1n digital recorder, plugged in the same earbuds I've been using and roughly adjust the volume to match (with the Zoom's NR off). That helped me a bit in isolating normal room presence as opposed to system noise. Some day I'll build an anechoic chamber!!!
 
Back
Top