This is an old revision of the document!


Smart Hydration System

author Ioana Cristea ACES 2021
[Video]

1.Project Objective

The idea behind this project is to keep the customer hydrated.
This will be achieved by determining the amount of water inside a water glass and sending email notifications based on how much and when does the user drink from it.

2.Project Description

The Smart Hydration System consists of a glass that is monitored in order to give feedback to the user regarding the water he drank.
Each time the user does not drink water, an email notification will be sent.
The email notification will arrive at an interval established by the user.
If the user does not drink in the interval specified, and did not receive an email during this period, than a new email will be sent.
For a visual feedback, there is a led bar indicating the level of the water.

3.Hardware Description

The hardware system consists of:

  • ESP32 Wroom Board
    • The ESP Wroom Board controls the entire system. It sends the emails to the user, it monitors the water level and gives feedback.
  • HC-SR04 Ultrasonic Sensor
    • The ultrasonic sensor is used to determine the distance to the water, which gives the ESP32 Board the chance of deducing when the user drank last time water.
    • The concept behind the ultrasonic distance sensor is the following: when triggered, the device sends a ultrasonic wave forward; this wave is reflected on the nearest surface and is expected back to the ultrasonic sensor; the device rises a signal on the whole period of time between the sending of the wave and the receiving of the reflected wave; this signal represents the duration, therefore, to find the distance between the sensor and the nearest surface the formula d = v*t/2 is used (the 2 factor is a result of measuring the time for both the emitted and reflected waves).
    • The ultrasonic sensor has the role to measure the level of water within the glass. This level is measured at every iteration of the program loop.
    • The trigger signal is linked to the digital GPIO 33, the echo signal is linked to the GPIO 25, the VCC signal is linked to 5V and the ground signal is linked to GND.

 HC-SR04 Ultrasonic Distance Sensor

  • Led Bar
    • The Led Bar is not a necessary component, but it gives some more feedback to the user.
    • The Led Bar has all the LEDs on when the glass is full in order to attract the user and make him feel like he needs to drink water.
    • When the glass is empty, all the LEDs are off, these would not attract the user. This would be more effective if the glass would fill automatically (from a barrel of 2l per day).
    • Of course there are intermediary stages for the LEDs based on the level of the water which will attract more or less the user to drink the water.
    • Each LED is connected to a GPIO pin of the ESP32 Board on one side and to a resistor followed by GND on the other side.

 10 LED Bar

  • Glass of water
    • The water glass is a normal glass, on top of which the ultrasonic sensor is placed.
    • This glass was supposed to be filled automatically, but the water pump did not work in my configuration because of the current provided by the board pins. This could have been resolved with a current amplificator, but I didn't have the necessary components for implementing this.

4.Software Description

5.Issues and Solutions

6.Conclusions

8.Bibliography and Resources

Download the source code

iothings/proiecte/2021/smarthydration.1641915362.txt.gz · Last modified: 2022/01/11 17:36 by ioana.cristea0112
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0