Here’s how I built an audio frequency spectrum display around the MSEQ7 spectrum analyzer – in stereo:
I took a lot of inspiration from this:
… and built it first with an Arduino and Sparkfun’s spectrum shield. Later I replaced this combo with an attiny2313 and two bare MSGEQ7s.
The original uploader planeboy21 did not link to any description or schematic, but gave a few hints in the comments. From this I figured a few things.
First, the analog output of the MSGEQ7 is directly connected to the signal input of a single LM3915 which drives all 10 LED bar graph displays. The analog signal is multiplexed over the seven bands. In other words, while we cycle through the frequency bands, we provide power to only one of the bar graphs at a time.
The Arduino’s job is to orchestrate the whole thing, send the reset and strobe signals to MSGEQ7, and to multiplex the bar graph displays. The Arduino never does an analog to digital conversion of the MSGEQ7 signal. This is important. It allows me to replace the Arduino with an attiny2313 which lacks lacks ADC, but has more than enough IO pins for this project.
There is a pretty good article MSGEQ7-Based DIY Audio Spectrum Analyzer: Construction at eetimes.com. This is where I got this timing diagram from:
We can read the MSEQ7’s signal at the times shown in green. The output of the MSGEQ7 is connected to the input of the LM3915 which controls one 10-LED bar graph display at a time. There are 7 bar graphs – one for each frequency band. While cycling through the bands, we have to switch on the respective bar graph.
Source code is at github.
This is for a single audio channel. For stereo I simply duplicated the MSGEQ7 + LM3915 section. The CAT1 .. CAT10 go the the cathodes of the bar graphs, the AN1 .. AN7 to the anodes. The LEDs are switched by P-channel MOSFETs.
The two resistors R13 and R14 around the LM3915 control the brightness. I picked resistor values which will give a pretty high current of 28mA for the LEDs. This is on purpose, because each bar graph is “on” only 1/7th of the time.