Go Down

Topic: MSGEQ7 problem (Spectrum Analyzer) (Read 153 times) previous topic - next topic

User151

Apr 21, 2017, 06:13 pm Last Edit: Apr 22, 2017, 12:43 am by User151
(Using Arduino Pro Mini)

I'm using the MSGEQ7 but there are a couple of issues.

This is the circuit:



And this is the code:

Code: [Select]
int bands[7];

int strobe = 3;
int res = 2;

void setup()
{
  pinMode(res, OUTPUT);
  pinMode(strobe, OUTPUT);
  digitalWrite(res, LOW);
  digitalWrite(strobe, HIGH);
}

void loop()
{
  digitalWrite(res, HIGH);
  delayMicroseconds(1);
  digitalWrite(res, LOW);
  for(char i = 0; i < 7; i++)
  {
    digitalWrite(strobe, LOW);
    delayMicroseconds(50);
    bands[i] = analogRead(A0);
    digitalWrite(strobe, HIGH);
    delayMicroseconds(30);
  }
}


What happens is, when looking at the output using an oscilloscope, only 6 out of 7 bands are visible:



The Function Generator is outputting a 63Hz signal 2Vp-p. Even if the frequency is anything else the result is the same.

I tried using a different MSGEQ7 but instead a different band doesn't appear.

Datasheet:
https://www.sparkfun.com/datasheets/Components/General/MSGEQ7.pdf

DVDdoug

#1
Apr 21, 2017, 09:58 pm Last Edit: Apr 21, 2017, 10:11 pm by DVDdoug
I've never used the MSGEQ7 but I think your missing a delay after reset (trs).   And "just for fun", you might try making the delays longer if that doesn't work.   (All of the times on the datasheet are minimum times, and you can make them longer.)

Quote
I'm using the MSGEQ7 to make a graphic equlizer but there are a couple of issues.
FYI -
That part is mis-named and you can't make a graphic equalizer out of it.  ;)  

 A graphic equalizer is a signal processor (hardware or software).  

The MSGEQ7 is a spectrum analyzer/display chip...   Audio goes in, but audio doesn't come out...   You can make a display  for your graphic equalizer with it (or you can use it without an equalizer).


User151

Thanks for the feedback :)
I'll update when I get the chance to test it.

Any other ideas?

Grumpy_Mike

That circuit will never work, the fact you are getting something means that is not what you have. Your have R3 connected directly to ground. So according to that circuit it does nothing.


User151

Sorry about that, it was a mistake in my drawing.
Replaced it.

Go Up