problems whit msgeq7 spectrum analyzer

Hello everyone!
I'm making a spectrum analyzer, using the MSGEQ7 filter.
ARDUINO MEGA and SI5351 board.

The "tutorial" is in this video, in the description there is a link with the arduino code, and all the schemes.

I assure you that I have followed the tutorial correctly, and the connection diagrams.

But in any case I find a big problem, once everything is connected, and once Arduino mega starts, all the LEDs light up, as if there was white noise.
after a few attempts, I realized that pin number 3 (out) of msgeq7 throws out this "noise" because unplugging it and touching the cable that would go to that pin causes the LEDs to light up with the voltage of my body.

so the problem I seem to understand is in this damned msgeq7 ... that I have already read that it may not always work ...

Do you have any ideas or advice?

Thank you!

after a few attempts, I realized that pin number 3 (out) of msgeq7 throws out this "noise" because unplugging it and touching the cable that would go to that pin causes the LEDs to light up with the voltage of my body.

No, do not go plugging an unplugging stuff to an electronic circuit that is powered up. That is a good way to fry chips. And those results do not result in that conclusion anyway.

Change your code so that you print out what numbers you are getting from this chip and see how they change.

Where did you get this chip from?

There are a lot of these ICs that are simply dummies with the part number printed on. That is they have nothing inside them. I was talking to the founder of Spark Fun back in 2011 and he told me about several thousand they bought that were like this.

You can tell if you try and measure the resistance between power and say the input pin. If it doesn't look like a diode, one direction has a different resistance to measuring it in the other then the chip is most likely dud. Do this with the chip out of any circuit. If it passes this then there is a chip inside but cheap parts from China sometimes are out of the reject bin so might not function correctly.

Grumpy_Mike:
No, do not go plugging an unplugging stuff to an electronic circuit that is powered up. That is a good way to fry chips. And those results do not result in that conclusion anyway.

Change your code so that you print out what numbers you are getting from this chip and see how they change.

Where did you get this chip from?

There are a lot of these ICs that are simply dummies with the part number printed on. That is they have nothing inside them. I was talking to the founder of Spark Fun back in 2011 and he told me about several thousand they bought that were like this.

You can tell if you try and measure the resistance between power and say the input pin. If it doesn't look like a diode, one direction has a different resistance to measuring it in the other then the chip is most likely dud. Do this with the chip out of any circuit. If it passes this then there is a chip inside but cheap parts from China sometimes are out of the reject bin so might not function correctly.

I thank you for your quick reply!

I know I shouldn't put my hand to the circuit while it's connected, but I had to understand something since I don't know where to bang my head ...

I have already tried to print the values that arduino receives, and they vary from 0 to about 1032, very quickly for each column and row of LEDs.

As soon as I can I try to test the chip as you recommended me!

But I know that as you say this msgeq7 is fake ...

But I was really thinking of taking it from sparkfun ... I didn't understand if you would recommend it or not ... however I had taken it from the china it seems to me, however I am from Italy, and this project I need for university. .. if sparkfun is safe I gladly pay the fastest courier ...

I have already tried to print the values that arduino receives, and they vary from 0 to about 1032,

Well to 1023.
It sounds like the pin is just open. Try adding a pinMode call in the setup function to enable the internal pull up resistor on the analogue pin you use. Use A0 for analogue zero and so on. If on doing this the readings are stable at 1023 then is sounds like you do not have a connection to the chip, either through faulty wiring or there being nothing inside the chip.

But I was really thinking of taking it from sparkfun

Yes I would recommend this. That is where I got my chips from. Rather than go to the US is used this place:-
Robot Shop

FoxHound511:
I thank you for your quick reply!

I know I shouldn't put my hand to the circuit while it's connected, but I had to understand something since I don't know where to bang my head ...

I have already tried to print the values that arduino receives, and they vary from 0 to about 1032, very quickly for each column and row of LEDs.

As soon as I can I try to test the chip as you recommended me!

But I know that as you say this msgeq7 is fake ...

But I was really thinking of taking it from sparkfun ... I didn't understand if you would recommend it or not ... however I had taken it from the china it seems to me, however I am from Italy, and this project I need for university. .. if sparkfun is safe I gladly pay the fastest courier ...

FoxHound511,

Did you resolve the issue? Please let us know.

Hi everyone,
I also made an attempt to build this 14 band spectrum analyzer. I was able to successfully got everything working. Here is the code which I had edited some numbers for different effects. I am not a coder, but was able to pick up some things during this learning process. My question is in the code, how do I change it to make to spectrum to have a rainbow effect as it respond to the audio, or have the band fade to other colors throughout the respond to the audio? Thanks for your help:

//   Project: 14 Band Spectrum Analyzer using WS2812B/SK6812
//   Target Platform: Arduino Mega2560 or Mega2560 PRO MINI  
//   The original code has been modified by PLATINUM to allow a scalable platform with many more bands.
//   It is not possible to run modified code on a UNO,NANO or PRO MINI. due to memory limitations.
//   The library Si5351mcu is being utilized for programming masterclock IC frequencies. 
//   Special thanks to Pavel Milanes for his outstanding work. https://github.com/pavelmc/Si5351mcu
//   Analog reading of MSGEQ7 IC1 and IC2 use pin A0 and A1.
//   Clock pin from MSGEQ7 IC1 and IC2 to Si5351mcu board clock 0 and 1
//   Si5351mcu SCL and SDA use pin 20 and 21
//   See the Schematic Diagram for more info
//   Programmed and tested by PLATINUM
//   Version 1.0    
//***************************************************************************************************

#include <Adafruit_NeoPixel.h>
#include <si5351mcu.h>    //Si5351mcu library
Si5351mcu Si;             //Si5351mcu Board
#define PULSE_PIN     13 
#define NOISE         50
#define ROWS          30  //num of row MAX=20
#define COLUMNS       21  //num of column
#define DATA_PIN      9   //led data pin
#define STROBE_PIN    6   //MSGEQ7 strobe pin
#define RESET_PIN     7   //MSGEQ7 reset pin
#define NUMPIXELS    ROWS * COLUMNS
struct Point{
char x, y;
char  r,g,b;
bool active;
};
struct TopPoint{
int position;
int peakpause;
};
Point spectrum[ROWS][COLUMNS];
TopPoint peakhold[COLUMNS];
int spectrumValue[COLUMNS];
long int counter = 0;
int long pwmpulse = 0;
bool toggle = false;
int long time_change = 0;
int effect = 0;
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, DATA_PIN, NEO_GRB + NEO_KHZ800);

void setup() 
{
Si.init(25000000L);
Si.setFreq(0, 104570);
Si.setFreq(1, 166280);
Si.setPower(0, SIOUT_8mA);
Si.setPower(1, SIOUT_8mA);
Si.enable(0);
Si.enable(1);
pinMode      (STROBE_PIN,    OUTPUT);
pinMode      (RESET_PIN,     OUTPUT);
pinMode      (DATA_PIN,      OUTPUT);
pinMode      (PULSE_PIN,     OUTPUT); 
digitalWrite(PULSE_PIN, HIGH);
delay(100);
digitalWrite(PULSE_PIN, LOW);
delay(100);
digitalWrite(PULSE_PIN, HIGH);
delay(100);
digitalWrite(PULSE_PIN, LOW);
delay(100);
digitalWrite(PULSE_PIN, HIGH);
delay(100);
pixels.setBrightness(20); //set Brightness
pixels.begin();
pixels.show();
pinMode      (STROBE_PIN, OUTPUT);
pinMode      (RESET_PIN,  OUTPUT);  
digitalWrite (RESET_PIN,  LOW);
digitalWrite (STROBE_PIN, LOW);
delay        (1);  
digitalWrite (RESET_PIN,  HIGH);
delay        (1);
digitalWrite (RESET_PIN,  LOW);
digitalWrite (STROBE_PIN, HIGH);
delay        (1);
}

void loop() 
{    
counter++;   
clearspectrum(); 
if (millis() - pwmpulse > 3000){
toggle = !toggle;
digitalWrite(PULSE_PIN, toggle);
pwmpulse = millis();
}
digitalWrite(RESET_PIN, HIGH);
delayMicroseconds(3000);
digitalWrite(RESET_PIN, LOW);
for(int i=0; i < COLUMNS; i++){ 
 
digitalWrite(STROBE_PIN, LOW);
delayMicroseconds(1000);
spectrumValue[i] = analogRead(0);
if(spectrumValue[i] < 120)spectrumValue[i] = 0;
spectrumValue[i] = constrain(spectrumValue[i], 0, 1023);
spectrumValue[i] = map(spectrumValue[i], 0, 1023, 0, ROWS);i++;
spectrumValue[i] = analogRead(1);
if(spectrumValue[i] < 120)spectrumValue[i] = 0;
spectrumValue[i] = constrain(spectrumValue[i], 0, 1023);
spectrumValue[i] = map(spectrumValue[i], 0, 1023, 0, ROWS);
digitalWrite(STROBE_PIN, HIGH);  
}
for(int j = 0; j < COLUMNS; j++){
for(int i = 0; i < spectrumValue[j]; i++){ 
spectrum[i][COLUMNS - 1 - j].active = 1;
spectrum[i][COLUMNS - 1 - j].r =150;           //COLUMN Color red
spectrum[i][COLUMNS - 1 - j].g =random(200);         //COLUMN Color green
spectrum[i][COLUMNS - 1 - j].b =random(100);           //COLUMN Color blue
}
if(spectrumValue[j] - 1 > peakhold[j].position)
{
spectrum[spectrumValue[j] - 1][COLUMNS - 1 - j].r = 0; 
spectrum[spectrumValue[j] - 1][COLUMNS - 1 - j].g = 0; 
spectrum[spectrumValue[j] - 1][COLUMNS - 1 - j].b = 0;
peakhold[j].position = spectrumValue[j] - 1;
peakhold[j].peakpause = 1; //set peakpause
}
else
{
spectrum[peakhold[j].position][COLUMNS - 1 - j].active = 1;
spectrum[peakhold[j].position][COLUMNS - 1 - j].r  = 50;  //Peak Color red
spectrum[peakhold[j].position][COLUMNS - 1 - j].g  = 50;  //Peak Color green
spectrum[peakhold[j].position][COLUMNS - 1 - j].b  = 200;    //Peak Color blue
}
} 
flushMatrix();
if(counter % 2 ==0)topSinking(); //peak delay
}
void topSinking()
{
for(int j = 0; j < ROWS; j++)
{
if(peakhold[j].position > 0 && peakhold[j].peakpause <= 0) peakhold[j].position--;
else if(peakhold[j].peakpause > 0) peakhold[j].peakpause--;       
} 
}
void clearspectrum()
{
for(int i = 0; i < ROWS; i++)
{
for(int j = 0; j < COLUMNS; j++)
{
spectrum[i][j].active = false;  
} 
}
}
void flushMatrix()
{
for(int j = 0; j < COLUMNS; j++)
{
if( j % 2 != 0)
{
for(int i = 0; i < ROWS; i++)
{
if(spectrum[ROWS - 1 - i][j].active)
{
pixels.setPixelColor(j * ROWS + i, pixels.Color(
spectrum[ROWS - 1 - i][j].r, 
spectrum[ROWS - 1 - i][j].g, 
spectrum[ROWS - 1 - i][j].b));         
}
else
{
pixels.setPixelColor( j * ROWS + i, 0, 0, 0);  
} 
}
}
else
{
for(int i = 0; i < ROWS; i++)
{
if(spectrum[i][j].active)
{
pixels.setPixelColor(j * ROWS + i, pixels.Color(
spectrum[i][j].r, 
spectrum[i][j].g, 
spectrum[i][j].b));     
}
else
{
pixels.setPixelColor( j * ROWS + i, 0, 0, 0);  
}
}      
} 
}
pixels.show();
}

Next time you post code, use CTRL-T to format your code, then use CTRL-A in the IDE, to hightlight it all, CTRL-C to copy it all.
open the Code tags box, </> on the menu, and CTRL-V to paste the code in.