In my first Instructable I'm going to go through the steps needed to create Water Speakers that act as an equalizer.
Water speakers from the store are great to watch, but I felt they could do more. so many years ago I had modified a set to show the frequency of music playing. At the time I used the Color Organ Triple Deluxe II, combined with a set of photos cells potentiometers and transistors I was able to get a set of 3 speakers to function.
I then a few years ago had heard about the IC MSGEQ7 which has the ability to separate audio into 7 data values for an arduino to read. I utilize an arduino mega 2560 in this project because it has the required number of PWM pins to drive five water towers.
This project uses soldering skills on a perfboard, Bluetooth module, arduino, and off the shelf water speakers. Through out the project I actually notice a few things that I should have done different so I'll be sure to point them out.
Let's get started
Step 1: Parts
There are quite a few parts used in this project. Many parts I had around the desk, other parts were purchased from a local parts store.
You will need:
NOTE: part quantity in brackets
(1) Arduino Mega 2560
(1) USB Bluetooth Module
(1) 8 Pin DIP socket
(1) MSGEQ7 - I recommend buying this from Sparkfun Electronics as ebay is full of fake versions of this IC
(1) Headphone jack socket
(1) Headphone cable with female end
(1) standard USB female with decent cable length
(5) 3 wire connector (pairs) usually sold as 3 wire connector for ws2812b LED strips (see image)
(10) FQP30N06L N-Channel mosfet
(5) 1N4001 standard blocking diode
(4) 3mm Red LED
(4) 3mm Yellow LED
(4) 3mm White LED
(4) 3mm Green LED
(4) 3mm Blue LED
(10) 10k resistors 1/4 watt
(8) 100 OHM resistors
(8) 150 OHM resistors
(5) 500 OHM potentiometers
(5) 2k OHM potentimeters
(5) 27 OHM 5 watt resistors
(2) 100k OHM Resistors
(2) 100nF capacitors
(1) 33pF capacitor - Must be this value; I put multiple capacitors in parallel to reach this value
(1) 10nF capacitor
(1) On - ON toggle switch (mounting hole was 3mm, usually listed as a mini toggle switch on ebay)
(4) 1/8" x 1 1/2" Bolts (mine were labeled as stove bolts from Home Depot, the 3d file is set up for this size nut and bolt)
(2) roughly 12" lengths of Ethernet cable
3D printed parts, if you don't own a printer websites like 3dhubs.com are a great resource.
Solder + Soldering Iron
Male header pins
Step 2: Dismantle the Bluetooth Adapter
Originally I was going to use a USB male cable, but the socket was broken on it, I then decided to dismantle the adapter and remove the USB port. Using a multi-meter i was able to find the ground by testing the pins to the outer shell of the USB port. (they are connected)
NOTE: I actually had to change out this adapter part way through the project as it was causing high frequency noise on the audio port, they new one isn't 100% better either. but I do have a different receiver that does work, it however has it's own battery and on/off switch making the water speakers not so plug and play. while these receivers are cheap paying more doesn't always mean your getting high quality.
Step 3: Setting Up the IC on Perfboard
In this step we will start the perfboard soldering of the IC DIP socket.
The schematic shows how all the parts will be wired, the mosfet control pin is label "PWM" because I just wired them directly to a pin on the arduino, as I could change what each pin controlled from the code.
I started by placing the DIP socket near one side of the board near the middle of the board.
TIP: sticky tack helps to hold parts in place while soldering.
I then added the 100nF capacitor on pins 1 and 2 then used the two 100k OHM resistors to connect to pin 8. I then used 4 capacitors in parallel and added the 100nF on pin 6. Then the male audio cable was added and wired into the 10nF capacitor. The ground from the audio cable was tied into ground.
I've included an image of the back side of the perfboard, I also added labels to the underside so that it is easier to understand where the parts were wired.
Step 4: Adding Mosfets
Next step I took was adding the mosfets, as I was adding mosfets I was using the heat sinks to set the high, it later turned out that they don't get warm enough to require the heat sinks to be added.
I would start by just applying solder to the middle pin allowing for adjustments.
Once the mosfets were in place I started to add the 10k OHM pull down resistors, I used the resistor legs to bridge between the necessary pins.
Step 5: Placing Diodes and 5W Resistors
At the time of this step I was still waiting for 5W resistors to be shipped to me so I salvaged a resistor from the previous version of water speakers so that I could ensure the spacing required to place the diodes.
After the diodes were placed, I started stripping solid 18AWG wire to act as positive and negative Bus bars
Solid AWG wire was placed on the positive side of the diodes then routed to pin 1 on the IC socket.
another piece of ware was used to go from the negative side of the 33pF capacitor and loops around the mosfets. Another smaller piece was looped from the negative of the 33pF capacitors to pin 2 on the IC socket.
Step 6: Adding Panel Jack and Bluetooth and Potentiometers
Using some 20AWG stranded hookup wire to attach the panel jack to the same connections as the male audio cable. I then added wires for power and ground for the Bluetooth adapter, using the solid AWG wire bus bar on the underside.
I then added the 500 OHM potentiometers that allow for extra control of the LED brightness (these are necessary but I find some LED colors can overpower others so I added these to adjust their brightness)
I used excess metal from cropped capacitor leads to bridge the distance from the potentiometer to the center pin of the mosfets
Step 7: Water Speakers Preparation
I started by using a small screwdriver to remove the small screws in the back of the water speaker housing, after removing the circuit board, I located the wires for the motor. using flush cutters I cut these as close as I could to the circuit board.
NOTE: the wires on the motors are non-serviceable, making too many error when cutting and stripping the ends could ruin the motor/wires
I then used small needle nose pliers to remove the circuit board with LED's. I'm opting for having one color per water housing vs the 4 colors that are used from the store product.
I then bend the LED positive leads almost flush so that they will cross over each other, I start by bending the out LEDs so that tier LEDs will span from end to end. Using sticky tack to hold the LEDs in place; I then bend the two inner LEDs but crop their leads as they don't need to be as long. With the LEDs held by sticky tack I can no solder the positive leads together.
I can now crop the negative leads of the LEDs and crop the resistors as well. (I choose to position the LED's so that their color bands were all facing the same direction; this was purely cosmetic) Using the leads of the resistors I bend them over the same way I did to the positive leads of the LEDs.
I used hot glue to hold the LEDs in place. Then attached the 3 wire connector. The motor and LEDs share a common positive. the matching connectors are then connected to the perfboard, the positive on one side of the diode, and the negative of the motor on the other side of the diode. The negative of the LEDs is wired to a leg on the potentiometer.
The Red and Yellow LEDs had a 150 OHM resistor on them
The White, Green, Blue LEDs had a 100 OHM resistor on them
These resistor values should allow each LED to run at 20mA
Step 8: Adding the Arduino Wires
I used two lengths of Ethernet cable, roughly about 12 inches of cable (x 2) I used 15 wires in total (1 spare)
I used some of the solid core wire poked thrift the cable to help secure the cable to the perfboard, I ended up need hot glue as well to hold it in place. A zip tie in the corner helped direct the wire to the arduino that would be position next to the perfboard when put into the case.
The wires were randomly place but I made sure that they could reach the spot they needed to, some were longer than others, the ones that were too long were trimmed to size. Using the headers I was able to solder the other ends of the wire to the pins , this allows for me to disassemble the arduino should I need to. I ended up adding hot glue later to ensure the wires wont break off the pins, but I do this after all functions are tested.
I added wires for the IC control, and a wire for both 5v+ and ground.
After this was done I did a test to see if the lights and IC would work correctly, as I was still waiting for the 5w resistors in the mail.
Step 9: The Motor Resistors and Potentiometers
I added the 5W resistors between the diode and the center pin of the mosfet. I use the leads of the resistor bend over to bridge the gap.
I find the motors are more responsive to being pulsed and actuated quickly when the water is slowly flowing already. This is where the 2k potentiometer comes into play. The potentiometer are wired using 20AWG hookup wire to the 5w Resistor, (don't attach this wire before the 5W resistor as the potentiometer can't handle the power of the motor)
Another leg of the potentiometer is bent out and using another piece of solid 18AWG wire I can connect a single pin from all potentiometer to ground.
NOTE: I had originally tried not using the potentiometers but I've found that using PWM on these motors causes terrible high frequency feedback that causes interference with the IC
Step 10: 3D Printing
I printed a total of 3 parts, the top, bottom, and back panel. The STL files that I've added however are just two parts (top and bottom) which will make things easier for someone to follow. I did this as I found trying to add the panel after the fact doesn't look as good. I mainly make a back panel because I wasn't sure what i wanted on the back. In my case I decided to add an on/off switch.
In total your looking at 36 hours of 3D printing. I use ABS in my printer as I find it really easy to paint and sand, Plus when I do assemblies I can use acetone to weld parts together.
The first part I recommend printing is the 3D measurement test file, this is a small 15 minute piece that allows you to ensure the water speaker will fit, I went trough about 8 iterations until I had the right profile to fit the speaker. By doing this it saves me wasting an 18 hour print. the top has slots for 1/8" x 1 1/2" I had to use small file as bridging on my 3D printer is a little tight.
Step 11: Assembly
I started by using hot glue on the headpins for the wires, this is to ensure they won't break. I added the hot glue after I ensured that the motors worked with the programming. I used small amount of hot glue in two corners of the arduino so that it could be removed later should it be needed. alternatively standoffs and threaded inserts could be designed into the 3D print.
As you can see in the photo I have a different Bluetooth module attached, I used this module while I awaited a new one in the mail. The main issue of the speakers falsely triggering isn't entirely the Bluetooth modules fault, the motors don't seem to like working on PWM.
I added the water towers to the top piece and secured it with hot glue. I used a small amount as I plan to disassemble the speakers later and sand then clear coat the plastic but it's too cold to spray paint where I am right now. The panel jack and switch were then added to the back panel, I had actually added the USB power cable earlier but now that The 3D print is one piece the cable needs to be routed through the case then wired in place, you can see where I wired the USB in the photo, it pokes through the perfboard and soldered to the solid AWG wire bus bar, The only difference from the photo is with the switch the positive will go to the switch first then the perfboard.
Step 12: The Code
The code I've added is mostly straight forward. The code should work as is.
The only thing that would need to be changed are the variables at the top of the code. They are clearly marked with comments.
Based on a tip I took the time to learn and try to adjust the PWM frequency on the arduino mega. While changing the frequency did help remove the motor noise that was causing a feedback loop, it however required me to change many other parts of the code, the timing had to be changed, the sensitivity had to be increased.
The problem changing the PWM frequency created is that the timing was had to be increased to offset the false triggering that started to happen and values had to be changed, making the speakers less sensitive. I believe the best thing at this point would be to try the motor driver from my previous iteration of this project which is talked about more in the last step.
Step 13: The Final Product
The final Item is really intriguing to watch. This item is best watched in low to dark room lighting. Unfortunately my current camera is unable to record in low lighting conditions. It is because I could use a good camera to show case my projects that I've entered into the first time author contest, I'm hoping people enjoyed this project and will choose to vote for me.
I've added a video of the original version of speakers so that you can see roughly what they look like.
I would like to try to use the original motor driver circuit that I made in version 1, that uses transistors and photocells to see if it would allow the motors to work better, this should eliminate the issues I've been having with frequency noise on the motors due to using PWM control signal. I also might add some speakers to the side of the case along with their own volume control.
You might also notice that the inside of the water towers are different colors the original speakers that I had are chome, which I couldn't find locally so I opted for the black for the new ones (the come in various colors) I might upgrade to all one color but they sell for $40 a pair.