RPECalc

This project involves the development of a monitoring system for weightlifting exercises. The primary objective is to accurately measure and analyze the dynamics of weightlifting reps, including the acceleration, time, average acceleration, final velocity, and power output of each rep. The system autonomously initiates rep monitoring when significant movement is detected and logs crucial metrics for each rep, aiding athletes in tracking and optimizing their performance. The project also involved creating a web interface using React, Node.js, and CSS to visualize and interpret the collected data.

Technologies used:

  • BBC micro:bit
  • Python
  • Javascript
  • HTML
  • CSS
  • Node.js, Express
  • React (JavaScript ES6)

Client

Myself

Type

Personal project

Year

2024

Process

This project aims to create a device that harnesses the principles of Velocity-Based Training (VBT) and the Rate of Perceived Exertion (RPE) scale to provide athletes with real-time, actionable data to optimize their training regimen. Below is an outline of the core concepts and the planned approach for implementing this device.

Understanding RPE and VBT:

Rate of Perceived Exertion (RPE):

  • RPE is a widely used scale to measure the intensity of an exercise. It's based on the perception of effort, discomfort, and fatigue during physical activity.
  • The scale ranges typically from 1 to 10, where:
  • RPE 10 corresponds to a maximal lift (no repetitions left in the tank).
  • RPE 1 corresponds to an extremely light effort (many repetitions left in the tank).
  • The RPE scale helps athletes train at the right intensity depending on their training phase and goals.

Velocity-Based Training (VBT):

  • VBT is a training approach where the focus is on the velocity of the lift rather than the weight lifted.
  • It’s grounded in the principle that there is a relationship between the velocity of a lift and the corresponding RPE. For example, a slower lift (lower velocity) typically indicates a higher RPE.
  • VBT allows for dynamic adjustment of training load based on the athlete's performance on a day-to-day basis. If an athlete is lifting at a higher velocity than expected, the load can be increased, and vice versa.

Project Plan:

RPE Tracking:

  • The device will utilize the micro:bit's accelerometer to track the velocity of each rep during a lift.
  • By measuring the time and acceleration, the device will calculate the velocity and subsequently estimate the RPE based on predefined velocity thresholds (e.g., .3m/s corresponds to RPE 10, .75 m/s to RPE 8, etc.).
  • This method allows the athlete to understand the intensity of each lift in real time and adjust their training load accordingly.

Power/Force Output Tracking:

  • Alongside RPE, the device will calculate the power output of each lift, providing a comprehensive view of the athlete's performance.
  • The calculations for force, work, and power will be based on:
  • Force = Mass × Gravity = 20 kg × 9.81 m/s² = 196.2 Newtons
  • Work = Force × Distance = 196.2 N × 1 m = 196.2 Joules
  • Power = Work / Time = 196.2 J / 2 s = 98.1 Watts

Goals:

This project aims to create an RPE tracking device that empowers athletes by providing real-time data on RPE and power output during their training sessions. This tool will be used to optimize training programs, ensuring athletes train at the correct intensity and load to maximize performance and minimize the risk of injury.

Link to Documentation

Outcome

Overall Features:

  • Automatic Rep Detection: The system automatically starts monitoring a rep based on detected acceleration, removing the need for manual initiation.
  • Acceleration Tracking: Captures acceleration data at regular intervals throughout the lift for detailed analysis.
  • Dynamic Metric Calculation: Calculates key metrics for each rep, including average acceleration, final velocity, and power output.
  • Data Logging: Logs detailed information for each rep, including acceleration data points, computed metrics, and timestamps.
  • Stability Detection: Utilizes a stability period to accurately determine the end of a rep, ensuring that data logging is precise and representative of the complete rep.

Technical Challenges:

Accurate Detection of Lift Phases:

  • Precisely detecting the start and end of each rep posed a significant challenge. Ensuring that the timer only started during the ascent phase of the lift required careful analysis and interpretation of the acceleration data.

Managing Data Sampling Rate:

  • Balancing the frequency of data sampling with the micro:bit's processing and memory limitations was crucial. Finding an optimal sampling rate that provided detailed data without overwhelming the micro:bit's resources was a complex task.

Algorithm for Detecting Rep Peak:

  • Developing an algorithm to reliably detect the peak of the lift, which signifies the transition from the downward to the upward phase, required extensive testing and refinement.

Eliminating False Triggers:

  • Ensuring that the system did not mistakenly start tracking a rep due to random movements or noise in the acceleration data required the implementation of a robust activation mechanism based on specific acceleration thresholds.

React Component Interactions:

  • Understanding and implementing interactions between React components posed challenges, especially when passing data between parent and child components. Figuring out useState and how to implement that and useEffect posed a challenge as well. Formatting the graph correctly also took logic for how to display results clearly.

CSV Parsing in Node.js:

  • Learning to read and parse CSV files in Node.js required overcoming initial hurdles. Integrating this functionality into the project was crucial for interpreting Microbit results. Initially, there were many issues in selecting only the important information, so I had to configure the method to cater to just the categories that were needed.

Real-time Microbit Data Handling:

  • Node.js's asynchronous nature was initially challenging when handling real-time data from the Microbit. Implementing smooth data flow and communication was a significant learning curve. It was helpful in learning how to run a local server to eventually move to Github.

Styling Challenges:

  • Achieving the desired aesthetics using CSS alongside React components required mastering the intricacies of styling in a React environment. It was meticulous because it required grouping assets together and knowing how different aspects of the website would work together to create a cohesive theme.

Conclusion:

In conclusion, this project successfully harnessed the capabilities of the BBC micro:bit to create an innovative and highly effective tool for Velocity-Based Training (VBT) in weightlifting. Through meticulous programming and rigorous testing, the device was refined to accurately track and analyze the dynamics of weightlifting reps. The final product offers a web interface that not only visualizes Microbit data but also provides real-time measurement of key performance indicators such as acceleration, velocity, and power output, providing athletes with invaluable insights into their training.

The journey of the project involved overcoming various challenges, from understanding the nuances of the micro:bit's accelerometer to devising a user interface. The result is a sophisticated yet user-friendly system that autonomously initiates monitoring when a rep begins, precisely calculates the average acceleration during the lift, and derives the final velocity and power output, all without the need for manual intervention or button presses.

Other work