Skip to main content
Version: ACS CC

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.

info

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:

  1. An upper section with left and right input zone equipped with IR sensors to detect the cards.
  2. A middle shuffling area with rubber rollers driver by DC motors to mix the cards.
  3. 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:

  1. Number of players participating in the game
  2. 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

Project Diagram

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2 WThe main microcontroller that runs the embedded Rust software and controls all system components35 RON
ULN2003 Stepper Motor DriverControls the stepper motor for precise rotation of the card distribution platform17 RON
GA12-N20 DC Motor with GearboxDrives the rubber rollers for card movement and shuffling (need 3 units)75 RON
LM2596HV DC-DC Step-down ModuleRegulates power from the wall adapter to appropriate voltage levels for motors and electronics12 RON
Round Cap ButtonsUser interface controls for selecting number of players, cards per player, and distribution angle3 RON
V-Groove Roller with BearingProvides smooth, low-friction movement of cards through the shuffling mechanism (need 4-5 units)17 RON
OLED ScreenDetects card presence at various points in the system for automated control and error detection27 RON
L298N Dual Motor DriverControls the DC motors for the shuffling mechanism20 RON
ConsumablesCards, adhesives, and other small items needed for assembly and operation30 RON

Software

LibraryDescriptionUsage
embassy-executorAsync/await executorManaging concurrent tasks for motor control and user interface
embassy-timeTimekeeping and delaysTiming for motors, animations, and card distribution
embassy-rpRP2350 HALHardware interface for Raspberry Pi Pico
embassy-syncSynchronization primitivesResource sharing between tasks
st7735Display driver for ST7735Used for the display for the Pico Explorer Base
embedded-graphics2D graphics libraryUsed for drawing to the display
tinybmpBMP image handlingLoading and displaying card images
defmtLogging frameworkDebug information during development
defmt-rttRTT debug channelReal-time debugging output
embedded-halHardware abstractionGeneric hardware interface for motors and sensors
randRandom number generationCard shuffling algorithm implementation
heaplessStack-based collectionsMemory-efficient data structures
cortex-m-rtRuntime supportCore functionality for ARM Cortex-M
critical-sectionCritical section APIThread-safe operations for motor control
panic-probePanic handlerError handling during development
display-interface-spiSPI display interfaceCommunication with the display
step-dirStepper motor controlPrecise control for rotating platform
ssd1306OLED display driverAlternative display option if needed
  1. Automatic card shuffler and dealer on Amazon