# MSGEQ7 seven band audio filter device

#### ccurtis

##### Well-Known Member
I'm considering experimenting with the MSGEQ7 and have the following questions for the forum's consideration:

1. Device production dates back to the late 90's, but still in active production. Number of distributors is very small, however. Any ideas why that would be?

2. Poster at https://forum.arduino.cc/index.php?topic=394167.msg2718245#msg2718245 indicates chip can be clocked from an external source, rather than RC specified in the datasheet. Has anyone tried this? It doesn't make sense to me, because something in the chip must discharge the capacitor and that something would tend to short out the external source. It would be great if external clocking can be done, so as to, for example, easily dither the center frequencies of the filters.

3. Datasheet shows strobe being toggled while reset is high. The necessity of that seems weird to me, as resets generally override strobe inputs anyhow. Has anyone tried reset without strobe toggle?

4. Datasheet shows performance at 5V supply only, but indicates operation at 3.3V is possible. Has anyone got performance experience at 3.3V?

Of course, any comments from users of the device are welcome! Thanks.

#### Visitor

##### Active Member
I don't know who MSI (Mixed Signal Integration) is, but they don't seem interested in small scale sales of 10 – 50 pieces. I wanted to use the MSLOSC chip, a 15 Hz — 64kHz sine generator – for a project that would ultimately require about 60 pieces, but they wouldn't sell me 10 pieces for prototype development.

The MSGEQ7 is sold by Sparkfun, so at least there's a reasonable source for small quantities.

#### ccurtis

##### Well-Known Member
Thanks, V. I finally got an answer to my inquiries to MSI, although a partial answer. Quote request for 1-10 pieces was rejected and referred to Sparkfun, just as you found for your device. Part can be clocked with external source and "the center frequencies of all seven bands should scale linearly as you change the clock frequency." No plans to discontinue production.

I guess the external timing cap is discharged through an internal resistance, so when clocked externally the clock pin does not short out external clock. No idea, what the value is.

I have a couple of this device on order to play with from a USA dealer I found on ebay, a little less expensive than Sparkfun.

##### Active Member
Also try www.utsource.com. I have purchased from them (more than 1x) with good results. They seem to have stock. E

#### ClydeCrashKop

##### Well-Known Member
I used a MSGEQ7, seven band Graphic Equalizer chip and LM3915 Dot Bar Display Drivers to make a night club style musical light show.

MSGEQ7 Arduino Tutorial 01: Getting Started https://rheingoldheavy.com/msgeq7-arduino-tutorial-01-getting-started/

Connecting an MSGEQ7 to an Arduino
http://nuewire.com/info-archive/msgeq7-by-j-skoba/

How to build your own LED Color Organ || Arduino || MSGEQ7
http://www.instructables.com/id/How-to-build-your-own-LED-Color-Organ-Arduino-MSGE/

The last one I made, Graphic equalizer club lighting in an infinity mirror
This one is 3 feet tall & 30" wide. It uses 5 columns of 53 Neopixels echoed to infinity. The Graphic equalizer separates the audio into seven bands. This light show displays the volume of the lower five bands. Bass is violet on the left. Treble is red on the right. It is fast enough to keep up with "Wipeout" and not miss a beat. Sometimes you can see the tremolo in a singer's voice. I had to dim the Neopixels down to about 1/3 for this video because full brightness overwhelmed the camera. I made this just for fun and to liven up parties.

Cool!

#### ccurtis

##### Well-Known Member
That is cool, CCK. I'm going to do something similar. Thanks for sharing that and the links. I didn't look at the detailed code, but still wonder if strobe has to be toggled during the reset pulse. Easy enough to try once I get the parts in my hands.

#### ClydeCrashKop

##### Well-Known Member
wonder if strobe has to be toggled during the reset pulse
Yes.

Code:
void loop()
{
// Set reset pin low to enable strobe
digitalWrite(resetPin, HIGH);
digitalWrite(resetPin, LOW);

// Get all 7 spectrum values from the MSGEQ7
for (int i = 0; i < 7; i++)
{
digitalWrite(strobePin, LOW);
delayMicroseconds(30); // Allow output to settle

// Constrain any value above 1023 or below filterValue
spectrumValue[i] = constrain(spectrumValue[i], filterValue, 1023);

// Remap the value to a number between 0 and 255
// spectrumValue[i] = map(spectrumValue[i], filterValue, 1023, 0, 255);

spectrumValue[i] = map(spectrumValue[i], filterValue, 1023, 0, 54); // 54 Neopixels per spectrumValue

digitalWrite(strobePin, HIGH);

}

Last edited:

#### ccurtis

##### Well-Known Member
It makes no sense in the datasheet that the Reset Pulse Width is 100 nS min, yet the strobe must be toggled during the reset and strobe pulse width is 18us min. Oh well.

#### gophert

##### Well-Known Member
I used a MSGEQ7, seven band Graphic Equalizer chip and LM3915 Dot Bar Display Drivers to make a night club style musical light show.

MSGEQ7 Arduino Tutorial 01: Getting Started https://rheingoldheavy.com/msgeq7-arduino-tutorial-01-getting-started/

Connecting an MSGEQ7 to an Arduino
http://nuewire.com/info-archive/msgeq7-by-j-skoba/

How to build your own LED Color Organ || Arduino || MSGEQ7
http://www.instructables.com/id/How-to-build-your-own-LED-Color-Organ-Arduino-MSGE/

The last one I made, Graphic equalizer club lighting in an infinity mirror
This one is 3 feet tall & 30" wide. It uses 5 columns of 53 Neopixels echoed to infinity. The Graphic equalizer separates the audio into seven bands. This light show displays the volume of the lower five bands. Bass is violet on the left. Treble is red on the right. It is fast enough to keep up with "Wipeout" and not miss a beat. Sometimes you can see the tremolo in a singer's voice. I had to dim the Neopixels down to about 1/3 for this video because full brightness overwhelmed the camera. I made this just for fun and to liven up parties.

That's very cool. I say that because I designed nearly the same thing for a local band. They gave me a down payment to order parts and wire up a prototype. A week later they called and asked me to stop the project - they broke up. I gave them their money back except the cost of the chips (nominal). Now I don't remember whether I have the chips or I gave them to the band leader.

#### ccurtis

##### Well-Known Member
Another reply from the device manufacturer today states that the duty cycle of an external clock input is not important. That's a plus.

#### ClydeCrashKop

##### Well-Known Member

Homemade 14 band spectrum analyzer Part 1; First tests using Arduino Mega and Specky Board Beta.

Homemade 14 Band Spectrum Analyzer Part 2 - Theory Of Operation
At ~ 20 minutes he says the masterclock can shift center frequency response higher or lower.

14 Band Spectrum Analyzer PART.2

#### schmitt trigger

##### Well-Known Member
Clydekrashcop:

absolutely gorgeous project. Thanks for sharing.

I do have a question for you: where did you purchase the materials for the infinity mirror?

I am doing a project with IV-25 VFD tubes.

#### ClydeCrashKop

##### Well-Known Member
Thanks @schmitt trigger yours should look great.
I was searching for the recommended 80% reflective mirror window tint. This film that I found at Home Depot didn’t say but it works fine.
Gila, mirror 50146287, Privacy control window film. Daytime privacy.
This may be it but the numbers have changed. Internet #100196546 Model # PRS361 Store SKU #115049
https://www.homedepot.com/p/Gila-3-ft-x-15-ft-Mirror-Privacy-Window-Film-PRS361/100196546

This mirror that goes on the back surface was the same size as a storm window that I had for the front surface.
30 in. x 36 in. Frame-Less 1/8 in. Thick Clear Glass Mirror
https://www.homedepot.com/p/Shape-P...n-Thick-Clear-Glass-Mirror-33036CLM/306470660

The tint goes on the inside of the clear front glass. Neopixels stuck to the mirror. The wood I used for the frame is 3/4” x 1.5” actual size. I cut grooves it the wood to hold the mirror & glass 3/4” apart.

You will probably use a different size but Home Depot also had 30 in. x 36 in. x 0.092 in. Clear Glass
https://www.homedepot.com/p/30-in-x...MERCH=REC-_-searchViewed-_-NA-_-300068401-_-N

#### ccurtis

##### Well-Known Member
It's nice to see all these implementations of a light organ. I've built a few versions, the latest solely within one micro-controller using a Digital Fourier Transform I coded myself and driving an addressable LED strip. It performs very well, but I just love to play and want to try this filter chip. One thing I noticed about this chip is the dynamic range is only 18.4 dB (20 log of 5V divided by the .6V max DC output offset). And that's assuming the output swings to the 5V power rail and low noise. Not bad, but not great for music either. I'm still waiting for my devices to come in the mail. Maybe the output offset is considerably better than the max specified.

I find, personally, that varying the intensity of the LEDS with the amplitude of the frequency bands and creating the illusion of movement by shifting the positions of the LED color groups along the strip according to the beat of the music is more visually stimulating.

Last edited:

#### ccurtis

##### Well-Known Member
So, I received my chips and have been experimenting with them. One thing peculiar, when clocked from an external source, if the strobe occurs very close to a clock edge, the output offset jumps higher by about 500mV. I determined that by experimentation, trying to figure out why the offset occasionally glitched higher. The output multiplexer does not function without the clock present, so you can't just disable the clock before strobing (reading) the data from the multiplexer. Just keep the strobe away from the clock edges (particularly the high to low clock edge). I don't know if this is an issue when using an external R and C to make it clock, as I didn't try that. Also, I measured an output offset of 1V (with +/- 500mV of clock edge noise riding on it) with the chip input shorted to ground through a capacitor. Spec sheet says 800mV max. That cuts into the dynamic range (20 log (5v/1V)=14 dB), or little better than 2:1 human loudness ratio. The output from the chip will swing to within miliivolts of the power rail, and no problems recovering from saturation.

This is constructed on a breadboard that you push the components leads into, with no ground plane, but using a single point ground, so not the best for this, but good for easy experimenting.

You can make a spectrum analyzer with the chip on an oscilloscope by triggering on the first strobe and looking at the chip output.

#### rjenkinsgb

##### Well-Known Member
One thing peculiar, when clocked from an external source, if the strobe occurs very close to a clock edge, the output offset jumps higher by about 500mV.
How are you driving the reset pin? That appears to control the data transfer from the internal accumulators, from its description on the last page of the data sheet.

Also make sure the strobe low times are long enough for the output to fully settle before reading the pin.

#### ccurtis

##### Well-Known Member
How are you driving the reset pin? That appears to control the data transfer from the internal accumulators, from its description on the last page of the data sheet.

Also make sure the strobe low times are long enough for the output to fully settle before reading the pin.
I'm using a micro to output the reset, strobe and clock signals to the chip. The chip functions okay. Just be sure to keep the strobe (high to low transition) a little away from the high to low transition of a clock edge occurrence, or there is a glitch upward in the output for that strobe, and only that strobe.

The output starts to rise not from the falling edge of the strobe but from the following, falling edge of the clock and when it does rise, it fully rises in less than 10 microseconds, but good idea to give lots of margin for settling time.

Also, the datasheet shows the strobe toggle during the reset pulse (I use 1 microsecond reset pulse). That is not required for the chip to function. I keep the strobe high during reset (and every other time, except to strobe channels out of the multiplexer, and the multiplexer resets just fine. I am using only the first four channels (pop music fundamentals rarely exceed 1000Hz. and above that mostly harmonics) and do a reset after the fourth channel to return to the first channel.

Edit: I have since build a circuit on a PCB with good ground plane and short connections. The issue with the output glitching higher if the strobe edge is coincident or near coincident with the clock edge is no longer present.

Last edited:

#### rjenkinsgb

##### Well-Known Member
OK. The data is rather minimal, so a lot of trial and error by the look of it.
What happens if you use the internal osc - does that produce random glitches depending on the timing?

Interesting device, I've just bought a couple myself from ebay.

#### ccurtis

##### Well-Known Member
OK. The data is rather minimal, so a lot of trial and error by the look of it.
What happens if you use the internal osc - does that produce random glitches depending on the timing?

Interesting device, I've just bought a couple myself from ebay.
Since you asked, I tried the internal osc. It does the same glitch thing (700 mV glitch higher at worst) with that, too, although it doesn't occur as often as when I use an external clock, probably because coincidence of internal clock and strobe edge is more random than with the external osc. The magnitude of the glitch appears related to how close the two edges coincide. I run through the channels every 17 milliseconds in my code and get a glitch using the internal oscillator roughly every 5 seconds. The glitch in the output magnitude remains until that channel is read enough times to exhaust it.

I am glad I tried the internal osc, because I also learned that the output offset voltage with the input shorted to ground through a capacitor is more like 300mV (excluding the occasional glitch), instead of the 1V I get using an external clock, and clock edge noise on the output is not present using the internal oscillator. That's nice.

With an external R and C (internal oscillator), the voltage on the clock pin is 1.7V peak to peak, sawtooth-like waveform at the clock frequency, rising slope and sharp fall, riding on a DC level, 1/2 the supply voltage. Could be used to time the strobe so the edges never coincide, preventing the occasional output glitch, if buffered first.

Now I wonder how I can get that low offset performance using an external clock, if possible.

Last edited: