Introduction: LED Water Fountain
Are your parties boring? Do you have a tough time getting people to come? If you want to liven up your parties, then this is the attraction for you. This project is a guide to making an LED water fountain. It consists of a small box that shoots up water and lights up LEDs according to the bass of the music. Four LEDs are always on, while four will flash and fade to different colors when the bass reaches a threshold and the fountain turns on. Although the LED water fountain has little practical utility, it is sure to be a hit at any gathering.
The following materials were used:
1. 6" X 6" X 6" glass container
2. 4 tri-color LEDs
3. 4 blinking LEDs
4. 100 Ohm, 150 Ohm, and 390 Ohm resistors
5. Extra wire
6. Protective chassis
8. Arduino with USB A-B cable
9. Fountain pump
11. 9 V battery
12. Velcro strap
13. 12 V transformer
Step 1: Microphone
The microphone we used to pick up the musical input was the Adafruit Electret Microphone Amplifier - MAX4466 with Adjustable Gain. The VCC pin would be powered by 5V from our Arduino, the GND pin was connected to the Arduino's ground, and the OUT pin was read by the Arduino's A0 pin. This input would run through a low-pass filter (described later) and create a certain output. That output would then determine if certain components turned on or not. The microphone was exposed to external sound by being attached to the outside of our chassis via super glue, with the actual microphone being exposed (see picture above).
Step 2: Powering the Pump/Valve
We wanted the water to shoot up in response to the music to liven up any party atmosphere. So, we had to start with finding a way to connect the valve to the pump. We considered different tubing sizes to try to get the two to fit together, but we found it to be more complicated then that. We ended up having an adapter machined to fit inside of a piece of tubing that would then connect snugly to the pump. The other end was pressed onto the valve (pictured above). On the other side of the valve, we found a plumbing piece of equipment that gave us a more concentrated stream instead of a wide spout (pictured above).
Then, we determined which piece was to be constantly powered and which was to react to music. We initially tried to constantly power the pump and turn the valve on and off. The pump was powered by wall sockets while the valve required anywhere between 8V and 12V to open. We tested this configuration and found there to be too much back pressure created when the pump would run with the valve off. So, we rearranged our thought process and constantly powered the valve while turning the pump on and off. The AC voltage in the diagram above comes from the wall and runs to a 12V transformer while the switch would close when 5V was supplied to it by the Arduino. This eliminated the back pressure issue and worked much better for us. The fountain was actually able to achieve a substantial height with its stream. However, with this came issues of direction and splashing. We were able to orient that valve and pump so that weights counterbalanced and the valve would shoot upright. Yet, a more secure way of doing this and eliminating splashing are two aspects we want to address in future steps.
Step 3: Blinking LEDs
We used four blinking LEDs for our fountain. One blinking LED consists of two legs. The first is connected to a voltage source that allows it to turn on and function, and the second is connected to ground. Ohm's law was used to calculate the amount of resistance we needed. The Arduino provides 0-5 V, and can only take a maximum current of 25 mA. So using the voltage drop across the LED, we determined that we should use a 390 Ohm resistor. A resistor was soldered to one leg of each of the four LEDs, and a wire was soldered from the other side of the resistor into the protective chassis and to the Arduino. A wire was also soldered from the other leg into the protective box and to the ground port of the Arduino. The LEDs were attached to the top of the sides of the glass container with a Velcro strap.
At first, we thought we wanted all of our LEDs to light up with the music. However, we decided that in a dark room, it would be better to have some of them always on, allowing the fountain to be visible at all times. Therefore, we wired these four LEDs to the +5 V port of the Arduino. These LEDs flash different colors, so having them always on is a show in itself. The picture shows the wiring at the base of one of the blinking LEDs.
Step 4: Tri-Color LEDs
We also used four tri-color LEDs for our fountain. One of these LEDs consists of four legs. The first is a red leg that is connected to a voltage source and controls that amount of red shading in the light. Second is a leg that goes to ground. Next is a green leg that is connected to a source and controls the amount of green shading. Last is the blue leg, which goes to a voltage source and controls the amount of blue in the LED. The red has a voltage drop of 2 V, while the green and blue have a voltage drop of 3.2 V each. Once again, knowing that the Arduino can supply up to 5 V and can take a maximum of 25 mA, we calculated that we need a 150 Ohm resistor for the red and a 100 Ohm resistor for the green and blue. These resistors were soldered on to the correct leg, and a wire was soldered on to the other side of the resistor and into the protective chassis. A wire was soldered on to the ground leg and ran into the chassis to the ground port of the Arduino.
Three outputs were designated for our Arduino. When the bass reached the threshold, these outputs gave a random amount of voltage from 0-5 V. In order to create a different color for each of the four LEDs, we connected a different leg to a different output for each one. That way, when they were supposed to light up, the initial color would be different for each LED.
In addition, we wanted these LEDs to fade to different colors. Although it would make sense for them to light up only when the bass was high, that would make them blink quickly, and we would not be able to see the fading take place. So, we decided that when the bass threshold was reached, the three outputs would provide a voltage for .1 seconds. In that time, we would quickly change the amount of voltage at each output several times, making the LEDs change color. The picture shows the wiring at the base of one of the tri-color LEDs.
Step 5: Bass Detection
As mentioned before, we used a microphone to pick up musical input. The code we would run the output through is discussed here, and the low-pass filter we used to pick up the lower frequencies (0-200 Hz) was created here. Basically, the code works by taking samples from the microphone and passing it through the filter to get an output. If that output was above a certain threshold, the reacting components would turn on. Then, they would reset until more samples were taken and the process repeated.
We first tested the code with the pump to ensure we got correct behavior. Then, we tested everything all together and found the LEDs to turn on and the pump to react, but the valve would not work. We determined the issue to be that the Arduino could not source enough current to the valve - with it being connected to so many different components - so we powered the valve with a 9V battery instead. This configuration worked and our fountain would spew!
Step 6: Future Steps
While we were very satisfied with how our project turned out, we definitely want to keep developing the idea. There are a few issues that we would like to address moving forward. First, we want to secure the direction of the stream by implementing a machined component that fits within the housing and around the valve to make sure that it points straight up. The part would also have to allow water to fall back into the reservoir, which ties into the issue of splashing. We thought of addressing the splashing issue in two ways. We thought of either raising the walls of the container or implementing a dome roof on the container. We encourage readers to pursue these ideas as we feel they will only add to the party-rocking experience.
Step 7: Conclusion
Whether it be a relaxed kick back with the squad or a legendary rager, this fountain is bound to get the room lit, literally! Not only will you hear the bass thumping out of a speaker, you will see it too! LEDs will throw you into a psychedelic trance, getting lost in a world of color and flash. But don't worry, a cool, quick spray from the spout would bring you back to your senses.
Good luck to those pursuing this project! Check this page out in the future for any future modifications.
Step 8: Acknowledgements
We would like to acknowledge the following for their continuous advice and support:
Our wonderful Department of Physics and Astronomy
Our fellow classmates
We have a be nice policy.
Please be positive and constructive.