With Machine Learning it is possible to teach the device what is a "regular" break and what is a "tire wasting" break. How? Using an accelerometer.  Seeed Studio Xiao nrf52840 Sense is powerful enough to run a machine learning model, has an on board accelerometer and fits a tiny enclosure.

Parts

Circuit

  • Connect button to GND and D1.
  • Connect Led to GND and D2.
  • Connect microSD to GND, VCC, MISO pin to D9, MOSI to D10, SCK to D8, CS to D3.

3d printed enclosure

Download and print these parts with PLA https://www.thingiverse.com/thing:5891091

Data acquisition

Having good data is a must. So you need to get accelerometer samples for regular driving, regular breaks and hard breaks. That data will be obtained in the same motorcycle you are using and with your driving style.

Download the acquisition.ino script, upload the script the Xiao board. While riding the motorcycle, press the device button and record a file for driving, another file for regular breaks and another file for hard breaks.

Create a new account and project at Edge Impulse https://www.edgeimpulse.com/ (Free for developers)

Upload the CSVs from the microSD card, split samples. Create Impulse with Spectral Analysis and Classification. Use 2000ms window, 1000 increase and 50hz.

Do a classifier with 300 seconds 0.005 learning rate and 20% validation.

If you get a good detection rate, do a Deployment for Arduino Library. Download the zip. Add the zip to the project.

Download the inference.ino script. If you need so, replace the library name

#include <XiaoTireCare_inferencing.h> 

#include <XiaoTireCare_inferencing.h> 

Upload the inference script to the XIAO board.

Connect the battery and you are good to go.

Operation

Fix the device to the handlebar and drive your motorcycle. If you get a blinink led, that means a regular break has been detected. If you get a solid red light, that means tires are being wasted by a hard break.

References

La odisea de conseguir cubiertas