|
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.
- Comments(0)
- Likes(0)
- 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
-
TEKTRONIX THS710,THS720,THS730 External Battery Charger with 3D Printed Case
30 1 0 -
-
Atomic Force Microscope - electronic part
100 0 0