Instructables

Sync LEDs to music

Picture of Sync LEDs to music
ledhuge.png
IT SEEMS SOME IMAGES HAVE BEEN REMOVED OVER TIME, I'M NOT ACTIVE ON THIS SITE ANYMORE AND I RECOMMEND THAT YOU ASK THE AUTHOR OF A SIMILAR INSTRUCTABLE

Here's a link to the wiring schematic that was removed


In this Instructable, I'll show you how to sync LEDs to music. I know this have been done before multiple times but this time I'll try to do it as clear and easy as possible. My camera is bad so please bare with me.

I've also made a video tutorial!


 
Remove these adsRemove these ads by Signing Up

Step 1: What you need

Picture of What you need
*This is what you need to make 1 channel. Double the quantity of this part if you want stereo.

Parts:
9 volt battery
9 volt battery clip
*TIP31 (Or other NPN transistor)
*2 LEDs
*220 ohm resistor
wire
audio cable or old headphones

Additional:

If you have a breadboard you only need:
a knife or scissors
(optional) 3 alligator clips

If you want to make it permanent you'll need:
Soldering iron and solder
on/off switch
(optional) project enclosure

can i use 12v 5amps battery to make this project with 4 leds (3v) and TIP 31c transistor.

------------------------------------------------------------------------------------------------------------------

Please reply fast.

sickly2 months ago

Hi Guys, Can anyone help me with this little project. I made this work on 3.5 audio jack but I wanted to replace audio source to mic. Is this possible? can anyone send me a working photo/video of this schematics (masakit0n@yahoo.com). Please be advised that I have no electronic background. I learn from what I saw on youtube :D cheers. TIA

Help.jpg
starbreeze4 months ago
hi made this circuit like this project i used 4 led but the circuit doesnt work like stereo...can u help me about that?
DIYPieter7 months ago
I did this project exactly
I couldn't get anything from a phone or a mp 4 but got it with my audio mixer that sets out 20v
After about 10 secs the wires at the battery started melting
Is it because the mixer has too much power ?
If so what do i do???????
bilal77c8 months ago
Hello guys i want to make my 12v led strip flash to music so if you could please confirm if it would work i would make and test it but i have ordered the parts which will take 2-3 weeks to come and i don't want to waste any parts i also want it to be stereo
here is the diagram
http://i.imgur.com/RXKSdp3.jpg?1
pasteler09 months ago
Main idea taken from: http://www.danielandrade.net/2005/12/06/howto-blinking-leds/
zatek (author)  pasteler08 months ago
Nobody cares. And I suspect that wasn't the very first time someone made sound reactive lights. Again, nobody but you should care.
ThaXified10 months ago
Video of my Working Prototypes! i maked 4 DIFFERENT WAYS!
http://www.youtube.com/watch?v=VsuG48KyaKI
iTinkers4 years ago
How strong an amp did you hook this up to? I built this circuit earlier today and at first it would not work. I double checked it, and it seemed the circuit itself was fine. It turns out it did not work because I had it hooked up to my headphone plug. The power from it is just not strong enough. I hooked it to an amp torn out of old crappy speakers and it worked OK. It would only work on high volume, and even then the response was not that great. Nowhere near your video, certainly. I'm wondering what your amp is so I can get an idea of how strong it needs to be to get good performance.
zatek (author)  iTinkers4 years ago
For me it works even with an iPod. I use simply an audio output on my pc in the video. I do not describe properly how you solder audio cables in this instructable. (Not taking the colored stuff off will block all weak signals that is trying to pass through I think)
iTinkers zatek4 years ago
Hmm.... I just used gator clips to connect the circuit as in your diagram. I re-did it today to double check and got the same results as before. I just realized I got a TIP31C, and you used a TIP31. I'll try to get a TIP31 tomorrow and see if it makes a difference.
zatek (author)  iTinkers4 years ago
I have tried it with TIP31C too and it works just the same for me. Are you sure your battery is fully charged?? (The circuit works with almost all NPN transistors!)
macman808 zatek3 years ago
1. can i hook up a whole strand of about15 leds to this?
2. or do i have to wire them in parallel?
3. i am using a computer power supply.
zatek (author)  macman8083 years ago
As long as you have enough voltage you can attach as many LEDs as you wish to this, however there are some things you should take into consideration:
Depending on the voltage the transistor(s) might get hot, look into using a heatsink if this is the case. Make sure the mA wont fry the LEDs, make sure to use proper resistors for your circut. You wire them in series, as I do in the instructable but with more than two LEDs. (Per channel if you're planning on a stereo setup)
I'm using BC547 and it is also a NPN transistor.. My input would be 4.8v. But it's glowing very dim. I've tested with my Sony Walkman and Laptop, i get the same problem. I've tried out with White LED
zatek (author)  Dibin M Dixit1 year ago
This instructable could clearly be a lot better, as many seem to be having the same problems. However, your problem MIGHT be your power supply, remember that volt isn't the only factor in making this work, you have to have proper mA (Milli amperes) and also direct current. (DC as opposed to Alternating Current/AC).
Does it blink faintly in rhythm, or just glow faintly? If the latter is the case you might have a short or an improper grounding.
I would go for "Blink faintly in Rhythm" . In simple words it's overall performance is low.. I barely see the difference during morning times.. Should i amplify it? Will it damage the LEDs? Rite now i'm using 4 RED and 4 BLUE LEDs connected in parallel with two 220k resistors from Batt +
zatek (author)  Dibin M Dixit1 year ago
That's 8 LED's on a 4.8v with a 220k resistance?
I used 4 LED's on a 9v with a 220 (not 220 thousand) resistance.
I think that's your problem right there. I have no idea what battery you are using that gives out 4.8 volts though, would need some more information if I were to help you out here.

Try to use this http://led.linear1.org/led.wiz to find proper resistance values for your build. Enter one channel at a time.
It looks good, though one thing if you have time to improve it would be to increase the linearity by feeding the inputs into 2 A2D ports on a microcontroller, with 2 pulse width modulators. That way if a sound was quiet you would only get a faint light, and if it was much louder youd get a bright flash.

Still impressive though for the low component count, I did something similar for my college project using RGB LEDs which is here: http://www.youtube.com/watch?v=rWAARGyPp5Q
Is there any chance you could post a schematic or something for how you did that? Thats almost exactly what I'd love to do!
I can give you a quick description of it as my schematic was hand drawn and I changed it considerably from the original.

Basically there is an electret microphone and a preamp like this:
http://www.qsl.net/va3iul/Homebrew_RF_Circuit_Design_Ideas/Microphone_Preamp_Electret.gif

The output of which then goes to 3 passive RC filters at 117Hz (bass), 1170Hz (med) and 4650Hz (high), then the output of the filters is smoothed using a fairly large capacitor, to give a slow fade as the volume of the 3 frequency components changed. If you miss out the smoothing caps it quickly gives you a headache as the flashing is too fast.

The 3 smoothed values then go into 3 analogue ports of a microcontroller (PIC 16F74 running @ 4MHz), and it uses pulse width modulation to control the brightness, according to the corresponding analogue value. 2 were implemented via the CCP modules and the other is bit-bashed. If I was going to make it again I would use the 16F737 as it has 3 CCPs on it, makes it much easier and frees up your software to do other things in the background if you want to make it a bit more intelligent.

The circuit is very experimental, and you would need a decent knowledge of assembler code to get it working. If you feel like giving it a go I can send you a copy of the .asm file, its all commented to explain how it works. It is only a couple of pages of code though so nothing too complex.
What sized smoothing capacitors did you use for your fading? I suppose voltage isn't a factor too much, but what µF?
Also where can you get the passive RC filters?
I believe I used 1uF X7R fading caps with a 1M resistor to ground to bleed off charge as they went into a high impedance A2D converter on the microcontroller. They're surface mount ones though, so no values printed on them, so I forget the exact capacitance. The value is fairly un-critical though, longer fade = higher capacitance and/or higher bleed resistor.

I posted below that I found a great site that helped me with filter design, its here: http://www.electronics-tutorials.ws/filter/filter_4.html

The RC filters are easy enough to make, as long as you get your calculations right you cant go wrong really. Just find a decent component supplier, or buy a resistor/capacitor kit from ebay (under £5 generally) and you'll have almost limitless combinations of filters you can make.
Okay thanks on that. I'm wondering though, whenever I put an audio signal through the filter, it comes out the other end considerably weaker. Is this normal, should I just amplify the signal before or after the filter?
That would be really really awesome! you could email it at: not john f at aim . com

with the at being the symbol, and no spaces of course.

So the filters have no coding involved... and the microcontroller makes the light flash based on how its coded? This seems a little over my head right now haha, but certainly cool.
zatek (author)  pyromaniac3034 years ago
It does work like that! I get only a faint flash with low sounds. It's just my sucky camcorder. Anyways thanks for the idea, allthough i know nothing about microcontrollers.
Oh right sorry didnt realise. Another thing you could do would be to use bandpass filters to seperate out the bass and treble sounds. You can make a simple bandpass from only 2 resistors and 2 capacitors like this:
http://www.electronics-tutorials.ws/filter/filter_4.html

Theyre really simple to get working. Your bass wants to be around 100Hz and treble above 3kHz.
Sorry but I'm kinda a noob at this but can you explain or craft a diagram for me please as I cannot understand the C1 or R1 values. I was also planning on making a music reactive LED box on a big scale and I decided to separate the right and left audio on the leds which was easy but then I thought that I should add leds for the mid audio and bass aswell. For the mids I found out how through some research but for the bass after a long long time I finally found your comment which I think would be the best solution. I have decided to separate the mids and the bass, the mid which would act as treble at the high freq of 3kHz and the bass acting at 100Hz, by using those bandpass things, which I wasn't able to find on the web. Please help me out as I dont get which tip resistors to buy and what are the capacitors as I've no knowledge of them at all :p

Hi, I had a few minutes this afternoon to come up with some values for you, see the image attached. If you can't get the component values stated (53nF is a bit of an odd one!) then use your next nearest, say 47nF. It means the frequency won't be exactly what you're after but may only be a few Hz out so nothing to worry about.
RC bandpass values.GIF
man I'm glad..thanks a bunch :p
Btw how do we change the capacitor value? or how do we determine it?
You have to first choose a resistor value, decide on what frequency you want, then use this formula:
C = 1 / (2 * Pi * f * R)

Therefore if your frequency was 100Hz like in the example, and your resistor was 1000 Ohms, then you'd do 1 / (2 * Pi * 100 * 1000) = 1 / 628318 = 1.59E-6

This means 1.59 with the decimal point shifted 6 places to the left, or 0.00000159 Farads, which is near enough 1.6 microfarads. Hope this clears it up a bit as it can be quite confusing!
hmm...lol I'm just a business student fascinated about electronics :P and mostly for this project. I got what you said but I'm still confused, how am I supposed to apply these values in real life or will the capacitor adjust it itself?
Well using the above formula and circuit, it means that the frequency you selected with the formula above will pass through from the input side to the output side of the bandpass filter, but the signals at different frequencies will be blocked (well its far from perfect, you'll get a good percentage either side that will not be blocked!).

To try and simplify it a bit:
So say you had your 3kHz filter, you might get anything from 2kHz to 4kHz coming through it, so things like guitars and violins etc will be passed through it and come out the other side, but bass guitars and really high frequency things like whistles may not be. Basically anything coming through it decreases in loudness the further from that 3kHz it is, it will still be there at even 5 or 6kHz, but many times lower voltage/quieter.

You can probably feed that signal straight into a transistor and you should see if you have your bass LED and your treble LED next to eachother there should be a difference in brightness as you step up through the frequencies.

I tried to upload an mp3 file I made that goes through all the frequencies slowly but it seems all the upload sites are blocked at work! I will try it later from home if I get chance...
Where can I get a 1.6 microfarads capacitor from? :/
I didn't manage to find any , but found some 1.5 microfarads here: http://uk.farnell.com/multicomp/mcca000544/mlcc-08055v-16v-1-5uf/dp/1759423

They're quite small though, depends on your soldering skill level as they're surface mount parts (have no connecting wires, you have to place them flat to the board, tweezers help!). To be honest though its for the bass side anyway so you'll probably get away with anything between 1uF and 2uF.

Just get the components that are fairly close to the values specified, but aren't hard to find. Like if you had calculated a 630 Ohm resistor for a design, in most cases a 680 Ohm would do the job as this is the closest commonly manufactured value - search for 'E12 series' to find out what values are available.
zatek (author)  pyromaniac3032 years ago
I think I gotta try this after all the talk about it in the comments.
However, open that image and replace the last string in the URL saying "SMALL" or "MEDIUM" with "LARGE" to see a much clearer version. ;)
I have tried this project according to your design. The LEDs light up, but do not flash or blink with the music. I tried using a MP3 player, then my computer speakers, but no success. Once I insert the audio jack, the LEDs light up and stay on. How can i fix this as easy as possible. I am not a electronics person. Cool project though.
How did the RBG LEDs make a difference? Because I only saw red in the vid.
Well the red was for the lower frequencies, and as the synths at the start were quite low pitch thats all you could see, as the blue and green were barely on. With the drum hits towards the end you can see that all 3 colours were on, as it turned an off-white, though as my red LED was slightly brighter it still had a pinkish tinge to it. I placed a prism in front of it, so take a look at the 'rainbow' on the door to see the three colours separated.

But I agree its far from ideal, and red is still the dominant colour. If I had the time I would have made changes to offset the red PWM value down a bit, increase the blue quite a lot, and increase the green a bit. Also the frequency response of my filters is poor, as they have a much wider range than I wanted.

Oh yeah know I see it now when I knew what too look for...
Another idea would to have the LEDs cycle through the colours...mabey...
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!