Blinking Leds




Listening to music on my pc (proudly using WINAMP), I was wondering how would be to have some leds blinking with the sound that came out from the P2 connector, so I decided to make a simple circuit to do that. It worked pretty fine, so I decided to write a HowTo telling step-by-step how to do it. Hope you enjoy it!

If you want to see more of my DIY projects, please, visit my website:
Daniel Spillere Andrade Website

Material and Equipment:

1. 4 LEDs (any collor)
2. P2 plug
3. 2 position switch
4. TIP31 component
5. Box to put all the stuff (if you want)
6. Soldering iron and accessories
7. Cable

Video of the final project:

Step 1: Step 1

This project will work this way, you connect 4 leds in the +12V from your computer, they are soldered to a 2 position switch that will connect to a component called TIP31, this component gets the intensity transmitted by the P2 connector, and with that, makes the leds blink with the music.

You can follow this scheme:

Step 2: Step 2

For this project, I decided to install everything inside a small black box I had here, so I made 6 holes on it. Four in the top for leds and one in each side for the switcher and cables. You can follow by the pictures:

Step 3: Step 3

With the box ready, its time to connect everything. I started with the leds, soldering one small cable connecting each one, so would be easier to arrange them inside the box after.

After connecting all leds, you must connect the cable coming from the leds to the center pin of the switcher. One side of the switcher goes to the middle pin of the Tip31 component, and the other one goes to ground cable.

Step 4: Step 4

Now it’s time to make the P2 connector. You can see that the P2 connector have 3 pins, they are, left channel, right channel and ground. So you have to decide to get the left or right channel and connect with the left pin from the Tip31. Remember that if you connect the P2 using the left channel, if only the right is enabled on the computer, this circuit won’t work. Usually the ground pin is the bigger one, and the other are small and similar. You have to connect the ground from P2 connector to the right pin of the Tip31 (right pin from Tip31 is ground)

Step 5: Step 5

On the other pin from the switcher, you must connect to the ground from Tip31. If the switcher if closing circuit with the Tip31, the leds will only blink if there is any signal coming from the P2 connector, and if it’s in the other direction, the leds will be always ON.

Now it’s time to put everything together in the box, as you can see in this picture, it’s not very organized, but after closing the box, it’ll look much better.

Job's Done! =)

And for more of my DIY projects, please visit my website:
Pasteler0's Tech Stuff



    • Toys Contest

      Toys Contest
    • Safe and Secure Challenge

      Safe and Secure Challenge
    • Cardboard Challenge

      Cardboard Challenge

    189 Discussions


    4 years ago

    Would I be able to hook up a parallel circuit of 50 LEDs to this? Still 12 volts. If not, what part should I use instead? Thanks!


    6 years ago on Introduction

    can anyone help me make a diagram of this with 63 red LEDs


    Reply 6 years ago on Introduction

    Thanks, i found one of those and the output on the emitter is 5v as opposed to 100v (?) according to the data sheet. Not sure what that means but there is logic there. I'll try, thanks :)

    Also in another place i saw about putting a diode on the live input of the audio input. Apparently it will protect positive voltages beign fed back into a soundcard. Any ideas on that one? Which diode?

    Thakns, hehe.


    6 years ago on Introduction

    Sorry, can't help anyone below; i am a noob.

    I made this and it works - so thanks for an entertaining weekend, but today i am noticing feedback through the speakers when the led are at their max. Any ideas? A bad ground somewhere?
    I am using a headphone splitter and i am powering 12 leds from a 12v supply. I put the extra led's in parallel; i figured the power pack was fine, didn't think about the tip31. Am going to blow myself up or worse my speakers? Thanks if ya can help. Alternatively what would i need to put in the circuit to prevent feedback up the P2 connector. :)


    6 years ago on Introduction

    Hello, I want add 11 White leds in circuit for blink.... tell which transistor i have to use. i am 32 DC power suppy. please answer fast....


    7 years ago on Introduction

    Hey guys if you want free LEDs go here and sign up free:
    All you have to do is sign up, earn points by playing games and doing offers, and get your free rewards. It is actually super easy. You also get $2.50 just for signing up. You can also get free transistors and circuit boards.


    8 years ago on Introduction

     Hey guys having a little bit of trouble here. I had this wired up temporarily last week and it worked great! I went to solder it all together today with more LEDs and it didn't work. It would switch on but when I flipped it to the other side nothing happened. I checked the wiring about four times and found nothing wrong, but I went to measure the P2 connection and it wasn't putting out any voltage. Yes it was plugged in, the volume was up, the multimeter was functioning properly and set to DC -- minimal to no voltage on the wires, sound on/off doesn't affect voltage. So I go to cut up another 3.5mm cable, same thing. But when I put the bare wires on the jack of headphones, the sound kicks in? This is not making any sense to me! I'm so lost on this one guys..

    1 reply

    Can I wire together both wires from right and left speaker in one wire to the transistor? Will it be then stronger current through the tip31 and later through the LED's, cause i need a liitle bit stronger current cause my LED's are not blinkinkg so bright..thanx in advice


    9 years ago on Introduction

    Hi! I did this mod and it's great. but I want to improve it a little more. I would like to hook up a cold cathode instead of these four leds for more light but the cathode isn't responding to music(won't light up). the cathode requires 12V and the input is 12V (same as leds) but I'm afraid that the current which is flowing trough tip31 isn't enough to light up the cathode Am I right? or what am I doing worong? Is there a way to add other component to make it work? I connected it to the circuit before inverter. should it be after inverter? but I'm afraitd if it won't damage the cathode when I do it that way. please take a look at the picture. any help appreciated

    5 replies

    Reply 7 years ago on Introduction

    Most likely the cold cathode can't respond fast enough to the current change, it most likely requires a quarter of a second to warm up, same with with the inverter


    Reply 7 years ago on Introduction

    man i have done that before ..... just like you show here , it is working ok ... ;)


    Reply 9 years ago on Introduction

    what is the inverter for? If the cathode take 12v and you are using 12v then why do you need an inverter? Do you mean that the inverter allows the cathode to use 12v? Otherwise I doubt it should be there.


    Reply 8 years ago on Introduction


    Inverters change direct current to alternating current, which is what cold cathode lights need.


    Reply 8 years ago on Introduction

    They also step it up to something like 500v low A, i did the cc mod at home and it works fine...