Let's Make Robots!

Taking Sound Volume and Doing Something With It

Hello

I want to take sound from my car speakers and use my 512 LED panel to display stuff when music is playing.

I'm guessing I will need a microphone connected to an analog input with my Arduino Uno?

I have been fairly successful programming the light matrix.

Thanks very much

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks bdk6 and Stephen

I want to create a very simple device that reacts to sound using random visual displays (geometric and amorphic) using my 512 RGB LED panel - nothing really fancy or complicated, I hope.

I think I remember seeing things like this many years ago from RadioShack - the product was described "Lights dance to the music" or something really cheezy like that (ha).

 

 

A long time ago, in a place far away, I built some LED bar graphs for my old 67 Cougar XR7 GT using some LM3914N chips. They are pretty cool in that they can take an input and drive a set of LEDs based on the input voltage. There are linear options for simple volt meters and log ones for sound levels. No clue where that circuit is at anymore but just an option. Like cheaper than a micro controller as well but might not be what you're looking for. The will do bar or dot sequences I believe. Just search for LM3914 LED bar graph or similar and you should find something. Looks like the chip is still available even. Edit: Of course what I'm talking about is likely way too simplified in regard to what your trying to achieve. Just saying... Stephen

How about peak level meters?  Divide the matrix in two halves, left and right.  On the first sample, light the two innermost (touching) bars higher for higher voltage.  Next sample shift the first two out one place, and light the inner two with the new sample.  Rinse and repeat over and over.  Make two histogram/oscilloscope displays of the volume.

You can connect directly to the speaker wires, but you will probably need some protection and level shifting.  Power = Voltage squared / Resistance.  The typical car speaker is 4 or 2 ohms so 20 watts into 4 ohms means about 9 volts RMS, or about 13 volts peak and 26 volts peak to peak.  You will need a voltage divider to lower it and maybe a diode to protect from negative voltage and probably a small cap to smooth out the peaks so you read a short time average.  The ADC and/or the voltage divider should have an input impedance of several thousand ohms so it will be almost unmeasurable compared to the speaker.

If you want to filter the frequencies, be prepared for some fairly heavy duty math (Fourier transforms are the "standard" method) and some careful optimization on an AVR. It is possible, though.  In that case you would use the voltage divider and shift the AC signal into the 0-5v range.

Cool idea.  I would like to see how it turns out.

 

≡≡≡≡≡≡≡≡≡≡≡≡≡

Mega-thanks!

≡≡≡≡≡≡≡≡≡≡≡≡≡

 

 

I think this is what I need --> LINK

 

The one you linked to is an impact sensor.  If there's a loud noise, it goes high and if not it stays low-probably not what you're after unless you just want to turn on all 512 LEDs at once.  This one from Sparkfun might be a little closer to what you're after.  It amplifies an ambient sound signal enough to generate an analog signal that your ADCs can see.  What you do with it-spectral analysis, etc-all happens in programming.

That IC will do most of the work for you by splitting audio into power levels for 7 different frequency bands, its widely used you will find lots of examples on your favorite video site.

Duane B

rcarduino.blogspot.com

If you could get line level inputs, you might be able to feed that directly, or, via some kind of level matching to an analog input. With analog in, you could get volume. If you added some filters, you could respond to different frequencies. My only concern to adding to a speaker's connection would be the addition of impedance.