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.
The platform used for programming the Intel Galileo board is Arduino IDE.
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.
This board can be used with the Arduino IDE.
Led Bar
The Led Bar is not a necessary component, but it gives some more feedback to the user.
The led bar is formed by 10 parallel leds.
Each led is enseried with a 220 ohm resistance to protect them from burning out.
For this project only 4 leds were used to offer a visual representation of the water lever, the more leds are turned on, the higher the water level is.
The 4 leds are linked to the pins 12,14,27,26.
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).
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.
The Hardware Diagram looks like this:
4.Software Description
The Intel Galileo board was programmed using the Arduino IDE.
The program is based on the two well-known functions: setup() and loop().
The setup() function ensures that each pin has the right direction set.
It also starts the server with the webpage.
The loop() function represents the core of the software project. This function is executed in a forever loop in which the following steps are followed:
Get the last time the user has drank water
Get the last time an email was sent
Calculate the distance from the ultrasonic sensor to the water within the glass
Based on the distance calculated, a number of LEDs will be lit up: as the level rises more LEDs will be lit up (the maximum distance is split into 4 intervals, representing the 4 LEDs )
The current level of water is compared to the last level of water in order to check if the user has drank water
If the user hasn't drank in a specific period of time (taken from the web page), an email notification is sent
If the water glass is full, the whole process is repeated, otherwise, the pump will start working, filling the glass with water (in this time the level of water is also checked)
5.Issues and Solutions
This project, as any project presented some technical issues.
The main problem was that the water pump did not function connected directly to a digital pin.
I came to figure out that this could be resolved using a current amplifier, although I didn't have the components necessary to implement it.
6.Conclusions
This project shows how easy is to make everyday life more simple. Using only a handful of components and taking some time to investigate how they work, a self smart hydrating system can be achieved.
Although, the project is not one that a person might use in real life, as there are some limitations such as taking the filled glass to drink from it it’s quite hard without messing up the circuits.
Download the source code