Intro
Hello everyone. I am trying to start my first microcontroller experiences. I like music, so i started with the SparkFun Spectrum Shield for arduino.
Hardware
- SparkFun Spectrum Shield (Uses two MSGEQ7 Audio Chips)
- ELEGOO UNO R3
Software
I flashed my arduino with this code https://github.com/sparkfun/Spectrum_Shield/blob/master/Firmware/SparkFun_Spectrum_Demo/SparkFun_Spectrum_Demo.ino I only added a function to debug the Frequencies_One and Frequencies_Two values:
void Debug_Frequencies(){
Serial.print("{\"Left\":[");
for(int i= 0; i<7; i++)
{
Serial.print(Frequencies_One[i]);
if(i<6){
Serial.print(",");
}
}
Serial.print("],\"Right\":[");
for(int i= 0; i<7; i++)
{
Serial.print(Frequencies_Two[i]);
if(i<6){
Serial.print(",");
}
}
Serial.print("]");
Serial.print(",\"millSecSinceOn\":");
Serial.print(millis());
Serial.println("}");
}
The Error
I got the following output in the Arduino IDE Serial Monitor:
15:50:06.080 -> {"Left":[1023,1023,1023,1023,1023,1020,60],"Right":[1023,1023,1023,1023,1023,1023,70],"millSecSinceOn":6599}
15:50:06.536 -> {"Left":[1023,1023,1022,1023,1023,1022,63],"Right":[1023,1023,1023,1022,1023,1023,71],"millSecSinceOn":7025}
15:50:06.949 -> {"Left":[1023,1023,1022,1023,1023,1020,62],"Right":[1023,1023,1023,1023,1023,1023,77],"millSecSinceOn":7451}
15:50:07.370 -> {"Left":[1023,1021,1021,1023,1023,1023,66],"Right":[1023,1023,1023,1023,1023,1023,76],"millSecSinceOn":7877}
The arduino function analogRead which is used by the manufactures code can return 0-1023 as a int value. So the analogRead Method now every times returnes MAX Value, even if there is no music input.
My Analysis
My first thoughts were, there must be a bypass anywhere between 5V input and the analog read Pin, but i cannot detect any (checked by multimeter). On my board there is a 2.53k-2.59k ohm resist beween the arduino board Pin 5V and A0 (and A1 too) when the board is offline. there also is a 4.36k ohm resist between A0/A1 and Ground.
Graph_Frequencies
function. My expected output is something between 100-300 when its silent (because there is always a kind of noice). Yea I know, this is a kind of, what is wrong here question, but i dont know the right value because i want to measure it. – ooyen