PicoChess
[Fall 2025] An interactive physical chess game featuring piece detection, VGA display, and a computer opponent.
- Suitable forB.Tech/B.E Embedded Systems students
- Build time4-6 weeks
- LevelAdvanced
- Available atAjvika Labs, Kakinada
About this project
ECE 4760: Digital Systems Design Using Microcontrollers
PicoChess
Authors:
Rachel Lee, Zephan Sanghani, Kailey Ye
Date:
Fall 2025
Introduction
High-Level Design
Hardware Design
Software Design
Results
Conclusion
Appendix
Demonstration Video
Introduction
An interactive physical chess game featuring piece detection, VGA display, and a computer opponent.
The PicoChess game board displayed on a VGA monitor.
This project creates a physical, interactive chess game that combines the tactile experience of a real chessboard
with the functionality of modern chess applications. The system uses a Raspberry Pi Pico (RP2040) microcontroller
to interface with a physical chessboard equipped with reed switches and magnetic pieces, enabling automatic piece
detection. Players interact with real chess pieces on a physical board, while the system provides visual feedback
on a VGA display, legal move hints when pieces are picked up, and an optional computer opponent.
The system supports both two-player and single-player modes, with additional features including optional game timing
and move hints. The implementation includes all standard chess rules: check, checkmate, en passant, pawn promotion, and
comprehensive move validation. The board automatically detects piece movements and validates each move in real-time.
High-Level Design
Rationale and Sources
The motivation behind this project was to create a physical chess game that combines the tactile experience
of a real chessboard with the functionality of modern chess applications. Unlike purely digital chess games,
this system allows players to interact with physical pieces while receiving visual feedback, legal move hints,
and optional computer assistance. The project draws inspiration from online chess platforms but maintains the
traditional feel of moving pieces by hand.
The system integrates several key technologies: reed switch-based piece detection for automatic board state
tracking, VGA display for visual feedback, a computer opponent using minimax search, and a keypad interface
for game configuration. This combination creates a unique hybrid experience that bridges physical and digital
gameplay.
System block diagram showing software modules inside RP2040 Pico (left) and hardware components (right), with connections showing hardware-software interfaces.
As shown in the block diagram above, the system consists of five software modules running inside the RP2040 Pico,
which interact with three external hardware components. The
Chess Engine
serves as the central orchestrator, maintaining the canonical representation of the chess board, current turn, check
status, and all game rules. The
Board Scanner
continuously monitors the
physical chessboard
detecting when pieces are lifted or placed by reading the 64 reed switches. The
Computer
module implements the opponent logic using minimax search to calculate moves. The
User Interface
processes
keypad
input, handling menu navigation and game configuration. The
VGA Display
generates video signals to render the game state, legal moves,
and menus on the
VGA monitor
The modules interact through a coordinated flow. When a player lifts a piece on the physical chessboard, the
Board Scanner detects the change and queries the Chess Engine to identify which
piece was lifted and request all legal moves for that piece. The Chess Engine responds with valid
destinations and passes them to the VGA Display to render as visual
hints. When the player places the piece, the Board Scanner calls the Chess Engine
to validate the move. If valid, the move is committed to Game State. If invalid, an error is displayed.
In single-player mode, when it's the computer's turn, the Chess Engine requests a move from the
Computer module. The Computer reads the current Game State, uses the Chess Engine's
move generation functions to explore possibilities, evaluates positions, and returns its chosen move. The
Chess Engine then updates Game State with the computer's move and signals the Board Scanner
to enter verification mode. The Board Scanner monitors the physical board until the player executes
the computer's move, creating a handoff where digital calculation is followed by physical execution. The
VGA Display receives all rendering information from the Chess Engine, which provides the current board state,
legal moves to highlight, and move history, ensuring the display always reflects the authoritative game state.
Hardware Design
The hardware design centers around the physical chessboard with 64 reed switches arranged in an 8×8 grid,
each corresponding to a square on the chessboard. Magnets attached to the bottom of each chess piece activate
the reed switches when placed on the board, enabling automatic piece detection. The system also includes VGA
output for visual feedback, a keypad for menu navigation, and the RP2040 microcontroller coordinating all
components.
Chessboard
The
chessboard
uses 64
Littlefuse MDSR-7-10-20 reed switches
, one for each square. The switches are arranged
in a matrix configuration with 8 rows and 8 columns. Each row is connected to a GPIO output pin (GPIO 0-7),
and each column is connected to a GPIO input pin (GPIO 8-15) with internal pull-down resistors enabled.
330Ω current-limiting resistors
are placed in series with each row to protect the GPIO outputs from overcurrent.
Diodes (1N4148)
are placed in series with each reed switch to prevent current from flowing between columns
when multiple switches are closed simultaneously. This is essential because when multiple pieces are on the
board, multiple switches may be closed, and without diodes, current could flow between columns, causing
false readings.
Left: Chessboard reed switch matrix schematic showing row/column connections and diode protection.
Right: Physical implementation with reed switches mounted on the chessboard during the construction process.
Chess Pieces
We attached multiple small
neodymium
disc magnets
to the bottom of each chess piece. We experimentally discovered that the reed switches only close when a
magnet is positioned directly over them, so a single small magnet didn't reliably activate the switch regardless
of piece placement. To solve this, we placed 4-5 magnets spread across the base of each piece, ensuring at least
one magnet is always over the reed switch. An alternative approach would be using larger, thinner magnets that
cover more area with a single magnet per piece.
Chess pieces with multiple neodymium magnets attached to the base for reliable reed switch activation.
VGA Interface
The VGA display connects to the RP2040 via GPIOs 16-21 and ground. HSync and VSync (GPIOs 16-17) connect
directly to the VGA connector. The interface uses 4-bit color: 2 bits for green, 1 bit for blue, and 1 bit
for red. Green gets more bits since human eyes are more sensitive to green.
For red and blue, 330Ω resistors create a voltage divider with the display's internal 70Ω resistor, stepping
down the RP2040's 3.3V output to the 0.0-0.7V range expected by VGA. For green, the high bit uses a 330Ω
resistor while the low bit uses 470Ω, enabling a more expressive range from the 2-bit green values.
VGA connector pinout (from
Professor Adams
).
Keypad Interface
The keypad works similarly to the chessboard: pressing a key closes a switch that shorts a row pin to a column pin.
We use three keys (2, 5, 8) from a standard 3×4 matrix keypad. Row pins are configured as outputs and the column
pin as an input with internal pulldown. Scanning sets each row high and reads the column to detect presses. A
rising edge detector ensures that holding a key registers as only a single press.
Software Design
The software architecture uses protothreads for concurrent task management, with two main threads handling
board scanning and keypad input. The system is organized into five modules corresponding to the system
block diagram: the Chess Engine, Board Scanner, Computer, User Interface, and VGA Display. Each module
is implemented in separate source files with clear interfaces. The chess algorithms are based on techniques
described in
Cornell's AI Chess Algorithms
Chess Engine (
chess.c
/
h
)
The Chess Engine maintains the canonical 8×8 board representation, tracks turns, manages check status,
and enforces all chess rules. The board is stored as a 2D array of
Tile
structures containing
piece type and color.
Move Generation
The move generator populates an 8×8 bitmap of legal destinations for a selected piece. Sliding pieces
(rooks, bishops, queens) iterate outward in each direction until hitting the board edge or another piece,
stopping after captures. Knights use a lookup table of eight L-shaped offsets. Kings check all eight
adjacent squares. Pawns move forward (one or two squares from start), capture diagonally, and can
perform en passant when the opponent's pawn just advanced two squares. En passant is tracked via state
variables that record the "passed through" square, cleared after each move.
Check and Checkmate Detection
Check detection locates the king, then generates moves for all enemy pieces to see if any attack the
king's square. When in check, the move generator filters candidates by temporarily applying each move,
testing for check, and restoring the board. Checkmate occurs when the king is in check and no legal
moves exist.
State Management
The engine provides save/restore functions using
memcpy()
to copy the entire game state,
PicoChess
Authors:
Rachel Lee, Zephan Sanghani, Kailey Ye
Date:
Fall 2025
Introduction
High-Level Design
Hardware Design
Software Design
Results
Conclusion
Appendix
Demonstration Video
Introduction
An interactive physical chess game featuring piece detection, VGA display, and a computer opponent.
The PicoChess game board displayed on a VGA monitor.
This project creates a physical, interactive chess game that combines the tactile experience of a real chessboard
with the functionality of modern chess applications. The system uses a Raspberry Pi Pico (RP2040) microcontroller
to interface with a physical chessboard equipped with reed switches and magnetic pieces, enabling automatic piece
detection. Players interact with real chess pieces on a physical board, while the system provides visual feedback
on a VGA display, legal move hints when pieces are picked up, and an optional computer opponent.
The system supports both two-player and single-player modes, with additional features including optional game timing
and move hints. The implementation includes all standard chess rules: check, checkmate, en passant, pawn promotion, and
comprehensive move validation. The board automatically detects piece movements and validates each move in real-time.
High-Level Design
Rationale and Sources
The motivation behind this project was to create a physical chess game that combines the tactile experience
of a real chessboard with the functionality of modern chess applications. Unlike purely digital chess games,
this system allows players to interact with physical pieces while receiving visual feedback, legal move hints,
and optional computer assistance. The project draws inspiration from online chess platforms but maintains the
traditional feel of moving pieces by hand.
The system integrates several key technologies: reed switch-based piece detection for automatic board state
tracking, VGA display for visual feedback, a computer opponent using minimax search, and a keypad interface
for game configuration. This combination creates a unique hybrid experience that bridges physical and digital
gameplay.
System block diagram showing software modules inside RP2040 Pico (left) and hardware components (right), with connections showing hardware-software interfaces.
As shown in the block diagram above, the system consists of five software modules running inside the RP2040 Pico,
which interact with three external hardware components. The
Chess Engine
serves as the central orchestrator, maintaining the canonical representation of the chess board, current turn, check
status, and all game rules. The
Board Scanner
continuously monitors the
physical chessboard
detecting when pieces are lifted or placed by reading the 64 reed switches. The
Computer
module implements the opponent logic using minimax search to calculate moves. The
User Interface
processes
keypad
input, handling menu navigation and game configuration. The
VGA Display
generates video signals to render the game state, legal moves,
and menus on the
VGA monitor
The modules interact through a coordinated flow. When a player lifts a piece on the physical chessboard, the
Board Scanner detects the change and queries the Chess Engine to identify which
piece was lifted and request all legal moves for that piece. The Chess Engine responds with valid
destinations and passes them to the VGA Display to render as visual
hints. When the player places the piece, the Board Scanner calls the Chess Engine
to validate the move. If valid, the move is committed to Game State. If invalid, an error is displayed.
In single-player mode, when it's the computer's turn, the Chess Engine requests a move from the
Computer module. The Computer reads the current Game State, uses the Chess Engine's
move generation functions to explore possibilities, evaluates positions, and returns its chosen move. The
Chess Engine then updates Game State with the computer's move and signals the Board Scanner
to enter verification mode. The Board Scanner monitors the physical board until the player executes
the computer's move, creating a handoff where digital calculation is followed by physical execution. The
VGA Display receives all rendering information from the Chess Engine, which provides the current board state,
legal moves to highlight, and move history, ensuring the display always reflects the authoritative game state.
Hardware Design
The hardware design centers around the physical chessboard with 64 reed switches arranged in an 8×8 grid,
each corresponding to a square on the chessboard. Magnets attached to the bottom of each chess piece activate
the reed switches when placed on the board, enabling automatic piece detection. The system also includes VGA
output for visual feedback, a keypad for menu navigation, and the RP2040 microcontroller coordinating all
components.
Chessboard
The
chessboard
uses 64
Littlefuse MDSR-7-10-20 reed switches
, one for each square. The switches are arranged
in a matrix configuration with 8 rows and 8 columns. Each row is connected to a GPIO output pin (GPIO 0-7),
and each column is connected to a GPIO input pin (GPIO 8-15) with internal pull-down resistors enabled.
330Ω current-limiting resistors
are placed in series with each row to protect the GPIO outputs from overcurrent.
Diodes (1N4148)
are placed in series with each reed switch to prevent current from flowing between columns
when multiple switches are closed simultaneously. This is essential because when multiple pieces are on the
board, multiple switches may be closed, and without diodes, current could flow between columns, causing
false readings.
Left: Chessboard reed switch matrix schematic showing row/column connections and diode protection.
Right: Physical implementation with reed switches mounted on the chessboard during the construction process.
Chess Pieces
We attached multiple small
neodymium
disc magnets
to the bottom of each chess piece. We experimentally discovered that the reed switches only close when a
magnet is positioned directly over them, so a single small magnet didn't reliably activate the switch regardless
of piece placement. To solve this, we placed 4-5 magnets spread across the base of each piece, ensuring at least
one magnet is always over the reed switch. An alternative approach would be using larger, thinner magnets that
cover more area with a single magnet per piece.
Chess pieces with multiple neodymium magnets attached to the base for reliable reed switch activation.
VGA Interface
The VGA display connects to the RP2040 via GPIOs 16-21 and ground. HSync and VSync (GPIOs 16-17) connect
directly to the VGA connector. The interface uses 4-bit color: 2 bits for green, 1 bit for blue, and 1 bit
for red. Green gets more bits since human eyes are more sensitive to green.
For red and blue, 330Ω resistors create a voltage divider with the display's internal 70Ω resistor, stepping
down the RP2040's 3.3V output to the 0.0-0.7V range expected by VGA. For green, the high bit uses a 330Ω
resistor while the low bit uses 470Ω, enabling a more expressive range from the 2-bit green values.
VGA connector pinout (from
Professor Adams
).
Keypad Interface
The keypad works similarly to the chessboard: pressing a key closes a switch that shorts a row pin to a column pin.
We use three keys (2, 5, 8) from a standard 3×4 matrix keypad. Row pins are configured as outputs and the column
pin as an input with internal pulldown. Scanning sets each row high and reads the column to detect presses. A
rising edge detector ensures that holding a key registers as only a single press.
Software Design
The software architecture uses protothreads for concurrent task management, with two main threads handling
board scanning and keypad input. The system is organized into five modules corresponding to the system
block diagram: the Chess Engine, Board Scanner, Computer, User Interface, and VGA Display. Each module
is implemented in separate source files with clear interfaces. The chess algorithms are based on techniques
described in
Cornell's AI Chess Algorithms
Chess Engine (
chess.c
/
h
)
The Chess Engine maintains the canonical 8×8 board representation, tracks turns, manages check status,
and enforces all chess rules. The board is stored as a 2D array of
Tile
structures containing
piece type and color.
Move Generation
The move generator populates an 8×8 bitmap of legal destinations for a selected piece. Sliding pieces
(rooks, bishops, queens) iterate outward in each direction until hitting the board edge or another piece,
stopping after captures. Knights use a lookup table of eight L-shaped offsets. Kings check all eight
adjacent squares. Pawns move forward (one or two squares from start), capture diagonally, and can
perform en passant when the opponent's pawn just advanced two squares. En passant is tracked via state
variables that record the "passed through" square, cleared after each move.
Check and Checkmate Detection
Check detection locates the king, then generates moves for all enemy pieces to see if any attack the
king's square. When in check, the move generator filters candidates by temporarily applying each move,
testing for check, and restoring the board. Checkmate occurs when the king is in check and no legal
moves exist.
State Management
The engine provides save/restore functions using
memcpy()
to copy the entire game state,
Technologies used
Hardware components
- RP2040
- Raspberry Pi Pico
- VGA display
- IMU
Software & tools
- C
- Arduino IDE
Project demo video
What you get
- Working project / hardware kit, tested before delivery
- Complete source code with explanation
- Project demo and guidance for your viva
- Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed.
Payment is in two parts:
• 50% advance to start the project
• Remaining 50% before delivery
Note:
• Documentation and PPT are not included by default
• If you need documentation/PPT, it can be arranged for extra time and cost
We'll confirm the exact timeline and cost with you after reviewing your requirements.