1 / 5
Smart Water Dispenser | ESP32 & App — zdjęcie 1
1 / 5

Smart Water Dispenser | ESP32 & App

Zamów wydruk tego modelu

Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.

Zapisane na tym urządzeniu.

ESP32-powered pet water dispenser

Ocena
0 / 5
Polubienia
25
Pobrania
26
Wydruki
0
Wyświetlenia
557
Oceny
0

Aktualizacja u źródła:

Informacje o modelu

Źródło
Printables
Kategoria
Pets
Licencja
Creative Commons — Attribution — Noncommercial — Share Alike

Smart Water Dispenser

 

Description

Water is the most important thing for our pets. And who wants to keep refilling it when you can spend this saved time together with them? 🐶😺

And that's why I created this gadget that will make your life easier with its own mobile app 📱.

 

Functions

  • Automatic water refilling (with MIN and MAX values settings)
  • Manual control
  • LED indication
  • Mobile app with Bluetooth connectivity
  • Data history via graph
  • Uses a standard PCO-1810 valve to hold the bottle (any standard bottle can be used!)

 

Hardware and Software Used

Hardware

NameLink (cz)
ESP32 devkit v1dratek.cz
Water pump R385dratek.cz
Silicone tube 6 x 8 mm 2 metersdratek.cz
Water level sensordratek.cz
Step down adjustable inverter (12 V → 5 V)dratek.cz
Breadboarddratek.cz
12V relay modulegme.cz
LED (blue)dratek.cz
Resistor (220 Ω)dratek.cz
Transistor (NPN)dratek.cz
12V jackdratek.cz
Some jump cables…-
Some M3 screws…-

Software

  • Visual Studio code
  • TincerCAD
  • FreeCAD
  • PusaSlicer
  • TypeScript
  • React-native
  • Kotlin

Wiring Diagram

Our wiring with 12V Relay and PNP tranzistor

Alternative wiring with 5V Relay module

node: This setup requires edition of the box proportions so the relay module fits in (might be included in the files folder in the future)

Code

ESP32 code

This code comunicates via Bluetooth characteristics to recive commands from mobile app and sending response back. It also reads sensor value and has basic logic to automaticaly control the water pump.

Github repository

Mobile app code

With the mobile app, you can control and see the device status and sensor measurement history in a clear UI.

Github repository

Printing Instructions

I apologize for some possible imperfections in the printing quality. I have only had the opportunity to print on a semi-functional Two Trees Bluer printer.

Some models might need to use Windows repair algorithm before printing 🔧

Model with two versions
  • LED holder can be printed in normal and tight version. Use what fits you better or refer to the model's page.
  • bottle-holder-tripod-leg has it's original size and my remixed size uploaded because I could not fit it into it's holder. Use what fits you better.

Main printing settings (Two Trees Bluer printer)

  • Filament Material - PLA (Elegoo RAPID PLA+)
  • Layer Height - 0.3 mm
  • Infill - about 90 %
  • Supports - Yes, for the bottle-holder

Printing settings for Box (main part)

  • Filament Material - PLA (Elegoo RAPID PLA+)
  • Layer Height - 0.3 mm
  • Infill - about 30 %
  • Supports - No
  • Layers - (optional) 0 top and bottom layers (here use at least 60% infill)

Assembly Instructions

Firstly read this whole description and then print everything you will need :)

Microcontroller
  • Connect a microcontroller into your PC and upload ESP32 code - BEFORE inserting it into the box
Box
  • Solder the cables to the DC jack connector, water pump and LED with resistor
  • Put the relay module into the breadbord (or use Arduino relay module)
  • Screw everything into the box (ESP32, water pump, step down) and stick the breadboard in
  • Insert LED's holder into the front panel and insert LED into it
  • Insert DC jack to the front panel and screw it in
  • Insert jump wires for the water level sensor to the front panel (optionally glue them)
  • Connect parts and the microcontroller as shown in the wiring diagram
  • Close the box with it's top part
Bottle holder
  • Screw bottle-holder-base and bottle-holder-tripod-base together
  • Insert the bottle-holder-leg 3 times
Sensor
  • Place the sensor with the tube from pump (the higher one) to the bowl (or to the desired water flow point)
  • 3D models will come
Tubes
  • Connect the bottle part and the pump with tubing (bottom one is IN and the top one is OUT)
  • Insert a bottle with water 

Congrats! It's assembled ✨

Demo and Usage Instructions

Application
  • After you Power ON the device you can scan the device in "Scan Screen" and connect to it (you will be asked for Bluetooth permission and maybe some "find devices using location")
  • So now you are connected to the device for the first time.
    The first thing I suggest after the connection is to set the MIN and MAX values of the sensor. Simply put the sensor into the water and move with it as you need according to the displayed value visible in the Home Screen. Here you have to test a bit how much you need as a Minimum value (that's when the pump pumps water) and vice versa Maximum (when to stop stumping). Write or remember these values and send them to the device in the “Settings Screen”
  • Application is tested for Android 14 and above (tested on HyperOS)
  • It should work on Android 12 and above
  • It is not made for iOS users 😢 (might be added in the future)

Additional Notes or Tips

  • When the “Scan” button is not reacting try to allow Position permission in your mobile settings for this application
  • If you are having trouble uploading the ESP32 code or you need to erase FLASH memory (with EEPROM), use this tutorial randomnerdtutorials.com
  • If you found anything let us now in the comments or create a Github issue in the code's repository

 

Photos and Videos

Mobile app screenshots

 

Device scan

When the device is powered ON, you can go to the "Scan Screen" and start scan for the device. You will be asked to turn on bluetooth (on some phones you will be asked for enable "find another devices" or something like that) 

Founded devices will have a name "ESP32_XXXX" where X is a 4 characters long unique ID (the ID is generated once and then it will be same) You can click on the founded device, that will connect to it, and control the device with the app.

 

 

 

 

 

 

 

 

 
Home screen

The "Home Screen" is basically a main screen of the app. You can see basic status of the connected device, see actual sensor value and of course control the device. 

If the "Operation mode" is in "Manual" you can control the water pump as you like (but keep in mind that water can overflow in this mode) 

In Automatic mode the pump is controlled via device itself and you can even turn the app off and the device will keep working just right.

 
 
 
 
 
 
 
 

 

History screen

History screen is exactly what the name suggests... It shows the history data returned by the sensor. You can view this data for 24h back, a week back or even a month. So you can see how much and when your beloved pet drinks.

These values are loaded from the device itself (EEPROM) and they are not stored locally in the app.

 

 

 

 

 

 

 

 

 

Remixes

Uses own and remixed models.

https://www.printables.com/model/602272-pco-1810-soda-bottle-to-nato-gas-mask-adapter

Creative Commons (4.0 International License)
Attribution-ShareAlike

https://www.printables.com/model/625992-5mm-led-holder

Creative Commons (4.0 International License)
Attribution-NonCommercial

https://www.printables.com/model/869846-box-box-box
Creative Commons (4.0 International License)
Attribution-NonCommercial

https://www.printables.com/model/1161300-bone

Creative Commons (4.0 International License)
Attribution—Noncommercial—Share Alike

https://www.printables.com/model/602257-wip-respirator-body-with-3x-nato-ports

Creative Commons (4.0 International License)
Attribution-ShareAlike

https://www.printables.com/model/944524-water-bottle-rocket

Creative Commons (International License)
Public Domain

https://www.printables.com/model/863518-dog-paw

Creative Commons (4.0 International License)
Attribution
 

Tagi