LED Strip Control With Dimmer and Audio Pulsing Circuits





Introduction: LED Strip Control With Dimmer and Audio Pulsing Circuits

About: I'm a mechanical and mechatronics engineer currently working towards a PhD in robotics. In my spare time I love playing soccer and tinkering with electronics!

This is a really neat circuit I put together based on another Instructable for pulsing LEDs to music: https://www.instructables.com/id/Sound-Reactive-LE.... This Instructable got me thinking that it's a bit of a waste just to have that LED strip sitting on the picture rail which can only be used when you're putting an audio signal through the circuit. So what I came up with is a circuit that can switch between two modes: one for pulsing the LEDs to audio and one for dimming the LEDs between 0 and 100% brightness. You'll get the best of both worlds with this project and I must say that it's a pretty cool thing to have set up in any room. Probably one of the better features is that you can plug and play. If you've got several led strips set up in your house, the box is completely self contained (apart from the power and audio leads) so you can unplug one set of LEDs and plug in another if you want to move rooms. Just make sure you use the same connector and you're good to go!

Here's what you're going to make:

Step 1: Acquire the Parts

This project requires a fair few tools and materials. Here's what you will need:

Soldering iron
Drill and drill bits
Hobby knife
Side cutters
Sand paper
Metal ruler

5m warm white led strip (or any colour of your choice). I bought mine off eBay for $7 http://m.ebay.com.au/itm/181743113860 or http://core-electronics.com.au/warm-white-led-weat...

12V 2A power supply (match this with the specs of your led strip.) I bought mine off eBay for $13: http://m.ebay.com.au/itm/281568349041 or http://core-electronics.com.au/power-supply-12v-5v...

2* 1N5404 diode
4* 1N4007 diode
2* 1N4148 diode
2* 1kohm resistor
2* 5.1kohm resistor
2* 100kohm resistor
1* 100ohm resistor
1* TIP31C transistor
1* LM324N op amp chip http://core-electronics.com.au/lm324n-quad-op-amp....

1* NE555 timer chip http://core-electronics.com.au/555-timer.html/?acc...

1* 4.7kohm resistor
2* 100nF capacitor
1* 10kohm potentiometer https://www.jaycar.com.au/10k-ohm-linear-b-single-... or http://core-electronics.com.au/rotary-potentiomete...

1* potentiometer knob https://www.jaycar.com.au/white-push-on-style-knob... or http://core-electronics.com.au/black-plastic-knob-...

1* 2.5mm power connector socket http://core-electronics.com.au/dc-barrel-jack-adap...

2* stereo aux connectors http://core-electronics.com.au/breadboard-friendly...

1* SPDT rocker switch centre off https://www.jaycar.com.au/spdt-centre-off-rocker-s...

1* plastic enclosure
1* 2 pin MOLEX style connector
2* 3 pin JST connector (or similar) http://core-electronics.com.au/jst-connector-kit-2...

1* 2 pin JST connector (or similar) http://core-electronics.com.au/jst-connector-kit-2...

Electrical tape
Double sided tape

Step 2: Test the Led Strip

It's good practice to test that all of your electronics work before putting everything together. So take the led strip and connect it to your power adaptor by using the provided barrel connector and hopefully the LEDs will light up. It goes without saying, but make sure that you connect positive to positive and negative to negative...

Step 3: Set Up the Individual Circuits on a Breadboard

First of all, I apologise for the pictures of the circuits, I did start to draw them up on my laptop but it died mid way through and it's in for repairs at the moment. First, I connected the two circuits separately and tested that they functioned independently. As I was waiting for the led strip and power adaptor to arrive, I hooked up the circuits using a single led first. It's not too different to the circuit using the led strip, just instead of the led strip, there's a resistor in series with an led going to ground. Once you've got the two circuits working separately, move to the next step where we will make a few additions and changes to combine the two circuits and connect a switch to choose the desired circuitry.

Step 4: Set Up the Complete Circuit on a Breadboard

Both circuits by themselves used a transistor for the switching (powering on) of the LEDs, so when I combined the two circuits, I thought, why not just use one? So I went through a few iterations of the complete circuit so I could use a single transistor for the switching for the LED strip, this implementation basically used a few extra diodes to prevent current from one circuit running into the other and disrupting the signal to the LED strip.

What I have eventually come up with is the circuit diagram as shown in the picture. You only need to add a few components to get the two circuits running and activated with the rocker switch. Follow the circuit diagram in the picture and get the circuit working on the breadboard first so you can diagnose any problems easily and make any necessary changes/fixes without having to desolder parts. To get the complete circuit connected, you'll have to solder wires to these components: (As always, colour coding is useful!)
- 3 wires to each of the pins of the 2 stereo aux sockets (OK, I realise I don't show these in the pictures here, but for testing, it's just as good to connect up the 3 wires (L,R,gnd) of a 3.5mm audio cable if you've got one lying around that's already cut open)
- 3 wires to the SPDT centre off rocker switch
- 3 wires to the 10kohm potentiometer
- 2 wires (one to each end of the 1N5404 (big) diodes) as these don't fit in the breadboard or Veroboard

For the breadboard implementation it makes your life easier if you strip the free end of the wires and tin them with some solder. This will keep the wire strands contained and you won't get the wires fraying on you when you try jam them into the breadboard.
- 2 wires to the power barrel connector (power and ground). Before soldering these in, you want to plug the power adaptor in and use a multimeter to probe the pins and figure out which one is ground and which one is V+

Once you've got the breadboard version connected, have a play with the switch, dimmer and audio input/output and make sure it functions as it should. You're now ready to solder it up on a Veroboard so move to the next step!

Step 5: Solder the Parts to the Veroboard

Solder away...

I should mention that a bit of planning is needed to make sure that your layout is good for connecting the switch/ potentiometer etc. Also measure out how much space you have in the box (ie the dimensions of the rectangular surface) and make sure that your circuit board will be smaller than this area so it fits in well! It's probably better if you solder the components in first and then cut the board as you might find you need to make it slightly wider to fit all the connections in. Mine ended up being a nice fit for the enclosure.

In this design iteration, I still have the single led connected. If you've got your LED strip already, solder in a 2 pin JST (or similar) connector so you can plug and unplug the LED strip (make sure you leave room for this connector on the board and wire it up so you've got the positive and negative next to each other on the board). An alternative is to solder the wires directly to the board, but these may come loose with time if you don't glue them down. If you're mounting your LED strip on your picture rail, make sure you have enough wire to run from the control box, up the walls and to the picture rail where you will stick the led strip. Also choose a colour of wire that will blend in with your walls, I've got white which was easy to match, but other colours may be more difficult.

The other components (power switch and potentiometer) have connectors and pin headers so that once all of the parts are mounted, you can still take off the lid of the enclosure and disconnect the components that are attached to the lid. Completely optional, but recommended for ease of access to the circuitry if you have any circuit issues you need to fix.

Finally, those big diodes need to be secured to the board so they don't move around too much. A small amount of glue would probably suffice but I just covered them with some white electrical tape.

When your circuit is fully soldered and ready to cut to size, take a hobby knife and metal ruler and slice over the area you would like to cut several times. This weakens the surface of the Veroboard and you can then place the cut edge on a table edge and simply break it off.

Step 6: Prepare the Enclosure

This step is where we will drill out the holes in the enclosure to mount the connectors, switch, power barrel connector and potentiometer. Using the sketch as a guide, drill holes on both of the short faces of the main enclosure which will be for the 3.5mm aux sockets (input and outputs). On one side of the enclosure next to the aux socket, drill out a hole which will allow the power barrel connector to fit through and connect to the power socket. On the opposite side of the enclosure (next to the other aux socket) drill a small hole which you can feed the LED strip wires through.

On the lid of the enclosure, drill a hole at a suitable position which is large enough to allow the shaft of the potentiometer to fit through. Also on the lid of the enclosure, drill a hole approximately at the centre of where you want to locate the SPDT rocker switch. Measure out dimensions of the switch on the lid and use a jigsaw to cut to the desired shape so that the switch can slot in. I cut my hole a bit too big but that was easily patched up with some sugru.

Step 7: Mount Parts Inside Enclosure

In this step we will fit the components the user interacts with to the enclosure. Additionally, we fit the circuit to the base of the enclosure.

Take some double sided tape and place it on the bottom of the circuit board. Peel off the adhesive and press the circuit into a good position on the bottom of the enclosure.

Next, I used a hacksaw to shorten the shaft of the potentiometer by 5mm and sanded the shaft to remove the sharp edges. The reason why I did this was because with the mounting method I chose, the shaft was too long. After this, I fed it through the lid of the enclosure, screwed it into place (effectively tapping the drilled hole in the plastic) and fit the knob.

Next, take the SPDT rocker switch and position it in the hole that was cut out on the lid. If the hole is too big, open some sugru and shove it in the gaps to secure the switch in place.

The power barrel connector is a tricky one to mount- you'll need some sugru here as well. Position the barrel socket within the enclosure by connecting the barrel connector from the outside. This will hold the barrel socket in the correct position for you to sugru it in. Glue would probably also be fine but I recently bought some sugru and felt like using it! Be careful to ensure that the barrel connector doesn't weigh down the socket and shift its position while the sugru is curing.

Where the wires poke out of the enclosure to go to the led strip, you can use some sugru to hold them in place and make sure that the wires don't get ripped out.

Finally, mount the 3.5mm aux sockets by removing the small nut that comes attached, pushing the connector through the drilled out hole and reattaching the nut to on the outside of the enclosure to hold the socket in place.

Step 8: Connect LED Strip and Test

Solder the wires from the Veroboard to the led strip and give the whole circuit a test. If everything looks good, mark the wires positive and negative on both sides and then cut them. Here is where you are going to attach the MOLEX style connectors to either side of the wires so you can unplug and move the box to another room if you also have LEDs set up there.

Personally, I hate doing connectors because they're always so fiddly and you need the right crimping tool. So my advice is to take your time with these connectors... Perhaps buy more than one so you've got back ups in case you make a mistake like I did.

Step 9: Mount Led Strip to Picture Rail

Simply find a good position for the led strip, peel off the adhesive and stick it down, simple as that! I recommend finding a place in the room where you can easily hide the LEDs (picture rail is prime choice, starting near a door or corner) so you don't have the wires obviously showing on the wall. I mounted my led strip to the picture rail in my room and tucked the wires behind the door frame and along the skirting boards.

Step 10: Enjoy!

Now you can enjoy your LEDs in both party mode and relaxation mode. All you have to do is connect one aux socket to your speakers and the other to a source of audio (with power connected to the enclosure of course), flip the switch and you can watch the LEDs dance with the audio or you can enjoy listening to chilled out music and have the LEDs dimmed to your viewing pleasure.

I hope everyone enjoys this project as much as I did, I'm very happy to say that I have this cool lighting feature in my room now!

The pictures here show the lights dimmed to three different intensities, but it doesn't show up too well in pictures. Have a look at the video once again to get a better idea of what it's like: https://youtu.be/beM0C4_bT1M



    • Creative Misuse Contest

      Creative Misuse Contest
    • Clocks Contest

      Clocks Contest
    • Water Contest

      Water Contest

    64 Discussions

    hellpw there see this video i wanna make it

    but i cant get extensition can u help me plz, i cant find all of component in my country, i think u will help me thanx and regards in advance


    2 replies

    Hi there,

    This video you have linked is a much more complicated sound reactive circuit. To develop something like this is very time intensive and many people have been working on similar things. An example of an "off the shelf" solution you can buy is something like this: https://www.kickstarter.com/projects/1777925564/vi... .

    I personally want to experiment with MSGEQ7 chip that the person you linked in the video has used, but I haven't quite got around to that type of project yet. I would suggest you get one of those graphic equaliser chips and start experimenting with that first, then the ideas will come to you for effects you want to achieve. You can do some basic tests with an Arduino or Teensy microcontroller (depending on the length of lights you want to use you might find the Arduino doesn't have enough RAM to achieve the fast effects). Also, it's important to note that you'll need some addressable RGB LED strips, such as the WS2812's and not just a regular RGB LED strip.

    If you have any questions, I'll be happy to assist, but without knowing a bit more about what experience you have and what you want to achieve it's hard for me to give you much more of a detailed answer!


    hay i need more help from you.
    can u help me more?
    its my email ID plz contact me i wanna share of my experiance.
    maybe its gone for work as a team


    12 months ago

    I want to connect this to my ipad using a dual 3.5mm audio cable. I
    am going to use it for a photobooth application where the led lights
    turn on when the app makes a beep noise through the headphone jack.

    I dont' want the lights to flicker to the music, I just want them to be
    100% on, how woudl the circuit be changed so it was a more binary mode?

    1 reply

    Hey there,

    Sounds like something a little bit more advanced than this circuit, you would most likely have to use a microcontroller to set up something like this. You can probably have an audio lead that connects to a pin on the micro configured as an input, read that in and if it meets whatever spec you need to activate the light then set that output pin with LED high. For the audio part you can just connect the split lead to another audio lead running into speakers.

    the light turns on both sides of the switches do not work. we connected everything, but are confused as to what side you placed the Potentiometer (left, middle,right) and the audio does not work either. any help

    1 reply

    Hi there,

    Can you please check that you have included the diodes D1 and D2 between the switch and the individual circuits. Also, the potentiometer middle pin goes to pin 3 on the 555 timer. It doesn't matter how you connect the left and right pins of the potentiometer, just as long as you have the centre pin going to pin 3 on the 555. Please let me know if you have any further issues and I will try to help.

    you can do with rgb led strip


    I got the audio pulsing circuit working but the LED's starts blinking continuously without the source, but the aux is connected.

    The lights are reacting to the sound but it doesn't stops when the song is over.

    I did'nt get 5.1 k instead I used 4.7 k ohm.

    7 replies

    Hi, it is quite difficult for me to give you advice on this without actually seeing what is going on with your circuit. Are you able to take a video of what is happening and send it to me?


    Here's the link of the video,

    Ok, there may be a few things that can fix your issue. Can you please first try removing the 1kohm pull down resistors which come from the L and R AUX inputs. This may solve the continuous flashing when there is no source connected. Let me know how that goes :)

    I removed the 1 k ohm resistor. The lights does not stop blinking.

    Okay, can you try just hooking up the audio pulsing circuit by itself and see if it still has the same issue (so remove the switch and the dimming circuit). Hopefully this will help to isolate the problem.

    I didn't set up the dimmer circuit in the breadboard.

    It has only the pulsing circuit.

    I removed all the resistors, but the blinking continues when there is no sound. But It reacts to sound

    Can I try buying a New LM324 and try again..??

    OK so what I would get you to try next, if you haven't already is to try a different audio lead (aux cable) and audio source e.g. your phone instead of computer and maybe even use a different speaker system too. See if using different things here makes a difference at all before buying a new LM324 IC. It is also possible that the op amp you are using in the LM324 chip isn't working. As there are 3 other op amps available in this chip, try using another op amp in your current chip before buying a new chip altogether.

    Please also check and double check all your connections in the circuit as it seems to me as if there is a short or a misplaced wire somewhere for those lights to remain on even without an audio source.

    Where did you get that plastic enclosure.. ??

    1 reply

    Hi, I live in Australia and we have an electronics store here called Jaycar Electronics. I'm not sure which enclosure I bought from there but here is a link to their web site: http://www.jaycar.com.au/


    I have set up the circuit on the bread board but when switching it on I get a strange squeeking sound from the power adapter.

    Where I would have made mistake..??

    1 reply

    Hi, please check that you have a common ground i.e. you have the ground (-ve terminal) coming from the power supply which all ground connections in the circuit are connected to. Also ensure that your power adapter is rated for 2A or higher, depending on the length of your LED strip. Let me know how you go :)