Introduction: Programmable Light Changing Speaker

This project is a simple Arduino based project where the voltage from the speaker is read by the Arduino to alter the effects that the strand of neopixels cased in the glass jar does. What the neopixels do is open to the user's imagination and programming ability. The project has been designed to make altering the Arduino quick and easy. This is my first Instructable, so my technical know how is not fully developed yet. Please ask questions and I can try to clarify anything that is confusing if needed.

Step 1: Gather Supplies

1. A speaker.

It needs to be one that you are willing to open up and mess with. Possibly some cutting of the casing. Old computer speakers work nicely. Audio jack needed.

2. 30 Neopixels in a strand. More or less can be used depending on preference. You will likely want at least 15 to make any kind of discernible effect

3. Arduino UNO and USB adapter.

Arduino Software with the NeoPixel Library. Both are free downloads.

4. Wires. Wires with pins is helpful.

5. Soldering Supplies

6. PVC pipe of desired height and diameter.

7. Duct Tape.

8. Clear glass jar to house the lights. A mason jar with the two piece lid is very useful.

9. Phone or any music playing device to play the music with.

10. Drill Press. I used a ball shaped drill head.

Optional

5V USB wall adapter.

Step 2: Solder Wires to Speaker

First you need to solder two wires to the speaker to have the voltage read by your Arduino UNO.

Make sure that these wires are around 12 inches in length to be able to open the speaker without unpinning the wires from the Arduino UNO.

The gray wire on the left is soldered to the white wire, which is the minus side (-). The gray wire will pin into the ground (grnd) on the Arduino UNO.

The white wire on the right is soldered to the red wire, which is the plus side (+). The white wire will pin into the analog 0 (A0) on the Arduino UNO.

Step 3: Making the Bulb (Notes)

Now you will be making the part that will house the neopixels, which will be referred to as the bulb. It will consist of the neopixels, the stand (PVC pipe), a glass jar, and tissue paper or a plastic trash bag. The bulb can vary in size depending on the number of neopixels you want to use, the size of the glass jar, and the size of the spot you have on your speaker to attach it to.

Step 4: The Stand

Here you will attach your neopixels to a piece of PVC pipe of your desired height and diameter. I used duct tape to attach it. I spiraled mine, but to make it as rows you can cut and solder it to your liking. 1 rotation for me got about 7 per row. Make sure the wires are at the bottom of the stand for ease of access. You can solder the wires to the neopixels before or after this step. Make sure the wires are around 10 inches in length to give enough length to attach to your Arduino UNO.

Step 5: Place in the Jar

Now, to put the stand in the jar you need to place either tissue paper or a white plastic bag inside of the glass jar. If you go for the plastic bag option, you should cut away any colored parts and about half of the bag was enough material to use.

First stuff some of the material in to line the jar, with a little extra towards the top. Then put the stand in. Be gentle, so as to not move any of your neopixels out of place. Finish by filling it in with the remaining material. There is no perfect way of doing this, just make sure there is a good distribution of material throughout to get a well blended look.Too much can result in too little light, so look out for that too.

The bulb can be attached to the speaker in whatever way you choose. the two piece lid I had would allow you to attach the top part of the lid to the speaker with screws or hot glue, while still allowing you to detach the glass part by unscrewing the jar.

Step 6: Drilling the Top

I used a drill press to cut a hole in the top of my speaker's casing to send the wires through to the Arduino UNO. No one will see this, so it doesn't have to look very clean. Be careful with plastic, go slow on the drilling. Clean your drill bit occasionally with a brush to get off the excess plastic, or else it will melt to it.

Step 7: Ardunio Slot

To give me access to my Arduino UNO once my device is put together I also used a drill press to make a cut in the back for the port that connects to USB. This is important because it is currently powered through this cord and is updated through it too. This allows you to close the speaker back together to make it one coherent device.

Step 8: Placement

To place my Arduino UNO in the speaker I found a flat spot that works best for this particular speaker. I used duct tape and a note card to separate it from the speaker's chip. I then placed another small piece of note card on the front side of the Arduino UNO to hold it in place. A similar approach should be applicable to all speakers, but you will have to find what actually works best for you.

Step 9: Wiring

Now, to wire it all together.

The white wire on the bottom left is from the speaker on the plus side (+) the we soldered previously. It goes into analog 0 (A0).

The gray wire is from the speaker on the minus side (-) that we soldered previously. It goes into ground (grnd).

The green wire is the ID from the neopixel strip. It goes in 6.

The red wire is the 5V from the neopixel strip. It goes in 5V.

The white wire on the middle left is the ground (grnd) from the neopixel strip. It goes in ground (grnd).

You may want to test that is working before proceeding. The file can be located in step 11.

Step 10: Close Up and Secure

Now that it is wired together, you can close the speaker up and secure it with the bulb attached and the cords plugged in.

Step 11: Download and Edit Code

Now you can play with and use the code. Here is the code that I have started with. Some notes have been included within it to explain what can be changed. The rest should remain the same unless you know what you are doing. It has 3 modes as of now. One that is a Christmas Tree, one that is layers, and one that is a party mode. It will rotate through these every 20 seconds, which can be changed.

Step 12: Plug and Play

At this point, all you need to do is make sure that the Arduino UNO and the speaker are plugged in. My speaker plugged in to the wall. The Arduino UNO can be plugged into the wall if you have a 5V USB adapter, like what most phones come with. Otherwise, a computer works. Then you can begin by plugging in your music device to the audio jack.

Step 13: How to Use

Finally, turn on the speaker, play music, and adjust the volume to see the lights change with the music. Volume can be adjusted with the speaker and the phone. Enjoy!!