A DIY, IMU-based skateboard activity tracker

Related tags

Utilities tracksb
Overview

tracksb

A DIY, IMU-based skateboard activity tracker. The idea is to come up with algorithms to track activity during skateboarding sessions.

A companion mobile app could be used to get useful insights into the session.


Board

The current revision is C. It uses:

  • STM32WB55 (hal) as a Cortex-M4F + Bluetooth (BLE) microcontroller
  • BNO08x (driver) as an all-in-one IMU with an accelerometer, gyroscope and magnetometer together with a built-in sensor fusion algorithm
  • AXP173 (driver) as a Li-Po battery charging, power-path and gas gauge controller
Revision C board picture

Revision C PCB picture

A link to Upverter Design for schematic and PCB layout.

Firmware

Firmware is written in Rust, currently it's very minimal and can't do much. It can be found in firmware directory.

It's built with RTIC and uses probe-run for board flashing and debugging via RTT logging.

Firmware TODO List
  • Stream quaternions via USB virtual serial port
    • Port to RTIC v6
  • Validate and fix IMU axes and quaternion data
  • Use interrupts for communication with PMIC and IMU
    • Poll IMU via interrupt
    • Use interrupt for PMIC status updates (charging, button, etc.)
  • Bluetooth functionality
    • Integrate with BLE support from stm32wb55 crate
    • async/.await BLE
    • BLE
      • Stream quaternions via GATT service with one characteristic
      • Stream accelerometer and gyroscope data
      • Battery Level service
      • Device Info Service
    • Cleanup static mut and unsafe code
  • PMIC
    • Implement battery gas gauge via built-in coulomb counters
  • Flash RGB LED instead of simple on/off
    • Simple flash
    • PWM effects
  • Optimize power consumption and use low-power modes
    • Fix debugging/RTT in sleep mode
    • Enter Low-Power mode in async executor loop
    • Detect when device is IDLE and scale down the IMU frequency
    • Sleep instead of busy-waiting for the PMIC interrupt on the very first start (battery just plugged)

Software

  • A BLE client for PC that logs received data is here
  • A Processing sketch that visualise data is here

Device and board orientation

Intended axes orientation and position of the device

Board and device orientation

You might also like...
🦀 Rust-based implementation of a Snowflake Generator which communicates using gRPC

Clawflake Clawflake is a Rust application which implements Twitter Snowflakes and communicates using gRPC. Snowflake ID numbers are 63 bits integers s

simple epoch-based reclamation

ebr a simple epoch-based reclamation (EBR) library with low cacheline ping-pong. use ebr::Ebr; let mut ebr: EbrBoxu64 = Ebr::default(); let mut

Another Async IO Framework based on io_uring

kbio, the Async IO Framework based on io_uring, is used in KuiBaDB to implement async io. Features Support multi-threading concurrent task submission.

Easy to use Rust i18n library based on code generation

rosetta-i18n rosetta-i18n is an easy-to-use and opinionated Rust internationalization (i18n) library powered by code generation. rosetta_i18n::include

Gossip-based cluster membership discovery (SWIM)

Foca: Cluster membership discovery on your terms Foca is a building block for your gossip-based cluster discovery. It's a small no_std + alloc crate t

Provides utility functions to perform a graceful shutdown on an tokio-rs based service

tokio-graceful-shutdown IMPORTANT: This crate is in an early stage and not ready for production. This crate provides utility functions to perform a gr

Generate an HTML page based on a Notion document

Notion Generator Generate an HTML page based on a Notion document! Still a bit of a work in progress, but I am about to actually use it for some actua

Stream-based FSEvents API bindings.

fsevent-stream Stream-based FSEvents API bindings. Features Support directory-granular and file-granular events. Retrieve related file inode with kFSE

A Rust-based tool to analyze an application's heap.

Heap analysis tool for Rust Heap analysis is a pure-Rust implementation to track memory allocations on the heap. Usage Heap analysis provides a custom

Comments
  • x3.33 speedup with async I/O

    x3.33 speedup with async I/O

    • Switch from blocking I2C to async/.await-friendly with DMA
    • Switch delays from blocking to more efficient and async LPTIM-based delays
    • Update defmt to 0.2
    opened by eupn 0
Owner
數字的力量
null
Code for connecting an RP2040 to a Bosch BNO055 IMU and having the realtime orientation data be sent to the host machine via serial USB

Code for connecting an RP2040 (via Raspberry Pi Pico) to a Bosch BNO055 IMU (via an Adafruit breakout board) and having the realtime orientation data be sent to the host machine via serial USB.

Gerald Nash 3 Nov 4, 2022
Serverless setup for activity pub (using lambda+dynamodb) in Rust

Serverless ActivityPub About This is an experiment to have free/cheaper activitypub instances running on AWS (making use of free tiers as much as poss

Conrad Ludgate 3 Dec 30, 2022
Utilities and tools based around Amazon S3 to provide convenience APIs in a CLI

s3-utils Utilities and tools based around Amazon S3 to provide convenience APIs in a CLI. This tool contains a small set of command line utilities for

Isaac Whitfield 47 Dec 15, 2022
A tiling window manager for Windows 10 based on binary space partitioning

yatta BSP Tiling Window Manager for Windows 10 Getting Started This project is still heavily under development and there are no prebuilt binaries avai

Jade 143 Nov 12, 2022
A high level diffing library for rust based on diffs

Similar: A Diffing Library Similar is a dependency free crate for Rust that implements different diffing algorithms and high level interfaces for it.

Armin Ronacher 617 Dec 30, 2022
A low-ish level tool for easily writing and hosting WASM based plugins.

A low-ish level tool for easily writing and hosting WASM based plugins. The goal of wasm_plugin is to make communicating across the host-plugin bounda

Alec Deason 62 Sep 20, 2022
wasm actor system based on lunatic

Wactor WASM actor system based on lunatic. Actors run on isolated green threads. They cannot share memory, and communicate only through input and outp

Noah Corona 25 Nov 8, 2022
a hobby OS for x86_64 based on MikanOS.

a hobby OS for x86_64 based on MikanOS.

algon 22 Dec 29, 2022
Nannou/Rust tutorial based on Schotter by Georg Nees

Schotter (German for gravel) is a piece by computer art pioneer Georg Nees. It consists of a grid of squares 12 across and 22 down with random rotation and displacement that increases towards the bottom.

null 101 Dec 27, 2022
Debug2 is a pretty printing crate based on std::fmt

debug2 is a pretty printing crate based on std::fmt Why not just use Debug The Debug trait is good, but the problem is it is not very good at n

Nixon Enraght-Moony 18 Jun 23, 2022