3D Printed Floating Solar Water Fountain

by TomGoff in Circuits > Arduino

6302 Views, 40 Favorites, 0 Comments

3D Printed Floating Solar Water Fountain

MAIN.jpg
3D Printed Solar Water Fountain

My family built a small garden pond from a recycled concrete ring last year and it's added a great feature to our garden. We also installed a solar powered fountain in it to keep the water aerated which was not much of a success so I decided that I could build something much better.

I wanted the the water fountain to be solar powered as I wanted it to use renewable energy and I also wanted the fountain nozzle to be 3D printed so that I could design my own custom pattern.

Finally I wanted the fountain to be floating in the middle of the pond so that I didn't need to install any extra fixings inside the pond.

The electronics for this project were designed so that battery never runs flat and the fountain only runs when there is suitable daylight.

This project took me a weekend to build and required a reasonable level of DIY and electronics know-how but I feel that most people to achieve it with some patience and perseverance.

Check out the embedded YouTube video to see a demonstration of the fountain working.

Supplies

thumbnail_IMG_6351.jpg
thumbnail_IMG_6353.jpg
thumbnail_IMG_6354.jpg

Here's a list of the tools and materials I used. I used what I had available but I'm sure you could use alternatives for if you can't get the same.

Materials

  • 12V Water Pump
  • 20mm ID Hose 500mm Long (to fit nozzle and water pump)
  • Arduino Nano
  • Arduino Nano Screw Terminal Adaptor
  • 10K Resistors x 4
  • 1K Resistor x 1
  • 560 ohm Resistor x 1
  • LED
  • 2N2222 Transistor x 1
  • PCB Mount Relay 5V SPST
  • Diode
  • 2-Way PCB Screw Terminals x 3
  • 3-Way PCB Screw Terminals x 1
  • 4-Way PCB Screw Terminals x 1
  • LDR (Light Dependant Resistor)
  • Copper Dot Prototyping Board
  • 12V Sealed Lead Acid Battery
  • Buck Convertor - LM2596
  • PWM Motor Controller


Materials (Solar Charger)

  • LM317 Voltage Regulator TO-220 Package
  • TO-220 Heat Sink
  • BC547 Transistor
  • 1 ohm 1W Resistor
  • 470 ohm Resistor 0.25W
  • 2.2K ohm Resistor 0.25W
  • 5K Trimmer Potentiometer (wired as a variable resistor)
  • 100nF Ceramic Capacitor (has a code of 104) x 2
  • 2-Way Screw Terminals (5.08mm Pitch) x 2
  • PCB
  • 20W Solar Panel suitable for 12V charging

Consumable Materials

  • Solder
  • PLA
  • Screws
  • Hook-up Wire (I used 22 AWG)


Tools

  • 3D Printer
  • Soldering Iron
  • Screwdrivers
  • Wire Strippers
  • Wire Cutters
  • Laptop with Arduino IDE

3D Printed Nozzle

Nozzle1.png
cura.png
thumbnail_IMG_6310.jpg
thumbnail_IMG_6311.jpg
thumbnail_IMG_6315.jpg

The 3D printed nozzle was designed with Fusion 360. I was not sure how I was going to go about this design until I started but it was actually quite simple. The steps were as follows:

  1. Draw a sphere of 50mm diameter.
  2. I then added a 2mm shell to the sphere.
  3. Draw a large flat plate half way up the sphere and then subtract half the sphere to create a hemisphere.
  4. Draw 3mm holes on the sphere, I drew these free hand on the surface of the sphere.
  5. Draw the bottom cap on the sphere, this is 50mm overall diameter with a 16mm hole for the connecting pipe and 3mm thick.
  6. Draw the first connecting pipe, 20mm OD (outside diameter), 16mm ID (inside diameter) and 10mm long.
  7. Draw the flange, this is the same as the bottom cap.
  8. Draw the second connecting pipe, same as the first but 20mm long.
  9. Combine all of the solid components together.
  10. Export the the file as a .stl file.

Once I had the .stl file i then sliced it with Cura and printed it on my Ender 3 Pro 3D printer.

After I 3D printed the nozzle I carefully cut off the hemisphere and removed all of the internal supports. I then glued the hemisphere back on with 2-part epoxy glue.

I've attached the .stl file if you wish to print your own nozzle.

Downloads

Floating Raft

thumbnail_IMG_6316.jpg
thumbnail_IMG_6317.jpg
thumbnail_IMG_6348.jpg
thumbnail_IMG_6350.jpg

I wanted the fountain to float in the middle of the pond to I decided to make a floating raft to carry the pump and nozzle. I wanted to use recycle materials as much as possible for this project so I made the floating raft out of the flange from an old cable drum and an old wheel barrow inner tube to provide the floatation.

I first sanded down the old cable drum flange and coated it with yacht vanish to prevent water damage. I left the varnish to dry over night.

Next I mounted six 25mm cable tie bases to the flange. Although these are self-adhesive I screwed them on as eventually they would come unstuck.

Finally I pumped up the innertube just enough so it would keep its shape and mounted it to the base with long cable (zip) ties

Electronics

Water Fountain Tinkercad Electronics Simulation
thumbnail_IMG_6328.jpg
thumbnail_IMG_6346.jpg
thumbnail_IMG_6347.jpg

I hand built a small circuit board for the four following functions:

  1. To read the battery voltage and feed this value back to Arduino on Analog Pin A1. This is achieved using a voltage divider comprising of three 10k resistors. As the nominal battery voltage is 12V if I take the reading after the second resistor it will be 1/3 of the battery voltage, nominally 4V. As the Analog to digital convertor (ADC) on the Arduino is 10 bits, it gets a value between 0 and 1023 for a voltage input of 0-5 volts. This means a voltage of 4V would be about 818 from the ADC. I have therefore used this as the threshold value for the pump (I used 820). If the battery voltage falls below 12V the pump doesn't run.
  2. I don't want the pump to run at night so I've used an LDR to monitor light levels and feed this value back to the Arduino on Analog pin A0. As with monitoring the battery voltage I use a voltage divider to measure the light level. The LDR is is series with a 10k ohm resistor and the signal to analog pin A0 is taken as the voltage at the junction between the LDR and the 10k ohm resistor. The enclosure needs a transparent front to allow the light to hit the LDR.
  3. It has a the relay to switch on the pump. The pump is far too powerful to be powered directly from the Arduino so it is switched on through a relay. However the relay is also too powerful to be switched on by the Arduino so the relay is switched on with a transistor. The relay coil is placed in series with the transistor collector pin and 5V. The emitter of the transistor is connected to ground. The transistor is switched on when pin 11 of the Arduino goes high. Pin 11 of the Arduino is connected to the base of the transistor through a 1k ohm resistor. There is also a diode across the coil of the resistor. The cathode of the diode (negative) is connected to the positive of the relay and the anode (positive) terminal of the diode is connected to the negative terminal of the relay. When the relay switches off it can generate a very high voltage in the opposite direction of the supply voltage. The diode causes this voltage to be recirculated around the relay coil so that it does not damage more sensitive components in the circuit.
  4. Lastly there's simply an LED powered from pin 12 of the Arduino through a 560 ohm resistor (for current limiting). This LED comes on when the relay is energised so that you can tell visually when the pump is meannt to be running.

Please see the short video demonstrating this circuit on Tinkercad.

A word about power......The Arduino has an onboard linear regulator that can easily handle the 12V supply at it's voltage input. This however is very inefficient as the extra voltage going into the regulator is wasted as heat. I wanted to make the system more efficient to save all of the precious solar power generated. For this reason I have taken the 12V from the battery / solar system and reduced it down to 5.2V with a LM2596 buck converter. This is far more efficient than using the Arduino on board regulator. I found that this reduces the current drawn when the system is idle (Arduino on but pump not running) from 91mA to 50mA.

To control the flow of water out of the pump I wanted to control the speed of the motor. To do this I used a simple manually adjusted PWM motor control module. The output of the relay and ground is fed to the input of the PWM module and the pump terminals are connected to the PWM module output.

Solar Charger

SolarSch3.png
Solar.png
solarbracket.png

For various reasons I really wanted the fountain to be powered from renewable energy and the obvious choice for this was solar power.

I could have also purchased a small 12V charge controller for very little however I decided to build my own because I it's something I wanted to learn about and use in future projects.

The design is a tried and tested charger based on the TI (Texas Instruments) datasheet application that uses a LM317 voltage regulator to control the voltage to the 12V sealed lead acid battery. The output voltage is controlled by the feedback voltage on the LM317 which is controlled by the resistor network R2, RV1 and R3, RV1 is wired as a variable resistor not a potentiometer. The output of the LM317 can be calculated with the following equation:

Vout = 1.25 x(1+ ((R3 +RV1A) / (R2 + RV1B)))

So if we set RV1 to 2.4k ohms the calculation gives:

Vout = 1.25 x (1+((2200 + 2400) / 470)) = 13.5V

The advantage that this charging circuit is that resistor R1 limits the current to the battery, protecting both the battery and the LM317. When the battery is low the charging process draws a high current, this current goes through resistor R1 which causes a voltage drop across the resistor. This voltage drop is detected by the transistor which turns on causing the charging LED to come on and also to drop the voltage on the adjust pin on the LM317. This then causes the charge voltage to drop lowering the charge current. This means that the charge current is kept at the current that causes the volt drop across R1 that results in the transistor being only just on. The size of the resistor R1 determines the charging current and is calculated as follows:

V = IR

if Voltage to start turning on the transistor is 0.6V and the resistance is 1 ohm then:

I = 0.6 / 1 = 600mA

This means that the charger is regulated around 600mA.

A heat sink is used on the LM317 to keep it cool.


I designed a bracket to fit the back of the solar panel in Fusion 360 and then laser cut it at my Hackspace, Norwich Hackspace UK.

The Code

Code1.png

The Arduino code is written to continuously monitor light levels and battery voltage. When the light level is low (indicating daytime) and the battery is sufficiently charged, the relay is activated to run the water pump for 30 seconds. The process repeats every 3 minutes, ensuring periodic operation of the fountain while allowing time for the battery to recharge.

The Code is quite simple but here's a detailed run through of how the code works:

Variable Definitions

  • ledPin: The pin number (12) for the LED that indicates the pump's status.
  • relayPin: The pin number (11) that controls the relay for the water pump.
  • LDRPin: The pin number (A0) connected to the Light Dependent Resistor (LDR) to measure light levels.
  • LDRLevel: A variable to store the light level read from the LDR.
  • battPin: The pin number (A1) connected to the battery voltage sensor.
  • battLevel: A variable to store the battery voltage level.


Setup Function

  • pinMode (relayPin, OUTPUT); Sets the relay pin as an output, allowing the Arduino to control the relay.
  • Serial.begin (9600); Initializes serial communication at a baud rate of 9600, enabling data transmission to the Serial Monitor.


Void Loop Function

Read Sensor Values:

  • LDRLevel = analogRead(LDRPin); Reads the light level from the LDR.
  • battLevel = analogRead(battPin); Reads the battery voltage level.

Print Sensor Values to Serial Monitor:

  • Outputs the battery level and light level to the Serial Monitor for debugging and monitoring. I used this when setting up the light levels.

Condition to Activate Pump:

  • if ((LDRLevel < 200) && (battLevel > 820)): Checks if the light level indicates daytime (LDRLevel < 200) and if the battery is sufficiently charged (battLevel > 820).
  • digitalWrite (relayPin, HIGH);: Turns on the relay to start the water pump.
  • digitalWrite (ledPin, HIGH);: Turns on the LED to indicate the pump is running.
  • delay (30000);: Keeps the pump running for 30 seconds.

Turn Off Pump and LED:

  • digitalWrite (relayPin, LOW);: Turns off the relay, stopping the pump.
  • digitalWrite (ledPin, LOW);: Turns off the LED.

Delay Before Next Cycle:

  • delay (180000);: Waits for 3 minutes before checking the conditions again. This allows the battery to recharge if needed.

Assembly and Installation

thumbnail_IMG_6359.jpg
thumbnail_IMG_6358.jpg
thumbnail_IMG_6343.jpg
thumbnail_IMG_6344.jpg
thumbnail_IMG_6345.jpg
thumbnail_IMG_6360.jpg

I first assembled the pump and raft assembly as follows:

  • Connect the 20mm diameter 500mm long tube to the pump outlet and secure with a hose clip.
  • Pass the other end of the hose through the centre of the raft and slide a hose clip onto the hose.
  • Connect the hose to the nozzle inlet.
  • Tighten the hose clips.
  • Secure the nozzle to the raft with 2-part epoxy glue and allow to set.

Next I mounted the electronics enclosure to a backboard. I used 10mm PVC sheet but you could use plywood or similar. I then mounted all the electronics inside the enclosure and hooked-up all of the electronics with hook-up wire.

The final part of the assembly was to connect the solar panel to the backboard. I made a bracket that ensures the solar panel sits at 45 degrees. This angle gives me the best overall performance from the solar panel throughout the year where I live.

with everything assembled I finally installed the system. The control system was installed so the solar panel faced south. The pump and floating raft assembly was placed in the centre of the pond and tethered in place with nylon chord.

With everything in position I turned on the pump and set the speed of the motor so that it presented a beautiful water fountain powered by renewable energy.