All Projects

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.

Course
ME360
Term
Summer, 6-week accelerated
My Role
Project coordinator & lead
Motion Control
Arduino Mega + Repetier-Host
Tools
SolidWorks, 3D printing, stepper motors, GT2 belts

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.

The team with the finished gantry machine positioned over a miniature tennis court
The finished machine over its court, team included.

Watch the Final Rally

Nineteen seconds of the finished machine playing out its programmed rally.

The ball clears the net on every programmed shot, at varied speeds.

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.

CAD model of a stepper motor mount plate with bore, bolt holes, and rail clamp
Stepper motor mount: bore, bolt pattern, and rail clamp in one printed part.
CAD model of a gear rack on a cylindrical rod with a rounded ball end
Rack on a cylindrical rod, part of the vertical motion.
CAD model of a slider housing block with rack teeth and a 66 mm dimension callout
Slider housing with rack teeth, toleranced to run on the T-slot rail.

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.