SolidWorks CAD Render of the Reverse Riffler V2
Existing automated card shufflers fail to provide true mathematical randomization, require excessive user intervention, and are limited to standard poker cards. To solve this, our team engineered a completely autonomous, cyclically operating mechatronic device designed to perform seven true inverse riffle shuffles in under 90 seconds. The system is mechanically dimensioned to process three distinct card geometries (US Standard, US Tarot, and US Mini) with zero user input required mid-cycle.
Process Schematic Table
To achieve an processing rate of at least 12 cards per second without jamming, the mechanism operates through four sequential subsystems outlined above:
1. Elevation: The primary card insertion tray is driven by a custom rack-and-pinion mechanism. Based on our kinematic calculations, this system is geared to rise at a precise linear velocity of 3 mm/s to perfectly feed the processing stage without overwhelming the intake.
2. Feeding: To match the 12 cards/s processing requirement, the intake relies on a 3000 RPM DC motor dynamically stepped down to 13% capacity to optimize the torque-to-speed ratio. We engineered a specific counter-roller mechanism to ensure perfect card singulation (pulling only one card at a time).
3. Separation: The core of the mathematical randomization occurs here. An integrated IR (Infrared) break-beam sensor detects the singulated card, instantly triggering a micro-servo to randomly distribute the cards into two separate hoppers, successfully simulating a true inverse riffle shuffle explained in the validation section.
4. Combination: Once separated, the two piles are recombined into a single deck via a mechanized conveyor belt. Through dynamic analysis, we constrained the maximum allowable conveyor speed to 345.8 mm/s to completely prevent deck shearing or card damage during final assembly.
Before moving into digital CAD, I spearheaded the project's initial ideation phase. I developed and sketched the preliminary layouts for the device, exploring various mechanisms for elevation, feeding, and routing.
While I originated the core mechanical concepts, the final system architecture pictured above is the result of rigorous collaborative refinement. Working closely with my team, we analyzed these sketches against our constraints, systematically down-selecting and refining my initial drawings into our final mechatronic design.
The primary mechanical hurdle of this project was achieving reliable singulation at a throughput of 12 cards per second. The system had to accomplish this across variable card thicknesses, dimensions, and surface finishes without causing a jam.
During the initial ideation phase, I prototyped a design that mimicked existing commercial shufflers, as seen to the right, utilizing a cam mechanism (fan shaped gear) synchronized to a single drive roller. However, testing revealed this approach was unreliable when dealing with varying card geometries, frequently resulting in double-feeds and jamming in existing shufflers.
To solve this, I researched industrial currency-dispensing mechanisms used in ATM machines and adapted the friction gradient approach to fit our spatial constraints. The free body diagram used to calculate our friction gradient and an initial CAD render is shown below.
Left: Photo of Existing Feeding Mechanism, Right: Lateral Sketch
Free Body Diagram Analysis for Deriving Friction Limits
Feeding Subsystem V1
To implement the ATM-style extraction, I engineered a synchronized dual-roller configuration linked by a 1:1 gear train.
The Friction Gradient: The primary drive roller is designed with recessed channels housing high-friction rubber O-rings to actively grip and advance the top card. Simultaneously, the geared counter-roller applies strict restraining resistance against the remainder of the deck, overpowering the card-to-card static friction.
Variable Geometry Accommodation: To ensure universal compatibility across the three target card sizes without requiring mechanical user adjustment, I engineered a concentric three-roller spacing array on the primary drive shaft. The outermost roller is mathematically dimensioned to independently grip the narrow US Mini cards. This roller and the adjacent middle roller are spaced to symmetrically engage US Standard cards to prevent rotational skew. Finally, the full three-roller array provides maximum distributed traction across the oversized US Tarot cards, ensuring reliable singulation regardless of the deck type inserted
Kinematic Throughput: To achieve the target processing rate of 12 cards/s, the system must maintain a constant linear velocity of 945 mm/s (708 RPM).
SolidWorks CAD Isometric Drawing of the Feeding Subsystem V2
3D Printed Prototype of the Feeding Subsytem V1 for Kinematic Testing
SolidWorks CAD Frontal Drawing of the Feeding Subsystem V2
SolidWorks CAD Closeup on Drive Train
Full Calculations
The feeding system is driven by a 3000 RPM GA12-N20 gearmotor equipped with a magnetic encoder. By actively running the motor at only 13% of its maximum capacity, I engineered a massive speed and torque overhead into the system. This allows the motor to instantly overcome the higher static inertia of larger cards (like Tarot sizes) without overdrawing current or generating excess heat, effectively preserving the structural integrity of the PLA chassis.
Once singulated, the card breaks an IR sensor path positioned exactly 3 mm past the counter-roller, validating the successful feed and triggering the Separation subsystem.
Beyond the mechanical design of the feeding subsystem, I served as the lead for the system's overall electronic architecture and firmware. The primary challenge was actively synchronizing five distinct actuation methods (a rack-and-pinion DC motor, a high-speed DC motor, a randomization servo, a gate servo, and a conveyor servo) with millisecond precision, ensuring a continuous 12 cards/s flow without causing processing bottlenecks or electrical brownouts.
To support the high-current demands of simultaneous motor actuation, I engineered a dual-rail power architecture centered on a 7.4V 6000mAh 80C LiPo battery.
Load Management: This specific battery was selected for its 480A discharge ceiling, which far exceeds our 4.8A stall load, eliminating voltage sag and preventing microcontroller resets during heavy operation.
Signal Isolation: The primary 7.4V rail directly drives the high-load motors, while an integrated LM2596 buck converter drops and regulates a stable 5.0V secondary rail. This critical isolation protects the Arduino MCU and servo signals from inductive motor noise.
Autonomy Tracking: Monitored via a custom voltage divider, the system leverages a usable capacity of 4800mAh. At an average draw of 1.6A, this guarantees 2.9 hours of continuous runtime—easily satisfying the project constraint of 100 full shuffle cycles per charge.
Reverse Riffler V2 Electrical Schematic
System logic is orchestrated by an Arduino Uno R4 Minima (48MHz). To ensure true randomization without user intervention, I architected a custom, event-driven state machine in C++.
To maintain strict closed-loop control over vertical displacement and feeding, I dedicated the MCU's high-speed digital pins exclusively to hardware interrupts for encoder counting and precision PWM for the three servos. When a card breaks the IR sensor threshold, it triggers an interrupt routine; the Arduino generates a seeded random integer and instantly commands the separation servo to route the card. This real-time processing ensures the physical inverse riffle shuffle mimics absolute mathematical randomization. Code snippets can be fund below.
Initial Code Snippet for Speed Encoding
Code Snippet for Chance Mechanism
Working within a strict $500 project budget, the team optimized the Bill of Materials (BOM) to prioritize high-durability structural components and reliable power delivery. The primary chassis and internal linkages are currently being fabricated using high-density PLA and PETG to withstand the operational vibration and heat of the motors and drivers.
To mitigate supply chain risks and ensure adherence to the Capstone timeline, my team initiated the procurement of the primary electronics, actuators, and raw materials during the inter-semester break. Physical assembly of the localized subsystems has commenced, with full-system integration scheduled for the upcoming phase next semester.
Once physical integration is complete, the team will begin system validation testing to ensure the device meets our strict mathematical constraints. Our primary testing milestones include:
Throughput Verification: Confirming the mechanism sustains the 12 cards/s processing rate without double-feeding or jamming across US Mini, Poker, and Tarot card sizes.
Thermal & Autonomy Testing: Validating the 6000mAh dual-rail power architecture to ensure the system successfully executes 100 continuous shuffle cycles (2.9 hours) without exceeding thermal limits or dropping below the logic voltage threshold.
Stochastic Validation: Analyzing the final deck output after the 7-cycle inverse riffle shuffle to mathematically verify true randomization, explained further below.
To prove that our device achieves true mathematical randomization—rather than the pseudo-randomness of existing commercial shufflers—system output will be rigorously validated against the Gilbert-Shannon-Reeds (GSR) and Bayer-Diaconis (BD) statistical shuffling models.
Validation testing evaluates hundreds of deck permutations across three strict mathematical metrics to identify and eliminate any residual ordering:
Rising Sequence Analysis (The 7-Shuffle Baseline): Based on the GSR model, a mathematically randomized 52-card deck yields approximately 25 "rising sequences" (interspersed, increasing card sequences). Our system is hard-coded to execute 7 autonomous inverse riffle shuffles, which our statistical histograms identify as the exact threshold where rising sequences reach the optimal ~25 target before encountering diminishing returns.
Card Position Distribution (CPD): This metric evaluates single-card entropy. Across hundreds of trial permutations, the device must demonstrate that every individual card has an equal probability (1/52) of appearing at any specific index in the final deck, proving that original top/bottom cards do not mathematically cluster.
Pairwise Ordering Probabilities (POP): To validate two-card randomness, the system evaluates all 1,326 possible pairs within a 52-card deck. The validation protocol measures the probability of Card A sitting above Card B. A perfectly random output will converge on a POP value of 0.5 averaged across all pairs, indicating zero residual sequential bias.
Designing the Reverse Riffler served as a comprehensive exercise in full-cycle mechatronic integration. By bridging the gap between physical kinematics, such as the friction-gradient feeding mechanism, and the C++ control logic, I developed a practical understanding of how to engineer reliable systems under strict spatial and thermal constraints. Ultimately, this project reinforced my ability to translate rigorous theoretical mathematics into functional, automated hardware.
As the project transitions out of the digital design phase, I am incredibly eager for the physical fabrication of these mechanisms next semester. I look forward to bridging the gap between our SolidWorks models and tangible hardware, and ultimately proving the system's reliability during the active validation trials.