Useless Machine - Portable Water Bottle Filling Station

by lucabalica in Circuits > Arduino

177 Views, 1 Favorites, 0 Comments

Useless Machine - Portable Water Bottle Filling Station

IMG_5516 (1).jpg
IMG_5515.jpg
6cf63954-5ec8-4ce2-90e4-2c5442e0edf8 (1).jpg
e45e2fa0-3e27-4049-93e0-cc104c0be09a (1).jpg

https://youtu.be/qtVzrZqI5Gc

Have you ever wanted to fill up your water bottle but dreaded getting up and going to the water filling station? Fear no more! The portable water filling station has you covered. You can take it anywhere with you, easily fill up your water bottle through the sensor operated pump, and refill it's water supply seamlessly by simply attaching a new plastic water bottle on top!

Supplies

Screenshot 2025-03-13 163501.png
Screenshot 2025-03-13 163759.png
Screenshot 2025-03-13 163358.png
Screenshot 2025-03-13 164010.png
Screenshot 2025-03-13 164105.png
Screenshot 2025-03-13 164229.png
Screenshot 2025-03-13 164339.png

circuit:

  1. arduino uno kit
  2. ultrasonic sensor
  3. solenoid valve
  4. submersible 12v pump
  5. lcd screen


box:

  1. 3/4" plywood
  2. plastic water bottle
  3. flexible tubing
  4. acrylic sheets (2)


tools:

  1. cutting tools (laser cutter or power saw)
  2. hot glue gun
  3. wire cutters, wire strippers

Build Circuit on Tinkercad

Screenshot 2025-03-13 160703.png

assemble the following circuit on tinkercad. The lightbulb is a placeholder for the relay that activates the pump and valve.

Write Code

this is the logic for the code that runs this system:

1. Setup

  1. Initialize the LCD display.
  2. Configure ultrasonic sensor pins (trigger & echo).
  3. Set up relay pin as an output.
  4. Set up button pin as an input.
  5. Ensure relay starts OFF.
  6. Display "Distance:" on LCD.

2. Main Loop (Repeated Continuously)

  1. Measure Distance Using Ultrasonic Sensor
  2. Send a LOW pulse to trigger pin.
  3. Send a HIGH pulse.
  4. Read echo time in microseconds.
  5. Convert echo time to distance in centimeters.
  6. Read Button State
  7. Check if button (A0) is pressed (HIGH).//for testing pump
  8. Display Distance on LCD
  9. Move cursor to second row.
  10. Clear previous distance reading.
  11. Print distance value followed by " cm".
  12. Check If Relay Should Activate
  13. If distance < 5 cm OR button is pressed:
  14. Turn relay ON.
  15. Display "ON" on the LCD.
  16. Else:
  17. Turn relay OFF.
  18. Display "OFF" on the LCD.
  19. Wait 500ms Before Next Reading (To Avoid Flickering LCD Updates)

Build Box

thumbnail_image004.png
thumbnail_image003.png
thumbnail_image002.png
thumbnail_image001.png

build this box as specified:

Build Water System

Screenshot 2025-03-13 171505.png

build this water system as illustrated, and test it for leaks.

Assemble Physical Circuit

IMG_9926.jpg
Screenshot 2025-03-13 173247.png

Assemble the circuit shown in the the tinkercad image, but replace the light with the pump and valve. Wire the pump and valve as specified to tap into the barrel jack power cable (The pump and valve will be powered from a standard 12v plug). Use this to test all components before installing the hardware in the box.

Fit Circuit and Water System to Box

IMG_9972.jpg
IMG_9973.jpg

Squeeze the circuit into the back compartment, the water system into the top, and make sure you use long enough wires to connect the screen to its slot, and the ultrasonic sensor to its slot.

Close It Up and Enjoy!

IMG_5516 (1).jpg