Tennis Buddy
About the project
Tennis Buddy is your personal Tennis Trainer
Tennis Buddy lives snuggly inside your racket and he both feels and listens to you playing tennis. Based on a simple calibration protocol he knows how hard you hit, the orientation you hit, and if you hit the sweet spot.
How?
Inside Tennis Buddy are two seperate IMUs, one is always feeling the motion and keeps constant track of the racket, one is only active during high g impacts. The high G IMU knows how hard you hit while the low G IMU knows where you hit. Inside Tennis Buddy is also a microphone, the microphone uses a local running ML model to work out if you hit the sweet spot. It is trained off specific drops during the calibration phase
Why?
Tennis Trainers are very expensive and we aim to make that cheaper. In a commercial product each Tennis Buddy would cost under $100 which is about an hour of a trainers time. Tennis buddy uses Gemma AI to take the place of a pro Trainer to give you personalised feedback all running locally on your device, this keeps privacy paramount and responses fast and light
The Math!
Tennis Buddy tracks the racket with a Mahony filter, which integrates the gyro 1,000 times a second into a quaternion and only lets the accelerometer correct tilt when the racket is nearly still, because fast swings drown out gravity. When the high-G accelerometer sees a spike of more than 8 g in under 3 ms during a fast swing, Tennis Buddy treats it as a hit and turns the motion into numbers: swing speed is angular speed × swing radius, ball speed comes from a coefficient-of-restitution model, and side-to-side hit position comes from the jump in roll rate at contact. Tip-versus-throat position comes from how much the frame rings (120–250 Hz) and which way the handle kicks. At the same moment, the microphone captures a 32 ms clip of the hit, measures 8 frequency bands with Goertzel filters plus 4 timing features (how long the sound rings, how sharp the attack is, its pitch and its peakiness), and feeds those 12 numbers into a tiny 370-parameter neural network that runs on the ESP32 itself and says whether you hit the sweet spot and, if not, roughly what percentage of the way toward the frame.
Built with
AI tools
Prize Categories Entered
- Submitted
Best Use of Gemma 4
- Submitted

Best Open-Source AI Project
- Event prizeSubmitted
Hacktoberfest Overall Winner