0

MAX4466 with Adjustable Gain and MSGEQ7
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MAX4466 with Adjustable Gain and MSGEQ7

by zekekoch on Thu May 30, 2013 11:49 am

Hello,

I'm trying to wire a MAX4466 Microphone to a MSGEQ7. I'm setting up the MSGEQ7 according to http://deadbird.fr/index.php?p=671, but it's

Pin 1 - 5v
Pin 2 - Gnd (.10uf between pin 1&2)
Pin 3 - A3
Pin 4 - D4
Pin 5 - .01uf to Out from the electret microsoft
Pin 6 - .10uf GND
Pin 7 - D3
Pin 8 - through two 100kohm resisters to power, 33pf cap to 5v

I've tried several MSGEQ7's and I'm getting really strange resuts. sometimes all lowish values from Pin5 (43s or so). Sometime 800's from the first two channels and the rest 43s. I"m guessing that the electret microphone is delivering a different power range than the msgeq7 is supposed to be receiving, but I'm not sure how to read that part of the data sheet. Any help would be much appreciated!

My code is here if it helps.

const int ANALOG = 0;
const int STROBE = 4;
const int RESET = 5;

int outputValues[7];
int spectrumBins[7] = {63, 160, 400, 1000, 2500, 6250, 16000};

void setup(void) {
//setup MSGEQ7
pinMode(ANALOG, INPUT);
pinMode(STROBE, OUTPUT);
pinMode(RESET, OUTPUT);

analogReference(DEFAULT);

digitalWrite(RESET, LOW);
digitalWrite(STROBE, HIGH);

LED1.init();

Serial.begin(9600);
}

void loop(void) {
//reset chip
digitalWrite(RESET, HIGH);
digitalWrite(RESET, LOW);

for (int i = 0; i < 7; i++) {
digitalWrite(STROBE, LOW);
delayMicroseconds(30);
outputValues[i] = analogRead(ANALOG);
digitalWrite(STROBE, HIGH);
}

for(int i = 0; i<7;i++)
{
if (outputValues[i] > 10)
Serial.print(outputValues[i]);
else
Serial.print(" ");
Serial.print(" ");
}
Serial.println();
}
zekekoch
 
Posts: 22
Joined: Thu May 30, 2013 11:38 am

Re: MAX4466 with Adjustable Gain and MSGEQ7

by zekekoch on Sat Jun 01, 2013 9:38 am

Leaving this here for future folks.

I figured out a couple of things. First of all, the MSGEQ7 seems to be tuned for the standard output of a headphone jack (is that 'line level). Anyway, I used a sparkfun breakout for a headphone jack and pumped the TIP into the MSGEQ7 and it's working well. Then I measured the voltage of the TIP and it seemed to be around .100V.

There's a line in the datasheet that says: Gain AV Peak input to DC output, Vin= 100 mVpp, fin = 1 kHz 20 22 24 dB

I think that might mean that Vin on the Audio Pin (5) is .1V "Peak to "Peak" or 100mv.

The Adafruit Electret Microsoft Board is tuned for 2.5V (about 20x more than I'm looking for). I slapped a resistor on that and now it's sort of in the right range. Now it's time to do some reading on voltage dividers. It's funny coming at all of this stuff from the software side. It's easy to get crazy stuff working, but then I get stuck on the elementals...

I'm not really sure what to do next since I want this to work in a wide variety of ambient noise (from spoken work to club)... I feel like I need some sort of non-linear dampening system, but I'm not sure what I'm talking about there...
zekekoch
 
Posts: 22
Joined: Thu May 30, 2013 11:38 am

Re: MAX4466 with Adjustable Gain and MSGEQ7

by adafruit_support_bill on Sun Jun 02, 2013 8:21 am

The microphone amplifier board will put out up to 5v peak-to-peak with a 5v supply. There is a tiny potentiometer on the back that can be used to adjust the gain.

Image

adafruit_support_bill
 
Posts: 74629
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX4466 with Adjustable Gain and MSGEQ7

by SLRist on Thu Feb 04, 2016 8:04 am

Beware that the MSGEQ7 chip is rather fragile in nature, and often inconsistent. Compare two of them, and you may get very different results. I have one which, for example, responds very well at the 3 low frequency bands, but poorly at the top 4. Another works fine. Another sent to me would not respond at all.

My advice if you're using MSGEQ7 chips is to set up a test rig with a ramping sine wave input (there are iPhone apps which can do this - I use one called Signal Gen) to run across the entire frequency range repeatedly, and check that it responds the same across all bands.

Only then start debugging your circuit, because it may well not be you at fault.

This is unfortunate, because it's not a particularly cheap IC.

SLRist
 
Posts: 9
Joined: Fri Jan 15, 2016 11:09 am

Re: MAX4466 with Adjustable Gain and MSGEQ7

by Nextprojectawesome on Sat Nov 18, 2017 10:45 pm

Hi, dis you figure this out? Having similar issue. Hoping for a circuit diagram

Nextprojectawesome
 
Posts: 37
Joined: Wed Jan 27, 2016 8:19 pm

Please be positive and constructive with your questions and comments.