spliting audio frequencys

hey y@ll,
its not realy an arduino proplem even its about an arduino project of mine...
i want to use a audio signal to control rgb led´s means the louder the audio the brighter it should be overall thats simple and i got this already but then my next step is use the frequency of the audio signal control the colors.
my first thought was to use the arduino for get the frequencys but nah that would be way to complicated specialy since 3 band equilizer seem to be a realy ez build.
my plan would be instead of the potis i would make a connection to a analog pin each.

maybe someone knows if this should work?

and maybe someone knows a good 3 band equilizer schematic that would work well with an not amplified headphone signal?

and maybe someone knows a good source that explaines how the frequency splitting realy works? i dont get how a resistor and a condensator with different values filter different frequencys and i would like to get a better understanding for that.

thanks upfront and have a nice day

Try search terms "arduino spectrum analysis" and "MSGEQ7"

RazeVorteX:
and maybe someone knows a good source that explaines how the frequency splitting realy works? i dont get how a resistor and a condensator with different values filter different frequencys and i would like to get a better understanding for that.

It's called filtering - Passive Low Pass Filter - Passive RC Filter Tutorial

What you are trying to make is (and has always been called) a COLOR ORGAN. (popular during the 60's)

I built a custom one for client when I first started in electronics. I didn't know what the going rate was so I
practically gave it away. It had a 10 band equalizer built using Walter Jung's "Audio IC Applications"

Don Lancaster has an "Active Filter Cookbook"

If that's out of your league you can just Google "Arduino Audio Spectrum Analyzer/Visualizer"

FYI, 3-BANDS is below the norm for a color organ. For the past 60 years the standard has been 4-channels, typically driving standard 7W christmas tree light strings

I believe I used red, orange, green & blue with red being the base end, but it's been so many years I can't
remember.

Typically is was four solid state relays driven by four bandpass filters

Due to the popularity of the circuit, (not just for the holiday season but year round) and the long
period of time it has been around , there is a proliferation of color organ circuit kits available , some
easier than others

thanks to all your replys helped a lot i should be able to get it done now.

Been there, done that (also in the sixties).
Mine looked like a traffic light, with PAR38 floodlights.
From memory red for bass, green for mid, blue for high.

Post#1 has the easy solution: MSGEQ7
Google "Arduino MSGEQ7".
Leo..

since 3 band equilizer seem to be a realy ez build.

Probably not as easy as an MSGEQ7* and maybe not as easy as doing it in software with an FFT or FHT library. But, if its' easy for you, go for it!

If you go with the MAGEQ7, you'll have 7 frequency-bands. You can either choose 3 bands and ignore the others, or combine them in software.

and maybe someone knows a good 3 band equilizer schematic that would work well with an not amplified headphone signal?]

I don't have a schematic handy but a headphone signal is no problem! Virtually all active equalizers are designed to work at [u]audio line level[/u]. A headphone signal is approximately the same level (voltage) as line-level except it's capable of driving a lower impedance load, and a headphone output always has a volume control. For example, the headphone output on a laptop or phone can connect to powered speakers (line input) or your stereo (line-input), etc.

If you copy an equalizer design make sure to leave-out the summing circuit (the part that re-combines the adjusted-filter outputs) and of course you can use fixed resistors instead of pots.

The Arduino can't read the negative half of the AC audio waveform. It can actually be damaged by negative voltages or the signal can be "damaged" (distorted) so the input must be biased. There is a schematic for a bias circuit at the bottom of my [u]World's Simplest Lighting Effect post[/u]. Of course, that goes at the Arduino-input(s) after any filtering.

The bias can be subtracted-out in software, or with FFT/FHT you can simply ignore the zero-Hz (DC) bin.

The MSGEQ7 puts-out a varying DC voltage so you don't need the bias circuit.

Another circuit that can be handy (and will eliminate the need for a bias circuit) if you use analog filters is a [u]Peak Detector[/u] (AKA "envelope follower"). It puts-out a varying DC voltage proportional to the peaks which means you can read/sample the "loudness" at around 10 times per second (or whatever) instead of reading the audio waveform thousands of times per second. That frees-up the processor to do "other things" and it just makes your software simpler overall.

I've built several lighting effects and I always use a peak detector.** (I'm not doing any frequency-related stuff.)

Of course a peak detector won't work with FFT/FHT/software filtering because the peak detector removes all frequency information. The MSGEQ7 has a peak detector already built-in.

Another trick that I always use is to make an automatic variable software threshold/sensitivity setting so that my effects automatically adjust to variations in loudness. (That's included in my "simplest effect" example.) One of my effects is a "VU Meter" effect, and it has automatic sensitivity adjustment. That makes it worthless as a real meter but it makes a good meter effect with lots of "meter action" no matter the actual signal level.

And, since I'm using a peak detector (a non-biased input) I also automatically switch between the 5V and 1.1V ADC reference depending on the signal level.

================================================================

Been there, done that (also in the sixties).
Mine looked like a traffic light, with PAR38 floodlights.
From memory red for bass, green for mid, blue for high.

Wow! I did almost the same thing! I built a color organ from a kit when I was in junior high (in the 60s). I re-configured it several times and it's last configuration was 3 colored floods in a rectangle box.

By the time I was in college I got bored with it and I converted it to a digital effect where a new-random patter would pop-up with every beat/peak. I liked that effect better and it was designed so that at-least one lamp was always on.

At some point I started over from scratch and made a 4-channel random effect with AC plugs so I could plug-in 8 colored floods (4 colors).

Next, I built a 4-channel chase light effect. IIRC, the direction changed with the beats/peaks and the speed was determined by the loudness. It randomly switched between a standard chase and Johnson Counter (inverted loop) effects. By that time, I'd figured-out how to make an automatic sensitivity adjustment.

Those were done with basic analog & digital electronics - No microcontroller.

...When I thought and the electronics design was getting complicated so I looked-into using a microcontroller and I chose the Arduino. Now, my VU meter randomly inverts, reverses, and mirrors. and there are 6 other sequencing/blinking effects with all kinds of random variations to keep things fun & interesting!

  • A lot of people seem to have trouble with the MSGEQ7 and some people seem to need some added-amplification.. I've never tried it but it is super-easy so I'd try it first if I wanted to do that kind of thing. BTW - the MSGEQ 7 is misnamed as a "Graphic Equalizer" chip. It's a Spectrum Analyzer Effect chip.

** My "Worlds Simplest Effect" doesn't use a peak detector, but that's just meant to be a simple example, using simple hardware. I have a similar real-world effect and it does use a peak detector.

Wawa:
Been there, done that (also in the sixties).
Mine looked like a traffic light, with PAR38 floodlights.

When I was in scouting, mid/late 80s, one of the leaders DIYed such a system using actual traffic lights, which he had obtained as surplus from the local government. The light show he built with it was running off a BBC computer with lots of custom hardware to switch high power AC (needed it's own group kind of high power). Pretty cool for the time.

The classic simple 4-channel SSR PCBs were a dime adozen back in the day. The input terminals were labeled "To speakers".