Skip to content
Low-Power Firmware & Cloud Integration for a Smart Toothbrush
Consumer Electronics

Low-Power Firmware & Cloud Integration for a Smart Toothbrush

Engaged by
A US oral care brand
Industry
Consumer Electronics
Year
2026
Key Results
5 modes
Brushing Modes
2,000 units
Production Run
Offline Buffer
No Data Loss

Background

We provide custom hardware and firmware development for a US oral care brand. Our scope covers hardware design (schematic, PCB layout, component selection, prototyping and debugging), embedded firmware, a production-line flashing host application, and integration with the customer's cloud backend. The device is used in professional oral care settings, so data accuracy is a critical requirement. It uses a single button, drives a vibration motor for multiple brushing modes, connects to the cloud over Wi-Fi to report brushing sessions and check for firmware updates, and supports local provisioning and status queries. The device is battery powered, making battery life another key metric.

Challenges

  • Data accuracy is a hard requirement: brushing timestamps and durations must be accurate, complete and never lost, since the data serves as a usage record in professional settings;
  • Battery life and power consumption: the battery is small, so the device must spend most of its time in deep sleep and can only be woken by the button;
  • Single-button interaction: one button has to cover start/stop, mode switching and provisioning;
  • No data loss allowed: brushing happens offline, so sessions must be cached locally and fully back-filled once connected;
  • Provisioning timing: the device provisions over SoftAP, and RF switching briefly interrupts the connection — handled poorly, users perceive it as a failed setup.

Solution

Low power and power management

Built on the ESP32-C3 platform, the device enters deep sleep when idle and is woken only by the button GPIO. It also enters deep sleep automatically while charging or when the battery is exhausted, with a light indication before shutdown. Battery level is derived from ADC sampling with piecewise linear fitting, balancing accuracy against resource usage.

Single-button, multi-level interaction

A short press starts brushing; another short press within 5 seconds cycles through modes; a short press after 5 seconds stops and triggers reporting. A 5-second long press enters provisioning mode. All states are shown through the mode LEDs and an RGB status light, so daily use requires no phone.

Multiple brushing modes

Five modes are built in — a 20-second quick mode plus clean, refresh, polish and sensitive. PWM combined with software timers generates different vibration rhythms and intensities, and the last used mode is remembered.

Data accuracy: time sync, caching and back-fill

Because the device is offline while brushing, each session is first stored locally with microsecond precision (up to 64 records, oldest dropped when full). Once connected, the device completes network time synchronisation before converting microsecond values into accurate timestamps, so time drift cannot undermine the data. All cached sessions are then reported in one batch, and local records are cleared only after a successful upload — otherwise they are kept in full for the next attempt, so no data is lost.

Provisioning and local interface

A long press enters AP provisioning mode, where a local HTTP interface lets the phone read device information, write Wi-Fi and cloud settings, query connection status and perform a factory reset. During provisioning, the configuration acknowledgement is returned to the phone before the device starts connecting, avoiding false "setup failed" indications caused by RF switching.

Security and cloud integration

Reporting and OTA both use HTTPS with server certificate validation and Bearer authentication. The cloud can push new configuration (including certificates) in the reporting response, or send a null value to clear a configuration item.

Over-the-air updates

After each report the device queries for OTA information, downloads and installs new firmware automatically when available, and indicates the result through the status light.

Production tooling: a secure flashing host application

Alongside the device firmware, we built a companion flashing tool for the production line:

  • Firmware signing (Secure Boot V2) and flash encryption: the tool burns the Secure Boot digest and encryption keys into eFuse, preventing firmware from being read or tampered with; packages include both plain and encrypted images, selected by production configuration;
  • Reads the device's unique identity from eFuse and automatically prints a barcode label after flashing;
  • Integrates with the customer's flashing management backend: accounts and flashing quotas are assigned per brand, decremented per unit and recorded in audit logs to prevent over-production;
  • The tool checks for and installs its own updates, with a switchable Chinese/English interface.

Application Value

  • Deep sleep plus button wake-up balances battery life with instant availability;
  • Offline caching and batch reporting keep brushing data intact through connectivity gaps;
  • A single button covers all operations, reducing hardware cost and mechanical complexity;
  • Provisioning, reporting and OTA form a complete loop, so future features can ship as firmware updates;
  • Tightened connection and time-sync timeouts plus end-to-end timing logs noticeably shorten the wait after brushing;
  • Firmware signing plus flash encryption, combined with flashing quota control, cover both firmware security and production governance.

smart-toothbrush-product