Automatic Card Dealer Robot

ME 102B Capstone Project – 2026

with Will Siemens, Rohan Aggarwal, Natalie Lau, Aiden Brutman, Ricardo Pilnik

Overview
For the ME 102B capstone project, my team and I built a prototype robot that automatically shuffles and deals deck of cards to players seated around a table. The project’s primary challenge was integration: three stepper axes, three friction-driven card-handling stages, and a 8 device wireless control stack that had to run together reliably.

How it works
Follow a deck through the machine:

Hopper: The unshuffled deck is loaded into the hopper from the top (seen on the left in the video below) which feeds cards from the bottom of the stack. A roller on a servo pushes the bottom card into a pair of O-ring friction rollers, driven by an DC motor with an encoder, which pinch the card and drive it out of the hopper. The hopper assembly rides on a linear bearing and is actuated by a stepper-driven synchronous belt, so it can move vertically quickly and preciesly to a variety of preset locations.

Card register and shuffle: To shuffle, the hopper randomly dispenses cards into the six slots of the register. Once the hopper has been emptied, a belt-driven pusher on a linear rail then sweeps the randomly ordered cards out of the register slots and returns the cards to the hopper. This cycle is repeated a few times to completeley shuffle the deck. Every stepper axis is homed using limit switches.

Shuffling Sequence

Base: Once shuffling is complete, to deal a card, the machine rotates towards the target on a 3D-printed ring gear and pinion driven by the third stepper motor. A slip ring carries power through the rotating joint, so the machine can rotate without limit. A limit switch gives the machine its reference 0 angle, so it can repeatably deal cards to specific players. Seat angles and distances are stored per player and set in the webapp. Had time and budget been permitting, a screen hosting the interface would have been the next addition to the robot.

Ejecting cards to 2 players

Ejector: Once pointed at a the target player, the hopper deals the bottom card into the ejector ramp at the bottom of the machine. Inside the ejector another rubberized friction wheel presses against a bearing to grip cards and accelerate them using a DC motor with an encoder for accurate card ejection speeds. The contact point of the friction wheel is offset from the card’s centerline, so the card leaves the ejector with angular momentum, stabilizing it during its flight across the table. Throw speed is stored per player. The motor is much faster than needed, so it is run well below its limit.

Controls
The ESP32 handles only real-time motion, since stepper timing can’t tolerate interruption. A single-core task queue executes primitive commands such as “deal card” and “put card in slot 2”. Game logic, calibration, and manual jogging run in a Python host and web app that communicates with the ESP32 over Wi-Fi. Wireless buttons pair directly with the ESP32. A game mode (Texas Hold’em, Cambio, and others) is a mapping from button events to queued actions.

Integration challenges

  • Pusher-to-hopper return: cards re-entering the hopper were not always seated, which jammed the next cycle. A vertical “jiggle” of the hopper settles the stack.
  • Single-card feed: the bottom-feed gap took several rounds of tolerancing.
  • System integration: each axis worked well on its own long before the combined machine did.

My contributions
Ejector design, including iterating the printed wheel for O-ring compression and diameter. About 70% of the 3D-printed parts. Electronics specification (stepper drivers and others) and the ESP32 pinout. Control-flow architecture, including the state flow and the task-queue design. The software implementation was a team effort. Mechanical ownership: Ricardo (turret), Rohan (hopper), Will and Natalie (pusher and register), Aiden (buttons).