IDEA & INSPIRATION :
project is an automated card shuffler and dealer, designed to shuffle and distribute playing cards. The goal is to make card games faster, and more enjoyable by removing the hassle of manual shuffling.
WHY THIS PROJECT :
I love card games, especially Uno, regular playing cards, and سكروو I thought it would be fun to build a device that could shuffle cards It felt like a cool and practical project that could add a unique touch to our game nights.
PERSONAL TOUCH :
I wanted the project to reflect a part of my personality, so I thought about adding a fun theme. After some brainstorming and research, I found no better than the panda🐼🥰 a calm, lovable, and playful animal
STEP 1: sketching
I looked for an existing sketch with a similar concept to what I had in mind and used it as a reference.
Card Size: I determined the exact dimensions of the playing cards I would be working with.
Panda: sketch panda as part of the design to integrate it into the overall aesthetic.
STEP 2: Designing On Fusion 360
2D Design: Created sketches for the laser-cut parts, ensuring precise dimensions.
3D Modeling: Built a 3D model parts of the project.
Exporting Files: Converted the necessary parts into DXF files for laser cutting and STL files for 3D printing.
Designing On Fusion 360
1. Since the most crucial and clear part of the design is the cardholder, I started with it first.
Focused on ensuring the correct dimensions to fit the cards properly.
Designed the structure to be stable and easy to load.
Focused on designing the pushing wheels for proper friction and the card passage for smooth movement.
Imported the motor and IR sensor models and designed mounts to secure them in place.
2. Second part of the design, I created the dealing
Designed the card holder to securely stack the cards before dealing.
Created a long wheel to push the cards one by one.
Added a mounting space for the motor to drive the wheel smoothly.
Ensured proper alignment so the cards are dealt correctly.
3. Third part of the design, PANDA🐼
Designed the face, hands, and legs to complete the panda shape.
Created slots in each part to ensure they fit securely with the other components.
4. Fourth part of the design, Base of component
Designed the base structure by creating the top, bottom, and side panels.
Imported the components (Breadboard, 2 H-bridge, LCD, and Arduino).
Created mounting points to securely fix all components in place.
Added a small panda SVG engraving on the front panel for a personalized touch.
5. Fifth part of the design, Wheels
Shuffling Wheel: Created a wheel with enough grip to push the cards smoothly.
Dealing Wheel: Designed a longer wheel to reach and push the cards out.
Used Involve Feature.
LASER CUTTING PROCESS
Laser Cad software For Design
Malky ML64 Machine For Fabrication
Plywood 3mm, 50*30mm
STEP 1: Prepare Files
Exported all parts as DXF files.
Configuring Cutting Settings:
Cut: Set appropriate speed and power for clean edges.
parameters : Speed: 10 , Power: 65
Engrave: Adjusted settings for adding details like the panda design.
parameters : Speed: 300 , Power: 50
Speed Cut: Adjusted speed and power for precise cutting .
parameters : Speed: 200 , Power: 30
Final Check: Ensured all parts fit within the material dimensions before starting the cut.
Sheet 1
Sheet 2
Sheet 3
Sheet 4
Sheet 5
STEP 2: Send Files to the Machine for Fabricate
3D PRINTING PROCESS
Cura software For Design
Creality ender 3 v2 Machine For Fabrication
PLA Filament Material of Machine
STEP 1: Prepare Files
Exporting Models: STL format from Fusion 360.
Slicing Process: Used Cura to slice the models and adjusting settings layer height 0.28 (low quality) , infill 10%, print speed 50, and Supoort.
Printer Setup: Loaded the filament, calibrated the bed, and ensured optimal adhesion.
Printing: Started the 3D printing process and monitored for any issues.
Post-Processing: Removed supports, cleaned edges, and tested fitment with other components.
STEP 2: Send Files to the Machine for Fabricate
Electronics Components
Breadboard
Arduino Uno
Wires
Regulator
Adapter 9v
Buzzer
2 IR Sensors
2 H-Bridge L298n
3 Geared motor
ON/OFF Switch
DC power Jack
Push Button
Wiring
Wiring On Fritzing
Power Switch (Pin 2)
Used to turn the system on and off by controlling the power supply to the circuit.
Push Button (Pin 12)
Used to trigger the dealing mechanism.
One leg connected to GND, and the other to pin 12
IR Sensors for Shuffling (Pins 3 & 4)
IR Sensor 1 (Pin 3): Detects card presence while shuffling.
IR Sensor 2 (Pin 4): Detects card presence while shuffling.
Both powered by 5V and GND from the Arduino.
LCD Display with I2C (SDA: A4, SCL: A5)
Displays system status and feedback.
Communicates via SDA (A4) and SCL (A5).
Buzzer (Pin 13)
Provides audio feedback when the system is activated, And it reacts when the shuffling process is completed.
Motor Drivers (H-Bridges - L298N):
First H-Bridge (Shuffling Motors - Pins 6, 7, 8, 9):
Controls the two motors responsible for shuffling the cards.
Second H-Bridge (Dealing Motor - Pins 10, 11):
Controls the motor responsible for dealing the cards.
A 9V battery powers the motor drivers.
The Arduino is powered via USB or an external 5V source.
9v Adapter
Power Source Selection: A 9V adapter was chosen as it provides the required voltage for the motors to operate efficiently.
Dedicated Power Supply: The adapter is connected to the VIN pin of the Arduino, ensuring the system runs independently without relying on a laptop's USB connection.
Step 1: Shuffle part code
In week 6 assignment, the core functionality of the shuffling mechanism was implemented. The code was initially developed using code blocks, and later modifications were made to enhance its performance.
Key modifications:
Added a second motor for improved card shuffling.
Integrated a switch to control the system.
Replaced the ultrasonic sensor with an IR sensor for more precise card detection.
uses if, while, and for loops to control the process.
The switch (switchPin) is checked to start or stop the operation.
The IR sensors detect card presence before starting the motors.
Motors run until the sensors confirm the process is complete.
INPUT_PULLUP is used for the switch to keep it HIGH by default, preventing false triggers.
If Condition: Button Press
If buttonPin is LOW (button is pressed), the dealer motor turns on by setting dealer_motor1 to HIGH and dealer_motor2 to LOW.
Else Condition: Button Release
If the button is released, both motor pins are set to LOW, stopping the dealer motor.
If Condition: Switch is HIGH
If switchPin is HIGH, the function exits (return), stopping execution and turning off everything.
Step 2: Dealer part code
In week 6 assignment, the core functionality of the shuffling mechanism was implemented. The code was initially developed using code blocks, and later modifications were made to enhance its performance.
Key modifications:
Added a second motor for improved card shuffling.
Integrated a switch to control the system.
Replaced the ultrasonic sensor with an IR sensor for more precise card detection.
Step 3: LCD messages
Library Installation & Integration
Installed the required LiquidCrystal_I2C library.
Checked its example codes inside the Arduino IDE.
Integrated it into the main project.
Customization & Modification
Adjusted the messages to fit the project's flow.
Cleared the display (lcd.clear()) before printing new messages.
Used lcd.setCursor() to position text correctly.
Ensured updates are displayed at the right moments in the workflow.
Step 4: Full code
Defined variables : Assigned pins for motors, sensors, switch, and button.
Initialized components : Set pin modes and initialized LCD.
Shuffling function : Controlled motors using if and while based on sensor input.
Dealing function : Activated dealer motor when the button was pressed.
Final integration & testing : Uploaded code, tested responses, and adjusted logic.
Fitting all parts
Fitting All Parts: Assembled all components to ensure proper alignment and secure fitting before final testing.
Attach Motors
Securing Shuffle Motors: Fixed the shuffle motors to their wooden base using screws and clamps for stability.
Base Copmonent
Securing the Base Components: Mounted the essential components onto the base
Test Shuffle
Powered the system and tested the shuffling mechanism to ensure smooth and random card mixing
Test Dealer
Close Base of Component
Test Power On & Start Shuffling
Successful Shuffle test
Verified that the shuffling mechanism works correctly, ensuring smooth card movement and proper mixing.
First Try Test Dealer after shuffle done
Successful Dealer test
Ensured that the dealer mechanism dispenses one card at a time smoothly and accurately.
Pre-Final Test
Tested the integration of both the shuffler and dealer to ensure they work together seamlessly.
Final Video 🐼🥳
Note: The pause in the middle of the video was to flip the cards that got reversed during shuffling.
Throughout each stage of the project, I tested my progress and shared updates with my family🥰♥️ to get their feedback. They always supported me without any negative impact. I also asked my friends and Joo Mahorous for their opinions and reached out to them whenever I faced a problem.
First challenge I faced was in the design
I planned to use the wheels that came with the motor. However, after cutting the part where the wheels would be placed, I realized they were too large and became an obstacle.
The solution was to use 3D-printed wheels instead. I designed them myself, which successfully solved the problem.
Solution
Second challenge
was with one of the sensors, which most likely received a higher voltage than it could handle, causing it to malfunction.
The solution was to buy a new sensor and use a voltage regulator to ensure it receives a stable 5V supply.
Solution
Last challenge
The last challenge was that multiple cards were coming out at once from the exit slot in dealing.
The solution was to add a thin strip at the top of the slot, reducing the opening by about 1mm. This improved the process, but sometimes the card exits more slowly.
Solution
After add tape
1. Rotation and Movement while dealing the cards
This feature will allow the dealer mechanism to rotate and move while distributing the cards, ensuring a more dynamic and randomized dealing process. It will enhance the functionality and make the card distribution more efficient.
2. Automated Card Dealing with Player Control
This feature will automate the dealer process, allowing users to set the number of cards to be distributed to each player. It will improve accuracy and efficiency, making the dealing process hands-free and customizable.
3. Voice Interaction Announcing the Starting Player