The MSGEQ7 by Mixed Signal Integration is a versatile seven band graphic equalizer display filter. It is widely used in audio analysis applications to divide the audio spectrum into seven distinct frequency bands. The frequencies are centered around 63Hz, 160Hz, 400Hz, 1kHz, 2.5kHz, 6.25kHz, and 16kHz. Each band's amplitude is output as a DC voltage, which can be used for creating visual representations of the audio spectrum, such as in spectrum analyzers and LED visualizers.
Common applications include:
Pin Number | Name | Description |
---|---|---|
1 | GND | Ground connection |
2 | VDD | Positive power supply (2.7V to 5.5V) |
3 | OUT | Output of the bandpass filter |
4 | STROBE | Strobe pin, toggled to switch between bands |
5 | RESET | Resets the multiplexer to the first band |
6 | IN | Audio input signal |
7 | VSS | Ground connection (same as Pin 1) |
8 | REF | Reference voltage for the internal ADC |
// Define the pin connections
const int analogPin = A0; // Connect OUT pin of MSGEQ7 to A0
const int strobePin = 2; // Connect STROBE pin to digital pin 2
const int resetPin = 3; // Connect RESET pin to digital pin 3
// Variables to store the band values
int spectrumValues[7];
void setup() {
pinMode(analogPin, INPUT);
pinMode(strobePin, OUTPUT);
pinMode(resetPin, OUTPUT);
digitalWrite(resetPin, LOW);
digitalWrite(strobePin, HIGH);
Serial.begin(9600); // Start serial communication at 9600 baud
}
void loop() {
digitalWrite(resetPin, HIGH); // Reset the MSGEQ7's counter
delayMicroseconds(5);
digitalWrite(resetPin, LOW);
for (int i = 0; i < 7; i++) {
digitalWrite(strobePin, LOW); // Move to the next band
delayMicroseconds(50); // Allow the MSGEQ7's output to settle
spectrumValues[i] = analogRead(analogPin); // Read the band value
digitalWrite(strobePin, HIGH);
}
// Print the spectrum values to the serial monitor
for (int i = 0; i < 7; i++) {
Serial.print("Band ");
Serial.print(i);
Serial.print(": ");
Serial.println(spectrumValues[i]);
}
Serial.println();
delay(50); // Delay for a short period before reading the next set of values
}
Q: Can I use the MSGEQ7 with a 3.3V system? A: Yes, the MSGEQ7 can operate from 2.7V to 5.5V, making it compatible with 3.3V systems.
Q: How can I increase the number of bands? A: To increase the number of bands, you can use multiple MSGEQ7 ICs and combine their outputs.
Q: What is the purpose of the REF pin? A: The REF pin sets the reference voltage for the internal ADC. It is typically connected to the midpoint of the power supply voltage.
This documentation provides a comprehensive guide to using the MSGEQ7 seven band graphic equalizer IC. For further information, consult the manufacturer's datasheet and application notes.