This shield features the MSGEQ7 graphic equalizer display filter, the same IC used in the Colorganic Spectralizer kit. Two of these ICs allow you to split a stereo audio input into 7-bands (per channel) and read the amplitude of each using the ADC on your Arduino. The shield is populated with two 1/8" stereo jacks (like you would find on a pair of headphones). One serves as a stereo input and the other is a pass-through output which allows you to connect the Spectrum Shield in-line between your audio source and your stereo system without interruption. This shield can be used to create sound visualizers, detect patterns in music or add sound activation to your microcontroller projects.
**Note: **This product is a collaboration with Ben Moyes of Bliptronics. A portion of each sales goes back to them for product support and continued development.
This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.
Skill Level: Rookie - The number of pins increases, and you will have to determine polarity of components and some of the components might be a bit trickier or close together. You might need solder wick or flux.
See all skill levels
If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.
Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
No reviews yet.
Wrote a tutorial on how to use this shield - http://tronixstuff.wordpress.com/2013/01/31/tutorial-arduino-and-the-msgeq7-spectrum-analyzer/
Hi John, if you are interested I have a forked repository of your drivers that adds baseline correction for each band as well as in-place computation of the mean/variance/std. deviation for each band. https://github.com/Stabitha/Spectrum_Shield_Driver
Thank you! I tried your first code section to just get the frequency outputs, and it usually does a few lines correctly (at least I think) and then gibberish: http://imgur.com/OCgShxm . It doesn't make a difference whether I input audio or not. I did the risers correctly, and the only other necessary connections are the usb and audio right? I don't understand why it's not working. If anyone has any ideas, please let me know, I'd appreciate it. Thank you.
Getting ready for Christmas - $.$
http://www.youtube.com/watch?v=H8GMpjyQgAI
Sometimes the lights appear to have latency but it is purely cell-phone-camera related.
What did you use to drive the LED's in this?
You guys should have; 1. mentioned that I'd need risers for this board...kinda needed for arduino noobs like myself doncha think? 2. Given a tutorial on at least a couple of projects...INCLUDING WIRING... Not just vids of the completed project and the code 3. Included a full data sheet on the shield and an explanation of the shields pin outs and connection to the Arduino board...I gather that full pin to pin compatibility with the arduino needs mods.
chas Enthusiastic arduino noob
I was just thinking the same thing. I have no clue how I'd wire it up. If I bought it I could figure it out, but then I'd have to wait even longer for a second round of parts to ship once I figured out what I needed.
There isn't any wiring required, unless you want to hook it up in some different manner to how it is intended. For that situation teh relevant pins are broken out. This shield will work with any standard Arduino or compatible board. You just connect audio into the input and optionally take it out of the output via 3.5mm jacks.
I know I am too late to this thread, still any one have a sketch for this board ? how to connect this board to a http://www.freetronics.com/collections/display/products/dot-matrix-display-32x16-red#.UoLGJedDuGk, I am trying with this http://tronixstuff.com/2013/01/31/tutorial-arduino-and-the-msgeq7-spectrum-analyzer/ but not sure how to connect all. Any clues ?
Is there a replacement or upgrade for this product? It fills a very specific niche and would be difficult to replace. Thanks.
It will be out soon! The rev on this ended up getting delayed because of Edison builds. Give it a couple of weeks and it'll be out :)
Awesome, I'm all ears, looking at getting another but will wait until the revision is out. Where would be the best place to get notified of its release?
The new product feed. It'll show up in there as soon as it is released. If you have an RSS tracker, you can find the feed here.
Saw it pop up today :) https://www.sparkfun.com/products/13116
I used this shield on a Due to do an LED strip on an outdoor barbecue:
http://www.youtube.com/watch?v=-4Yn3KqeNXM
Way easier than trying to program and debug a Hartley or FFT and keep up real-time. The best $25 I ever spent.
I do agree the noise level on the spectrum shield runs high - about 8-10% of max level is what I found, but not a problem to gate out in the software and really little effect for what this project was. I did try putting a stiff cap. across the power rails which didn't help, so this is something more intrinsic to the shield implementation.
I also found that the LED strip (the Adafruit 32-LED/meter one) had to be power-cycled after initial bootup or it wouldn't always come on. (Nothing to do with the spectrum shield, just FYI). Not sure where that problem is - it runs fine off 3.3V clock/data & 5V power otherwise, but I just programmed the home automation system to do it, so again not a problem.
I've put my code for this shield (usine the Due and the Adafruit LPD8806 LED strip) up on github:
https://github.com/ergodic00/LightOrgan
The library is written as a C++ class that allows you to define sound-driven segments on the LED strip quite easily. The comments explain everything.
Even if you don't have this particular hardware the library may help, especially if you're using a Due and SPI.
This thing does not work until an analogReference(DAFAULT); is added to the initialization on ArduinoUNO, i am using Arduino 0022 built, hope it helps someone since i've lost few days debuging it.
regards
You shouldn't need that.
Example code here: http://www.bliptronics.com/ArduinoCode/SpectrumProcessing/SpectrumShield101.zip
When the line is plugged into my computer, at full volume, it peaks very easily, and I found that it has to be at 50-60% to get good readings.
I am a little disappointed by this shield. Maybe my test is flawed - I just connected it directly to my old iPod with an 10" audio cable. I have to crank up the volume pretty high to get some useful readings. I also get a lot of noise when I pause the music. With the Arduino 10 bit ADC (values 0 - 1023) I have to ignore any value less than 64 (noise) and I never get any value above 256 - which is not a very useful range.
The audio input needs to be at normal line levels to get a good reading. That's the sort of levels you'd feed into an audio amplifier. The levels from an iPhone are a bit low unless you have the volume at about 80%-90%. So the idea would be to feed your audio in from your device at an appropriate level to get good results, then out to your powered speakers or an amp and adjust the listening level there. Listening with headphones at that level will be a bit too loud for most people.
I just wanted to say I ran into the opposite issue with mine - running off most audio outputs, the bands max out at a medium volume. Before I disassemble my board and add a stereo input adjustment (which I will document), does anyone know if there's a way to adjust the reference voltage coming to the IC?
Worth noting that I had SIGNIFICANTLY better results with the reference circuit from the datasheet of the MSGEQ7 than with this shield. The components used (caps primarily) seem to have a VERY significant impact on your results. A protoboard of the reference circuit using junk hookup wire, the same 3.5mm jack, a DIP8 MSGEQ7 and some jumper wires produced one third the noise floor (readings from the Arduino UNO ADC of 20 vs almost 150 from this shield!)
I also had huge shifts in frequency sensitivity. When playing misc dubstep with heavy bass on my own board, I was getting appropriate (readings matched what I was hearing) separation. When using the shield, the higher bands (3-7) were GREATLY exaggerated to the point where I had to stop using it.
I'm building my own shield now using the wima polyester caps I used on my own version and I'll post side by side results when I get the chance.
I'll take a look at this as well. I haven't noticed this issue, but I haven't looked for it either.
One thing I do notice is that the SFE schematic shows a 1000 pF input coupling cap, but the MSI datasheet shows a 0.1 uF cap there. Perhaps this is affecting the low end response? I don't have the board in front of me so I can't check and see how it's actually built.
Ive posted a helpful guide on connecting this chip to an Arduino on my site. Hopefully someone finds it useful!
http://skoba.no-ip.org/msgeq7/
I read below that a replacement for this shield is coming out... any news on when that may be? Or what kind of improvements there will be?
It's in the works - we're building them up and putting the final touches on some new documentation. Give it a week or two more!
Any ETA on when this will be available again?
Does it make a difference which of the two audio jacks you use for line-in? I tested my board with one of the audio jacks and with speaker-out of my notebook and it worked well as long as I turned the volume up. Now I wanted to use the audio-out cinch jacks (line level) of my hifi amplifier as the audio source for the board but nothing happens on the LEDs. I thought the best input would be line-level but this does not work for me at all. Any idea?
I am the Director of the Fort Hays State University Makerspace. We are almost done doing a dancing light show with 14 mini Christmas trees, one for each band. I would say the code to run this is a 4 or 5 out of 10 for simplicity. The only complications are the arrays and the digital controlled chip. This is a great backbone for our holiday light show and works great. Now to add an MP3 shield.I would suggest this project for others!
Here's the shield in action; it kicks in at around 40s:
http://youtu.be/0xwMbbmw55Y
Is it possible to connect a "Electret Microphone Breakout" such as https://www.sparkfun.com/products/9964 directly to this board? (I would like to skip the left/right input audio cables)
I don't want to have a long audio cable coming to this shield. Does anyone know if I can directly connect the Audio-signal from "Electret Microphone Breakout" https://www.sparkfun.com/products/9964 to both the Right and Left of this shield?
I will post this link as a source for drivers for this chip: http://tronixstuff.wordpress.com/2013/01/31/tutorial-arduino-and-the-msgeq7-spectrum-analyzer/
All you need to do is plug the Shield into the Arduino and plug in power and audio and you're ready to go with the drivers above and the Processing sketch provided there as well.
All of the pins for the Arduino are for connecting additional components if you desire. The Spectrum Shield just sends multiplexed analog voltage signal to pins A0 and A1 and the drivers readAnalog() from there.
Anyone running this at 3.3v without issues?
would this be the board I need to build a led music spectrum analyzer?
I'm getting a lot of noise if there's absolutely nothing playing. Whether I have something connected to the shield or not makes no difference, the noise levels remain the same. I'm wondering if this is considered "normal" for this IC or this specific design of the shield. The following is with nothing connected to the audio input. All it's doing is reading the 7 buckets and spitting them out:
Compare that output with one where there is music playing:
Running code for this output is visible at http://pastebin.com/QM1qeDpr
Add a baseline correction when you initialize your drivers. Compute the average for the first N samples per band and then reduce subsequent output values by the computed average, taking care not to assign a negative number (so write a function that assigns zero if average > output and the difference otherwise).
This should fix most of your noise.
You can also usually turn down the volume on whatever audio device you are inputting from.
You missed the part where I said the noise is there regardless of whether there is something playing or even something connected to the shield. It seems to settle to lower values over time. What I mean with that is, I ran a sketch that captures the lowest and highest noise level for each of the seven bands. The shield is connected to an UNO R3 and there's nothing connected to the shield itself.
I would reset the unit and let it sit for 120 seconds and write down the values then. Reset again, let it sit for 120 seconds, write down values again. I did it several times and this is what I'm seeing: http://pastebin.com/7TPZbJrk
For the low values it doesn't change much, but the high values do show a slow decline. So I suppose I can take these, calculate the average of them, and use that as a permanent baseline that I will always use. Anything below those values gets ignored.
The noise you put on pastebin looks like what I was seeing.
What I've been doing is smoothing the output signal by computing a running average with Welford's algorithm, then computing a running average from the baseline corrected signal and outputting that. The result should be zero noise and a smoother output signal.
I put my arduino code (for an Uno) on https://github.com/Stabitha/Spectrum_Shield_Driver You can comment out all of the running variance and standard deviation code for space.
Ok I should have read the comments. No headers included. Which ones do I need?
These will work for you.
Those headers don't work out that great. If you try to plug the shield all the way down onto the Uno the edge of the prototyping area hits the USB port and charging jack. Some extra long stacking headers would work better.
Total arduino noob here. Can someone help me convert this code [ https://gist.github.com/matt-/3835612 ] for use with arduino uno r3 with sparkfun spectrum shield and WS2812 leds please? Here's a link to the video. http://www.youtube.com/watch?v=8Urj9ugsV58
Thank you so so much. Or at least show me the way to understanding this. I don't mind doing the work myself, I just couldn't find any information on how to do this or have any idea where to start so i came here. Thank you all! Cheers
Without digging into the code too much, I think that example should already work for Arduino R3. You'll just need to make sure you connect the WS2812 LEDs to pins 2 and 3 (or change the code to match which pins you have it connected to). However, this shield doesn't work with SPI, so it may be worth simply starting with the example code above and adding in the LED control. You can find a basic example sketch for them here.
Thanks so much for replying Toni! I tried the code and nothing. I have 3 wires on my ws2812. red=5v, green=DIN (data?), and white=GND. Most example codes i see asks for 2 pins to connect to the arduino. I'm still confused about this
Hey, sorry about that. I sent you to the wrong code. Check out this hook-up guide. That'll be much better for you to get running. Sorry again about the confusion!
It is odd and annoying that only some of the digital IO pins (6-13) are broken out when none of the other analog and power pins are. It makes using the prototyping area difficult since you have to solder a jumper wire for power and ground rails from where you soldered the headers that plug into the Arduino, or from a leg of one of the SMD components. It seems like it would be an easy fix to have a secondary PTH point for the rest of the Arduino pins...
To get started, here's an Arduino sketch to use it, runs fine on an UNO and 1.0.5 of the Arduino suite. http://www.bliptronics.com/ArduinoCode/SpectrumProcessing/SpectrumShield101.zip
might want to mention on the schematic that you are using the MSGEQ7N not MSGEQ7P so it is not confused for and used for the dip version as they are not pin compatible!
For what it is worth, I found the board to have very bad noise in the readings ... until I actually plugged something into the input. At that point the noise completely went away, even if the input wasn't playing anything. Here is a YouTube playlist with a project I'm working on showing this in use.
https://www.youtube.com/playlist?list=PLp21wF8e4Xng5j6fdSD9A1c0W8lONnVxk
When you say 7 band per channel, does this mean there is more than one channel? Does this mean that, if there were two channels, I could run a 14 band spectrum analyzer?
Each part has one input channel. There are two parts, for a total of two input channels (stereo).
Each part has seven bands, but the frequencies are preset and can't be changed. Two parts give you 14 bands, but the two groups of 7 will be identical frequencies.
Claro?
Si, Gracias.
Has anyone stacked an mp3 shield with this spectrum shield?
Merry Xmas to All! Here's my YAAXT - Yet Another Arduino Xmas Tree, just in the nick of time. Used the SparkFun Spectrum and MP3 Shields, LPD8806 Addressable LEDs, Dayton Amplifier, Bose Speakers and controlled via IR Remote. Used great MP3 and IR libraries provided by Bill Porter. Also the LPD8806 LED library from AdaFruit. Video could not capture the true intensity of of the led colors - they are so bright, they overwhelm the camera CCD.
http://youtu.be/YSS91urEqEg
This board works fantastic. I used one of these along with a EL Escudo Dos to add a color organ feature to my brothers boom box http://www.youtube.com/watch?feature=player_embedded&v=sm1fcgI5BcM
That is a cool project!!! Any chance you could post the code? Keep up the good work!!
GREAT project! Thanks for sharing the link!
Bought it, loaded it, ran it, like it!
FWIW - I have the same noise level (ave of ~60) but that's easy enough to cancel out in software. Not sure why it's such a big deal if it's so consistent.
What I'm now wrestling with is whether I can easily reroute the digital pins to allow me to try this stacked with an LCD shield for spectrum eye candy. Maybe I'll just wire up a protoshield with these same chips but jumper pin holes for the 4 used I/O's would have been nice. Cutting the trace is easy, soldering in a new connection not so much.
I used the straight IC first to test with the manufacturer's circuit. Then I tested this board. I found the noise to be about the same level in both, a value of 64 like previously stated by Larsi. Sparkfun, were you able to get this board to produce a lower level of noise? or, the IC?
Here's my project using this shield. http://www.youtube.com/watch?v=XN8itBO7fvg
does anyone know if you can use this shield with a maple board? http://www.sparkfun.com/products/10664
Hi, does anyone know if you can plug in a mic to listen to environment sounds and analyse those sounds?
Yes! We used that in making the DreadMill. We used the breakout board for the electret microphone here. It worked well enough, but you could do another microphone with an opamp.
How is this different than using a bandPass filter in Minim?
I just watched the product post, and I think I heard that you had some example code posted on here, and I am wondering where it is. Thanks!
For arduino ...
* the link above ..
http://skoba.no-ip.org/msgeq7/
also others ...
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1275615544/all
... and ...
http://www.bliptronics.com/item.aspx?ItemID=116
Netduino ..
http://forums.netduino.com/index.php?/topic/478-graphical-eq-shield-from-bliptronics/page__p__3526__hl__bliptronics__fromsearch__1#entry3526
FEZ
There is also working code on the FEZ forum, but site not responding right now.
These are great boards if the same as the ones I used to get on bliptronics site. The shield working with arduino, netduino and FEZ.
Thanks for picking up this design sparkfun.