For a lot of people, games are anything but fun and games. From the professional athlete to the weekend warrior, the pressure to perform, compete, and win can be intense. At the highest levels of competition, the difference in skill level between competitors may be negligible, so it is important to seize on any possible advantage. A good coach can help in this regard by monitoring an athlete’s performance and rooting out any bad habits that may be holding him or her back.
That may be a good approach for the professional athlete who can afford such a luxury, but not for the person that is just trying to get the best of their friends in their free time. Moreover, even the best coach is only human. As such, just like anyone else, they are likely to miss quick actions that take place on the millisecond scale. People are also prone to subjectivity in their observations and assessments, which can further cloud their judgement at times.

A smarter solution
A highly accessible and completely objective training aid recently developed by machine learning enthusiast Samuel Alexander has the potential to transform how athletes, both professional and amateur, train. Alexander’s work focused on table tennis, although similar techniques could be applied to a wide variety of sports.
As an amateur table tennis player, Alexander noticed that some days his technique felt better than others. However, he wasn’t sure if this was due to actual improvements in his abilities, or if it was just reflective of his level of confidence in himself on any given day. To find out, he built a smart table tennis paddle. By collecting and analyzing hard data, the paddle provides important insights that can be leveraged to assess and improve one’s skills.
To prove the concept, Alexander decided to start by tracking the specific types of strokes made by a player in real-time. This would require a special, instrumented paddle that could capture highly accurate motion information, and a data analysis pipeline to analyze and classify the data in real-time. The system would also need a means of providing instant feedback to the player to allow for corrections where needed.
From idea to implementation
After giving these requirements some thought, Alexander selected an Arduino Nano 33 BLE Sense Rev2 development board for the project. It has a tiny form factor, yet comes equipped with the inertial measurement unit required for precise motion tracking. The onboard processor running at 64MHz is quite capable for most tasks, but is not very powerful when it comes to running a machine learning algorithm. Since Alexander planned to use a machine learning classifier for stroke recognition, he chose Edge Impulse, which makes it simple to shrink powerful classifiers down to a size that microcontrollers like this Arduino won’t choke on.

Alexander created a 3D-printed handle and attached it to a standard table tennis paddle. The handle housed the Arduino, a battery, and a small, 128×32-pixel OLED display for instant feedback. He also developed a simple phone app to collect a dataset to train the machine learning model as he practiced with the paddle.
After collecting data for five different types of strokes, as well as an idle state, it was uploaded to Edge Impulse Studio using the Data Acquisition tool. The data labels were automatically assigned to each data point based on the names of the uploaded files, then the tool split the data into training and testing sets.
Is that your best backhand?
As a next step, Alexander created an impulse. The impulse defines how data is processed from the moment the sensor produces it until a prediction is made by the model. For preprocessing, Alexander specified that the input stream is time series data that should be analyzed in 500ms chunks. Each chunk undergoes a spectral analysis to help surface the most informative features. The features are fed into a neutral network classifier that determines the likelihood that any given observation belongs to a specific class.

At this point, the model’s hyperparameters, such as the learning rate, were tuned. Alexander also configured the EON Tuner and quantization options to ensure that the final model would fit comfortably within the constraints of the Arduino board. Finally, the model training process was kicked off with the click of a button. Training accuracy exceeded 96%, and a further test using data that was not included in the training process confirmed that everything was working well.
Now your paddle is your coach
With the classifier ready to go, Alexander needed to get it running on the hardware. This was accomplished by exporting the impulse as an Arduino library. This is the perfect option to use when further customization of a project is needed. In this case, the predictions made by the model were displayed on the paddle’s onboard display to provide the player with instant feedback.

Thanks to the efficiency of the Arduino Nano 33 BLE Sense Rev2 board and the classification algorithm, the battery lasts long enough for extended training sessions. The instant feedback lets players know if their form is spot on, or if some adjustments need to be made. And all of this is now possible without high costs or the subjectivity that plagued assessments in the past.
If you have a few spare hours, you could easily make your own smart table tennis paddle. Or, if your game is golf, baseball, or basketball, you could get creative and make a few adjustments to suit your needs. Whatever direction you plan to go, check out Alexander’s project write-up as a first step. It will help to set you on the right course (or court, diamond, or field, for that matter).