Overview
SipSense is a NexivoLabs product in development: an attachment for an ordinary water bottle that estimates how much you drink, shows the day's progress as a slow colour change, and reminds you with a gentle vibration when you fall behind. It works fully standalone; a phone connection is a sync layer, not a dependency.
The current revision is a v0.1 prototype on perfboard, used to validate sensing and collect real-world data before a custom PCB.
Problem
Most hydration gadgets are notification machines — they blink and beep until they get unplugged. The engineering problem is the opposite: detect real drinking reliably enough that the device can stay quiet, and run long enough on a battery that people forget it is there.
Two hard parts drive the design:
- Detection. A bottle is lifted, carried, washed, knocked over and refilled. Only some of those are drinks.
- Power. BLE transmit spikes of around 350 mA, an always-on status light and continuous motion sensing all compete for a small battery.
Requirements
- Detect drink events and estimate volume without user input
- Show daily progress at a glance, without a screen being required
- Remind without being annoying — no blinking, no audible alarms on a desk
- Keep working if the phone app is never opened again
- Allow the weight sensor and even the microcontroller to be swapped without rewriting application logic
System architecture
Hardware
The prototype is built around an ESP32-C3 Mini — native USB for development, BLE 5 for sync, and RTC-capable GPIOs that can wake it from deep sleep.
| Function | Part | Interface |
|---|---|---|
| Motion / drink posture | MPU6050 6-axis IMU | I²C 0x68, interrupt to an RTC GPIO |
| Weight (v0.1, under validation) | DF9-40 force-sensing resistor — moving to a load cell + HX711 | ADC1 channel 0 |
| Bottle temperature | DS18B20 | 1-Wire with 4.7 kΩ pull-up |
| Status readout | 0.91" SSD1306 OLED | I²C 0x3C, shared bus |
| Ambient progress light | WS2812 | single-wire data, 330 Ω series |
| Silent reminder | Vibration motor | BC558 PNP high-side switch |
| Input | TTP223 capacitive touch | GPIO, RTC wake |
Pin choices were made around the C3's constraints: analogue on ADC1 only (ADC2 is unusable while the radio is active), strapping pins left with the levels they need at boot, and the USB pins reserved.
Firmware architecture
Firmware is written in C++ with PlatformIO and split into strict layers, so a future switch to a lower-power microcontroller does not touch application logic:
- drivers/ — thin wrappers for each part, with no business logic
- sensing/ — sampling schedule, median filtering, settled-reading detection
- logic/ — the drink-detection engine and reminder scheduling
- io/ — non-volatile storage, the Wi-Fi setup portal and the BLE GATT service
- power/ — deep sleep, wake sources and battery state
All pins and tunable thresholds live in a single configuration header. Drivers never call into logic, and logic never touches a GPIO.
Drink detection
The detection engine is a pure function — sensor readings in, events out — so it can be unit-tested by replaying recorded data on a desktop. The weight path is a state machine:
IDLE bottle present, weight stable (slow re-tare allowed only here)
↓ weight drops toward tare
LIFTED save last stable weight, start event timer
↓ weight returns
SETTLING median filter, N readings within ±2 g, 1.5–2 s slosh delay
↓
CLASSIFY lighter → DRINK · heavier → REFILL · otherwise → MOVEDWhile the force sensor is still being validated, the shipped prototype firmware detects drinks from posture instead: a sustained tilt above about 45° with low angular jitter. Drinking is smooth and held; carrying and washing are erratic.
Power
The device stays awake while in use, then drops into deep sleep after a period without motion. It wakes on the IMU's motion interrupt, a touch, or a periodic timer that refreshes the status colour and checks whether a reminder is due. Wi-Fi is off by default and the radios never run together: BLE stops whenever the setup portal is open.
Implementation
Bring-up was done in numbered stages, each verified and committed before the next — blank-slate USB enumeration, I²C scan, display, IMU, outputs, temperature and weight, then the integrated application. Wiring everything at once makes a single fault take hours to isolate; staging turns it into minutes.
The single status LED is driven through an array-based driver, so moving to a multi-LED progress ring in a later revision is a configuration change rather than a rewrite.
Testing & validation
The guiding rule is data before algorithms: thresholds are tuned by replaying recorded, labelled sensor sessions against a manual drink diary — never live on the bench.
Each sensing decision has an explicit gate:
- Weight sensor — keep the force sensor only if its error is within ±25 ml and drift is manageable; otherwise move to a load cell. The next revision moves to a load cell with an HX711 amplifier, now in development.
- Detection — the target for the weight-based engine is at least 90% of real drinks detected with under one false positive per day on the recorded dataset.
- Microcontroller — if sleep current cannot reach multi-week battery life, move to an nRF52840.
Results & lessons
- The integrated prototype boots, serves its setup portal, reads temperature live and detects drink posture; build size is 81% of flash, mostly the BLE stack.
- The buzzer was removed after the first integration: audible alerts on a desk device get it unplugged. Reminders are now haptic plus colour.
- Designing the hardware abstraction first kept the costly decisions — weight sensor and microcontroller — cheap to reverse.



