|
emlearn-micropython |
|
![]() |
MicroPython |
|
![]() |
Python |
|
![]() |
FreeCad |
|
|
M5Stick C PLUS 2M5Stack
|
Automatic toothbrush timer
Brushing one's teeth is quite boring... And how looong is 2 minutes anyway? Spice things up using this gadget, which uses accelerometer and machine learning to track the time you are actively brushing.
This project is intended to be a fun and simple example of using machine learning on microcontrollers, in the area of Human Activity Recognition. It was designed as a demo project for emlearn-micropython, a Machine Learning and Digital Signal Processing library for MicroPython.
See it in action
How it is made
The device continually analyzes the accelerometer data. The overall process is illustrated in the following diagrams:
Since the input data is an infinite continious stream, the data is cut into short fixed-size windows, which are processed and analyzed independently.
We collected data from several toothbrushing sessions. This was annotated to indicate which time has actively brushing and not. Using this labeled data, we could train a machine learning model that can classify this activity.We used the training recipe found in https://github.com/emlearn/emlearn-micropython/tree/master/examples/har_trees
Constructing the device
You will need to 3d-print the toothbrush holder. The files are provided in the attachments, and in the Github repository.
You will also need to have the M5Stick C PLUS 2 device at hand.
Assembling the toothbrush holder
Here are the assembly steps:
- Position the toothbrush in upper half of the base.
- Attach toothbrush using zipties. Tighten them well, using pliers
- Snap the lid onto the base to cover the toothbrush
- Use double-sided tape to put the M5Stick in lower half of the base
Stand
There is also an optional stand. This is designed for a USB-C magnetic adapter. Unfortunately, there seems to be no standard size for the USB-C magnetic adapters, so some customization will be needed.
The part I got looks something like this:
To try to accommodate basically any USB-C adapter, the inside of the stand is just open, to leave maximum amount of space. I recommend using a hot glue gun to secure the adapter to the inside of the top.
Flashing the firmware
You will need to first flash MicroPython, then copy the firmware and its dependencies onto the device. A USB-C cable is necessary.
Instructions are provided in the jonnor/toothbrush repository
Automatic toothbrush timer
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.

Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW
ESP32-S3 4.3inch Capacitive Touch Display Development Board, 800×480, 5-point Touch, 32-bit LX7 Dual-core Processor
BUY NOW
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(1)

-
Jon Nordby Jan 10,2025
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Jon Nordby
-
-
-
Modifying a Hotplate to a Reflow Solder Station
750 1 5 -
MPL3115A2 Barometric Pressure, Altitude, and Temperature Sensor
405 0 1 -
-
Nintendo 64DD Replacement Shell
351 0 2 -
V2 Commodore AMIGA USB-C Power Sink Delivery High Efficiency Supply Triple Output 5V ±12V OLED display ATARI compatible shark 100W
974 4 2 -
How to measure weight with Load Cell and HX711
639 0 3