A basketball can't tell a player how well a session went โ the ball just bounces, and everything about the session lives in the player's memory or a coach's notes. A client came to us wanting to change that: a motion-tracking device small enough to live permanently inside a basketball, capable of recognising a real dribble, reading shot speed and angle, and reporting all of it live to a companion app.
We took the project end to end โ from an initial dev-board prototype through a miniaturized custom PCB sized to the client's ball cavity, the on-device motion logic, and the companion mobile app. It shipped and has been in use since 2023. This case study walks through how it came together, and where the honest limits of the detection sit.



The brief was to embed real intelligence inside a basketball โ not strap a sensor to the outside of one. That constraint shapes everything else. The electronics had to fit inside a cavity the client had already fixed the dimensions of, with no room to negotiate for a bigger board. They had to survive being embedded in a ball that gets thrown, dribbled, and dropped. And the device had to run for long stretches without attention, which meant it couldn't stay powered on and draining its battery between uses.
On top of the physical constraints sat a harder problem: telling a dribble apart from everything else a basketball does in a player's hands. A ball in play generates motion constantly โ shots, passes, catches, repositioning โ and the device had to isolate the one pattern, a genuine dribble, from all of that noise, using only an onboard IMU and no external reference.
The result is a self-contained ESP32 and IMU device, mounted inside a custom rubber enclosure sized to sit inside the ball cavity, that detects dribbles, shots, and spin on-device, wakes itself on the first dribble, and reports live telemetry to a companion mobile app.
The electronics are built around an ESP32 paired with an MPU6050 inertial measurement unit, which provides the accelerometer and gyroscope data the device uses to characterise ball motion. Development started on an ESP32-WROOM-32E module โ a full-size, easy-to-instrument board that let us get the detection logic working before worrying about size at all.


Getting from that dev board to a board that could actually live inside a basketball was its own project. The client gave us the internal cavity dimensions of the ball and nothing else โ no target board size, just the space we had to work within. We stripped the design down to a bare ESP32 build and sized it to fit that cavity with a bleed margin, landing on a final board roughly the size of a watch face.

That final board sits in a custom rubber enclosure designed to hold it securely inside the ball cavity and absorb the repeated impact of normal play. Final assembly โ board into enclosure, enclosure into ball โ was done at a manufacturing partner, and finished units were shipped to the client from there.


The core of the device is the logic that tells a real dribble apart from everything else the ball does. It works by tracking the vertical-axis motion peak on every bounce: a genuine dribble produces a repeating, consistent peak height, bounce after bounce. That repetition is the signal. A shot, a pass, or a player repositioning the ball in-hand produces motion too, but not that same rhythmic, consistent pattern โ so those get filtered out rather than miscounted as dribbles.
The same IMU data is also used to track shot speed, shot angle, and rotation or spin, all computed on-device and passed to the companion app rather than left as raw sensor output.
Live testing demo of the dribble tracker in the ball
A device embedded permanently inside a ball can't be switched on by hand before every session, and it can't be left running continuously between uses either. The device ships in sleep mode and wakes on the first dribble it detects, so it draws essentially nothing while the ball is sitting still and only becomes active once play actually starts. That wake-on-motion approach is the same kind of power-management decision that shows up across our low-power wearable work โ keep the device dormant until there's a real signal worth acting on.

The companion app displays the telemetry the device computes on-board: speed in metres per second, rotation count, max angle, and max speed for the session. It also breaks down shooting performance into a swish percentage, split by close-range, midrange, and long-range zones, so a player can see not just whether a shot went in but from how far.

Alongside the live stats, the app includes gamified challenge modes โ time-based challenges and custom challenges built around a goal counter โ that turn the raw telemetry into something a player has a reason to keep opening the app for.
In testing, dribble detection came in at roughly 80% โ correct in about 8 out of 10 dribbles โ with a few seconds of detection latency. Rotation and spin detection came in noticeably higher, at roughly 95%.
| Signal | Character | Measured accuracy |
|---|---|---|
| Rotation / spin | Near-continuous once the ball is moving | ~95% |
| Dribble | Brief transient, must be told apart from shots and grip noise | ~80% |
Figures are from our own testing, not vendor datasheets.
The gap between the two isn't a polish gap โ it reflects the underlying detection problem. Spin is a predictable, near-continuous signal once the ball is in the air or rolling, which makes it comparatively straightforward to read. A single dribble is a brief transient event that has to be distinguished from a shot, a pass, or ordinary bounce-height variation, and that's a genuinely harder signal to classify reliably.
The finished device shipped and has been deployed since 2023 โ a working, wake-on-dribble tracker embedded inside a basketball, delivering roughly 80% dribble detection accuracy and roughly 95% rotation accuracy, with live speed, angle, rotation, and shooting-percentage telemetry surfaced through a companion app. It's a real, in-use product, not a prototype sitting on a shelf.
This was a constrained-embedded-hardware problem before it was a basketball problem. Sizing a board down to a cavity we didn't get to define, classifying motion reliably on limited hardware, managing power with a wake-on-motion design, and pairing all of it with a real-time companion app are the same challenges that show up across sports and motion-tracking hardware generally. The basketball is the specific application here; the underlying capability is embedded firmware, custom PCB miniaturization, IMU-based motion sensing, and connected mobile apps.
That's the work we do end to end. This one leaned heavily on ESP32 firmware and IMU sensor development , and sits within our broader electronics and embedded software development practice โ see more of our sports tech product development work. If you have a motion-tracking or sports hardware idea that needs to go from constraint to shipped product, that's exactly the path we build.
Whether you need a custom ESP32 and IMU sensor build, on-device motion classification, or a real-time companion app, DigitalMonk can help turn your idea into a production-ready product.