Arduino + MSGEQ7 is malfunctioning

I have sets of LED lights hooked up to an arduino and MSGEQ7 and they play to the audio. They’ve been working great for months but today all of a sudden they stay full blue and green at the same time but no red, so they appear teal. They stopped responding to the music at all. They just stay blue/green constantly whether i restart the arduino, computer, or anything.

I tried replacing the entire arduino board with a brand new one and they do the same thing.

I tried removing the MSGEQ7 chip but they do the same thing.

I tried removing the audio cable but they do the same thing.

I even tried swapping out the mosfets from each color but they do the same thing. I also rewired the entire breadboard thinking it was the wiring, nothing.

The only time they turn off is when i set the threshold over 800 in the code for the arduino or if i disconnect the GND wire. If i disconnect the 5V wire then they blink randomly all different colors, including red.

I havent replaced any capacitors or resistors yet and i dont have another MSGEQ7 to swap out, if thats the problem. I do have an MSGEQ7 shield from sparkfun but i just got it in the mail this week and dont know anything about it.

Can someone help me modify my code and rewire so i can try subbing in the shield? Or does anyone have any suggestions? Im going to go to radio shack tomorrow and replace all the resistors and capacitors but i dont think thats the problem.

This is my schematic:

And this is my code:

int analogPin = 0; // MSGEQ7 OUT
int strobePin = 2; // MSGEQ7 STROBE
int resetPin = 4; // MSGEQ7 RESET
int spectrumValue[7];

// MSGEQ7 OUT pin produces values around 50-80
// when there is no input, so use this value to
// filter out a lot of the chaff.
int filterValue = 80;

// LED pins connected to the PWM pins on the Arduino

int ledPinR = 9;
int ledPinG = 10;
int ledPinB = 11;

void setup()
// Read from MSGEQ7 OUT
pinMode(analogPin, INPUT);
// Write to MSGEQ7 STROBE and RESET
pinMode(strobePin, OUTPUT);
pinMode(resetPin, OUTPUT);

// Set analogPin’s reference voltage
analogReference(DEFAULT); // 5V

// Set startup values for pins
digitalWrite(resetPin, LOW);
digitalWrite(strobePin, HIGH);

void loop()
// Set reset pin low to enable strobe
digitalWrite(resetPin, HIGH);
digitalWrite(resetPin, LOW);

// Get all 7 spectrum values from the MSGEQ7
for (int i = 0; i < 7; i++)
digitalWrite(strobePin, LOW);
delayMicroseconds(30); // Allow output to settle

spectrumValue = analogRead(analogPin);

  • // Constrain any value above 1023 or below filterValue*
    spectrumValue = constrain(spectrumValue*, filterValue, 1023);*

* // Remap the value to a number between 0 and 255*
spectrumValue = map(spectrumValue*, filterValue, 1023, 0, 255);*

* // Remove serial stuff after debugging*
_ Serial.print(spectrumValue*);
Serial.print(" ");
digitalWrite(strobePin, HIGH);

* Serial.println();*

* // Write the PWM values to the LEDs*
* // I find that with three LEDs, these three spectrum values work the best*
* analogWrite(ledPinR, spectrumValue[1]);*
* analogWrite(ledPinG, spectrumValue[4]);*
* analogWrite(ledPinB, spectrumValue[6]);*

I just finished my audio project which uses two MSGEQ7s. It works great so based on my "vast" experience, I'll try to help.

First, the 22K resistor should be in between the audio input (from jack) and C3. Next, you need a 200K resistor (red, black, yellow) where you show the 22K resistor. That's between 5V and EQ7 pin 8. Probably not that critical, but the latest chip datasheet shows 100nF for C3 (not 10nF).

Depending on the audio signal level, you may have fried the chip because of no resistance on the input. Replace the 22K in the circuit shown with 200K and move the 22K to the audio input. Try it using serial data to monitor the EQ7 output (A0).

I'll look at the code next.

I actually caught that error on his schematic about the 22K resistor and ive been using a 200K resistor there. I should have mentioned that. I dont have a 22k resistor between audio input and C3 though. That could be the problem. I'll replace the 100nf too.

If the MSGEQ7 chip got damaged, would it still cause this malfunction when i remove the MSGEQ7 and send no audio signal? I cant figure out why it outputs the blue/green when its not receiving any input signal

I dont have a spare MSGEQ7 but i do have an MSGEQ7 shield here. Can i substitute that somehow?

I should add that i really need to get this thing fixed in the next 12 hours. We use this set up at my bar and there is a huge show tonight and it would be a disaster to have no lights.

Nothing worked.

When I monitor output 7, I get a bunch of scrolling numbers when it’s plugged intoarduino. If i disconnect the MSGEQ7 from the arduino, I still get scrolling numbers but they are different slightly but still malfunctioning. It doesnt respond to the audio input at all.

I think i need to get this shield working.

There's a board that does everything you need to do: :)