Card Shuffling and Reading Robot Information

The card shuffling and reading robot uses Lego EV3, laser-cut, and 3D-printed parts to shuffle and read cards. It has four primary operations: dispensing, shuffling, releasing, and reading cards. C was used to program the robot, while AutoCAD and SolidWorks were used to model the mechanical components.

A finely-tuned dispenser ensures cards are fed into the barrel in random slots, almost guaranteeing a truly randomized shuffling process. This is achieved by having the barrel rotate to a random slot before each card is dispensed, with the rotation algorithm ensuring that each slot is selected once.

Meanwhile, a gate releases cards from the barrel once shuffling is over, and a precision conveyor belt uses color recognition to "read" the card contents for the user. 

I designed the card reading conveyor belt and programmed it using C. Although the robot can shuffle most playing cards, the reading system is designed for use with fortune cards. Each card is uniquely coded with a sequence of colors.

Inspired by a barcode reader, a color sensor detects the unique color sequence on each card. My C program then searches a file for the associated fortune and displays it onto the screen (if found). My design achieves 86% accuracy with reading cards on the first pass.

I also led the integration of the barrel, conveyor, and card dispenser, designing the vertical supports and general arrangement of the components. On the software side of integration, my contributions include coordinating timings of different actions and designing the user interface using C.

Data storage was a notable challenge in my card reading system. My original approach was to store all 78 fortunes in a text file, then read the data into an array for use in the program. However, strings in C are implemented as arrays of characters; as such, creating an array of 78 strings exceeded the Lego EV3's memory limit.

To solve the issue, I redesigned my algorithms to dynamically search the file for the associated fortune whenever needed, rather than perpetually storing the fortunes in the program. 

Another obstacle was the accuracy of the color sensor. The sensor could only reliably sense green, red, and yellow, meaning a longer color sequence was needed to achieve 78 unique combinations. To overcome this obstacle, I used a worm gear to precisely control the conveyor belt and allow the color sensor to reliably read longer sequences.

Hide Element on Touch Devices