A universal force and velocity sensing hangboard mount with exercise timers for all hangboards.

Why a universal smart hangboard?

Nowadays smart hangboards are becoming more and more popular. But there is little market for commercial products (they are expensive). All existing hangboard training apps have limitations (i.e. payed subscriptions, limited to specific hangboards, buggy, sketchy to create new or custom training plans). In the recent years there have been a couple of attempts to create hombrew smart hangboards (i.e. [PiClimbing] and [ArduinoHangboard]).

This was motivation for me to learn new technologies and build an own smart hangboard - which is easy to reproduce for others.

Smart Hangboard
Figure 1. Smart Hangboard

What you need

  • Any hangboard (large list of supported hangboards below).

  • A Raspberry Pi, force sensors and some basic skills to setup the software backend (no automation so far).

  • Basic skills to create a board mount with the force sensors.

  • Any mobile device (iOS / Android / WebApp) and some basic skills to deploy the debugging app (no Store so far)

Tip
Further information can be found in the repository: github.com/8cH9azbsFifZ/hangboard.

Features

  • Smart exercise timer - easily customizeable

  • Uses preexisting exercise files - easily extendable

  • Measures hangtime, applied force, rate-of-force development, maximal load

Smart Hangboard App
Figure 2. Smart Hangboard App

List of implemented hangboards

  • Beastmaker 1000

  • Beastmaker 2000

  • Cliffboard Mini

  • Crusher 3

  • Linebreaker Base

  • Metolius Prime

  • Metolius Project

  • Metolius Simulator 3D

  • Metolius Wood Grips 2 Compact

  • Monster

  • Mountain Rocks

  • Redge Port

  • Roots Baseline

  • Simond Ballsy Board

  • Topout Project

  • Zlagboard Evo

  • Zlagboard Mini

Tip
Your hangboard is not supported yet? It can be added easily. Just open a ticket: github.com/8cH9azbsFifZ/hangboard/issues/new
Note
Most of the boards configuration has been merged from the excellent project [Boards].

Software Design

This is a brief design layout of the project.

Frontend

  • Web client (Running on the backend Raspberry Pi)

  • iOS App

  • Android App

Backend

  • Running on a Raspberry Pi.

  • Communicating to the frontend using MQTT.

  • The default hostname for the MQTT broker is "hangboard". Modification is possible in backend and frontend with a variable so far.

The class documentation of the backend services can be found here: 8ch9azbsfifz.github.io/hangboard/backend-doc/index.html.

Software Used

  • Flutter for the frontends

  • Python backends

  • MQTT for Communication

  • JSON for Board configuration and finger grip positions

  • SVG Layers for hold configuration (will be converted to PNG in a cache, as flutter has no native SVG support)

Developing the software

For preparation install the following software: - Install dependencies on raspi: sudo apt-get install libxslt-dev - Install flutter and configure correct paths - Prepare the virtual python environment ` python3 -m venv venv source venv/bin/activate python3 -m pip install -r backend/requirements.txt ` - Install a fresh raspian on a SD card, put the corresponding wpa_supplicant.conf into the boot folder - ready for SSH :)

Software documentation

  • For manual documentation (manual creation): install brew install asciidoctor and create the PDF cd doc; asciidoctor-pdf Manual.adoc

  • Documentation of the backend software can be created using doxygen (cf. Doxyfile).

  • The documentation is automatically generated using a commit hook on github and published on gh-pages.

For manual startup: - Start backend service cd backend; python3 ./run_ws.py - Start the iOS / Android / Web App: cd flutter_hangboard && flutter run

API (MQTT)

The documentation of the backend API can be found here: 8ch9azbsfifz.github.io/hangboard/api/index.html .

  • AsyncAPI for documentation of the API

  • For manual generation install npm install -g @asyncapi/generator and run cd backend ; ag asyncapi.yaml @asyncapi/html-template -o ./docs

  • If you want to run MQTT locally on the raspi run sudo apt-get -y install mosquitto

Add App Icon

The application icon is located under assets/icon. The backgound source code image has been created using ray.so. - The PNG can be converted to icon sets using this tool: appicon.co/ .

For iOS follow these steps to configure the application icon: - Start Xcode open ios/hangboardapp.xcworkspace - On the root directory click on the folder named Images.xcassets. - Import a new IconSet

Hardware Design

  • Raspberry Pi Zero W

  • Sensors: as listed below

All sensors can be wired at once following this schema:

Hangboard wiring - all sensors
Figure 3. Hangboard wiring - all sensors

Force Sensors with HX711

Load cells are available widely with the HX711 signal amplifier module as a package [HX711LoadCellPackage]. We will use one of these packages as the force measurement sensors. The python module [HX711PythonModule] is slightly modified and contained in the backend sources.

The HX711 with 4 load cells
Figure 4. The HX711 with 4 load cells
Note
Some HX711 modules have a wrong grounding according to the application sheet: github.com/bogde/HX711/issues/172. This can be fixed with a small solder bridge.
The HX711 Fix
Figure 5. The HX711 Fix

Wire the HX711 module to the Raspberry Pi as follows:

Raspi GPIO Module Module Pin

3v3

HX711

Vcc

GPIO17

HX711

DT

GPIO27

HX711

SCK

Wire the 4 load cells as follows (according to the application sheet):

Wiring four load cells
Figure 6. Wiring four load cells

Getting rid of the noise

As measured in <[LPFvsKalman]>: using a Low Pass Filter (moving average) is equivalent to a Kalman filter for HX711.

Mounting the load sensors

Mounting the load cells in a zlagboard

  1. Disassemble the 4 screws and the gyroscope mount

  2. Place the 4 load cells at bottom

  3. Create small "U-shaped" holds for the load cells (i.e. made from paper)

Zlagboard disassembled
Figure 7. Zlagboard disassembled
Zlagboard with load cells
Figure 8. Zlagboard with load cells
U-Shaped load cell mount
Figure 9. U-Shaped load cell mount
Note
Gyroscope mount disabled after placing the load cells…​

Mounting the load cells for any existing hangboard

Any hangboard can be mounted on a wooden construction with the 4 load cells in between. This will provice force measurements for any existing hangboard.

An example construction of a hangboard mount is given here: Mount for Isometrix Board [ArduinoHangboard].

Mount for Isometrix Board
Figure 10. Mount for Isometrix Board [ArduinoHangboard]

Gyroscope Sensor: MPU-6050

Without further modifications a gyroscoope sensor can be mounted on an existing Zlagboard. Hangs can be measured with the gyroscope, too. We will use the widely used MPU6050 package [MPU6050Datasheet] with excellent documentations [MPU6050GettingStarted]. Obviously there will be noise in the measurements, so for accurate measurements in our setup a kalman filter is implemented in the backend, based on this implementation [MPU6050KalmanFilter].

Caution
Force measurements are not possible without the load cells.
Note
Modules with BLE are existing for further / future developments [MPU6050BLEVersion].
Sensor MPU-6050
Figure 11. Sensor MPU-6050

Wire the Gyroscope sensor to the raspi as follows:

Raspi GPIO Module Module Pin

Pin 1 (3.3V)

MPU 6050

VCC

Pin 3 (SDA

MPU 6050

SDA

Pin 5 (SCL)

MPU 6050

SCL

Pin 6 (GND)

MPU 6050

GND

For getting started with the software for the Gyroscope, follow these steps

  1. Enable I2C I/O sudo sed -i 's/\#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt

  2. Load the user space module grep i2c-dev /etc/modules ||echo i2c-dev |sudo tee -a /etc/modules

  3. Install I2C tools sudo apt-get -y install i2c-tools

  4. Reboot sudo reboot

  5. Check whether 68 exists in sudo i2cdetect -y 1 | grep 68

Distance sensor HC-SR04

Warning
This sensor is not yet fully implemented in the backend.

For measuring distances (i.e. for pullups) we will use a HC-SR04 ultrasonic distance sensor [HCSR04Package]. There is excellent documentation on how to getting started [HCSR04GettingStarted]. For accurate measurements a kalman filter is implemented in the backend based on [HCSR04KalmanFilter]. More information also can be found in [KalmanHCSR04].

Other alternatives are <[VelocityBraincoder]>.

Sensor HC-SR04
Figure 12. Sensor HC-SR04

Wire the distance sensor to the raspi as follows:

Raspi GPIO Module Module Pin

Pin 2 (VCC)

HC-SR04

VCC

Pin 6 (GND)

HC-SR04

GND

Pin 12 (GPIO18)

HC-SR04

TRIG

R1: 330Ω

ECHO

Pin 18 (GPIO24)

R1: 330Ω

R1: 330Ω

R2: 10kΩ

Pin6 (GND)

R2: 10kΩ

Training plans, Workouts, Exercises and Sets

The following definitions will be used:

Training Plan

A series of workouts, usually executed with at least of one day rest in between.

Workout

A series of exercise sets.

Excercise

A single exercise, i.e. hang, maximal hang, pull up, assisted pull up.

Set

A set of exercises with Repetitions, Pause between the exercises and a rest to start pause.

Workout files

TODO

Creating a custom workout based on MVC

Once you have measured your MVC, you can create a custom workout using the script: exercises/mvc_workout_creator.py.

Measurements, their definitions and what to learn from them

The following values are measured. For more informations on their meaning refer to the papers given in the references. TODO

MVC

Maximum Voluntary Contraction TODO

RFD

Rate of force development (N/s) TODO

FTI

Force-Time-Integral TODO

Average Load

TODO

Maximal Load

TODO

Load Loss

TODO

Load

TODO

Evaluations of the measured data

From the MVC we can estimate the maximal boulder grade according to [] using the script in evaluations/estimate_bouldergrade_from_mvc.py.

Here are some first test measurement data sets. The test has been conducted with a hang, one handed pulls, a fast and a slow pullup. The data and evaluation scripts can be found in the directory evaluations.

Measurement of Load (Test 1)
Figure 13. Measurement of Load (Test 1)
Measurement of average Load (Test 1)
Figure 14. Measurement of average Load (Test 1)
Measurement of maximal Load (Test 1)
Figure 15. Measurement of maximal Load (Test 1)
Measurement of Load loss (Test 1)
Figure 16. Measurement of Load Loss (Test 1)
Measurement of FTI (Test 1)
Figure 17. Measurement of FTI (Test 1)
Measurement of RFD (Test 1)
Figure 18. Measurement of RFD (Test 1)

Hangboards

For every hangboard supported there is a JSON file containing the hold names and dimensions and an SVG image with all the holds.

Luckily there is a similar project and lots of configurations are already implemented [Boards]. These boards have been merged to this repository. Measuring a hangboard is lots of work, i.e. [Beastmaker1000HoldSizes].

Implement new board configurations

  • Install inkscape brew install inkscape

  • Create a new board json file

  • Use inkscape with layers for overlay image creation

  • Edit layer "id" names manually afterwards in any editor

  • change all style:: display:inline ⇒ inline

  • Use colors: 979797 and d8d8d8

  • Export layers as svg: github.com/james-bird/layer-to-svg (cf. boards directory)

  • Change colors of overlays to: d8d8d8 → 979797

  • Export all layers as svg and convert them to png (i.e. svgtopng.com/de/)

  • Conversion to PNG for all permutations can be done using the backend/generate_all_board_images.py script.

  • Put all PNG images to flutter_hangboard/images

References