Introduction: Retrofit Sound Activated Led Lights to a Jukebox

I'd been thinking about having a go at making lights that would change colour in time with some music, to add to a jukebox, for a while and when I saw the LED Strip speed challenge, and since we're in lockdown at the moment, I thought this would be the ideal time to try it out. First I'd like to point out that this can be used with any music source, it is not connected to the jukebox in any way as I would not want to make any modifications to it which would take away it's originality. This project uses an ordinary RGB LED strip along with an arduino (I used a nano but you can use an uno or mega if you like) and an arduino sound detection module. I have taken information, pieces of code and circuit layout from other peoples previous instructables and added to these and combined them together to create this project, which lights a different colour of led depending on the pitch of the sound being picked up. My first attempt at this was a bit simpler and displayed a different colour depending on the volume of the sound being picked up but the effect was not really what I wanted so this version that detects the frequency of the sound gives a much better result.

I used some code from the Arduino Frequency Detection instructable and some code and circuit layout from user C.R.C3 who commented on the Sound Reactive LED Strip instructable in the 'I made it' section

Supplies

Arduino nano (or uno or mega)
12V LED RGB Strip
Sound detection module for arduino (the one I had came along with a starter kit I bought a few years ago and is slightly different to the one in the link but it should work just the same)
3 x 2N 2222 transistors
3 x rectifiying diodes
1 x 330-ohm resistor

You will also need 2 power sources, I powered the arduino from a usb charger for a phone and I used a 7.5 V power supply for the LED strip but you could power the LEDs with a 9 volt battery if you like.

Step 1: Building the Circuit

Build the circuit as shown in the fritzing diagram. The diagram shouldn't be too hard to follow. I've used pins D9, D10 and D11for the outputs to each transistor, and the A0 pin for the analogue input from the microphone module. I made this on a breadboard to begin with and once I was happy with the result, soldered all the components onto a double sided strip board as seen in the second image.

Step 2: Upload the Sketch to the Ardunio

Upload this sketch to your arduino. You can play around with the frequency values in lines 96, 105 and 115 and adjust the delay values on lines 98, 107, 117 and 125 to have the lights respond to different sound frequencies and to stay on for longer if you want but I'm quite happy with the results from this with these values.

Step 3: Try It Out and Adjust the Sound Module

Connect the two power supplies to the set up (9v for LEDs and a USB supply for the arduino) and you should now have a music reactive led strip. You may need to adjust the potentiometer on the sound module so that the leds don't stay on all the time or off all the time.

Step 4: In Use

You can set these near any music source (something with a strong beat will give a better effect) and they pulse and change colour with the music. I sat mine inside a jukebox and fed the power supply wires out through the back door to hide them from view , while the self adhesive led strip is stuck onto the diffuser that normally let out a plain white light from a fluorescent tube.

LED Strip Speed Challenge

Participated in the
LED Strip Speed Challenge