Automatic card shuffler and dealer
Automatic card shuffler and dealer for board games with a display and buttons to select the number of players and the cards to be dealt.
Author: Dragusin Matei Cosmin
GitHub Project Link: Repository
Description
This project is an automatic card shuffler and dealer for board games. The device consists of three main sections:
- An upper section with left and right input zone equipped with IR sensors to detect the cards.
- A middle shuffling area with rubber rollers driver by DC motors to mix the cards.
- A lower section with a rotating base controlled by a servo motor to deal the cards.
Users can interact with the device through a simple OLED display interface and control buttons, allowing them to select:
- Number of players participating in the game
- Cards to be dealt per player
Motivation
The motivation behind this project is to create a fun and interactive device that can enhance the experience of playing card games. The automatic shuffler and dealer will save time and effort, allowing players to focus on enjoying the game rather than dealing with the tedious task of shuffling and dealing cards.
Architecture
Log
Week 5 - 11 May
Week 12 - 18 May
Week 19 - 25 May
Hardware
The automatic card shuffler uses a Raspberry Pi Pico 2W as the main controller, connected to an OLED display and buttons for user interface. The mechanical system includes three DC motors driving rubber rollers for card movement, one stepper motor for the rotating dealing platform, and IR sensors for card detection, all powered through a wall outlet.
Schematics
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2 W | The main microcontroller that runs the embedded Rust software and controls all system components | 35 RON |
ULN2003 Stepper Motor Driver | Controls the stepper motor for precise rotation of the card distribution platform | 17 RON |
GA12-N20 DC Motor with Gearbox | Drives the rubber rollers for card movement and shuffling (need 3 units) | 75 RON |
LM2596HV DC-DC Step-down Module | Regulates power from the wall adapter to appropriate voltage levels for motors and electronics | 12 RON |
Round Cap Buttons | User interface controls for selecting number of players, cards per player, and distribution angle | 3 RON |
V-Groove Roller with Bearing | Provides smooth, low-friction movement of cards through the shuffling mechanism (need 4-5 units) | 17 RON |
OLED Screen | Detects card presence at various points in the system for automated control and error detection | 27 RON |
L298N Dual Motor Driver | Controls the DC motors for the shuffling mechanism | 20 RON |
Consumables | Cards, adhesives, and other small items needed for assembly and operation | 30 RON |
Software
Library | Description | Usage |
---|---|---|
embassy-executor | Async/await executor | Managing concurrent tasks for motor control and user interface |
embassy-time | Timekeeping and delays | Timing for motors, animations, and card distribution |
embassy-rp | RP2350 HAL | Hardware interface for Raspberry Pi Pico |
embassy-sync | Synchronization primitives | Resource sharing between tasks |
st7735 | Display driver for ST7735 | Used for the display for the Pico Explorer Base |
embedded-graphics | 2D graphics library | Used for drawing to the display |
tinybmp | BMP image handling | Loading and displaying card images |
defmt | Logging framework | Debug information during development |
defmt-rtt | RTT debug channel | Real-time debugging output |
embedded-hal | Hardware abstraction | Generic hardware interface for motors and sensors |
rand | Random number generation | Card shuffling algorithm implementation |
heapless | Stack-based collections | Memory-efficient data structures |
cortex-m-rt | Runtime support | Core functionality for ARM Cortex-M |
critical-section | Critical section API | Thread-safe operations for motor control |
panic-probe | Panic handler | Error handling during development |
display-interface-spi | SPI display interface | Communication with the display |
step-dir | Stepper motor control | Precise control for rotating platform |
ssd1306 | OLED display driver | Alternative display option if needed |