Mechatronics Case Study
A Tennis Rally, Played by Stepper Motors
Our take on the course's 2.5 degrees of freedom assignment: a Cartesian machine that carries a tennis ball back and forth over a miniature net, replaying a programmed rally. The motion is computer controlled in x, y, and z, and the structure is 3D-printed parts riding on T-slot rail.
The Goal
Build a device that moves in the x, y, and z directions using stepper motors under full program control. Instead of a plain demo rig, we gave the motion a story: a tennis court where the ball travels side to side over the net, simulating match play with roughly eight distinct shots per rally.
I coordinated the project and led the design and build, which on a 6-week accelerated schedule mostly meant making sure printing, assembly, and motion programming never had to wait on each other.
Watch the Final Rally
Nineteen seconds of the finished machine playing out its programmed rally.
Nine Parts, All Ours
Every custom component was modeled in SolidWorks and 3D-printed: motor brackets for each layer, the tennis-ball attachment, pin and bar holders, the net, and its stand. The holders slide along 20 × 20 mm T-slot rails while clamping the GT2 timing belts that transmit motion.
Early prints flexed and bound up on the rails, so we raised the print quality and infill density until the parts were stiff enough to travel smoothly under load.
Making It Move
The steppers are driven by an Arduino Mega running under Repetier-Host, the same toolchain 3D printers use, repurposed here as a general motion controller. Each shot in the rally is a programmed step sequence. We marked ball positions on the court, verified the attachment cleared the net at speed, and varied shot velocity so the rally feels like a real match instead of a metronome.
What I Learned
- Print settings are engineering decisions. Infill and quality changes took parts from fitting on the rail to actually working under load.
- Borrowing a mature toolchain (Repetier-Host) beat writing motor firmware from scratch and left more time for the mechanism itself.
- Tolerances against off-the-shelf hardware are where CAD meets reality. The printed part has to accept the rail you actually bought.
- On a compressed schedule, coordination is a design tool. Printing, assembly, and programming ran in parallel because we planned them that way.