Trouble interfacing MAX4466 with MSGEQ7 and Arduino UNO with 3 LEDs

Hello All,

this is my first project with which I am diving into the Arduino world. I am trying to create a LED light organ that reacts to music and sounds using:
-Adafruit MAX4466 Electret Mic Amplifier
-MSGEQ7
-Arduino UNO (powered by pc usb)
-3x1W LEDs with 3 N Channel MOSFETs
-external 5v 2A powersupply

First I followed the MSGEQ7 Tutorial by J Skoba (http://nuewire.com/info-archive/msgeq7-by-j-skoba/) and everything works really well, in the serial monitor I can see a good response ranging from 80 to 1023 for each frequency.

Next, I followed an Instructable (I am aware they are not the best) and put everything together like in the schematic. However, the LEDs stay on the whole time while flickering a little, also when I observe the serial monitor all the values seem to be stuck around 255 and dont react to sound (screenshot is attached). I also tried various other Tutorials (not from instructables)all to similar results.

int analogPin=0;
int strobePin=2;
int resetPin=3;
int ledred=9;
int ledblue=10;
int ledgreen=11;
int spectrumValue[7];
int filter=80;

void setup(){
  
  Serial.begin(9600);
  pinMode(analogPin, INPUT);
  pinMode(strobePin, OUTPUT);
  pinMode(resetPin, OUTPUT);
  pinMode(ledred, OUTPUT);
  pinMode(ledblue, OUTPUT);
  pinMode(ledgreen, OUTPUT);
  digitalWrite(resetPin, LOW);
  digitalWrite(strobePin, HIGH);
}

void loop(){
  
  digitalWrite(resetPin, HIGH);
  digitalWrite(resetPin, LOW);
  for (int i=0;i<7;i++){
    digitalWrite(strobePin, LOW);
    delay(30);
    spectrumValue[i]=analogRead(analogPin);
    spectrumValue[i]=constrain(spectrumValue[i], filter, 1023);
    spectrumValue[i]=map(spectrumValue[i], filter,1023,0,255);
    Serial.print(spectrumValue[i]);
    Serial.print(" ");
    digitalWrite(strobePin, HIGH);
  }
  Serial.println();
  analogWrite(ledred,spectrumValue[0]);
  analogWrite(ledred,spectrumValue[1]);
  analogWrite(ledblue,spectrumValue[3]);
  analogWrite(ledblue,spectrumValue[4]);
  analogWrite(ledgreen,spectrumValue[5]);
  analogWrite(ledgreen,spectrumValue[6]);
}

So, what could be the problem?

Thanks for your help!

schematic.jpg

serialmonitor.jpg

Hi Meteora,

Did you ever solve this problem?

I'm doing a similar project.

Cheers