Introduction: Sync LEDs to Music

Picture of Sync LEDs to Music


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!

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.

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


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

Step 2: Assembly

Picture of Assembly

Everything will be done step for step in the pictures below as well.

1 Making it with a breadboard:

Start with connecting the 9v battery to the bus lane. Then put the TIP31 vertically somewhere near that bus lane.
Hook up the cathode (shorter lead) of the first LED to the collector (middle) pin of the transistor. Then connect the cathode of the secound LED to the anode of the first. The secound LED's cathode goes via 220 ohm resistor to positive voltage.
Connect the emitter of the TIP31 to ground on the bus lane.
Connect an alligator clip to a jumper wire and connect that jumper to the base of the transistor.
The other end of the alligator clip goes to left or right channel in the audio cable.
Connect another alligator clip to a jumper wire and hook it up to ground.
The other end goes to the power in the audio jack, there might be several power cables inside, any of them will do.
Copy everything if you want two channels.

2 Making it permanent (Both channels)

Solder both resistors to the positive end of the battery clip.
Solder 3 wires to the negative end of the battery clip.
Solder the anode (Longer lead) of one LED to the cathode of the other one.
Repeat above step.
Then solder the anode of the 2nd LEDs to the resistors
Solder two of the cables to ground to the emitter pins of the transistors.
The collector pins are soldered to the cathode of the two LEDs
The base pins are soldered to respectively the right and left channels in the audio cable.
The third cable to ground goes to the power cable in the audio cable.
If you want a switch solder the positive voltage to pin 1 on the switch and the
continiuing cable on the secound pin.

Step 3: And How Does It Look?

Well there is only one answer to that!


DIYPieter (author)2013-09-11

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???????

bostaba (author)DIYPieter2014-12-18

I have not tried this yet, but will be receiving my Bachelors in Electronic Engineering this weekend. From what I've gathered, you didn't "do this project exactly." If the wires melted, then YES, you have given too much power through the mixer, which probably has destroyed some (if not all) of the components used. The idea proposed is not the best way to produce the effect, but I have tested it virtually, and it does work with a .5V output (say from an MP3 player on max volume).

geod1 (author)2014-10-10

Hi guys, i was wondering if i could connect a laser device

(something like this ) instead of LEDs.

jvalencia9 (author)2014-05-25

im a newbie, i tried this circuit, and its doing fine, but when i use Y-splitter to hear the sound, LED became dim.. any suggention for a newbie.. thanks help help help

selvamsabarish1998 (author)2014-03-26

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


Please reply fast.

sickly (author)2014-01-22

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 ( Please be advised that I have no electronic background. I learn from what I saw on youtube :D cheers. TIA

starbreeze (author)2013-12-11

hi made this circuit like this project i used 4 led but the circuit doesnt work like stereo...can u help me about that?

bilal77c (author)2013-08-21

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

pasteler0 (author)2013-07-14

Main idea taken from:

zatek (author)pasteler02013-08-14

Nobody cares. And I suspect that wasn't the very first time someone made sound reactive lights. Again, nobody but you should care.

ThaXified (author)2013-06-08

Video of my Working Prototypes! i maked 4 DIFFERENT WAYS!

iTinkers (author)2009-09-15

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)iTinkers2009-09-21

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 (author)zatek2009-09-21

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)iTinkers2009-09-21

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 (author)zatek2010-12-10

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)macman8082010-12-10

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)

Dibin M Dixit (author)zatek2012-10-15

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 Dixit2012-10-15

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.

Dibin M Dixit (author)zatek2012-10-15

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 Dixit2012-10-15

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 to find proper resistance values for your build. Enter one channel at a time.

pyromaniac303 (author)2009-06-14

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:

jpf5144 (author)pyromaniac3032011-01-08

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!

pyromaniac303 (author)jpf51442011-01-09

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:

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.

Daxuto (author)pyromaniac3032012-07-14

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?

pyromaniac303 (author)Daxuto2012-07-17

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:

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.

Daxuto (author)pyromaniac3032012-07-25

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?

jpf5144 (author)pyromaniac3032011-01-18

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)pyromaniac3032009-06-14

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.

pyromaniac303 (author)zatek2009-06-14

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:

Theyre really simple to get working. Your bass wants to be around 100Hz and treble above 3kHz.

ceriosis (author)pyromaniac3032011-05-20

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

pyromaniac303 (author)ceriosis2011-05-22

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.

ceriosis (author)pyromaniac3032011-05-22

man I'm glad..thanks a bunch :p
Btw how do we change the capacitor value? or how do we determine it?

pyromaniac303 (author)ceriosis2011-05-22

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!

ceriosis (author)pyromaniac3032011-05-22 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?

pyromaniac303 (author)ceriosis2011-05-23

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...

ceriosis (author)pyromaniac3032011-05-25

Where can I get a 1.6 microfarads capacitor from? :/

pyromaniac303 (author)ceriosis2011-05-27

I didn't manage to find any , but found some 1.5 microfarads here:

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)pyromaniac3032011-05-22

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. ;)

Iliketoknow (author)zatek2010-01-18

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...

I actually found it not very useful, so I wrote some new software as a moodlight. When I clap or whistle it cycles between off, and various colour combinations. I have it under my bed so when getting up in the morning in winter when its dark, I can see where I'm going just by clapping. Also useful at night before bed. Its relatively bright as it is 3W too.

The only problem with this is that it wakes everyone up when I get up!

You seem to be a few steps ahead me at the moment, a soon as I get an idea you've already done it!
But seriously that sounds really good,how long did it take and what programing language did you use?

Well to reprogram it it took me about 2 hours, as I had to get my head around what I'd done a couple of years ago. Also took a bit of tuning to work out at what level to set the limit, so that it wouldn't inadvertently be activated by talking etc. but would still work with a sharp clap from any point in the room.

I used assembler and a PIC16F74. I can provide you with the .asm file if you like, though I have to say my annotation of it is a bit messy.

No thanks but thank you all the same, I wouldn't know what to do with it or anything...
But mabey a project for the future...

ernest950 (author)2012-04-21

i need the schematic please ........

zatek (author)ernest9502012-04-21

Yeah dude, seems it's been removed from the 'stucable somewhere, but I can fetch it for you;)

ernest950 (author)zatek2012-04-24

wat is audio cord power?

About This Instructable



Add instructable to: