spectrum shield / same value / no working audio input

Hi.
I bought a spectrum shield from sparkfun and I am executing tutorial which is Spectrum Shield Hookup Guide - SparkFun Learn (this one).
I think that I am good at following a tutorial but all the number of frequency band is relatively same.

This is original codes.

/******************************************************************************
SparkFun Spectrum Shield Demo
Toni Klopfenstein @ SparkFun Electronics
December 2015

This sketch shows the basic functionality of the Spectrum Shield, working with a basic RGB LED Matrix.

The Spectrum Shield code is based off of the original demo sketch by Ben Moyes @Bliptronics.
This sketch is available in the Spectrum Shield repository.

Development environment specifics:
Developed in Arduino 1.6.

This code is beerware; if you see me (or any other SparkFun employee) at the local, and you've found our code helpful, please buy us a round!
Distributed as-is; no warranty is given.
*********************************************************************************/

//Declare Spectrum Shield pin connections
#define STROBE 4
#define RESET 5
#define DC_One A0
#define DC_Two A1

//Define LED connections on the Arduino/Shield
int LED[] = {7, 8, 9, 10, 11, 12, 13};

//Define spectrum variables
int freq_amp;
int Frequencies_One[7];
int Frequencies_Two[7];
int i;

/Setup Loop*****/
void setup() {
//Set LED pin configurations
for(i=0; i<7; i++)
{
pinMode(LED*, OUTPUT);*
_ digitalWrite(LED*, LOW);_
_
}*_

* //Set spectrum Shield pin configurations*
* pinMode(STROBE, OUTPUT);*
* pinMode(RESET, OUTPUT);*
* pinMode(DC_One, INPUT);
pinMode(DC_Two, INPUT);
_
digitalWrite(STROBE, HIGH);_
_
digitalWrite(RESET, HIGH);*_

* //Initialize Spectrum Analyzers*
* digitalWrite(STROBE, LOW);*
* delay(1);*
* digitalWrite(RESET, HIGH);*
* delay(1);*
* digitalWrite(STROBE, HIGH);*
* delay(1);*
* digitalWrite(STROBE, LOW);*
* delay(1);*
* digitalWrite(RESET, LOW);*
}
/Main Function Loop***/
void loop() {

* Read_Frequencies();
Graph_Frequencies();
_
delay(50);*_

}
/Pull frquencies from Spectrum Shield*/
void Read_Frequencies(){
* //Read frequencies for each band*
* for (freq_amp = 0; freq_amp<7; freq_amp++)
_
{_
Frequencies_One[freq_amp] = analogRead(DC_One);
Frequencies_Two[freq_amp] = analogRead(DC_Two);
_
digitalWrite(STROBE, HIGH);_
_
digitalWrite(STROBE, LOW);_
_
}_
_
}_
/Light LEDs based on frequencies**********/
void Graph_Frequencies(){
_
for( i= 0; i<7; i++)_
_
{_
if(Frequencies_Two > Frequencies_One){
_ digitalWrite(LED, HIGH);_
delay(Frequencies_Two);
_ digitalWrite(LED, LOW);
}
else{
digitalWrite(LED, HIGH);_

delay(Frequencies_One);
_ digitalWrite(LED, LOW);
}
}
}
I checked hardware connection several times and installed all libraries and copy that code. What I changed in this code was led pin number and println.
But when I printed frequency, all frequency band have same value!!!! Even though I didn't connect audio input!!!!!!
This is my codes.
/
SparkFun Spectrum Shield Demo
Toni Klopfenstein @ SparkFun Electronics
December 2015
GitHub - sparkfun/Spectrum_Shield: Spectrum Shield for Arduino, available from SparkFun Electronics.
This sketch shows the basic functionality of the Spectrum Shield, working with a basic RGB LED Matrix.
The Spectrum Shield code is based off of the original demo sketch by Ben Moyes @Bliptronics.
This sketch is available in the Spectrum Shield repository.
Development environment specifics:
Developed in Arduino 1.6.
This code is beerware; if you see me (or any other SparkFun employee) at the local, and you've found our code helpful, please buy us a round!
Distributed as-is; no warranty is given.
/

//Declare Spectrum Shield pin connections
#define STROBE 4
#define RESET 5
#define DC_One A0
#define DC_Two A1
//Define LED connections on the Arduino/Shield
int LED[] = {3,5,6,9,10,11,12};
//Define spectrum variables
int freq_amp;
int Frequencies_One[7];
int Frequencies_Two[7];
int i;
/Setup Loop*****/
void setup() {
* //Set LED pin configurations*
* for(i=0; i<7; i++)
{
pinMode(LED, OUTPUT);
digitalWrite(LED, LOW);
}*_

* //Set spectrum Shield pin configurations*
* pinMode(STROBE, OUTPUT);*
* pinMode(RESET, OUTPUT);*
* pinMode(DC_One, INPUT);
pinMode(DC_Two, INPUT);
_ digitalWrite(STROBE, HIGH);
digitalWrite(RESET, HIGH);*_

* //Initialize Spectrum Analyzers*
* digitalWrite(STROBE, LOW);*
* delay(1);*
* digitalWrite(RESET, HIGH);*
* delay(1);*
* digitalWrite(STROBE, HIGH);*
* delay(1);*
* digitalWrite(STROBE, LOW);*
* delay(1);*
* digitalWrite(RESET, LOW);*
}
/Main Function Loop***/
void loop() {
* Serial.begin(9600);*
* Read_Frequencies();
Graph_Frequencies();
_ delay(50);*_

}
/Pull frquencies from Spectrum Shield*/
void Read_Frequencies(){
* //Read frequencies for each band*
* for (freq_amp = 0; freq_amp<7; freq_amp++)
_ {_
Frequencies_One[freq_amp] = analogRead(DC_One);
Frequencies_Two[freq_amp] = analogRead(DC_Two);
_ digitalWrite(STROBE, HIGH);
digitalWrite(STROBE, LOW);
}
}
/Light LEDs based on frequencies**********/
void Graph_Frequencies(){
for( i= 0; i<7; i++)
{_

if(Frequencies_Two > Frequencies_One){
_ digitalWrite(LED, HIGH);_
delay(Frequencies_Two);
_ digitalWrite(LED, LOW);
}
else{
digitalWrite(LED, HIGH);_

delay(Frequencies_One);
_ digitalWrite(LED, LOW);
}
Serial.print("\n");
for(i=0;i<7;i++);{_

Serial.print("Frequencies_One : ");
Serial.print(Frequencies_One);}
_ Serial.print("\n");
for(i=0;i<7;i++);{_

Serial.print("Frequencies_Two : ");
Serial.println(Frequencies_Two);}*

* }*
}
This is serial monitor.
Frequencies_One : 303
Frequencies_Two : 7
Frequencies_One : 324
Frequencies_Two : 7
Frequencies_One : 326
Frequencies_Two : 7
Frequencies_One : 319
Frequencies_Two : 7
Frequencies_One : 303
Frequencies_Two : 7
Frequencies_One : 296
Frequencies_Two : 7
Frequencies_One : 268
Frequencies_Two : 7
Frequencies_One : 300
Frequencies_Two : 7
Frequencies_One : 266
Frequencies_Two : 7
Frequencies_One : 273
Frequencies_Two : 7
Frequencies_One : 267
Frequencies_Two : 7
Frequencies_One : 275
Frequencies_Two : 7
Frequencies_One : 280
Frequencies_Two : 7
Frequencies_One : 300
Frequencies_Two : 7
Frequencies_One : 264
Frequencies_Two : 7
Frequencies_One : 262
Frequencies_Two : 7
Look at the Serial monitor. seven of first spectrum value have a number of value from 250 to 350 even though I didn't connect audio input. seven of second spectrum value have only 7. I don't know why this shield don't work.
To sum up, These are my question.
First, I don't know why all frequency value is same even though I don't connect audio input. I think that value should be zero when I don't connect audio input.
Second, Why do not each of spectrum bands have different value? I have understood that frequency_One[0] is 63hz, frequency[1] is 160hz ... But even though I didn't connect audio input, they have all same value. Then can this shield not classify the frequency band?
Third, I bought 5 m audio cable and I connect it with my computer speaker. But there is no change. I read in your tutorial comment long device makes noisy. So, is it real?

When posting code, please use code tags. See #7 [u]here[/u].

I assume the SparkFun supplied code is good and it's unlikely that both chips are bad, carefully check all of your connections.

I don't know if SparkFun tests those boards. You might try sending an email to customer support to ask. Or, give them a call. SparkFun seem like a customer-oriented company so they can probably answer a question like that. (But they probably aren't going to personally help you with the nitty-gritty details of troubleshooting.)

Do you have a multimeter? With a meter, you can measure the outputs of the Spectrum Shield. The program is showing that one channel is almost zero and "solid" while the other channel is around 1V (reading 200-300) and jumping around. It could be helpful to confirm the voltages track what you're seeing on the serial monitor.

SparkFun does publish the schematic so you can check the PC board for opens & shorts, & voltages with your meter.

And you can criss-cross the Channel-1 & channel-2 connections to see if the 7 & 200+ readings reverse. That can help to narrow-down where the problem is. It's very helpful to have 2 identical circuits/channels... If one channel is working...

You can also try disconnecting the spectrum shield and replacing it with a pot like the [u]Analog Read Serial Example[/u]. For whatever channel you're connected to, you should see the readings go up-and-down when you adjust the pot and all of the frequency bands should read (about) the same. That will confirm that the software is reading the analog inputs.

I've never used the MSGEQ7 but some people have complained of electrical "noise" (unstable readings) or readings when there is no signal. A reading of 7 with no signal is probably normal and I wouldn't worry about that. You can deal with that in software if necessary (subtract it or ignore anything less than 10, etc.). The readings of 200 or more a more of a concern. Maybe one of the chips is flaky?

If you short the audio inputs (both channels) to ground that will eliminate any external audio noise input. With the audio inputs shorted you should be reading (near) zero. (Don't connect your audio source during that test... You don't want to short the audio output or any outputs.)

Shorting the inputs won't eliminate power supply noise or noise generated inside the chip. (I'm sure it's not a power supply issue since the problem is only in one channel.)

A long cable shouldn't be a BIG problem as long as it's plugged-into a (relatively) low impedance audio source. And it should be no problem as long as it's shielded (with the shield connected to ground). "Worst case" is a long, unshielded cable with nothing plugged-in at the far-end. And, any noise will appear at both ends of the cable, so you'll hear it too. With headphones plugged-in the headphone impedance is low enough to "kill" any electrical interference picked-up by the cable(s) connected to the headphones. (You can still pick-up noise somewhere else.)

And, an unconnected cable should mostly pick-up power line interference (50 or 60Hz depending on where you live) so that should show-up mostly in the low band. But the filters are not perfect so you'd see "leakage" into the other bands.

You can also try adding a "load" to the analog outputs (or at the Arduino analog inputs). A 10k resistor to ground would be a good test. That might bring-down the output voltage with silence (otherwise it shouldn't have any effect) but it's not shown on the MSGEQ7 datasheet and SparkFun didn't put it on the board, so that's a long-shot and it shouldn't be required.

What kind of audio source do you have? A "strong" headphone output or line-level signal should work. An unamplified microphone signal is too weak to do anything.

What kind of connector/cable are you using? A regular 3.5mm 3-conductor (TRS) cable [like this](http://http
://Monoprice 6ft 3.5mm Stereo Plug/Plug M/M Cable - Black - Monoprice.com) plugged into your computer or phone should work fine, but turn-up the volume. And, it never hurts to try another cable. If you're not using the pass-through you'll (probably) need a Y-splitter to connect speakers or headphones at the same time.

Have you tried plugging headphones (or speakers) into the pass-through connection to make sure audio is getting-into the board and into both channels?

...Once you're reading "something", [u]Audacity[/u] can generate sine waves at various frequencies that you can play on your computer.