Pages: [1] 2 3   Go Down
Author Topic: Audio Spectrum Analyzer  (Read 11435 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Wigan, UK
Offline Offline
God Member
*****
Karma: 19
Posts: 814
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's brilliant!

Are you going to share hardware schematics and code?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: June 04, 2010, 06:11:06 am by blip » Logged

Wigan, UK
Offline Offline
God Member
*****
Karma: 19
Posts: 814
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Do you have a rough idea of cost?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mind sharing where you found those spectrum chips?

edit - nvm if you will post them on your webstore thats good enough for me.
« Last Edit: June 04, 2010, 10:01:07 am by spam21 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the analyzer chip:
http://bliptronics.com/item.aspx?ItemID=111
Example circuit will follow shortly...
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

California. USA
Offline Offline
Full Member
***
Karma: 0
Posts: 130
my guitar wants to kill your mama
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Wigan, UK
Offline Offline
God Member
*****
Karma: 19
Posts: 814
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You nearly ready to sell them as shields? It's been three weeks smiley
Logged

Milano, Italy
Offline Offline
Faraday Member
**
Karma: 11
Posts: 3091
Sideralis Arduino!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What if I would like to have more than 5 or 7 frequency ranges?
Logged

Federico - Sideralis
Arduino &C: http://www.sideralis.org
Foto: http://blackman.amicofigo.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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....
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 131
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: July 02, 2010, 01:17:55 pm by SirPoonga » Logged

Pages: [1] 2 3   Go Up
Jump to: