How do I light up LED's according to audio frequency bands?

I'd like to have LED's light according to the tones/frequency in music. Sort of a light show type of thing, I guess. I'm a digital guy, but I guess I'd start with active filters to divide music (~100Hz to 15 kHz) into 8, 10, 12 bands ? Then the output from each band would be converted into PWM to drive some multi-colored LED's. I know this description is vague and my idea is half-baked, so I'd be grateful to hear about some real ideas ;) TIA !

-Dave Pollum

Reply to
Dave Pollum
Loading thread data ...

Do a web search for "color organ".

If you want to do 12 lights you'll be making a _big_ bank of filters. You'll save board space, and maybe even money, doing it with a fast processor or a DSP -- something like a dsPIC, or an itty bitty ARM chip from Atmel or Luminary.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

Like this?

formatting link

D from BC myrealaddress(at)comic(dot)com British Columbia Canada

Reply to
D from BC

Or like this?

formatting link

D from BC myrealaddress(at)comic(dot)com British Columbia Canada

Reply to
D from BC

Or like this??

formatting link

It's possible that once you see all the videos on youtube,,,you won't feel like making this project.. :P

D from BC myrealaddress(at)comic(dot)com British Columbia Canada

Reply to
D from BC

The way you have described is the way it's been mostly done in the distant past. Disadvantage is that you need a bandpass filter for every channel you want, that adds up to a lot of circuitry. These days it's done with FFT (Fast Fourier Transform) processing, everything is done in software. A DSP (Digital Signal Processor) is often used, but normal 8/16bit microcontrollers like PIC and Atmel et.al have enough grunt to do it these days.

Dave.

Reply to
David L. Jones

It works better if you filter and rectify each band and then process the rectified values a bit before you light the LEDs

Each band's results should have a little of the nearby bands results subtracted from it. This narrows the bandwidth of the effect of each filter.

The rectified results are filtered in a filter that averages the value over many cycles but also subtracts away a bit of the value from the history. This makes the LEDs respond to changes a bit more than they otherwise would.

Reply to
MooseFET

Hmmm... lots to think about. I'll have to research FFT and DSP and take another look at the YouTube videos for ideas. Thanks, all =)

-Dave Pollum

Reply to
Dave Pollum

Easily adaptable to LED's...

formatting link

...Jim Thompson

--
| James E.Thompson, P.E.                           |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

"The American Republic will endure until the day Congress
discovers that it can bribe the public with the public\'s money."

                 - Alexis de Tocqueville
Reply to
Jim Thompson

Sure Dave, this is easy, just intermodulate the audio with a sweep signal, this is how old style spectrum analyzers worked. It's not to hard to hook up.

Reply to
Comcast1952

This idea does not work for audio bands because the sweep rate must be too slow to be useful.

I just had an interesting idea for someone digital.

In music, harmonics are heard as the character of the tone not as individual tones. The brain picks out the low frequency component as the underlying note.

Here what I suggest just for fun:

Take the audio input and convert it into a delta modulated signal at lets say 5MHz.

Get a "top octave generator" and use it to make square waves on the octave below middle C.

Use XORs to combine the delta mod signal with each of the notes of the octave.

The next step as analog to make the digital easier to see: The XORed signals can then be hooked to simple RC low pass filters to "delta demodulate" them. This then goes to a comparitor

The next step as digital: An up down counter can be used to make a simple IIR filter like circuit as follows.

An up down counter controlled directly by the output of the XOR would be an integration. If the system is clocked at a multiple of the 5MHz that is used in the delta modulator, we can use some of the extra clocks to make the counter tend to settle back towards zero.

To make the settling process work, but not very like the real RC, simply use the MSB of the counter as a sign value and one out of every so many clock cycles direct the sign to the up/down control.

Another XOR between the upper two bits of the counters would control the LEDs.

Reply to
MooseFET

[...]

Very elegant indeed. Why don't we see you in comp.dsp?

VLV

Reply to
Vladimir Vassilevsky

I have a wife and a job and a garage to put shelves up in and I sleep

8 hours a day.

Reply to
MooseFET

BTW: There is a mistake. We need a second XOR running at 90 degrees. The 90 degree signal can be made by XORing F with 2*F so the top octave circuit can be run at a higher clock and divided down.

Many years back I worked on the design of a sonar where I suggested the same sort of method.

Reply to
MooseFET

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.