Problems with Electret Microphone MAX4466

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
jeff009
 
Posts: 48
Joined: Sun Jun 10, 2012 11:54 am

Problems with Electret Microphone MAX4466

Post by jeff009 »

Hello,

I purchased an Electret Microphone MAX4466 and I'm having some issues with
getting it to work. I followed the wiring instructions at
https://learn.adafruit.com/adafruit-mic ... and-wiring

To test it, I created a sketch similar to the one at
https://learn.adafruit.com/adafruit-mic ... und-levels


Code is:
unsigned int minSample;
unsigned int maxSample;


void setup()
{
Serial.begin(9600);

minSample = 1024;
maxSample = 0;
}

void loop()
{
unsigned int sampleValue = analogRead(0);

if(maxSample < sampleValue)
{
maxSample = sampleValue;
}

if(minSample > sampleValue)
{
minSample = sampleValue;
}

Serial.print("Current: ");
Serial.print(sampleValue);
Serial.print(" Minimum: ");
Serial.print(minSample);
Serial.print(" Maximum: ");
Serial.println(maxSample);
}


With the gain screw turned all the way clockwise, I'm typically getting
Minimum: 223 Current: 337 Maximum: 550
* Ambient noise level is around 337
* When I clap (close to the mic) I was able to get up to 550 (but that's
out of 1024)
* Ambient noise level stays constant around 330-340. When I clap, I
noticed that the "minimum" went down (which I didn't expect)


With the gain screw turned all the way counter-clock wise, I'm getting
(with ambient noise)
Minimum: 307 Current: 321 Maximum: 361
After I clapped, I got:
Minimum: 197 Current: 339 Maximum: 421
so...
1) The max did go up a little bit it's still 421/1024
2) The min went down after I clapped


(these are pretty loud claps, fairly close to the mic).



Is there a problem w/my code, or do I have a faulty mic?

Thanks,

Jeff

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

Re: Problems with Electret Microphone MAX4466

Post by adafruit_support_mike »

If you've connected the microphone to the 3.3v pin on your Arduino, the highest ADC reading you can possibly see will be 676.. 3.3/5ths of 1024.

The 337 ambient reading corresponds to a quiescent voltage of 1.65v, which is exactly what I'd expect from a 3.3v supply.

User avatar
jeff009
 
Posts: 48
Joined: Sun Jun 10, 2012 11:54 am

Re: Problems with Electret Microphone MAX4466

Post by jeff009 »

Thanks for clearing it up. This makes sense now.

Thanks!

Jeff

User avatar
awleonard1
 
Posts: 21
Joined: Wed Jul 07, 2010 2:17 pm

Re: Problems with Electret Microphone MAX4466

Post by awleonard1 »

Thought this would be the best place to ask this since it is right in line with the same issue. My values at ambient noise are lower than 1.65/338 steps. Since they are scrolling so fast, it is hard to figure an average, but I'd say between 250 and 290. What might be the reason for that? Thanks for the help, I am still trying to learn about this stuff. The above reply helped me along quite a bit as I didn't think about the fact that 3.3 was the max.

Oh, the gain wire is loose at the moment. Attaching it to Vcc didn't seem to make much if any difference.

EDIT: I found that the DC bias is 1.25 according to the product description. That would put my ambient noise readings right in line at a little above "silence."

Thanks,

Tony

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

Return to “Other Products from Adafruit”