Turning music into a light show

[nickinoki] Made a light show using some amplifiers and an arduino. First he created a microphone circuit based around a LM386 Audio Amplifier. After amplifying the output of the microphone a second time, he uses three bandpass filters to block all but a few desired frequencies from reaching the arduino.  By only letting a few frequencies through the arduino is able to determine if the song is louder at higher or lower frequencies.  Then using the three analogue inputs he created a scheme for generating the light show on an arduino. While he was unable to achieve the exact target frequencies with his bandpass filters they worked well enough to allow him to successfully generate the light show.

Comments

  1. Philip says:
  2. steaky says:

    is there not an FFT library for arduino yet??

  3. MRC says:

    steaky: there is an FFT library written in C for AVR, so you have to compile that for your arduino code. I tried mucking my way through it to make a audio graphical equalizer, but I fail at software.

  4. nate says:

    An Arduino is overkill for a simple project like this, of course, but it is a good way to get into audio DSP. (Comparators would have been a good choice for a simpler, all-analog approach.)

    As for the filters, could you not replace the resistors with trim-pots and use a multimeter to fine-tune the cut-off frequencies, since imprecise resistance/capacitance values are typically the culprit?

  5. Sargon says:

    only mic amp (opamp Tl-071) and serial shifters to drive leds
    it is constructed as a blinky toy… not “pro” visualization tool
    video:

    FFT lib for arduino can be realy useful …

  6. LOL, i just did this 2 days ago, without knowing what i was doing. I ripped apart a controller from my phone speaker and wired them into the arduino board. Connected some wires to the controller and arduino and it worked :D

  7. Justin says:

    This would be cool for low bandwith radio digital signaling.

  8. vasskk says:

    nice idea. i dont see where you need the arduino though…

  9. vonskippy says:

    Cardassian: So how many lights are there in this here “light show”?

    Picard: There….are….F..O..U..R….Lights!!!!!

    Cardassian: Wow, you humans are really lax on the whole “light show” definition eh?

  10. Norm Lillibridge says:

    Dear (I use the term loosly) HAD,

    I don’t like Instructables. They exist in opposition to “Freedom of the Internet”. In addition, they are making rediculous amounts of money off the work of others (Advertizing and “Pro” membership). And this is content they receive for free. I would prefer that you NOT refer me to them. I realize that you are not likely to do as I would prefer, so please note when the referral you make is to Instructables so that I can avoid wasting valuable emotional energy following the link. I may be the only reader who feels this way, but please humor me.

    Norm

  11. Eggman says:

    @Norm

    cry about it. how about you make a FREE account, and it turns into a great resource for anyone who wants to use the site for its intended purpose: making things. and good for them making money, whats it to you? two words: Chrome, AdBlock.

  12. fyre says:

    I did a similar thing with a mic, low pass filter for the bass and opamp.
    Output goes into a Picaxe 08M that filters out the beat and generates serial RGB flashy data that runs to my RGB lamp. (serout)
    If the beat had not been detected for a few seconds, it would fade to random colours. Once a beat had been picked up it would swap between two random colours (sometimes black to make a strobe effect).
    The colours would be changed every 8 beats or so so it should synch up with whatever song.

    It’s kinda fun to optimize programs into a small space. Squeeze every byte!

  13. CalcProgrammer1 says:

    @Norm
    Instructables makes money, yes, but for people who have a project to share you have several options to post your project. If you want something easy that will share your project with a huge number of people, Instructables is free and easy to use. Otherwise you would need to pay for a web host or run your own server with enough bandwidth to handle linking from HaD. Advertisements aren’t a problem if you use AdBlock and if you have a (free) account you don’t see the Go Pro stuff so I really don’t see the reason behind the Instructables hate. If you really don’t like it, don’t go there.

    As for the project, cool! I just finished a project where I modded some LED fans with microcontroller-driven RGB LED’s for my PC case (3 fans * 4 RGB LED’s * 3 R/G/B = 36 LEDs total with Software PWM). I used an FFT in Processing to analyze the audio playback and do the same thing except digitally to send serial commands and flash the LED’s. I have blue mapped to low (bass) frequencies, green to midrange, and red to high (treble).

  14. strider_mt2k says:

    @ vonskippy:

    That’s the main reason why you never EVER hire a Cardasian to be your lighting guy.

  15. Vegetico says:

    @CalcProgrammer
    You mentioned you used a FFT libary for audio stuff… I’m plannung to play with FFTs on Atmels for a long time – but usually find excuses why not to start.
    One thing I’m always wonding is how you debug your stuff.
    Even assuming your FFT libary is rock solid – designing an FIR filter or whatever is (for me) always a try and error game.
    How did you do that. How do you test your whole setup – always with real data???

  16. fhamel says:

    I built something similar into an IKEA mood lamp, although all audio processing is done on the atmega168 (using software filters, not FFT). The lamp also accepts MIDI input (and sports the requisite automatic colour-cycling modes):

    (I have changed jobs since posting the video comment, and I would now be willing to assume the minuscule risk of posting details about the construction/code… one day I hope to have/take the time to do so :-( )

  17. kernelcode says:

    @Norm Lillibridge
    Doesn’t your browser tell you the target of links when you hover on them? If not, I suggest you get one that does.
    I always like to check where a link is taking me, lest I blindly click myself onto something horrific – such as Instrucatables.

  18. jaqen says:

    @norm; notice how the first comment from phillip, saves you from your misery.

    It never hurts to read other comments before you post your own

  19. jm says:

    How about instead of writing some ridiculous note about hating instructables, you just point your browser elsewhere.

    Alternatively, add an entry in your hosts file to point anything hosted at instructables to google or something.

    just edit c:\windows\system32\drivers\etc\hosts and add something like

    74.125.229.16 http://www.instructables.com

    to the bottom.

    There you go. Problem solved. you don’t ever have to look at instructables again.

  20. nate says:

    For those who detest Instructables:

    Taking Philip’s tip a step further, there is a handy Firefox add-on called “Redirector” that allows you to redirect URLs matching a given pattern to a custom URL, based either on regexes or wildcards. By using the following include pattern:

    http://www.instructables.com/id/*

    …and the following redirect pattern:

    http://daid.mine.nu/instructabliss/?url=http://www.instructables.com/id/$1

    you can redirect all Instructables to Instructabliss.

  21. Cubby says:

    Why bother with a mic. pre-amp? Eliminate that stage, use a capacitor and a variable resistor for volume control and make two of ‘em, feeding them at line level and stereo use. Gets rid of unwanted background noise such as someone talking in vicinity of the mic. and other ‘room noises’.

  22. Calis says:

    Not to say this isn’t cool, but I did this very thing when I was about 10 (close to 30 years ago…damn) and I used op amps. Even then the project cost me just a few dollars for parts. I also used incandescent bulbs for my “color organ” as the LEDs I had back then just weren’t very impressive for a light show.

  23. DeFex says:

    when i was a teen I made one with a triac and some transistors per channel. it was great for listening to ELO on :) Its not really a waste to use an arduino chip only though, you could program beat sequencing of lights and stuff.

  24. Devi says:

    can we use TL084CN instead of LM386N as OPAMP?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,791 other followers