Skip to the content
PCBKitNew board
4 layers65 × 83.5 mmHRCStepTracker, the printed circuit board in 3D

Fitness Tracker Used in my nonprofit running camp. KiCad Schematics and Code included.

Size
65 × 83.5 mm
Copper layers
4
Thickness
1.6 mm
Parts
6
Nets
37
Pads
56
Tracks, vias
25, 0
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
21 Jul 2026
Updated
21 Jul 2026

Overview

HRCStepTracker is an open-source printed circuit board by darianleo30, from the darianleo30/HRCTracker repository on GitHub. It is a 4-layer board of 65 × 83.5 mm with 6 parts on 37 nets, routed with 25 tracks and 0 vias.

Its parts include 4 ICs, 1 diode and 1 switch. It belongs with the ESP32 and RISC-V boards of this library.

README

README.md

Handheld Cadence Tracker

A responsive handheld walking and running cadence tracker built with an ESP32-C5, an MPU9250-series inertial sensor, and a 128×64 SSD1306 OLED.

The tracker measures rhythmic handheld motion, filters out gravity and orientation changes, validates step timing, and displays both the current and average cadence in steps per minute (SPM). An LED provides immediate feedback whenever a step is detected.

Features

  • 125 Hz accelerometer and gyroscope sampling
  • Orientation-independent handheld motion detection
  • Automatic stillness calibration at startup
  • Adaptive accelerometer and gyroscope thresholds
  • Hysteretic peak detection and false-motion rejection
  • Rhythm locking for more reliable step validation
  • Recovery from an occasional missed step impact
  • Session step counter
  • Average active cadence display
  • Responsive current cadence display
  • Immediate, non-blocking LED step indication
  • OLED and sensor access coordinated to protect sample timing
  • No button required

Display

During tracking, the OLED shows:

  • AVG SPM: Average cadence across accepted active step intervals
  • NOW: Smoothed current cadence
  • STEPS: Total confirmed and recovered steps
  • MOT: Live motion-strength indicator
  • AVG CAD / AVG SEEK: Whether a stable walking or running rhythm has been established

Pauses and rejected hand movements are not included in the average cadence. The average remains available if rhythm lock is temporarily lost.

Hardware

  • ESP32-C5 development board
  • MPU9250, MPU9255, or MPU6500 motion sensor
  • 128×64 SSD1306 I²C OLED at address 0x3C or 0x3D
  • Indicator LED
  • 220–330 Ω LED resistor
  • Jumper wires or a custom PCB

Wiring

The firmware defaults to the original split-bus wiring below.

DeviceSignalESP32-C5 pin
OLEDSDAGPIO23
OLEDSCLGPIO24
MPUSDAGPIO25
MPUSCLGPIO26
LEDAnode through 220–330 Ω resistorGPIO2
LEDCathodeGND

Connect the ESP32-C5, OLED, and MPU grounds together. Power each module using the voltage supported by the specific breakout board being used.

The ESP32-C5 has one high-performance I²C controller that can be routed to the arbitrary GPIO pins above. The firmware therefore locks the controller during an OLED transfer, selects the OLED pins, transmits one frame, restores the MPU pins, and releases the sensor task. The display refresh is limited to 2 FPS so these interruptions remain short and infrequent.

Firmware requirements

The MPU is configured directly through its registers. A separate MPU9250 Arduino library is not required.

Installation

  1. Install the Espressif ESP32 board package in Arduino IDE.
  2. Install Adafruit GFX Library and Adafruit SSD1306 using Library Manager.
  3. Open cadence_tracker_screen_average.ino.
  4. Select ESP32C5 Dev Module as the board.
  5. Select the correct serial port.
  6. Compile and upload the sketch.

The firmware has been compile-tested with the following board identifier:

text
esp32:esp32:esp32c5

Using the tracker

  1. Turn on or reset the tracker.
  2. Confirm that the LED flashes three times during its startup test.
  3. Hold the tracker completely still while the calibration screen reaches 100%.
  4. Hold the tracker naturally and begin walking or running.
  5. The first valid motion flashes the LED immediately.
  6. Two plausibly timed detections establish rhythm lock and begin the cadence display.

If the device moves repeatedly during calibration, the stable calibration window restarts automatically.

How cadence is calculated

The accelerometer magnitude is used so detection does not depend on the orientation of the device. A slow baseline removes gravity and gradual hand orientation changes. Filtered gyroscope motion then corroborates the acceleration signal.

Candidate peaks must satisfy motion-strength, timing, and refractory-period checks. After rhythm lock:

  • Recent accepted intervals produce the responsive NOW cadence.
  • All accepted active intervals produce the session AVG SPM cadence.
  • A gap near two expected periods can recover one weak or missed impact.
  • Pauses and rejected peaks do not lower the active-cadence average.

Configuration and tuning

The default values are intended as a balanced starting point for handheld walking and running. Test the tracker before changing them.

Useful constants near the top of the sketch include:

ConstantPurpose
SENSOR_PERIOD_MSSensor sampling interval
DISPLAY_PERIOD_MSOLED refresh interval
MIN_STEP_INTERVAL_MSMaximum allowed cadence
MAX_STEP_INTERVAL_MSMinimum cadence used while seeking rhythm
PEAK_TRIGGER_SCOREMotion strength required to open a candidate peak
PEAK_RELEASE_SCOREHysteresis level used to finish a peak

For missed real steps, reduce the lower acceleration-threshold clamp slightly. For false steps caused by ordinary hand movement, increase PEAK_TRIGGER_SCORE in small increments. Change only one value at a time and test at multiple walking and running speeds.

KiCad hardware files

KiCad design files for the custom cadence-tracker hardware will be added to this repository. The planned hardware release includes:

  • KiCad project file (.kicad_pro)
  • Schematic (.kicad_sch)
  • PCB layout (.kicad_pcb)
  • Component and connector details
  • Fabrication outputs and a bill of materials when available

A recommended repository location is:

text
hardware/
└── kicad/
    ├── handheld_cadence_tracker.kicad_pro
    ├── handheld_cadence_tracker.kicad_sch
    └── handheld_cadence_tracker.kicad_pcb

Until those files are uploaded, the wiring table above is the reference for building the prototype.

Suggested repository structure

text
.
├── cadence_tracker_screen_average.ino
├── README.md
├── hardware/
│   └── kicad/                 # KiCad files will be added here
└── docs/                      # Optional photos and build notes

Troubleshooting

OLED remains blank

  • Confirm SDA is connected to GPIO23 and SCL to GPIO24.
  • Confirm the OLED is an I²C SSD1306 display.
  • Check whether its address is 0x3C or 0x3D; the firmware tries both.
  • Verify common ground and the module's supply voltage.
  • Open Serial Monitor at 115200 baud and check for OLED not found.

Tracker stays on the calibration screen

Place it on a stable surface or hold it completely still. Sustained movement intentionally restarts calibration.

Cadence remains blank

The tracker needs two plausibly timed motion peaks before rhythm lock. Confirm that the LED responds while walking naturally.

MPU initialization fails

  • Confirm SDA is connected to GPIO25 and SCL to GPIO26.
  • Check power and ground.
  • The firmware checks MPU addresses 0x68 and 0x69 automatically.

No license has been selected yet. Add a LICENSE file before distributing or accepting contributions if you want to define reuse terms explicitly.

Parts

6
QtyValueFootprintReferences
1ESP32-C5-DevKitC-1PCM_Espressif:ESP32-C5-DevKitC-1U4
1LEDLED_THT:LED_D4.0mmD2
1SW_PushButton_Switch_THT:SW_PUSH_6mm_H4.3mmSW2
1~HRCStepTrackerFootprints:SSD1306U5
1~HRCStepTrackerFootprints:TP4056U1
1~HRCStepTrackerFootprints:MPU6500U6

Questions

How big is the HRCStepTracker PCB?

It measures 65 × 83.5 mm and has 4 copper layers, 1.6 mm thick.

What parts does the HRCStepTracker use?

6 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the HRCStepTracker KiCad files?

From the darianleo30/HRCTracker repository on GitHub, at the commit this page was made from: the board is HRCStepTracker.kicad_pcb and its schematic HRCStepTracker.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the HRCStepTracker design in my own project?

Its repository states no licence, so its author keeps all rights: ask darianleo30 before reusing the design.

Similar boards

  • 4 layers37.1 × 61.5 mmMCLZ8 PCB, the printed circuit board in 3D

    MCLZ8 PCB

    MicroCoreLabs/Projects

    Ted Fried's MicroCore Labs Projects - FPGA CPU cores and emulators for the 8088, 8086, 8051, 6502, 68000, Z80, Risc-V, and also Typewriter and EPROM Emulator projects.

    6 parts534
  • 4 layers15.6 × 51.4 mmHyperram 3p3v, the printed circuit board in 3D

    Hyperram 3p3v

    loxodes/vna

    Under development open hardware microwave vector network analyzer

    6 parts205
  • 4 layers37 × 27 mmProbecard pinheader, the printed circuit board in 3D

    Probecard pinheader

    azonenberg/starshipraider

    Open hardware test equipment

    6 parts193BSD-3-Clause
  • 4 layers312 × 111.2 mmPCIexpress x1 full, the printed circuit board in 3D

    PCIexpress x1 full

    lucanastasio/PCIexpress-KiCad

    PCI express libraries and templates for KiCad

    6 parts170
  • 4 layersEsp32s3 Wroom 1, the printed circuit board in 3D

    Esp32s3 Wroom 1

    BerkeleyHCI/PolymorphicBlocks

    A Python-based hardware description language for PCBs for higher-level (block-diagram / system-architecture level) PCB design through libraries of directly reusable subcircuit generators.

    6 parts94BSD-3-Clause
  • 4 layers29.4 × 22.1 mmAssembly power, the printed circuit board in 3D

    Assembly power

    buganini/Kikakuka

    Kikakuka — KiCad Workspace, Panelization, Build Variants, Differ & FreeCAD PCB Bending and Assembly

    6 parts81MIT
  • 4 layers30.2 × 40.6 mmMicrostrip width nightly, the printed circuit board in 3D

    Microstrip width nightly

    matthuszagh/fmcw

    6GHz frequency-modulated continuous-wave radar with real-time range detection

    6 parts66Apache-2.0
  • 4 layers149.9 × 99.1 mmArchimedes bus scope, the printed circuit board in 3D

    Archimedes bus scope

    google/myelin-acorn-electron-hardware

    Phillip Pearson's retro hardware projects for the Acorn Electron

    6 parts59Apache-2.0