Everyone probably needs to drink more water, so we built an easy-to-use app and water bottle that tracks how much you drink and motivates you to drink more through push notifications on your phone. In a world where everything is connected to the internet, even your water bottle tracks your drinking habits in order to bring the power of the Internet of Things to your healthy lifestyle.

What it does

CloudCanteen measures how much water is in your water bottle, and whenever there is a change in the amount, the website updates with the amount of water in the bottle, and checks to see if its empty. If its empty, it updates the website by incrementing the number of water bottles consumed, and sends a push notification to your phone to tell you to fill up your water bottle.

How we built it

Two wires create a capacitor with the plastic water bottle as an insulator, and a c sketch on an Arduino Uno measures the capacitance of the entire bottle system in order to estimate volume. A grove shield interfaces with the wires that create the capacitor, and with an accelerometer that is used to ensure the bottle is level while measurements are being made. This estimated volume is fit to a curve in order to determine what percentage of the water bottle is full. Then, a python script running on a DragonBoard 410c reads sensor data from the Arduino over serial, and sends that data to an AWS server via POST requests. The AWS virtual machine used Apache to serve a Python/Flask website, and stores every change in water level into a sqlite database. Using AJAX and jQuery, the website live updates a progress bar every 5 seconds to show the amount of water in the bottle to show the user how much water they have left. In addition, a second progress bar shows how many times the water bottle has been emptied, and shows how many more water bottles the user needs to drink before they reach their daily water intake goal. A log of all water changes is also available on the website. The website is formatted using CSS and bootstrap.

Challenges we ran into

Our main challenges included finding a way to accurately and consistently measure the amount of water in the bottle. Capacitance can be influenced by the surrounding environment of the capacitor, so we had to calibrate the sensors and create a curve to fit the data onto in order to get to reliable results. Because our supplies were limited, and no Hall effect sensors were available at the hardware lab, we had to settle for the low resolution and reliability of the capacitance method of measuring volume. In addition, we had significant trouble with setting up the virtual machine on the AWS server, and getting it to properly serve the website.

Accomplishments that we're proud of

We are proud that we were able to get an end-to-end prototype working in such little time with such few resources, and with significant obstacles inhibiting our progress. We are able to demo a website that accurately displays the amount of water in the water bottle, and sends push notifications to your phone when you are running low on water.

What we learned

We learned that at a hackathon, the most important thing is to not let any one obstacle get in the way of progress. Whenever we reached a roadblock, we were able to recognize that we needed to change paths and try something to continue making progress towards the goal.

What's next for CloudCanteen

We chose the DragonBoard 410c because of its many capabilities, speed, and small form factor. One of its abilities is GPS, so we'd like to use that to track your water bottles location when it's been misplaced, and to help you find the nearest water fountain so that you can continue to work towards your daily intake goal. We'd also like to use a floating magnet and some Hall effect sensors to more accurately measure the amount of water in the water bottle, even when the bottle is tilted or moving.

Share this project: