MAX 9814 Breakout Noise Issues

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
petamaj82
 
Posts: 6
Joined: Sat Oct 18, 2014 11:25 am

MAX 9814 Breakout Noise Issues

Post by petamaj82 »

Hi,

I have recently purchased your MAX9814 electret microphone breakout as well as the regular mic breakout with adjustable gain. I tried to sample the values with atmega328. While the adjustable gain mic is working very very badly, the autogain breakout works reasonably nice, however the noise level is quite high - way higher than when I try to sample with my laptop's mic.

atmega328p is powered from 5V via SMPS. The microphone is connected to 3v3 via a MCP1700 linear regulator (eventually I plan to have it all run from 3v3). The 3v3 is filtered using a 33uF electrolytic capacitor and there is 0.1uF cap directly between GND and VCC of the breakout board. The 3v3 line also goes to AVR's AREF pin and to compensate for the DC offset of the board, its output goes to a 10uF electrolytic capacitor connected to AVR's adc input and two 100k resistors to 3v3 and GND.

Can you please tell me what is wrong with my setup, or what can I change to get the noise level to an acceptable range? I am also not sure if AVR's ADC is precise enough, I have tried sampling the output from the 100k voltage divider alone and that was stable at 128.

If you would like to, I will be happy to send the wav files I have sampled too.

Thanks a lot for your help!

-P

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: MAX 9814 Breakout Noise Issues

Post by adafruit_support_mike »

You may be seeing aliasing effects from undersampling.

It sounds like you've done a good job of filtering and stabilizing the supply and reference voltages, and your connection to the ADC is a classic high-pass filter. For the values you listed, it will block frequencies below about 0.3Hz and let everything faster than that through.

Thing is, the ATmega328P's ADC only samples at about 10kHz. At that speed, you can only get meaningful readings from signals whose frequencies are 5kHz or less. Above 5kHz, the wave can rise, fall, and rise again between two ADC samples. If you feed a standard audio signal into that (20Hz to 20kHz), about 3/4 of the bandwidth is moving too fast for the ADC's samples to catch a pattern.

The readings you do get will sample the fast waves relative to the nearest multiple of 5kHz, and the effect will look a lot like random noise piled on top of the 20Hz-5kHz signals the ADC can actually read meaningfully.

This webpage talks about speeding the ADC up beyond its default rate:
https://sites.google.com/site/measuring ... he-arduino

User avatar
petamaj82
 
Posts: 6
Joined: Sat Oct 18, 2014 11:25 am

Re: MAX 9814 Breakout Noise Issues

Post by petamaj82 »

Hi Mike,

Thanks a lot for such a quick answer. I should have probably noted this earlier, but I have tried oversampling too - (2x and 4x) and while there has been a little improvement in the deviance of the output (i sampled 10 seconds of as close to a silence as I could get), there was no audible difference in the output. Also, I am only interested in human voice and I tried to record this in as quiet settings as possible, so I was thinking that 8kHz should be enough.

Also, when I tried your test and directed the output of the mic to headphones, the ambient noise level was high too.

Thanks,

-P

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: MAX 9814 Breakout Noise Issues

Post by adafruit_support_mike »

Let's take a look at the hardware..

Post a photo of your breakout and the connections to the Arduino please. 800x600 images usually hit the best balance between file size and amount of visible detail.

User avatar
petamaj82
 
Posts: 6
Joined: Sat Oct 18, 2014 11:25 am

Re: MAX 9814 Breakout Noise Issues

Post by petamaj82 »

Sure, thanks. Attached is a picture of the whole thing - I am not using arduino, but connect directly to mega328. It is a bit messy as there is the raspberry pi board, real time clock module, accelerometer, 3v3 SMPS, lines between rpi and avr with level converters, display cables and programmer interface all on the board. I will also post a schematic of the relevant parts so that it makes more sense because the board is a bit crowded.
Attachments
board.jpg
board.jpg (311.64 KiB) Viewed 840 times

User avatar
petamaj82
 
Posts: 6
Joined: Sat Oct 18, 2014 11:25 am

Re: MAX 9814 Breakout Noise Issues

Post by petamaj82 »

Here is the pdf schematic (not all parts are listed, but I have made sure that all the parts that deal with the mic are there and in correct form).
Attachments
schematic.jpg
schematic.jpg (136.93 KiB) Viewed 840 times

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: MAX 9814 Breakout Noise Issues

Post by adafruit_support_mike »

Yeah, there's a lot going on there.

Do you have an Arduino you can use for testing purposes? It's a lot easier to check hardware in a small, well-controlled circuit.

One thing that might help with your existing setup: move the 1uF capacitor over to the rows on the breadboard that connect to the ATmega328's VCC and GND pins. Better yet, leave the one you have now where it is and connect another as close to the ATmega328 as possible.

A debounce cap's job is to absorb ripples generated by stray inductance, resistance, and capacitance in the supply rails. Breadboards are notorious for having all three, to the more distance you have between the chip and the cap, the more noise will escape the debouncer.

User avatar
petamaj82
 
Posts: 6
Joined: Sat Oct 18, 2014 11:25 am

Re: MAX 9814 Breakout Noise Issues

Post by petamaj82 »

Hi, thanks! Unfortunately, I do not have an arduino board. I can try to move the relevant parts of the circuit to a different breadboard, if that might help. However, I am not sure what is the 1uF Cap you are talking about? If you mean the 0.1uF C6 in the schematic, that is already on the rows with VCC and GND on them as close to the chip as possible (it is barely visible on the picture). If you mean the larger C7 electrolytic cap, that one is 470uF and is located in the 5V and GND rails on the breadboard in the top right corner - however I though this one is not a debouncer, but a smoothing capacitor for the power lines. Can you please specify what capacitor did you mean? Or you wanted me to increase C6 to 1uF?

I tried also attaching the wav file I have recorded from this, but your webpage does not allow it. If you would like to look at it, please let me know how should I get it to you.

Thanks a lot!

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: MAX 9814 Breakout Noise Issues

Post by adafruit_support_mike »

I was referring to the larger cap in the upper right corner of the photo. I didn't see a 100nF cap between the ATmega's VCC and GND pins.

For reference, "debounce capacitor" and "smoothing capacitor" are different names for the same thing.

If you can move the MAX9814 out to its own circuit for testing purposes, it will make finding the problem easier.

User avatar
petamaj82
 
Posts: 6
Joined: Sat Oct 18, 2014 11:25 am

Re: MAX 9814 Breakout Noise Issues

Post by petamaj82 »

Hi, Thanks for the clarification. I have flashed another ATMega 328p with the program and I have put it on a separate breadboard (image attached). The four wires coming from the image are: red (+5V), black (GND), and yellow /grean (SDA/SCL for I2C).

I have tested it and the sound quality has not changed - note that I have put the large debouncing cap as close to 5V and GND lines of AVR as possible already as you suggested.
Attachments
board2.jpg
board2.jpg (724.85 KiB) Viewed 800 times

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: MAX 9814 Breakout Noise Issues

Post by adafruit_support_mike »

That layout looks good.

There may be something amiss with the microphone breakout. Let's try a new one.

Send a note to [email protected] with a link to this thread and the folks there will get you a new MAX9814 breakout.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”