Skip to content

Commit b782896

Browse files
Project/amalia mihaela.onea (#1325)
* Add project documentation for Electronic Chess Board * Add project documentation content * Remove misplaced index.md * Update index.md * Update index.md * Add schematic * Add schematic image to documentation * Moved project folder * Made the changes * Add files via upload * Update index.md * Remove schema.webp * Add files via upload * Update index.md * Remove schema.webp * Add files via upload * oooooof * Update index.md * Update index.md * Delete website/versioned_docs/version-acs_cc/project/2026/amalia_mihaela.onea/schematic.webp * Add files via upload * Update index.md * Add files via upload * Update index.md * Update index.md * Update index.md * Delete website/versioned_docs/version-acs_cc/project/2026/amalia_mihaela.onea/schematic.webp * Rename schemaBloc.webp to schemabloc.webp * Rename schematiculMeu.webp to schematiculmeu.webp * Update index.md --------- Co-authored-by: Amaliaaa07 <onea.iuliama@gmail.com>
1 parent 08378d6 commit b782896

4 files changed

Lines changed: 45 additions & 62 deletions

File tree

Lines changed: 45 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Electronic Chess Board with Autonomous Play and Legal Move Display
22

3-
An electronic chess board that autonomously moves pieces using an XY electromagnetic system, detects piece positions with Hall sensors, displays legal moves with LEDs, and shows a timer on LCD.
3+
An electronic chess board that autonomously moves pieces using an XY electromagnetic system, displays legal moves with LCD.
44

55

66

@@ -13,13 +13,13 @@ An electronic chess board that autonomously moves pieces using an XY electromagn
1313

1414
## Description
1515

16-
This project is an autonomous chess board powered by an STM32 Nucleo-U545RE-Q microcontroller. The board uses a system of two stepper motors to move an electromagnet along the X and Y axes beneath the board, allowing it to physically move chess pieces (which contain small magnets) without human intervention. Hall effect sensors placed under each of the 64 squares detect the presence and position of pieces. An 8x8 LED matrix highlights the possible moves for each piece, and an LCD display shows the chess timer for each player.
16+
This project is an autonomous chess board powered by an STM32 Nucleo-U545RE-Q microcontroller. The board uses a system of two stepper motors to move an electromagnet along the X and Y axes beneath the board, allowing it to physically move chess pieces (which contain small magnets) without human intervention. An LCD display shows the current piece being moved and its legal moves.
1717

1818
The board implements a chess engine in Rust that computes valid moves and executes them automatically, moving pieces physically on the board.
1919

2020
## Motivation
2121

22-
I chose this project because it combines multiple engineering disciplines: mechanical design, electronics, and software. A self-playing chess board is a fascinating challenge that requires precise motor control, real-time sensor reading, and complex game logic — all implemented in Rust on an embedded system. It is a project that is both technically challenging and visually impressive, making it a perfect showcase for the knowledge gained throughout the semester.
22+
I chose this project because it combines multiple engineering disciplines: mechanical design, electronics, and software. A self-playing chess board is a fascinating challenge that requires precise motor control and complex game logic — all implemented in Rust on an embedded system. It is a project that is both technically challenging and visually impressive, making it a perfect showcase for the knowledge gained throughout the semester.
2323

2424
## Architecture
2525

@@ -29,36 +29,11 @@ The system is composed of the following main modules:
2929

3030
- **STM32 Nucleo-U545RE-Q**: The main microcontroller that runs the chess engine, controls the motors, reads the Hall sensors, and drives the LEDs and LCD.
3131
- **XY Motion System**: Two stepper motors (one for each axis) move a carriage beneath the board. An electromagnet mounted on the carriage attracts and moves the magnetic chess pieces.
32-
- **Hall Sensor Matrix**: 64 Hall effect sensors (one per square) detect the presence of a magnetic chess piece on each square.
33-
- **LED Matrix**: An 8x8 LED matrix (one LED per square) displays valid moves for the selected piece.
34-
- **LCD Display**: A 16x2 I2C LCD shows the chess timer for both players.
32+
-**LCD Display**: A 16x2 I2C LCD displays the current piece being moved and its legal moves.
3533
- **Power Supply**: A 12V external power supply powers the stepper motors and electromagnet. A voltage regulator steps down to 5V for the logic components.
3634

3735
### Block Diagram
38-
39-
```
40-
+---------------------------+
41-
| STM32 Nucleo-U545RE-Q |
42-
| |
43-
| +--------+ +---------+ |
44-
| | Chess | | Motor | |
45-
| | Engine | | Control | |
46-
| +--------+ +---------+ |
47-
| | | |
48-
+-------|------------|------+
49-
| |
50-
v v
51-
+---------------+ +------------------+
52-
| Hall Sensor | | Stepper Motor X |
53-
| Matrix (8x8) | | Stepper Motor Y |
54-
+---------------+ | Electromagnet |
55-
| +------------------+
56-
v
57-
+---------------+ +---------------+
58-
| LED Matrix | | LCD I2C 1602 |
59-
| (8x8) | | (Timer) |
60-
+---------------+ +---------------+
61-
```
36+
![SchemaBloc](schemabloc.webp)
6237

6338

6439
## Hardware
@@ -89,62 +64,70 @@ The system is composed of the following main modules:
8964
- **Role**: Flyback protection for the electromagnet
9065
- **Connection**: In parallel with the electromagnet, reverse biased
9166

92-
### 7. Hall Effect Sensors SS49E (x64)
93-
- **Role**: Detect the presence of a magnetic chess piece on each square
94-
- **Interface**: Analog output read via ADC on STM32
95-
- **Arrangement**: One sensor per square, arranged in an 8x8 matrix
96-
97-
### 8. LED Matrix 8x8 (x1)
98-
- **Role**: Display valid moves for the currently selected piece
99-
- **Interface**: Controlled via GPIO (row/column multiplexing)
100-
101-
### 9. Resistors 220Ω (x64)
102-
- **Role**: Current-limiting resistors for LEDs
103-
104-
### 10. LCD I2C 1602 (x1)
67+
### 7. LCD I2C 1602 (x1)
10568
- **Role**: Display the chess timer for both players
10669
- **Interface**: I2C (SDA, SCL)
10770

108-
### 11. Power Supply 12V (x1)
71+
### 8. Power Supply 12V (x1)
10972
- **Role**: Power the stepper motors and electromagnet
11073

111-
### 12. Voltage Regulator LM7805 (x1)
112-
- **Role**: Step down 12V to 5V for logic components
113-
114-
### 13. Capacitors 100µF (x2)
74+
### 9. Capacitors 100µF (x1)
11575
- **Role**: Stabilize voltage on the power supply lines
11676

117-
### 14. Breadboard + Jumper Wires
77+
### 10. Breadboard + Jumper Wires
11878
- **Role**: Prototyping and connections
11979

12080
## Schematics
12181

122-
![Schematic](schematic.webp)
82+
![Schematic](schematiculmeu.webp)
12383

12484

12585
## Bill of Materials
12686

12787
| Device | Usage | Price |
12888
|--------|-------|-------|
12989
| STM32 Nucleo-U545RE-Q | Main microcontroller | provided by lab |
130-
| NEMA 17 Stepper Motor x2 | Move electromagnet on X and Y axes | ~60 RON |
131-
| A4988 Stepper Driver x2 | Drive stepper motors | ~20 RON |
132-
| Electromagnet 12V | Move chess pieces | ~15 RON |
90+
| NEMA 17 Stepper Motor x2 | Move electromagnet on X and Y axes | ~200 RON |
91+
| A4988 Stepper Driver x2 | Drive stepper motors | ~16 RON |
92+
| Electromagnet 12V | Move chess pieces | ~50 RON |
13393
| MOSFET IRF540N | Control electromagnet | ~5 RON |
13494
| Diode 1N4007 | Flyback protection | ~1 RON |
135-
| Hall Sensor SS49E x64 | Detect piece positions | ~80 RON |
136-
| LED Matrix 8x8 | Display valid moves | ~10 RON |
137-
| Resistors 220Ω x64 | Current limiting for LEDs | ~5 RON |
13895
| LCD I2C 1602 | Chess timer display | ~15 RON |
13996
| Power Supply 12V | Power motors and electromagnet | ~30 RON |
14097
| Voltage Regulator LM7805 | Step down 12V to 5V | ~3 RON |
14198
| Capacitors 100µF x2 | Voltage stabilization | ~2 RON |
142-
| Breadboard + Jumper Wires | Prototyping | ~20 RON |
143-
| **Total** | | **~266 RON** |
99+
| Breadboard + Jumper Wires | Prototyping | ~25 RON |
100+
| **Total** | | **~347 RON** |
101+
102+
## LOG
103+
### Week 28 April - 2 May
104+
- Components started arriving
105+
106+
### Week 5 May - 11 May
107+
- All components arrived
108+
- Connected and tested the LCD I2C display — successfully displayed text
109+
- Connected and tested the electromagnet with MOSFET IRF540N
110+
- Started assembling the XY motion system
111+
112+
### Week 12 May - 18 May
113+
- Connected and tested the two NEMA17 stepper motors with A4988 drivers
114+
- Built the XY motion system using T6 threaded rods
115+
- Purchased plexiglass for the chess board surface
116+
- Purchased Neodymium magnets for the chess pieces
117+
- Assembled the chess board structure
118+
119+
## Software
120+
121+
| Library | Description | Usage |
122+
|---------|-------------|-------|
123+
| embassy-rs | Async runtime for embedded Rust | Task management, timers, GPIO control |
124+
| embassy-stm32 | Embassy HAL for STM32 | GPIO, I2C, PWM control for motors and LCD |
125+
| embassy-time | Timer abstractions | Delays and timing for motor steps |
144126

145127
## Links
146128

147-
- [STM32 Nucleo-U545RE-Q Documentation](https://www.st.com/en/evaluation-tools/nucleo-u545re-q.html)
148-
- [embassy-rs](https://embassy.dev/)
149-
- [PM-Rust Labs](https://embedded-rust-101.wyliodrin.com/)
150-
- [A4988 Stepper Driver Datasheet](https://www.pololu.com/product/1182)
129+
1. [embassy-rs](https://github.com/embassy-rs/embassy)
130+
2. [STM32 Nucleo-U545RE-Q Documentation](https://www.st.com/en/evaluation-tools/nucleo-u545re-q.html)
131+
3. [PM Lab 02 - GPIO](https://embedded-rust-101.wyliodrin.com/docs/acs_cc/lab/02)
132+
4. [PM Lab 03 - PWM](https://embedded-rust-101.wyliodrin.com/docs/acs_cc/lab/03)
133+
5. [A4988 Stepper Driver Datasheet](https://www.pololu.com/product/1182)
36.2 KB
Loading
Binary file not shown.
41.5 KB
Loading

0 commit comments

Comments
 (0)