Go Down

Topic: Audio Spectrum Analyzer (Read 11998 times) previous topic - next topic

blip

I like running LEDs off my Arduino and I also like listening to music, so I thought it would be nice if I could give my Arduino pitch perfect hearing then we could make the LEDs do some neat stuff.

I found these audio spectrum analyzer chips that are used in car stereos, so I've whipped up a shield and hooked it all up to an array of LEDs.  This is all running on an Arduino, no PC connected. In fact the Arduino is not even working that hard.

[media]http://www.youtube.com/watch?v=xYf_MMvdNvU[/media]


Details:
- A 3.5mm Audio in connector for input.
- Another 3.5mm connector for output to your speakers/stereo.
- 7 Band real time spectrum analyzer (Stereo!) 63Hz, 160Hz, 400Hz, 1KHz, 2.5KHz, 6.25KHz, 16KHz
- Only uses 2 digital pins and one analog.

For this example the LEDs are using 2 digital pins.
I'm only using the 5 lowest frequency bands here, I'll make a bigger array soon.
I've applied some automatic gain/attenuation to keep the display interesting and prevent it maxing out on noisy tracks.

This could be used for other types of audio analysis. Voice ID or audio fingerprinting may be possible.

I'll have some shields ready in 3 weeks time, I'll post back here when they are good to go.

CowJam

That's brilliant!

Are you going to share hardware schematics and code?

blip

#2
Jun 04, 2010, 01:09 pm Last Edit: Jun 04, 2010, 01:11 pm by blip Reason: 1
Of course! I'll just tidy it up a bit, I got so excited I just had to show it off first.  The analyzer chips are SMD, I just received a load of them, and I'll put them on my web store this weekend.  For those who don't want to solder SMDs, the shields will be couple of weeks off.  I was going to make them stereo, but now I'm thinking mono is fine. Visually represented, it's had to see any difference between the two  channels as it turn out.

I'm working on a BPM sensing algorithm now. For those who like listening to dance music, it's a must have I think.

CowJam

I'm not too good at soldering so I might wait for the shield.

Do you have a rough idea of cost?

spam21

#4
Jun 04, 2010, 04:52 pm Last Edit: Jun 04, 2010, 05:01 pm by spam21 Reason: 1
Mind sharing where you found those spectrum chips?

edit - nvm if you will post them on your webstore thats good enough for me.

blip

Here is the analyzer chip:
http://bliptronics.com/item.aspx?ItemID=111

Example circuit will follow shortly...

DeFex

Do you have backwards sounding music because the analyzer is backwards from the usual bass on the left :)

Very nice! i ordered some of your LEDs for my synthesizer project.

spookybonus

that is pretty great, but yeah, the bass on the right hand side makes my head hurt.

Youran

Amazing end result !
What material did you use as a diffuser? I've been looking around quite a while now and that's exactly what I need.
I suppose you're using BlinkM LEDs or some other type that have a small circuit to drive them?

blip

For the diffuser I used corrugated plastic sheet (Coroplast) that I covered with silver vinyl adhesive (signwriters material). I made a grid and placed one LED at the back of each cell in the grid, and the faceplate is just white Perspex with a grid decal appled to the front with black vinyl.

The LEDs are a type that you can buy from me here.
http://bliptronics.com
Like BlinkM but a different controller and they come pre-wired.

CowJam

You nearly ready to sell them as shields? It's been three weeks :)

Federico

What if I would like to have more than 5 or 7 frequency ranges?
Federico - Sideralis
Arduino &C: http://www.sideralis.org
Foto: http://blackman.amicofigo.com

blip

Well, you could use something with more power than an Arduino. Sample the audio, do a fourier transform on it and represent the analysis on the LEDs.

Alternatively do the analysis on a PC and then send the values to your arduino to display on the LEDs.

I haven't been able to find a simple audio spectrum analyzer chip that has more than seven bands, but there may well be some solution out there.


blip

Cowjam: shields are being worked on - I had to change some parts - I've now added a connector for LEDs and a power input jack to power the LEDs. Just a few more weeks....

SirPoonga

#14
Jul 02, 2010, 08:12 pm Last Edit: Jul 02, 2010, 08:17 pm by SirPoonga Reason: 1
blip, I want to see if I understand that chip correctly.  Setting the reset to high then low will reset the chip.  then the strobe pin will start turning on and off.  When it turns off the next frequency value is sent starting with the lowest immediately after the reset then looping infinitely through the frequencies.

How are you monitoring it?  How do you know if you missed  a frequency? Can out put up the code you used in that youtube video?  Does it take line level or mic level audio input?  If mic level then I would assume the value peaks will vary on the volume?

Edit: Oh wait, do you control the strobe pin?

Go Up