Skip to content

walkerhsu/Water_Intake_Tracking_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Final project — Water Intake Tracker System

Final Project Youtube Demo Video

Short summary

  • Simple, low-cost hydration tracking system without flow sensors or weight scales.
  • Uses only motion/orientation information accompanied with some filters to estimate the volume of water per sip.
  • Useful for fitness, health tracking, or simply as a learning project combining sensors, signal processing, and embedded UI.

Key features

  • Detects sip events using angular velocity (gyroscope) cues.
  • Estimates per-sip and cumulative volume.
  • BLE for live updates or logging.
  • Mobile application to record the cumulative volume and past drinking events
  • Remind the user to drink water if no water intake has been made within a certain interval

Results

  • 5.8% error rate compared with the real weight volume per sip

Details

How it works (overview)

  1. Sensor & orientation

    • LSM6DSL, an IMU in the STM32 borad we use, provides gyroscope (angular velocity) data.
  2. Sip detection

    • A typical sip is a forward tilt (pitch increases) followed by a return to upright.
    • The gyroscope detects angular velocity, we calculate the overall amgular velocity by the square root of y-axis and z-axis
    • Collects the forward tilt via Riemann integral of the angular velocity and check whether the tilt surpasses the threshold.
      • Mark as a sip event when the value of the current angle is larger than the threshold.
    • Filtering (low-pass) reduces noise.
  3. Volume estimation

    • Estimate the drink rate based on the current angular (conducting experiemnts on various people).
      • When the angular is small, drink rate is smaller
      • When the angular is large, drink rate will be larger
  4. Post-processing

    • Aggregate per-sip estimates to track total daily intake.
    • Provide real-time feedback (mobile app) via BLE.
  5. UI

    • Flutter based mobile application
    • Use flutter_blue_plus as the package to connect to the hardware device via BLE
    • Display thet daily water consumption
    • Record the water consumption to the database
    • Reminds the user to hydrate after a custom period of time of no water intake

Hardware

  • Microcontroller:
    • B-L475E-IOT01
  • IMU:
    • LSM6DSL
  • Others:
    • BLE...

Notes on sensor placement

  • Mount the IMU to the side of the cup or lid in a fixed, rigid way so motion of the cup corresponds to the sensor orientation.
  • Keep the IMU aligned (document axis orientation) so that the sipping event only reflects to the y-axis and the z-axis.

For more information, check out our slides


Improvement

Calibration & tuning

  • Performing calibration and tuning for each cup, each gyroscope, or even each person will get a better estimation.

Machine Learning involvement

  • Using ML-based estimation from a sequence of angular may result in a better estimation

Thank you for checking out ES_lab — happy building and stay hydrated!

About

Final project for Embedded System Course in NTUEE.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •