Inspiration

There are many health apps these days to help people track how much water they are drinking, but there's one problem with them, we're pretty forgetful. Karthik tried to use one of these apps once, but could not keep up with the commitment of accessing the app every time he drinks his water. So we thought of a solution. A water bottle that does it for you.

What it does

The SmartBottle tracks how much water you are drinking from the bottle by sensing how much you tilt the bottle. The amount of water recorded is based on your own drinking speed. When you first get the bottle, you can train a machine learning model simply by drinking water while pressing down the recording button and inputting how much you drank in each swig into an app. This way, the model is completely personalized and can accurately estimate how much you are drinking. The app also lets you input your weight and tells you how much water you should drink a day based on that. There is a progress bar on the home screen to visualize just how far you are getting each day with your water intake. There is also a feature in the app that allows you to input the foods you eat and adds the water from those foods into your daily hydration, since much of the water we get each day is from foods.

How we built it

We used an Adafruit 9-DOF gyro and accelerometer to read in the tilt of the bottle using the magnetic field of the Earth. The values are read into an Arduino, which then send the values into a Raspberry Pi 3. On the Raspberry Pi, there is a machine learning algorithm that will calculate the amount of water you drink and send it through a server to your app.The app is written in javascript in React Native. All of the hardware is stored in a compartment under the bottle.

Challenges we ran into

We originally were not planning to use the Arduino since we wanted to be able to use bluetooth and internet with the Raspberry Pi, but we soon learned that the sensor we had only worked on Arduino. Because we still wanted to be able to access wifi or bluetooth in order to connect the bottle to an app, we had to continue using the Raspberry Pi, so we found a way to transfer data from the Arduino to the Pi. Another challenge we ran into was getting the data from a python script on the Pi onto the app. The gyro data had to be read in through Python, and the machine learning script was also in Python, but we were unable to find a way to transfer the data through bluetooth unless it was in javascript on the Pi which it was not. Therefore, we decided to ditch bluetooth and use a server to transfer data to the app.

Accomplishments that we're proud of

We are all pretty new at using hardware, so we are proud of learning how to use so many different systems. We are also proud of our machine learning model, since it is a fairly complex part of our project, and our app UI since it looks very clean.

What we learned

We learned a lot about using hardware, such as using sensors on an Arduino, a button on the Pi, and connecting the Arduino to the Pi. We also learned a lot about machine learning while making our model.

What's next for SmartBottle

We want to make the bottle less clunky by finding a gyro that can work directly with the Pi so we can remove the Arduino. We also want to be able to connect a fitbit to an app and use the new information from the fitbit to provide more accurate water intake goals.

Share this project:

Updates