From b574dddbdf19d5d573b923d0cc73f90f15003168 Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Mon, 20 Apr 2026 21:39:45 +0300 Subject: [PATCH 01/13] [PM Proiect] - Documentatie - mihai.topa --- .../project/2026/mihai.topa/index.md | 249 ++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md new file mode 100644 index 00000000000..0cc4dc2062f --- /dev/null +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md @@ -0,0 +1,249 @@ +# Wireless Game Controller + +A custom wireless game controller inspired by Xbox/PlayStation designs, built on STM32 Nucleo-U545RE-Q and ESP32-C3, communicating via Bluetooth. + +:::info + +**Author**: Țopa Mihai-Sebastian \ +**Github Project Link**: https://github.com/UPB-PMRust-Students/acs-project-2026-topa-mihai-sebastian + +::: + +--- + +## Description + +This project is a **wireless game controller** designed to replicate the experience of a commercial gamepad (Xbox / PlayStation style). The device communicates with a host computer via **Bluetooth Low Energy (BLE) 5**, presenting itself as a standard **HID (Human Interface Device)** — no drivers needed on any modern OS. + +The controller features: +- **2 analog joysticks** (left/right), each with a clickable button (L3/R3) +- **2 analog triggers** (L2/R2) implemented via a dual-channel slide potentiometer +- **4 face buttons** (A, B, X, Y) +- **D-Pad** (4 directional buttons) +- **Shoulder buttons** (L1, R1) +- **System buttons** (Start, Select, Home) +- **3× AA battery power supply** (4.5V → 3.3V via LDO) + +The system is split between two microcontrollers: +- The **STM32 Nucleo-U545RE-Q** handles all input reading (ADC for joysticks/triggers, GPIO for buttons) and runs the main game logic in **Rust** using the **Embassy** async framework. +- The **ESP32-C3 SuperMini** acts exclusively as a **Bluetooth LE 5 co-processor**, receiving controller state from the STM32 via UART and advertising it to the host as a HID gamepad. + +--- + +## Motivation + +As an avid gamer, I've always been curious about what's inside a game controller. This project is an opportunity to understand the full stack of an embedded HID device — from analog signal acquisition to wireless protocol implementation — while building something genuinely useful and fun. The challenge of splitting responsibilities between two microcontrollers (one for logic, one for wireless) also mirrors real-world embedded system design patterns. + +--- + +## Architecture + +The system is organized into three main layers: + +**Input Layer** — The player's physical interactions (thumbstick movement, button presses, trigger pulls) are captured by analog and digital peripherals connected to the STM32. + +**Processing Layer** — The STM32 reads all inputs, applies dead-zone filtering and scaling, packages the state into a structured report, and sends it over UART to the ESP32-C3. + +**Communication Layer** — The ESP32-C3 receives the HID report and re-transmits it to the host computer via Bluetooth LE 5, presenting itself as a standard gamepad recognized natively by any modern operating system. + +``` +┌─────────────────────────────────────────────────────────────┐ +│ INPUT LAYER │ +│ [Joystick L] [Joystick R] [Triggers L2/R2] [Buttons x18] │ +└───────────────────────┬─────────────────────────────────────┘ + │ ADC / GPIO + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ PROCESSING LAYER (STM32 Nucleo-U545RE-Q) │ +│ - Reads ADC channels (4 joystick axes + 2 triggers) │ +│ - Reads 18 GPIO pins (buttons + D-Pad) │ +│ - Applies dead-zone filtering │ +│ - Packs HID report struct (8 bytes) │ +│ - Sends report over UART TX │ +└───────────────────────┬─────────────────────────────────────┘ + │ UART (115200 baud) + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ COMMUNICATION LAYER (ESP32-C3 SuperMini) │ +│ - Receives HID report over UART RX │ +│ - Advertises as BLE 5 HID Gamepad (HOGP profile) │ +│ - Sends notifications to host on state change │ +│ - Pairs once, auto-reconnects on power-on (bonding NVS) │ +└───────────────────────┬─────────────────────────────────────┘ + │ Bluetooth LE 5 (BLE HID / HOGP) + ▼ + [ Host: Laptop / PC ] +``` + +--- + +## Log + +### Week 1 +- Defined the architecture and component list. +- Researched BLE HID profile (HOGP) and HID report descriptors for gamepads. +- Set up Embassy project for STM32U545 and esp-idf project for ESP32-C3. + +### Week 2 +- Wired joysticks and verified ADC readings on all 4 axes (Morpho connectors CN7/CN10). +- Implemented dead-zone filtering and 12-bit → 8-bit axis scaling in Rust. +- Wired all tactile buttons with internal pull-ups; verified GPIO interrupt debouncing. + +### Week 3 +- Implemented UART communication between STM32 (TX) and ESP32-C3 (RX). +- Implemented BLE HID GATT server on ESP32-C3 using `esp-idf-svc`. +- Tested pairing with laptop — controller recognized as a gamepad with no extra drivers. + +### Week 4 +- Wired L2/R2 dual-channel slide potentiometer and validated analog trigger response. +- Wired 3× AA battery holder and LDO regulator; validated power path (4.5V → 3.3V). +- Full integration test: all inputs reflected correctly on host OS gamepad tester. +- Tuned dead-zones and trigger curves; finalized HID report descriptor. + +--- + +## Hardware + +### Main Components + +#### 1. STM32 Nucleo-U545RE-Q +Main microcontroller board. Runs the Rust/Embassy firmware, reads all analog and digital inputs, drives UART communication with the ESP32-C3. + +- 6 ADC channels: Joystick L (X, Y), Joystick R (X, Y), Trigger L, Trigger R +- 18 GPIO inputs: A, B, X, Y, L1, R1, Start, Select, Home, D-Pad (4), L3, R3, + 2 spare +- 1 UART TX to ESP32-C3 SuperMini +- Pins accessed via ST Morpho connectors CN7 + CN10 (≈42 pini liberi, nevoie de 26) + +#### 2. ESP32-C3 SuperMini +Bluetooth LE 5 co-processor. Receives HID reports from the STM32 via UART and advertises them to the host as a standard gamepad — natively recognized by Windows, Linux, and macOS without any additional drivers. + +- BLE 5 HID over GATT Profile (HOGP), Appearance = Gamepad (0x03C4) +- Firmware: Rust + `esp-idf-svc` + `esp-idf-hal` +- Bonding stored in NVS flash — auto-reconnects on power-on after first pairing + +#### 3. Analog Joysticks — PS2 Breakout Module (×2) +Standard XY joystick modules with integrated push-button (L3/R3). Each module: VCC, GND, VRx, VRy, SW. + +- VRx/VRy → 2 ADC channels on STM32 +- SW → GPIO with internal pull-up + +#### 4. Tactile Buttons — 12×12mm with round cap (×20) +A, B, X, Y, L1, R1, Start, Select, Home, D-Pad ×4, L3, R3, + 2 spare. + +- Wired between GPIO and GND, internal pull-ups enabled in software +- 5 ms software debounce filter + +#### 5. Analog Triggers — Dual-Channel Slide Potentiometer B10K (×1) +One dual-channel module covers both L2 and R2. + +- Wiper pins → 2 ADC channels on STM32 +- 0–3.3V range mapped to 0–255 axis value per trigger + +#### 6. Power Supply — 3× AA Battery + AMS1117-3.3V LDO + +3× AA alkaline (4.5V) feeds into the AMS1117-3.3 LDO regulator → stable 3.3V rail for STM32 and ESP32-C3. + +- No charging circuit needed — simpler and safer for a breadboard prototype +- Runtime: ~8–10 hours with alkaline AA +- Batteries available at any supermarket or electronics store +- Upgrade path: swap battery holder for Li-Po 3.7V + TP4056 module — rest of circuit unchanged + +**Power path:** +``` +3× AA (4.5V) → AMS1117-3.3 LDO → 3.3V Rail → STM32 Nucleo + ESP32-C3 SuperMini +``` + +**UART connection (3.3V logic, no level shifter needed):** +``` +STM32 TX (Morpho CN10) → ESP32-C3 RX +STM32 GND (Morpho CN7) → ESP32-C3 GND +3.3V (Morpho CN7) → ESP32-C3 3V3 +``` + +--- + +### Schematics + +*(Add KiCad or Fritzing schematic here)* + +--- + +### Bill of Materials + +| Device | Usage | Preț | +|--------|-------|------| +| [STM32 Nucleo-U545RE-Q](https://www.st.com/en/evaluation-tools/nucleo-u545re-q.html) | Main microcontroller | ~110 RON | +| ESP32-C3 SuperMini — [sigmanortec.ro](https://sigmanortec.ro/en/esp32-c3-supermini-development-board-33v-wifi-bluetooth) / [emag.ro](https://www.emag.ro/microcontroller-esp32-c3-super-mini-wifi-bt-5-0-usb-c-1-2-29/pd/D5C34SYBM/) | Bluetooth LE 5 co-processor — HID gamepad | [~30 RON](https://sigmanortec.ro/en/esp32-c3-supermini-development-board-33v-wifi-bluetooth) | +| [PS2 Joystick Breakout ×2](https://www.optimusdigital.ro/en/touch-sensors/742-ps2-joystick-breakout.html) | Joystick stâng + drept cu L3/R3 | [~10 RON × 2](https://www.optimusdigital.ro/en/touch-sensors/742-ps2-joystick-breakout.html) | +| [Butoane tactile 12×12mm cu capac ×20](https://www.optimusdigital.ro/ro/207-butoane-i-comutatoare) | A, B, X, Y, D-Pad, L1, R1, Start, Select, Home | [~0.50 RON × 20](https://www.optimusdigital.ro/ro/207-butoane-i-comutatoare) | +| [Potențiometru Liniar Dual-Canal B10K 75mm](https://www.optimusdigital.ro/ro/componente-electronice-potentiometre/3914-poteniometru-liniar-cu-doua-canale-de-75-mm-b10k.html) | Triggere analogice L2/R2 (un singur modul) | [~15 RON](https://www.optimusdigital.ro/ro/componente-electronice-potentiometre/3914-poteniometru-liniar-cu-doua-canale-de-75-mm-b10k.html) | +| [Suport baterii 3× AA](https://www.emag.ro/suport-baterii-aa-pentru-3buc-cu-contacte-pentru-lipire-gni0055/pd/D62S5JYBM/) | Alimentare 4.5V | [~5 RON](https://www.emag.ro/suport-baterii-aa-pentru-3buc-cu-contacte-pentru-lipire-gni0055/pd/D62S5JYBM/) | +| Baterii AA alkaline ×3 | Putere efectivă | ~10 RON (orice magazin) | +| [Modul LDO AMS1117-3.3V](https://www.optimusdigital.ro/en/others/2219-mini-ams1117-33-33v-voltage-regulator-module.html) | Regulator 3.3V | [~5 RON](https://www.optimusdigital.ro/en/others/2219-mini-ams1117-33-33v-voltage-regulator-module.html) | +| [Breadboard 830p ×2](https://sigmanortec.ro/en/breadboard-830-points-mb-102) | Bază prototipare | [~11 RON × 2](https://sigmanortec.ro/en/breadboard-830-points-mb-102) | +| [Cabluri Dupont M-M 65 buc](https://www.optimusdigital.ro/en/wires-with-connectors/12-breadboard-jumper-wire-set-65-pcs.html) | Conexiuni breadboard | [~8 RON](https://www.optimusdigital.ro/en/wires-with-connectors/12-breadboard-jumper-wire-set-65-pcs.html) | +| [Cabluri Dupont M-F 40 buc](https://www.optimusdigital.ro/en/wires-with-connectors/214-colored-40p-254-mm-pitch-male-to-female-wire.html) | Conexiuni module joystick | [~6 RON](https://www.optimusdigital.ro/en/wires-with-connectors/214-colored-40p-254-mm-pitch-male-to-female-wire.html) | +| Condensatoare ceramice 100nF ×10 | Decuplare VCC / ADC | ~3 RON | +| Condensatoare electrolitice 10µF ×5 | Filtrare șină 3.3V | ~3 RON | +| Set rezistențe 10kΩ / 1kΩ | Pull-up / protecție UART | ~5 RON | +| | | **Total ~232 RON** | + +--- + +## Software + +### STM32 Firmware (Rust + Embassy) + +| Library | Description | Usage | +|---------|-------------|-------| +| [embassy-stm32](https://github.com/embassy-rs/embassy/tree/main/embassy-stm32) | HAL for STM32U5 | ADC reads (joysticks, triggers), GPIO (buttons), UART TX | +| [embassy-executor](https://github.com/embassy-rs/embassy/tree/main/embassy-executor) | Async task executor | Runs ADC task, button polling task, and UART send task concurrently | +| [embassy-time](https://github.com/embassy-rs/embassy/tree/main/embassy-time) | Time management | Button debounce timers, polling intervals | +| [embassy-sync](https://github.com/embassy-rs/embassy/tree/main/embassy-sync) | Async primitives | Mutex/Channel for sharing controller state between tasks | +| [defmt](https://github.com/knurling-rs/defmt) | Debug logging | RTT-based logging over STLINK-V3EC probe | +| [panic-probe](https://github.com/knurling-rs/probe-run) | Error handling | Crash reporting via integrated probe | + +**Key Implementation Details (STM32 side):** + +- **ADC Scanning**: Embassy's `AdcChannel` scans all 6 analog inputs in sequence. Readings are 12-bit (0–4095), scaled to i8 (−128 to +127) for joysticks and u8 (0–255) for triggers. +- **Dead Zone Filtering**: ±8% dead zone applied to each joystick axis before packaging the report. +- **Button Debouncing**: Each GPIO polled every 5ms; state change registered only after 2 stable consecutive polls. +- **HID Report Struct**: Packed 8-byte struct sent over UART on every state change. + +```rust +#[repr(C, packed)] +struct HidReport { + lx: i8, ly: i8, // Left joystick + rx: i8, ry: i8, // Right joystick + lt: u8, rt: u8, // Triggers + buttons_lo: u8, // Buttons 0–7 + buttons_hi: u8, // Buttons 8–15 (D-Pad + extras) +} +``` + +### ESP32-C3 Firmware (Rust + esp-idf-svc) + +| Library | Description | Usage | +|---------|-------------|-------| +| [esp-idf-svc](https://github.com/esp-rs/esp-idf-svc) | ESP-IDF Rust wrapper | BLE GATT server, HID over GATT Profile (HOGP) | +| [esp-idf-hal](https://github.com/esp-rs/esp-idf-hal) | Hardware abstraction | UART RX from STM32 | +| [embedded-svc](https://github.com/esp-rs/embedded-svc) | Embedded service traits | Abstractions for BLE traits | + +**Key Implementation Details (ESP32-C3 side):** + +- **BLE HID Profile (HOGP)**: GATT server with HID Service (UUID 0x1812). Report Descriptor describes 6 axes + 18 buttons — recognized natively as a gamepad by any modern OS. +- **UART Reception**: Listens for 8-byte HID reports; sends BLE notification only on state change to reduce radio traffic. +- **Pairing & Bonding**: Keys stored in NVS flash — host pairs once, auto-reconnects afterwards. +- **Advertising**: Device advertises as `"RustPad"` with Appearance = Gamepad (0x03C4). + +--- + +## Links + +1. [Embassy Async Embedded Framework (Rust)](https://embassy.dev/) +2. [esp-rs — Rust on ESP32](https://github.com/esp-rs) +3. [BLE HID over GATT Profile Specification](https://www.bluetooth.com/specifications/specs/hid-over-gatt-profile-1-0/) +4. [USB HID Usage Tables (Gamepad)](https://usb.org/sites/default/files/hut1_21.pdf) +5. [STM32 Nucleo-U545RE-Q User Manual (UM3062)](https://www.st.com/resource/en/user_manual/um3062-stm32u3u5-nucleo64-board-mb1841-stmicroelectronics.pdf) +6. [ESP32-C3 SuperMini Pinout](https://www.espboards.dev/esp32/esp32-c3-super-mini/) +7. [KiCad EDA — Free PCB Design](https://www.kicad.org/) \ No newline at end of file From 3a78eb4d607868b027ce20944f61566c01cf3d7e Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Sun, 26 Apr 2026 17:48:45 +0300 Subject: [PATCH 02/13] [PM Proiect] - Documentatie v2- mihai.topa --- .../project/2026/mihai.topa/Schematic.svg | 47447 ++++++++++++++++ .../project/2026/mihai.topa/diagrama.svg | 4 + .../project/2026/mihai.topa/index.md | 255 +- 3 files changed, 47554 insertions(+), 152 deletions(-) create mode 100644 website/versioned_docs/version-acs_cc/project/2026/mihai.topa/Schematic.svg create mode 100644 website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/Schematic.svg b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/Schematic.svg new file mode 100644 index 00000000000..975b6340e14 --- /dev/null +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/Schematic.svg @@ -0,0 +1,47447 @@ + + + +SVG Image created as Schematic.svg date 2026-04-26T17:38:17 + Image generated by Eeschema-SVG + + + + + + + + + + + +1 +1 + + + + + +2 +2 + + + + + + + + + + +3 +3 + + + + + + + + + + + + + +4 +4 + + + +5 +5 + + + + + + + + + + + + + + + +6 +6 + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + +2 +2 + + + + + + + + + + +3 +3 + + + + + + + + + + + + + +4 +4 + + + +5 +5 + + + + + + + + + + + + + + + +6 +6 + + + + + + + + + + + + + + + + + + + + + + + + +A +A + + + +B +B + + + + + + + + + + + + + + + + + + +C +C + + + + + + + + + + + + + + + +D +D + + + + + + + + + + + + + + + +A +A + + + +B +B + + + + + + + + + + + + + + + + + + +C +C + + + + + + + + + + + + + + + +D +D + + + + + + + + + + + + +Date: +Date: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +KiCad E.D.A. 10.0.1 +KiCad E.D.A. 10.0.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Rev: +Rev: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Size: A4 +Size: A4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Id: 1/1 +Id: 1/1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Title: +Title: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +File: untitled.kicad_sch +File: untitled.kicad_sch + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Sheet: / +Sheet: / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + + +2 +2 + + + + + + + + + + + +3 +3 + + + + + + + + + + + + + + + +J6 +J6 + + + + + + + + + + + + + + + + + + + + + + + + + + +TriggerL2(potentiometru) +TriggerL2(potentiometru) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SW9 +SW9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + + +2 +2 + + + + + + + + + + + +3 +3 + + + + + + + + + + + + + + + +J5 +J5 + + + + + + + + + + + + + + + + + + + + +TriggerR2(potentiometru) +TriggerR2(potentiometru) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + + +2 +2 + + + + + + + + + + + +3 +3 + + + + + + + + + + + + + + +4 +4 + + + + +5 +5 + + + + + + + + + + + + + + + + + +J2 +J2 + + + + + + + + + + + + + + + +Joystick_Right +Joystick_Right + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VBAT + +VBAT + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 + +1 + + + + + + + + +PC13 +PC13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2 +2 + + + + + + + + + + + + + +PC14 +PC14 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +3 +3 + + + + + + + + + + + + + + + + +PC15 +PC15 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +4 +4 + + + + + + +PH0 +PH0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +5 +5 + + + + + + + + + + + + + + + + + + +PH1 +PH1 + + + + + + + + + + + + + + + + + + + + +6 +6 + + + + + + + + + + + + + + + + + + + + + + + + +NRST +NRST + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +7 +7 + + + + + +PC0 +PC0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +8 +8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC1 +PC1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +9 +9 + + + + + + + + + + + + + + + + + + + + + + + + +PC2 +PC2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +10 +10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC3 +PC3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +11 +11 + + + + + + + + + + + + + + +VSSA + +VSSA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +12 + +12 + + + + + + + + + + + + + + + + + + + +VDDA + +VDDA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +13 + +13 + + + + + + + + + + + + + + + + + + + + + +PA0 +PA0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +14 +14 + + + + + + + + + + + +PA1 +PA1 + + + + + + + + + + + + + + + + + + + + +15 +15 + + + + + + + + + + + + + + + + + + + + + + + +PA2 +PA2 + + + + + + + + + + + + + + + + + + + + + + + + + +16 +16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PA3 +PA3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +17 +17 + + + + + + + + + + + +VSS + +VSS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +18 + +18 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VDD + +VDD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +19 + +19 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PA4 +PA4 + + + + + + + + + + + + + + + + + + +20 +20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PA5 +PA5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +21 +21 + + + + + + + + + + + + + + + + + + +PA6 +PA6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +22 +22 + + + + + + + + + + + + + + + + + + + + + + + +PA7 +PA7 + + + + + + + + + + + + + + + + + +23 +23 + + + + + + + + + + + + + + + + + + + + + + + + + + +PC4 +PC4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +24 +24 + + + + + + + + + + + + + + + + +PC5 +PC5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +25 +25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB0 +PB0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +26 +26 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB1 +PB1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +27 +27 + + + + + + + + + + + + + + + +PB2 +PB2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +28 +28 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB10 +PB10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +29 +29 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VCAP +VCAP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +30 +30 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VDD + +VDD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +32 + +32 + + + + + + + + + + + + + + + + + + + + + + + + + + +PB12 +PB12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +33 +33 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB13 +PB13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +34 +34 + + + + + + + + + + + + + + + + + + + +PB14 +PB14 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +35 +35 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB15 +PB15 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +36 +36 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC6 +PC6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +37 +37 + + + + + + + + + + + + + + + + + + +PC7 +PC7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +38 +38 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC8 +PC8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +39 +39 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC9 +PC9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +40 +40 + + + + + + + + + + + + + + + + + + + + + + + + + + +PA8 +PA8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +41 +41 + + + + + + + + + + + +PA9 +PA9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +42 +42 + + + + + + + + + + + + + + + + +PA10 +PA10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +43 +43 + + + + + + + + + + + + + + + + + + + +PA11 +PA11 + + + + + + + + + + + + + + + + + + + + + + + + + +44 +44 + + + + + + + + + +PA12 +PA12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +45 +45 + + + + + + + + + + + + + + + + + + + + + +PA13 +PA13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +46 +46 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VDDUSB + +VDDUSB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +48 + +48 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PA14 +PA14 + + + + + + + + + + + + + + + + + + + + + + + +49 +49 + + + + + + + + + + + + + + + + + + + + + + + + + + + +PA15 +PA15 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +50 +50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC10 +PC10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +51 +51 + + + + + + + + + + + + + + + + + + + + + + + +PC11 +PC11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +52 +52 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC12 +PC12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +53 +53 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PD2 +PD2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +54 +54 + + + + + + + + + + + + + + + + + + + + + +PB3 +PB3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +55 +55 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB4 +PB4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +56 +56 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB5 +PB5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +57 +57 + + + + + + + + + + + + + + + + + + + + +PB6 +PB6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +58 +58 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB7 +PB7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +59 +59 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PH3 +PH3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +60 +60 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB8 +PB8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +61 +61 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB9 +PB9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +62 +62 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VDD + +VDD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +64 + +64 + + + + + + + + + + + + + + + + + + + + + + + + + + +U1 +U1 + + + + + + + + + + + + + + +STM32U545RETx +STM32U545RETx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PWR_FLAG +PWR_FLAG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C1 +C1 + + + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C2 +C2 + + + + + + + + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C6 +C6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C4 +C4 + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C5 +C5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + + +2 +2 + + + + + + + + + + + +3 +3 + + + + + + + + + + + + + + +4 +4 + + + + +5 +5 + + + + + + + + + + + + + + + + + +J1 +J1 + + + + + + + + + + +Joystick_Left +Joystick_Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 + +1 + + + + + + +2 +2 + + + + + + + + + + + + +3 + +3 + + + + + + + + + + + + + + + +Q1 +Q1 + + + + + + + + + + + + + + + + + + + + + + + + + + +Motor_Driver +Motor_Driver + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PWR_FLAG +PWR_FLAG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + + +2 +2 + + + + + + + + + + + + +J3 +J3 + + + + + + + + + + + + + + + + + + +Vibration_Motor +Vibration_Motor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C3 +C3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +R1 +R1 + + + + + + + + + + + + + + + + +1k +1k + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +D1 +D1 + + + + + + + + + + + + + + + + + +Flyback_Diode +Flyback_Diode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VRx +VRx + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SW +SW + + + + + + + + + + + + + + + + + + + + + + + + + +VRy +VRy + + + + + + + + + + + + + + + + + + + + +SW +SW + + + + + + + + + + + + + + + + + + + + + + + + + +VRy +VRy + + + + + + + + + + + + + + + + + + + + +VRx +VRx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C1 +C1 + + + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C2 +C2 + + + + + + + + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C4 +C4 + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C5 +C5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PWR_FLAG +PWR_FLAG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C3 +C3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +D1 +D1 + + + + + + + + + + + + + + + + + +Flyback_Diode +Flyback_Diode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +J3 +J3 + + + + + + + + + + + + + + + + + + +Vibration_Motor +Vibration_Motor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + + +2 +2 + + + + + + + + + + + + +Q1 +Q1 + + + + + + + + + + + + + + + + + + + + + + + + + + +Motor_Driver +Motor_Driver + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 + +1 + + + + + + +2 +2 + + + + + + + + + + + + +3 + +3 + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +J1 +J1 + + + + + + + + + + +Joystick_Left +Joystick_Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + + +2 +2 + + + + + + + + + + + +3 +3 + + + + + + + + + + + + + + +4 +4 + + + + +5 +5 + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +C6 +C6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +100n +100n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PWR_FLAG +PWR_FLAG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +U1 +U1 + + + + + + + + + + + + + + +STM32U545RETx +STM32U545RETx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VBAT + +VBAT + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 + +1 + + + + + + + + +PC13 +PC13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2 +2 + + + + + + + + + + + + + +PC14 +PC14 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +3 +3 + + + + + + + + + + + + + + + + +PC15 +PC15 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +4 +4 + + + + + + +PH0 +PH0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +5 +5 + + + + + + + + + + + + + + + + + + +PH1 +PH1 + + + + + + + + + + + + + + + + + + + + +6 +6 + + + + + + + + + + + + + + + + + + + + + + + + +NRST +NRST + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +7 +7 + + + + + +PC0 +PC0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +8 +8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC1 +PC1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +9 +9 + + + + + + + + + + + + + + + + + + + + + + + + +PC2 +PC2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +10 +10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC3 +PC3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +11 +11 + + + + + + + + + + + + + + +VSSA + +VSSA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +12 + +12 + + + + + + + + + + + + + + + + + + + +VDDA + +VDDA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +13 + +13 + + + + + + + + + + + + + + + + + + + + + +PA0 +PA0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +14 +14 + + + + + + + + + + + +PA1 +PA1 + + + + + + + + + + + + + + + + + + + + +15 +15 + + + + + + + + + + + + + + + + + + + + + + + +PA2 +PA2 + + + + + + + + + + + + + + + + + + + + + + + + + +16 +16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PA3 +PA3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +17 +17 + + + + + + + + + + + +VSS + +VSS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +18 + +18 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VDD + +VDD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +19 + +19 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PA4 +PA4 + + + + + + + + + + + + + + + + + + +20 +20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PA5 +PA5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +21 +21 + + + + + + + + + + + + + + + + + + +PA6 +PA6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +22 +22 + + + + + + + + + + + + + + + + + + + + + + + +PA7 +PA7 + + + + + + + + + + + + + + + + + +23 +23 + + + + + + + + + + + + + + + + + + + + + + + + + + +PC4 +PC4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +24 +24 + + + + + + + + + + + + + + + + +PC5 +PC5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +25 +25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB0 +PB0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +26 +26 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB1 +PB1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +27 +27 + + + + + + + + + + + + + + + +PB2 +PB2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +28 +28 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB10 +PB10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +29 +29 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VCAP +VCAP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +30 +30 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VDD + +VDD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +32 + +32 + + + + + + + + + + + + + + + + + + + + + + + + + + +PB12 +PB12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +33 +33 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB13 +PB13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +34 +34 + + + + + + + + + + + + + + + + + + + +PB14 +PB14 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +35 +35 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB15 +PB15 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +36 +36 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC6 +PC6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +37 +37 + + + + + + + + + + + + + + + + + + +PC7 +PC7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +38 +38 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC8 +PC8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +39 +39 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC9 +PC9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +40 +40 + + + + + + + + + + + + + + + + + + + + + + + + + + +PA8 +PA8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +41 +41 + + + + + + + + + + + +PA9 +PA9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +42 +42 + + + + + + + + + + + + + + + + +PA10 +PA10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +43 +43 + + + + + + + + + + + + + + + + + + + +PA11 +PA11 + + + + + + + + + + + + + + + + + + + + + + + + + +44 +44 + + + + + + + + + +PA12 +PA12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +45 +45 + + + + + + + + + + + + + + + + + + + + + +PA13 +PA13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +46 +46 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VDDUSB + +VDDUSB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +48 + +48 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PA14 +PA14 + + + + + + + + + + + + + + + + + + + + + + + +49 +49 + + + + + + + + + + + + + + + + + + + + + + + + + + + +PA15 +PA15 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +50 +50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC10 +PC10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +51 +51 + + + + + + + + + + + + + + + + + + + + + + + +PC11 +PC11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +52 +52 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PC12 +PC12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +53 +53 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PD2 +PD2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +54 +54 + + + + + + + + + + + + + + + + + + + + + +PB3 +PB3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +55 +55 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB4 +PB4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +56 +56 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB5 +PB5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +57 +57 + + + + + + + + + + + + + + + + + + + + +PB6 +PB6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +58 +58 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB7 +PB7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +59 +59 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PH3 +PH3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +60 +60 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB8 +PB8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +61 +61 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PB9 +PB9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +62 +62 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VDD + +VDD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +64 + +64 + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +J2 +J2 + + + + + + + + + + + + + + + +Joystick_Right +Joystick_Right + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + + +2 +2 + + + + + + + + + + + +3 +3 + + + + + + + + + + + + + + +4 +4 + + + + +5 +5 + + + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +J5 +J5 + + + + + + + + + + + + + + + + + + + + +TriggerR2(potentiometru) +TriggerR2(potentiometru) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + + +2 +2 + + + + + + + + + + + +3 +3 + + + + + + + + + + + + + + + + + + + + + + + + + +SW9 +SW9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +J6 +J6 + + + + + + + + + + + + + + + + + + + + + + + + + + +TriggerL2(potentiometru) +TriggerL2(potentiometru) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +1 + + + + + + +2 +2 + + + + + + + + + + + +3 +3 + + + + + + + + + + + + + + + +GND +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++3V3 ++3V3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg new file mode 100644 index 00000000000..aba0ae12bb8 --- /dev/null +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg @@ -0,0 +1,4 @@ + + + +
Microcontroller
(STM32 Nucleo)
Triggers L2/R2 (ADC)
Buttons x18 (GPIO)
PC/Laptop (USB-C HID)
Vibration Motor (PWM)
Power Supply (USB-C 5v)
Joysticks x2 (ADC)
\ No newline at end of file diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md index 0cc4dc2062f..7944e02db7d 100644 --- a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md @@ -1,6 +1,6 @@ -# Wireless Game Controller +# Game Controller -A custom wireless game controller inspired by Xbox/PlayStation designs, built on STM32 Nucleo-U545RE-Q and ESP32-C3, communicating via Bluetooth. +A custom wired game controller inspired by Xbox/PlayStation designs, built on STM32 Nucleo-U545RE-Q, connected to the host via USB-C. :::info @@ -13,66 +13,48 @@ A custom wireless game controller inspired by Xbox/PlayStation designs, built on ## Description -This project is a **wireless game controller** designed to replicate the experience of a commercial gamepad (Xbox / PlayStation style). The device communicates with a host computer via **Bluetooth Low Energy (BLE) 5**, presenting itself as a standard **HID (Human Interface Device)** — no drivers needed on any modern OS. +This project is a **wired game controller** that connects to a computer via **USB-C**, presenting itself as a standard **HID (Human Interface Device)** — natively recognized by any modern operating system, no extra drivers needed. The controller features: - **2 analog joysticks** (left/right), each with a clickable button (L3/R3) -- **2 analog triggers** (L2/R2) implemented via a dual-channel slide potentiometer +- **2 analog triggers** (L2/R2), each with its own linear potentiometer - **4 face buttons** (A, B, X, Y) -- **D-Pad** (4 directional buttons) +- **D-Pad** (4 directions) - **Shoulder buttons** (L1, R1) - **System buttons** (Start, Select, Home) -- **3× AA battery power supply** (4.5V → 3.3V via LDO) +- **Vibration motor** for haptic feedback, PWM-controlled +- USB-C powered — no batteries needed -The system is split between two microcontrollers: -- The **STM32 Nucleo-U545RE-Q** handles all input reading (ADC for joysticks/triggers, GPIO for buttons) and runs the main game logic in **Rust** using the **Embassy** async framework. -- The **ESP32-C3 SuperMini** acts exclusively as a **Bluetooth LE 5 co-processor**, receiving controller state from the STM32 via UART and advertising it to the host as a HID gamepad. +I initially planned a two-microcontroller architecture (STM32 + ESP32-C3) communicating over Bluetooth LE, but decided against it — coordinating BLE HID between two microcontrollers turned out to be quite complex. The final design uses a **single STM32 Nucleo-U545RE-Q** that reads all inputs and connects directly to the host as a USB HID gamepad. --- ## Motivation -As an avid gamer, I've always been curious about what's inside a game controller. This project is an opportunity to understand the full stack of an embedded HID device — from analog signal acquisition to wireless protocol implementation — while building something genuinely useful and fun. The challenge of splitting responsibilities between two microcontrollers (one for logic, one for wireless) also mirrors real-world embedded system design patterns. +As an avid gamer, I wanted to understand how a controller works from the ground up — from analog signal acquisition to OS-level communication. This project lets me work with ADC, GPIO, PWM, and USB HID all in one practical device. --- ## Architecture -The system is organized into three main layers: - -**Input Layer** — The player's physical interactions (thumbstick movement, button presses, trigger pulls) are captured by analog and digital peripherals connected to the STM32. - -**Processing Layer** — The STM32 reads all inputs, applies dead-zone filtering and scaling, packages the state into a structured report, and sends it over UART to the ESP32-C3. - -**Communication Layer** — The ESP32-C3 receives the HID report and re-transmits it to the host computer via Bluetooth LE 5, presenting itself as a standard gamepad recognized natively by any modern operating system. - ``` ┌─────────────────────────────────────────────────────────────┐ │ INPUT LAYER │ -│ [Joystick L] [Joystick R] [Triggers L2/R2] [Buttons x18] │ +│ [Joystick L] [Joystick R] [Trigger L] [Trigger R] │ +│ [Buttons x18] [Vibration Motor] │ └───────────────────────┬─────────────────────────────────────┘ - │ ADC / GPIO + │ ADC / GPIO / PWM ▼ ┌─────────────────────────────────────────────────────────────┐ -│ PROCESSING LAYER (STM32 Nucleo-U545RE-Q) │ -│ - Reads ADC channels (4 joystick axes + 2 triggers) │ -│ - Reads 18 GPIO pins (buttons + D-Pad) │ -│ - Applies dead-zone filtering │ -│ - Packs HID report struct (8 bytes) │ -│ - Sends report over UART TX │ +│ STM32 Nucleo-U545RE-Q │ +│ - Reads ADC: 4 joystick axes + 2 triggers │ +│ - Reads GPIO: 18 buttons │ +│ - Controls vibration motor via PWM │ +│ - Acts as USB HID Gamepad │ └───────────────────────┬─────────────────────────────────────┘ - │ UART (115200 baud) + │ USB-C ▼ -┌─────────────────────────────────────────────────────────────┐ -│ COMMUNICATION LAYER (ESP32-C3 SuperMini) │ -│ - Receives HID report over UART RX │ -│ - Advertises as BLE 5 HID Gamepad (HOGP profile) │ -│ - Sends notifications to host on state change │ -│ - Pairs once, auto-reconnects on power-on (bonding NVS) │ -└───────────────────────┬─────────────────────────────────────┘ - │ Bluetooth LE 5 (BLE HID / HOGP) - ▼ - [ Host: Laptop / PC ] + [ PC / Laptop ] ``` --- @@ -81,24 +63,20 @@ The system is organized into three main layers: ### Week 1 - Defined the architecture and component list. -- Researched BLE HID profile (HOGP) and HID report descriptors for gamepads. -- Set up Embassy project for STM32U545 and esp-idf project for ESP32-C3. +- Researched the USB HID protocol for gamepads. ### Week 2 -- Wired joysticks and verified ADC readings on all 4 axes (Morpho connectors CN7/CN10). -- Implemented dead-zone filtering and 12-bit → 8-bit axis scaling in Rust. -- Wired all tactile buttons with internal pull-ups; verified GPIO interrupt debouncing. +- Wired the joysticks and verified ADC readings on all 4 axes. +- Wired all buttons and verified GPIO readings. ### Week 3 -- Implemented UART communication between STM32 (TX) and ESP32-C3 (RX). -- Implemented BLE HID GATT server on ESP32-C3 using `esp-idf-svc`. -- Tested pairing with laptop — controller recognized as a gamepad with no extra drivers. +- Implemented USB HID on the STM32 using the Embassy USB stack. +- Tested controller recognition by the operating system. ### Week 4 -- Wired L2/R2 dual-channel slide potentiometer and validated analog trigger response. -- Wired 3× AA battery holder and LDO regulator; validated power path (4.5V → 3.3V). -- Full integration test: all inputs reflected correctly on host OS gamepad tester. -- Tuned dead-zones and trigger curves; finalized HID report descriptor. +- Wired the potentiometers for the analog triggers. +- Wired the vibration motor and tested PWM control. +- Full integration test. --- @@ -107,143 +85,116 @@ The system is organized into three main layers: ### Main Components #### 1. STM32 Nucleo-U545RE-Q -Main microcontroller board. Runs the Rust/Embassy firmware, reads all analog and digital inputs, drives UART communication with the ESP32-C3. +The only microcontroller in the project. Reads all inputs, controls the vibration motor, and communicates with the host via USB HID. - 6 ADC channels: Joystick L (X, Y), Joystick R (X, Y), Trigger L, Trigger R -- 18 GPIO inputs: A, B, X, Y, L1, R1, Start, Select, Home, D-Pad (4), L3, R3, + 2 spare -- 1 UART TX to ESP32-C3 SuperMini -- Pins accessed via ST Morpho connectors CN7 + CN10 (≈42 pini liberi, nevoie de 26) - -#### 2. ESP32-C3 SuperMini -Bluetooth LE 5 co-processor. Receives HID reports from the STM32 via UART and advertises them to the host as a standard gamepad — natively recognized by Windows, Linux, and macOS without any additional drivers. - -- BLE 5 HID over GATT Profile (HOGP), Appearance = Gamepad (0x03C4) -- Firmware: Rust + `esp-idf-svc` + `esp-idf-hal` -- Bonding stored in NVS flash — auto-reconnects on power-on after first pairing +- 18 GPIO pins for buttons +- 1 PWM output for the vibration motor +- USB Full Speed via USB-C (CN3) to the host +- Powered via USB-C; provides 3.3V on Morpho pins (CN7) for peripherals -#### 3. Analog Joysticks — PS2 Breakout Module (×2) +#### 2. Analog Joysticks PS2 Module (×2) Standard XY joystick modules with integrated push-button (L3/R3). Each module: VCC, GND, VRx, VRy, SW. -- VRx/VRy → 2 ADC channels on STM32 +- VRx/VRy → 2 ADC channels per joystick - SW → GPIO with internal pull-up -#### 4. Tactile Buttons — 12×12mm with round cap (×20) -A, B, X, Y, L1, R1, Start, Select, Home, D-Pad ×4, L3, R3, + 2 spare. +#### 3. Tactile Buttons 12×12mm (×20) +A, B, X, Y, L1, R1, Start, Select, Home, D-Pad ×4, L3, R3 + 2 spare. -- Wired between GPIO and GND, internal pull-ups enabled in software -- 5 ms software debounce filter +- Wired between GPIO and GND, internal pull-up enabled in firmware -#### 5. Analog Triggers — Dual-Channel Slide Potentiometer B10K (×1) -One dual-channel module covers both L2 and R2. +#### 4. Analog Triggers — Linear Potentiometers 10K (×2) +One potentiometer per trigger (L2 and R2). -- Wiper pins → 2 ADC channels on STM32 -- 0–3.3V range mapped to 0–255 axis value per trigger +- Wiper → ADC channel on STM32 +- 0–3.3V range mapped to the trigger axis value -#### 6. Power Supply — 3× AA Battery + AMS1117-3.3V LDO +#### 5. Vibration Motor (PWM, DC, 3–5V) +ERM coin-type motor, driven by an NPN transistor (S8050 or BC337) and a flyback diode (1N4148). -3× AA alkaline (4.5V) feeds into the AMS1117-3.3 LDO regulator → stable 3.3V rail for STM32 and ESP32-C3. - -- No charging circuit needed — simpler and safer for a breadboard prototype -- Runtime: ~8–10 hours with alkaline AA -- Batteries available at any supermarket or electronics store -- Upgrade path: swap battery holder for Li-Po 3.7V + TP4056 module — rest of circuit unchanged - -**Power path:** ``` -3× AA (4.5V) → AMS1117-3.3 LDO → 3.3V Rail → STM32 Nucleo + ESP32-C3 SuperMini +STM32 GPIO (PWM) → Transistor base → Motor → 3.3V + 1N4148 in parallel with motor ``` -**UART connection (3.3V logic, no level shifter needed):** -``` -STM32 TX (Morpho CN10) → ESP32-C3 RX -STM32 GND (Morpho CN7) → ESP32-C3 GND -3.3V (Morpho CN7) → ESP32-C3 3V3 -``` +#### 6. Power Supply + +The board is powered via USB-C (5V from the USB bus). The Nucleo's onboard regulator provides 3.3V on the Morpho pins (CN7) for all peripherals. No external regulator is needed. --- ### Schematics -*(Add KiCad or Fritzing schematic here)* +![Diagrama controller](./diagrama.svg) + +![Schematic](./Schematic.svg) + +The schematic covers the following connections: + +**Joysticks (×2)** +| Signal | STM32 Pin | +|--------|-----------| +| Joystick L — VRx | ADC channel (TBD) | +| Joystick L — VRy | ADC channel (TBD) | +| Joystick L — SW | GPIO (TBD) | +| Joystick R — VRx | ADC channel (TBD) | +| Joystick R — VRy | ADC channel (TBD) | +| Joystick R — SW | GPIO (TBD) | + +**Triggers (×2)** +| Signal | STM32 Pin | +|--------|-----------| +| Trigger L — wiper | ADC channel (TBD) | +| Trigger R — wiper | ADC channel (TBD) | + +**Buttons (×18)** +| Button | STM32 Pin | +|--------|-----------| +| A, B, X, Y | GPIO (TBD) | +| L1, R1 | GPIO (TBD) | +| Start, Select, Home | GPIO (TBD) | +| D-Pad ×4 | GPIO (TBD) | +| L3, R3 | GPIO (TBD) | + +**Vibration Motor** +| Signal | STM32 Pin | +|--------|-----------| +| PWM control | TIM channel (TBD) | --- ### Bill of Materials -| Device | Usage | Preț | -|--------|-------|------| -| [STM32 Nucleo-U545RE-Q](https://www.st.com/en/evaluation-tools/nucleo-u545re-q.html) | Main microcontroller | ~110 RON | -| ESP32-C3 SuperMini — [sigmanortec.ro](https://sigmanortec.ro/en/esp32-c3-supermini-development-board-33v-wifi-bluetooth) / [emag.ro](https://www.emag.ro/microcontroller-esp32-c3-super-mini-wifi-bt-5-0-usb-c-1-2-29/pd/D5C34SYBM/) | Bluetooth LE 5 co-processor — HID gamepad | [~30 RON](https://sigmanortec.ro/en/esp32-c3-supermini-development-board-33v-wifi-bluetooth) | -| [PS2 Joystick Breakout ×2](https://www.optimusdigital.ro/en/touch-sensors/742-ps2-joystick-breakout.html) | Joystick stâng + drept cu L3/R3 | [~10 RON × 2](https://www.optimusdigital.ro/en/touch-sensors/742-ps2-joystick-breakout.html) | -| [Butoane tactile 12×12mm cu capac ×20](https://www.optimusdigital.ro/ro/207-butoane-i-comutatoare) | A, B, X, Y, D-Pad, L1, R1, Start, Select, Home | [~0.50 RON × 20](https://www.optimusdigital.ro/ro/207-butoane-i-comutatoare) | -| [Potențiometru Liniar Dual-Canal B10K 75mm](https://www.optimusdigital.ro/ro/componente-electronice-potentiometre/3914-poteniometru-liniar-cu-doua-canale-de-75-mm-b10k.html) | Triggere analogice L2/R2 (un singur modul) | [~15 RON](https://www.optimusdigital.ro/ro/componente-electronice-potentiometre/3914-poteniometru-liniar-cu-doua-canale-de-75-mm-b10k.html) | -| [Suport baterii 3× AA](https://www.emag.ro/suport-baterii-aa-pentru-3buc-cu-contacte-pentru-lipire-gni0055/pd/D62S5JYBM/) | Alimentare 4.5V | [~5 RON](https://www.emag.ro/suport-baterii-aa-pentru-3buc-cu-contacte-pentru-lipire-gni0055/pd/D62S5JYBM/) | -| Baterii AA alkaline ×3 | Putere efectivă | ~10 RON (orice magazin) | -| [Modul LDO AMS1117-3.3V](https://www.optimusdigital.ro/en/others/2219-mini-ams1117-33-33v-voltage-regulator-module.html) | Regulator 3.3V | [~5 RON](https://www.optimusdigital.ro/en/others/2219-mini-ams1117-33-33v-voltage-regulator-module.html) | -| [Breadboard 830p ×2](https://sigmanortec.ro/en/breadboard-830-points-mb-102) | Bază prototipare | [~11 RON × 2](https://sigmanortec.ro/en/breadboard-830-points-mb-102) | -| [Cabluri Dupont M-M 65 buc](https://www.optimusdigital.ro/en/wires-with-connectors/12-breadboard-jumper-wire-set-65-pcs.html) | Conexiuni breadboard | [~8 RON](https://www.optimusdigital.ro/en/wires-with-connectors/12-breadboard-jumper-wire-set-65-pcs.html) | -| [Cabluri Dupont M-F 40 buc](https://www.optimusdigital.ro/en/wires-with-connectors/214-colored-40p-254-mm-pitch-male-to-female-wire.html) | Conexiuni module joystick | [~6 RON](https://www.optimusdigital.ro/en/wires-with-connectors/214-colored-40p-254-mm-pitch-male-to-female-wire.html) | -| Condensatoare ceramice 100nF ×10 | Decuplare VCC / ADC | ~3 RON | -| Condensatoare electrolitice 10µF ×5 | Filtrare șină 3.3V | ~3 RON | -| Set rezistențe 10kΩ / 1kΩ | Pull-up / protecție UART | ~5 RON | -| | | **Total ~232 RON** | +| Device | Usage | Price | +|--------|-------|-------| +| STM32 Nucleo-U545RE-Q | Main microcontroller + USB HID | ~110 RON *(owned)* | +| Joystick Module 2-Axis XY ×2 | Left + right joystick with L3/R3 | 5.45 RON × 2 | +| Tactile Button PCB 12×12×7.3mm ×20 | A, B, X, Y, D-Pad, L1, R1, Start, Select, Home | 1.33 RON × 20 | +| Linear Potentiometer Module 10K ×2 | Analog triggers L2 and R2 | 12.52 RON × 2 | +| Vibration Motor Module DC PWM 3–5V | Haptic feedback | 5.36 RON | +| Breadboard 400p ×3 | Prototyping base | 6.62 RON × 3 | +| Dupont Wire 30cm M-M ×2 (40pcs/set) | Breadboard connections | 8.39 RON × 2 | +| Dupont Wire 30cm M-F ×1 (40pcs/set) | Module connections | 7.59 RON | +| Ceramic Capacitor Set 300pcs | VCC / ADC decoupling | 12.55 RON | +| Resistor Kit 30 values 600pcs | Pull-up / protection | 15.16 RON | +| | Subtotal (components) | 139.84 RON | +| | Delivery | 15.15 RON | +| | **Total (cart incl. VAT)** | **154.99 RON** | +| | **Grand Total (incl. Nucleo)** | **~265 RON** | --- ## Software -### STM32 Firmware (Rust + Embassy) - -| Library | Description | Usage | -|---------|-------------|-------| -| [embassy-stm32](https://github.com/embassy-rs/embassy/tree/main/embassy-stm32) | HAL for STM32U5 | ADC reads (joysticks, triggers), GPIO (buttons), UART TX | -| [embassy-executor](https://github.com/embassy-rs/embassy/tree/main/embassy-executor) | Async task executor | Runs ADC task, button polling task, and UART send task concurrently | -| [embassy-time](https://github.com/embassy-rs/embassy/tree/main/embassy-time) | Time management | Button debounce timers, polling intervals | -| [embassy-sync](https://github.com/embassy-rs/embassy/tree/main/embassy-sync) | Async primitives | Mutex/Channel for sharing controller state between tasks | -| [defmt](https://github.com/knurling-rs/defmt) | Debug logging | RTT-based logging over STLINK-V3EC probe | -| [panic-probe](https://github.com/knurling-rs/probe-run) | Error handling | Crash reporting via integrated probe | - -**Key Implementation Details (STM32 side):** - -- **ADC Scanning**: Embassy's `AdcChannel` scans all 6 analog inputs in sequence. Readings are 12-bit (0–4095), scaled to i8 (−128 to +127) for joysticks and u8 (0–255) for triggers. -- **Dead Zone Filtering**: ±8% dead zone applied to each joystick axis before packaging the report. -- **Button Debouncing**: Each GPIO polled every 5ms; state change registered only after 2 stable consecutive polls. -- **HID Report Struct**: Packed 8-byte struct sent over UART on every state change. - -```rust -#[repr(C, packed)] -struct HidReport { - lx: i8, ly: i8, // Left joystick - rx: i8, ry: i8, // Right joystick - lt: u8, rt: u8, // Triggers - buttons_lo: u8, // Buttons 0–7 - buttons_hi: u8, // Buttons 8–15 (D-Pad + extras) -} -``` - -### ESP32-C3 Firmware (Rust + esp-idf-svc) - -| Library | Description | Usage | -|---------|-------------|-------| -| [esp-idf-svc](https://github.com/esp-rs/esp-idf-svc) | ESP-IDF Rust wrapper | BLE GATT server, HID over GATT Profile (HOGP) | -| [esp-idf-hal](https://github.com/esp-rs/esp-idf-hal) | Hardware abstraction | UART RX from STM32 | -| [embedded-svc](https://github.com/esp-rs/embedded-svc) | Embedded service traits | Abstractions for BLE traits | - -**Key Implementation Details (ESP32-C3 side):** +*(To be developed)* -- **BLE HID Profile (HOGP)**: GATT server with HID Service (UUID 0x1812). Report Descriptor describes 6 axes + 18 buttons — recognized natively as a gamepad by any modern OS. -- **UART Reception**: Listens for 8-byte HID reports; sends BLE notification only on state change to reduce radio traffic. -- **Pairing & Bonding**: Keys stored in NVS flash — host pairs once, auto-reconnects afterwards. -- **Advertising**: Device advertises as `"RustPad"` with Appearance = Gamepad (0x03C4). +Firmware will be written in **Rust** using the **Embassy** async framework for STM32. Implementation details will be added as development progresses. --- ## Links 1. [Embassy Async Embedded Framework (Rust)](https://embassy.dev/) -2. [esp-rs — Rust on ESP32](https://github.com/esp-rs) -3. [BLE HID over GATT Profile Specification](https://www.bluetooth.com/specifications/specs/hid-over-gatt-profile-1-0/) -4. [USB HID Usage Tables (Gamepad)](https://usb.org/sites/default/files/hut1_21.pdf) -5. [STM32 Nucleo-U545RE-Q User Manual (UM3062)](https://www.st.com/resource/en/user_manual/um3062-stm32u3u5-nucleo64-board-mb1841-stmicroelectronics.pdf) -6. [ESP32-C3 SuperMini Pinout](https://www.espboards.dev/esp32/esp32-c3-super-mini/) -7. [KiCad EDA — Free PCB Design](https://www.kicad.org/) \ No newline at end of file +2. [USB HID Usage Tables (Gamepad)](https://usb.org/sites/default/files/hut1_21.pdf) +3. [STM32 Nucleo-U545RE-Q User Manual (UM3062)](https://www.st.com/resource/en/user_manual/um3062-stm32u3u5-nucleo64-board-mb1841-stmicroelectronics.pdf) From 69e1e50987762981f0ef834f07fd151c36f0a592 Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Sun, 26 Apr 2026 18:10:22 +0300 Subject: [PATCH 03/13] update diagrama --- .../version-acs_cc/project/2026/mihai.topa/diagrama.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg index aba0ae12bb8..d577670aa21 100644 --- a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg @@ -1,4 +1,4 @@ -
Microcontroller
(STM32 Nucleo)
Triggers L2/R2 (ADC)
Buttons x18 (GPIO)
PC/Laptop (USB-C HID)
Vibration Motor (PWM)
Power Supply (USB-C 5v)
Joysticks x2 (ADC)
\ No newline at end of file +
Microcontroller
(STM32 Nucleo)
Triggers L2/R2 (ADC)
Buttons x18 (GPIO)
PC/Laptop (USB-C HID)
Vibration Motor (PWM)
Power Supply (USB-C 5v)
Joysticks x2 (ADC)
\ No newline at end of file From 3d4b960340959cc237fa8d640c94f623619051ac Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Sun, 26 Apr 2026 22:26:42 +0300 Subject: [PATCH 04/13] rename file --- .../project/2026/mihai.topa/{Schematic.svg => schematic.svg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename website/versioned_docs/version-acs_cc/project/2026/mihai.topa/{Schematic.svg => schematic.svg} (100%) diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/Schematic.svg b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg similarity index 100% rename from website/versioned_docs/version-acs_cc/project/2026/mihai.topa/Schematic.svg rename to website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg From 333dc44ab74f2d9414f1b4ddc4c29c4fb230ae28 Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Sun, 26 Apr 2026 22:47:47 +0300 Subject: [PATCH 05/13] Github vs GitHub --- .../version-acs_cc/project/2026/mihai.topa/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md index 7944e02db7d..c9a91ef0ee5 100644 --- a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md @@ -5,7 +5,7 @@ A custom wired game controller inspired by Xbox/PlayStation designs, built on ST :::info **Author**: Țopa Mihai-Sebastian \ -**Github Project Link**: https://github.com/UPB-PMRust-Students/acs-project-2026-topa-mihai-sebastian +**GitHub Project Link**: https://github.com/UPB-PMRust-Students/acs-project-2026-topa-mihai-sebastian ::: From 1cd22ad470d8023e453381b03caf8e5acf49b047 Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Sun, 26 Apr 2026 22:58:34 +0300 Subject: [PATCH 06/13] remove wrong file --- .../version-acs_cc/project/2026/mihai.topa/diagrama.svg | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg deleted file mode 100644 index d577670aa21..00000000000 --- a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
Microcontroller
(STM32 Nucleo)
Triggers L2/R2 (ADC)
Buttons x18 (GPIO)
PC/Laptop (USB-C HID)
Vibration Motor (PWM)
Power Supply (USB-C 5v)
Joysticks x2 (ADC)
\ No newline at end of file From 3a330c2766cd36b171750dd0b0fd503dc2e569ad Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Sun, 26 Apr 2026 23:01:19 +0300 Subject: [PATCH 07/13] repaired file --- .../version-acs_cc/project/2026/mihai.topa/diagrama.svg | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg new file mode 100644 index 00000000000..68ce01920f1 --- /dev/null +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg @@ -0,0 +1,4 @@ + + + +
Microcontroller
(STM32 Nucleo)
Microcontroller...
Triggers L2/R2 (ADC)
Triggers L2/R2 (ADC)
Buttons x18 (GPIO)
Buttons x18 (GPIO)
PC/Laptop (USB-C HID)
PC/Laptop (USB-C HID)
Vibration Motor (PWM)
Vibration Motor (PWM)
Power Supply (USB-C 5v)
Power Supply (USB-C 5v)
Joysticks x2 (ADC)
Joysticks x2 (ADC)
\ No newline at end of file From 3884cdf10b650ca7c02ef671b77ee13f628c4349 Mon Sep 17 00:00:00 2001 From: sebi <153653021+topa-mihai-sebastian@users.noreply.github.com> Date: Sun, 26 Apr 2026 23:07:12 +0300 Subject: [PATCH 08/13] Update website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md fixed file path in index.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../version-acs_cc/project/2026/mihai.topa/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md index c9a91ef0ee5..36f1828afe4 100644 --- a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md @@ -128,7 +128,7 @@ The board is powered via USB-C (5V from the USB bus). The Nucleo's onboard regul ![Diagrama controller](./diagrama.svg) -![Schematic](./Schematic.svg) +![Schematic](./schematic.svg) The schematic covers the following connections: From 5a125efdbe7a41c9d49672d027fdb1e0912985e6 Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Mon, 27 Apr 2026 11:59:20 +0300 Subject: [PATCH 09/13] compress schematic file --- .../project/2026/mihai.topa/schematic.svg | 47448 +--------------- 1 file changed, 1 insertion(+), 47447 deletions(-) diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg index 975b6340e14..432e2eb4b89 100644 --- a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg @@ -1,47447 +1 @@ - - - -SVG Image created as Schematic.svg date 2026-04-26T17:38:17 - Image generated by Eeschema-SVG - - - - - - - - - - - -1 -1 - - - - - -2 -2 - - - - - - - - - - -3 -3 - - - - - - - - - - - - - -4 -4 - - - -5 -5 - - - - - - - - - - - - - - - -6 -6 - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - -2 -2 - - - - - - - - - - -3 -3 - - - - - - - - - - - - - -4 -4 - - - -5 -5 - - - - - - - - - - - - - - - -6 -6 - - - - - - - - - - - - - - - - - - - - - - - - -A -A - - - -B -B - - - - - - - - - - - - - - - - - - -C -C - - - - - - - - - - - - - - - -D -D - - - - - - - - - - - - - - - -A -A - - - -B -B - - - - - - - - - - - - - - - - - - -C -C - - - - - - - - - - - - - - - -D -D - - - - - - - - - - - - -Date: -Date: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -KiCad E.D.A. 10.0.1 -KiCad E.D.A. 10.0.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Rev: -Rev: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Size: A4 -Size: A4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Id: 1/1 -Id: 1/1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Title: -Title: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -File: untitled.kicad_sch -File: untitled.kicad_sch - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Sheet: / -Sheet: / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - - -2 -2 - - - - - - - - - - - -3 -3 - - - - - - - - - - - - - - - -J6 -J6 - - - - - - - - - - - - - - - - - - - - - - - - - - -TriggerL2(potentiometru) -TriggerL2(potentiometru) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -SW9 -SW9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - - -2 -2 - - - - - - - - - - - -3 -3 - - - - - - - - - - - - - - - -J5 -J5 - - - - - - - - - - - - - - - - - - - - -TriggerR2(potentiometru) -TriggerR2(potentiometru) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - - -2 -2 - - - - - - - - - - - -3 -3 - - - - - - - - - - - - - - -4 -4 - - - - -5 -5 - - - - - - - - - - - - - - - - - -J2 -J2 - - - - - - - - - - - - - - - -Joystick_Right -Joystick_Right - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VBAT - -VBAT - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - -1 - - - - - - - - -PC13 -PC13 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -2 -2 - - - - - - - - - - - - - -PC14 -PC14 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -3 -3 - - - - - - - - - - - - - - - - -PC15 -PC15 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -4 -4 - - - - - - -PH0 -PH0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -5 -5 - - - - - - - - - - - - - - - - - - -PH1 -PH1 - - - - - - - - - - - - - - - - - - - - -6 -6 - - - - - - - - - - - - - - - - - - - - - - - - -NRST -NRST - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -7 -7 - - - - - -PC0 -PC0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -8 -8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC1 -PC1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -9 -9 - - - - - - - - - - - - - - - - - - - - - - - - -PC2 -PC2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -10 -10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC3 -PC3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -11 -11 - - - - - - - - - - - - - - -VSSA - -VSSA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -12 - -12 - - - - - - - - - - - - - - - - - - - -VDDA - -VDDA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -13 - -13 - - - - - - - - - - - - - - - - - - - - - -PA0 -PA0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -14 -14 - - - - - - - - - - - -PA1 -PA1 - - - - - - - - - - - - - - - - - - - - -15 -15 - - - - - - - - - - - - - - - - - - - - - - - -PA2 -PA2 - - - - - - - - - - - - - - - - - - - - - - - - - -16 -16 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PA3 -PA3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -17 -17 - - - - - - - - - - - -VSS - -VSS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -18 - -18 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VDD - -VDD - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -19 - -19 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PA4 -PA4 - - - - - - - - - - - - - - - - - - -20 -20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PA5 -PA5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -21 -21 - - - - - - - - - - - - - - - - - - -PA6 -PA6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -22 -22 - - - - - - - - - - - - - - - - - - - - - - - -PA7 -PA7 - - - - - - - - - - - - - - - - - -23 -23 - - - - - - - - - - - - - - - - - - - - - - - - - - -PC4 -PC4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -24 -24 - - - - - - - - - - - - - - - - -PC5 -PC5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -25 -25 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB0 -PB0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -26 -26 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB1 -PB1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -27 -27 - - - - - - - - - - - - - - - -PB2 -PB2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -28 -28 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB10 -PB10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -29 -29 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VCAP -VCAP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -30 -30 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VDD - -VDD - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -32 - -32 - - - - - - - - - - - - - - - - - - - - - - - - - - -PB12 -PB12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -33 -33 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB13 -PB13 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -34 -34 - - - - - - - - - - - - - - - - - - - -PB14 -PB14 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -35 -35 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB15 -PB15 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -36 -36 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC6 -PC6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -37 -37 - - - - - - - - - - - - - - - - - - -PC7 -PC7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -38 -38 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC8 -PC8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -39 -39 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC9 -PC9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -40 -40 - - - - - - - - - - - - - - - - - - - - - - - - - - -PA8 -PA8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -41 -41 - - - - - - - - - - - -PA9 -PA9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -42 -42 - - - - - - - - - - - - - - - - -PA10 -PA10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -43 -43 - - - - - - - - - - - - - - - - - - - -PA11 -PA11 - - - - - - - - - - - - - - - - - - - - - - - - - -44 -44 - - - - - - - - - -PA12 -PA12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -45 -45 - - - - - - - - - - - - - - - - - - - - - -PA13 -PA13 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -46 -46 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VDDUSB - -VDDUSB - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -48 - -48 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PA14 -PA14 - - - - - - - - - - - - - - - - - - - - - - - -49 -49 - - - - - - - - - - - - - - - - - - - - - - - - - - - -PA15 -PA15 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -50 -50 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC10 -PC10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -51 -51 - - - - - - - - - - - - - - - - - - - - - - - -PC11 -PC11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -52 -52 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC12 -PC12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -53 -53 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PD2 -PD2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -54 -54 - - - - - - - - - - - - - - - - - - - - - -PB3 -PB3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -55 -55 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB4 -PB4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -56 -56 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB5 -PB5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -57 -57 - - - - - - - - - - - - - - - - - - - - -PB6 -PB6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -58 -58 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB7 -PB7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -59 -59 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PH3 -PH3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -60 -60 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB8 -PB8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -61 -61 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB9 -PB9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -62 -62 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VDD - -VDD - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -64 - -64 - - - - - - - - - - - - - - - - - - - - - - - - - - -U1 -U1 - - - - - - - - - - - - - - -STM32U545RETx -STM32U545RETx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PWR_FLAG -PWR_FLAG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C1 -C1 - - - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C2 -C2 - - - - - - - - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C6 -C6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C4 -C4 - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C5 -C5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - - -2 -2 - - - - - - - - - - - -3 -3 - - - - - - - - - - - - - - -4 -4 - - - - -5 -5 - - - - - - - - - - - - - - - - - -J1 -J1 - - - - - - - - - - -Joystick_Left -Joystick_Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - -1 - - - - - - -2 -2 - - - - - - - - - - - - -3 - -3 - - - - - - - - - - - - - - - -Q1 -Q1 - - - - - - - - - - - - - - - - - - - - - - - - - - -Motor_Driver -Motor_Driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PWR_FLAG -PWR_FLAG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - - -2 -2 - - - - - - - - - - - - -J3 -J3 - - - - - - - - - - - - - - - - - - -Vibration_Motor -Vibration_Motor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C3 -C3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -R1 -R1 - - - - - - - - - - - - - - - - -1k -1k - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -D1 -D1 - - - - - - - - - - - - - - - - - -Flyback_Diode -Flyback_Diode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VRx -VRx - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -SW -SW - - - - - - - - - - - - - - - - - - - - - - - - - -VRy -VRy - - - - - - - - - - - - - - - - - - - - -SW -SW - - - - - - - - - - - - - - - - - - - - - - - - - -VRy -VRy - - - - - - - - - - - - - - - - - - - - -VRx -VRx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C1 -C1 - - - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C2 -C2 - - - - - - - - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C4 -C4 - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C5 -C5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PWR_FLAG -PWR_FLAG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C3 -C3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -D1 -D1 - - - - - - - - - - - - - - - - - -Flyback_Diode -Flyback_Diode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -J3 -J3 - - - - - - - - - - - - - - - - - - -Vibration_Motor -Vibration_Motor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - - -2 -2 - - - - - - - - - - - - -Q1 -Q1 - - - - - - - - - - - - - - - - - - - - - - - - - - -Motor_Driver -Motor_Driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - -1 - - - - - - -2 -2 - - - - - - - - - - - - -3 - -3 - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -J1 -J1 - - - - - - - - - - -Joystick_Left -Joystick_Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - - -2 -2 - - - - - - - - - - - -3 -3 - - - - - - - - - - - - - - -4 -4 - - - - -5 -5 - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C6 -C6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -100n -100n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PWR_FLAG -PWR_FLAG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -U1 -U1 - - - - - - - - - - - - - - -STM32U545RETx -STM32U545RETx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VBAT - -VBAT - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - -1 - - - - - - - - -PC13 -PC13 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -2 -2 - - - - - - - - - - - - - -PC14 -PC14 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -3 -3 - - - - - - - - - - - - - - - - -PC15 -PC15 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -4 -4 - - - - - - -PH0 -PH0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -5 -5 - - - - - - - - - - - - - - - - - - -PH1 -PH1 - - - - - - - - - - - - - - - - - - - - -6 -6 - - - - - - - - - - - - - - - - - - - - - - - - -NRST -NRST - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -7 -7 - - - - - -PC0 -PC0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -8 -8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC1 -PC1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -9 -9 - - - - - - - - - - - - - - - - - - - - - - - - -PC2 -PC2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -10 -10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC3 -PC3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -11 -11 - - - - - - - - - - - - - - -VSSA - -VSSA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -12 - -12 - - - - - - - - - - - - - - - - - - - -VDDA - -VDDA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -13 - -13 - - - - - - - - - - - - - - - - - - - - - -PA0 -PA0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -14 -14 - - - - - - - - - - - -PA1 -PA1 - - - - - - - - - - - - - - - - - - - - -15 -15 - - - - - - - - - - - - - - - - - - - - - - - -PA2 -PA2 - - - - - - - - - - - - - - - - - - - - - - - - - -16 -16 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PA3 -PA3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -17 -17 - - - - - - - - - - - -VSS - -VSS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -18 - -18 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VDD - -VDD - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -19 - -19 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PA4 -PA4 - - - - - - - - - - - - - - - - - - -20 -20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PA5 -PA5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -21 -21 - - - - - - - - - - - - - - - - - - -PA6 -PA6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -22 -22 - - - - - - - - - - - - - - - - - - - - - - - -PA7 -PA7 - - - - - - - - - - - - - - - - - -23 -23 - - - - - - - - - - - - - - - - - - - - - - - - - - -PC4 -PC4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -24 -24 - - - - - - - - - - - - - - - - -PC5 -PC5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -25 -25 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB0 -PB0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -26 -26 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB1 -PB1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -27 -27 - - - - - - - - - - - - - - - -PB2 -PB2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -28 -28 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB10 -PB10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -29 -29 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VCAP -VCAP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -30 -30 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VDD - -VDD - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -32 - -32 - - - - - - - - - - - - - - - - - - - - - - - - - - -PB12 -PB12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -33 -33 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB13 -PB13 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -34 -34 - - - - - - - - - - - - - - - - - - - -PB14 -PB14 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -35 -35 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB15 -PB15 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -36 -36 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC6 -PC6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -37 -37 - - - - - - - - - - - - - - - - - - -PC7 -PC7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -38 -38 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC8 -PC8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -39 -39 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC9 -PC9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -40 -40 - - - - - - - - - - - - - - - - - - - - - - - - - - -PA8 -PA8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -41 -41 - - - - - - - - - - - -PA9 -PA9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -42 -42 - - - - - - - - - - - - - - - - -PA10 -PA10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -43 -43 - - - - - - - - - - - - - - - - - - - -PA11 -PA11 - - - - - - - - - - - - - - - - - - - - - - - - - -44 -44 - - - - - - - - - -PA12 -PA12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -45 -45 - - - - - - - - - - - - - - - - - - - - - -PA13 -PA13 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -46 -46 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VDDUSB - -VDDUSB - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -48 - -48 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PA14 -PA14 - - - - - - - - - - - - - - - - - - - - - - - -49 -49 - - - - - - - - - - - - - - - - - - - - - - - - - - - -PA15 -PA15 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -50 -50 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC10 -PC10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -51 -51 - - - - - - - - - - - - - - - - - - - - - - - -PC11 -PC11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -52 -52 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PC12 -PC12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -53 -53 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PD2 -PD2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -54 -54 - - - - - - - - - - - - - - - - - - - - - -PB3 -PB3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -55 -55 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB4 -PB4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -56 -56 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB5 -PB5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -57 -57 - - - - - - - - - - - - - - - - - - - - -PB6 -PB6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -58 -58 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB7 -PB7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -59 -59 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PH3 -PH3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -60 -60 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB8 -PB8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -61 -61 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PB9 -PB9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -62 -62 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -VDD - -VDD - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -64 - -64 - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -J2 -J2 - - - - - - - - - - - - - - - -Joystick_Right -Joystick_Right - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - - -2 -2 - - - - - - - - - - - -3 -3 - - - - - - - - - - - - - - -4 -4 - - - - -5 -5 - - - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -J5 -J5 - - - - - - - - - - - - - - - - - - - - -TriggerR2(potentiometru) -TriggerR2(potentiometru) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - - -2 -2 - - - - - - - - - - - -3 -3 - - - - - - - - - - - - - - - - - - - - - - - - - -SW9 -SW9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -J6 -J6 - - - - - - - - - - - - - - - - - - - - - - - - - - -TriggerL2(potentiometru) -TriggerL2(potentiometru) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 -1 - - - - - - -2 -2 - - - - - - - - - - - -3 -3 - - - - - - - - - - - - - - - -GND -GND - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+3V3 -+3V3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Image generated by Eeschema-SVG123456123456ABCDABCDDate:KiCad E.D.A. 10.0.1Rev:Size: A4Id: 1/1Title:File: untitled.kicad_schSheet: /GNDGND123J6TriggerL2(potentiometru)+3V3SW9123J5TriggerR2(potentiometru)GND12345J2Joystick_RightGNDGNDVBAT1PC132PC143PC154PH05PH16NRST7PC08PC19PC210PC311VSSA12VDDA13PA014PA115PA216PA317VSS18VDD19PA420PA521PA622PA723PC424PC525PB026PB127PB228PB1029VCAP30VDD32PB1233PB1334PB1435PB1536PC637PC738PC839PC940PA841PA942PA1043PA1144PA1245PA1346VDDUSB48PA1449PA1550PC1051PC1152PC1253PD254PB355PB456PB557PB658PB759PH360PB861PB962VDD64U1STM32U545RETxPWR_FLAG+3V3GNDGNDGNDC1100nC2100nGNDC6100n+3V3+3V3+3V3GNDGNDC4100nGNDC5100nGND12345J1Joystick_Left+3V3+3V3+3V3123Q1Motor_DriverPWR_FLAG12J3Vibration_Motor+3V3+3V3C3100nR11k+3V3D1Flyback_Diode+3V3VRxGND+3V3GND+3V3SWVRySWVRyVRx+3V3GNDGNDGNDC1100nC2100n+3V3+3V3GNDGNDC4100nGNDC5100n+3V3PWR_FLAG+3V3+3V3C3100nGND+3V3D1Flyback_Diode+3V3J3Vibration_Motor12Q1Motor_Driver123+3V3J1Joystick_Left12345+3V3C6100nPWR_FLAGU1STM32U545RETxVBAT1PC132PC143PC154PH05PH16NRST7PC08PC19PC210PC311VSSA12VDDA13PA014PA115PA216PA317VSS18VDD19PA420PA521PA622PA723PC424PC525PB026PB127PB228PB1029VCAP30VDD32PB1233PB1334PB1435PB1536PC637PC738PC839PC940PA841PA942PA1043PA1144PA1245PA1346VDDUSB48PA1449PA1550PC1051PC1152PC1253PD254PB355PB456PB557PB658PB759PH360PB861PB962VDD64GNDGNDJ2Joystick_Right12345GNDJ5TriggerR2(potentiometru)123SW9+3V3J6TriggerL2(potentiometru)123GND+3V3 \ No newline at end of file From 26a31d8b12e302b7ce1083c721feb8c449290e93 Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Mon, 27 Apr 2026 13:36:48 +0300 Subject: [PATCH 10/13] trigger CI From e8898d16294fe2ca65efb50af8897f89f51700cd Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Mon, 27 Apr 2026 16:25:52 +0300 Subject: [PATCH 11/13] final file --- .../version-acs_cc/project/2026/mihai.topa/diagrama.svg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg index 68ce01920f1..4fc0aef72c6 100644 --- a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/diagrama.svg @@ -1,4 +1,3 @@ - -
Microcontroller
(STM32 Nucleo)
Microcontroller...
Triggers L2/R2 (ADC)
Triggers L2/R2 (ADC)
Buttons x18 (GPIO)
Buttons x18 (GPIO)
PC/Laptop (USB-C HID)
PC/Laptop (USB-C HID)
Vibration Motor (PWM)
Vibration Motor (PWM)
Power Supply (USB-C 5v)
Power Supply (USB-C 5v)
Joysticks x2 (ADC)
Joysticks x2 (ADC)
\ No newline at end of file +
Microcontroller
(STM32 Nucleo)
Microcontroller...
Triggers L2/R2 (ADC)
Triggers L2/R2 (ADC)
Buttons x18 (GPIO)
Buttons x18 (GPIO)
PC/Laptop (USB-C HID)
PC/Laptop (USB-C HID)
Vibration Motor (PWM)
Vibration Motor (PWM)
Power Supply (USB-C 5v)
Power Supply (USB-C 5v)
Joysticks x2 (ADC)
Joysticks x2 (ADC)
\ No newline at end of file From 6dbace339f37e9188bc6d5e3411b19e93e8b6d00 Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Tue, 28 Apr 2026 13:14:37 +0300 Subject: [PATCH 12/13] acum fisierele respecta rezolutia si dimensiunea --- .../version-acs_cc/project/2026/mihai.topa/schematic.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg index 432e2eb4b89..0b62b75f25c 100644 --- a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg @@ -1 +1 @@ -Image generated by Eeschema-SVG123456123456ABCDABCDDate:KiCad E.D.A. 10.0.1Rev:Size: A4Id: 1/1Title:File: untitled.kicad_schSheet: /GNDGND123J6TriggerL2(potentiometru)+3V3SW9123J5TriggerR2(potentiometru)GND12345J2Joystick_RightGNDGNDVBAT1PC132PC143PC154PH05PH16NRST7PC08PC19PC210PC311VSSA12VDDA13PA014PA115PA216PA317VSS18VDD19PA420PA521PA622PA723PC424PC525PB026PB127PB228PB1029VCAP30VDD32PB1233PB1334PB1435PB1536PC637PC738PC839PC940PA841PA942PA1043PA1144PA1245PA1346VDDUSB48PA1449PA1550PC1051PC1152PC1253PD254PB355PB456PB557PB658PB759PH360PB861PB962VDD64U1STM32U545RETxPWR_FLAG+3V3GNDGNDGNDC1100nC2100nGNDC6100n+3V3+3V3+3V3GNDGNDC4100nGNDC5100nGND12345J1Joystick_Left+3V3+3V3+3V3123Q1Motor_DriverPWR_FLAG12J3Vibration_Motor+3V3+3V3C3100nR11k+3V3D1Flyback_Diode+3V3VRxGND+3V3GND+3V3SWVRySWVRyVRx+3V3GNDGNDGNDC1100nC2100n+3V3+3V3GNDGNDC4100nGNDC5100n+3V3PWR_FLAG+3V3+3V3C3100nGND+3V3D1Flyback_Diode+3V3J3Vibration_Motor12Q1Motor_Driver123+3V3J1Joystick_Left12345+3V3C6100nPWR_FLAGU1STM32U545RETxVBAT1PC132PC143PC154PH05PH16NRST7PC08PC19PC210PC311VSSA12VDDA13PA014PA115PA216PA317VSS18VDD19PA420PA521PA622PA723PC424PC525PB026PB127PB228PB1029VCAP30VDD32PB1233PB1334PB1435PB1536PC637PC738PC839PC940PA841PA942PA1043PA1144PA1245PA1346VDDUSB48PA1449PA1550PC1051PC1152PC1253PD254PB355PB456PB557PB658PB759PH360PB861PB962VDD64GNDGNDJ2Joystick_Right12345GNDJ5TriggerR2(potentiometru)123SW9+3V3J6TriggerL2(potentiometru)123GND+3V3 \ No newline at end of file + \ No newline at end of file From 16617a9bc39c2cdc6fd1f077572695cd9b18a01f Mon Sep 17 00:00:00 2001 From: topa-mihai-sebastian Date: Sun, 17 May 2026 13:56:17 +0300 Subject: [PATCH 13/13] update hardware --- .../project/2026/mihai.topa/index.md | 95 +++++++++++++------ .../project/2026/mihai.topa/schematic.svg | 2 +- 2 files changed, 66 insertions(+), 31 deletions(-) diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md index 36f1828afe4..7156331385a 100644 --- a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/index.md @@ -21,9 +21,9 @@ The controller features: - **4 face buttons** (A, B, X, Y) - **D-Pad** (4 directions) - **Shoulder buttons** (L1, R1) -- **System buttons** (Start, Select, Home) - **Vibration motor** for haptic feedback, PWM-controlled - USB-C powered — no batteries needed +- Fully recognized by **Steam** (Steam Input) — all axes, buttons, and triggers work correctly I initially planned a two-microcontroller architecture (STM32 + ESP32-C3) communicating over Bluetooth LE, but decided against it — coordinating BLE HID between two microcontrollers turned out to be quite complex. The final design uses a **single STM32 Nucleo-U545RE-Q** that reads all inputs and connects directly to the host as a USB HID gamepad. @@ -41,14 +41,14 @@ As an avid gamer, I wanted to understand how a controller works from the ground ┌─────────────────────────────────────────────────────────────┐ │ INPUT LAYER │ │ [Joystick L] [Joystick R] [Trigger L] [Trigger R] │ -│ [Buttons x18] [Vibration Motor] │ +│ [Buttons x12] [Vibration Motor] │ └───────────────────────┬─────────────────────────────────────┘ │ ADC / GPIO / PWM ▼ ┌─────────────────────────────────────────────────────────────┐ │ STM32 Nucleo-U545RE-Q │ │ - Reads ADC: 4 joystick axes + 2 triggers │ -│ - Reads GPIO: 18 buttons │ +│ - Reads GPIO: 12 buttons │ │ - Controls vibration motor via PWM │ │ - Acts as USB HID Gamepad │ └───────────────────────┬─────────────────────────────────────┘ @@ -77,6 +77,7 @@ As an avid gamer, I wanted to understand how a controller works from the ground - Wired the potentiometers for the analog triggers. - Wired the vibration motor and tested PWM control. - Full integration test. +- Added the controller to Steam and configured it using Steam Input. Steam correctly detects all axes, buttons, and triggers. The controller is fully functional in Steam. --- @@ -88,9 +89,9 @@ As an avid gamer, I wanted to understand how a controller works from the ground The only microcontroller in the project. Reads all inputs, controls the vibration motor, and communicates with the host via USB HID. - 6 ADC channels: Joystick L (X, Y), Joystick R (X, Y), Trigger L, Trigger R -- 18 GPIO pins for buttons -- 1 PWM output for the vibration motor -- USB Full Speed via USB-C (CN3) to the host +- 12 GPIO pins for buttons +- 1 PWM output for the vibration motor (TIM3 CH1) +- USB Full Speed via USB-C (PA11/PA12) to the host - Powered via USB-C; provides 3.3V on Morpho pins (CN7) for peripherals #### 2. Analog Joysticks PS2 Module (×2) @@ -99,8 +100,8 @@ Standard XY joystick modules with integrated push-button (L3/R3). Each module: V - VRx/VRy → 2 ADC channels per joystick - SW → GPIO with internal pull-up -#### 3. Tactile Buttons 12×12mm (×20) -A, B, X, Y, L1, R1, Start, Select, Home, D-Pad ×4, L3, R3 + 2 spare. +#### 3. Tactile Buttons 12×12mm (×12) +A, B, X, Y, L1, R1, D-Pad ×4, L3, R3. - Wired between GPIO and GND, internal pull-up enabled in firmware @@ -135,32 +136,45 @@ The schematic covers the following connections: **Joysticks (×2)** | Signal | STM32 Pin | |--------|-----------| -| Joystick L — VRx | ADC channel (TBD) | -| Joystick L — VRy | ADC channel (TBD) | -| Joystick L — SW | GPIO (TBD) | -| Joystick R — VRx | ADC channel (TBD) | -| Joystick R — VRy | ADC channel (TBD) | -| Joystick R — SW | GPIO (TBD) | +| Joystick L — VRx | PA0 (ADC1) | +| Joystick L — VRy | PA1 (ADC1) | +| Joystick L — SW (L3) | PB13 | +| Joystick R — VRx | PA4 (ADC1) | +| Joystick R — VRy | PB0 (ADC1) | +| Joystick R — SW (R3) | PB14 | **Triggers (×2)** | Signal | STM32 Pin | |--------|-----------| -| Trigger L — wiper | ADC channel (TBD) | -| Trigger R — wiper | ADC channel (TBD) | +| Trigger L2 — wiper | PC1 (ADC1) | +| Trigger R2 — wiper | PC0 (ADC1) | -**Buttons (×18)** +**Buttons (×12)** | Button | STM32 Pin | |--------|-----------| -| A, B, X, Y | GPIO (TBD) | -| L1, R1 | GPIO (TBD) | -| Start, Select, Home | GPIO (TBD) | -| D-Pad ×4 | GPIO (TBD) | -| L3, R3 | GPIO (TBD) | +| A | PA3 | +| B | PA2 | +| X | PC6 | +| Y | PB10 | +| L1 | PC9 | +| R1 | PC10 | +| D-Up | PB8 | +| D-Down | PA8 | +| D-Left | PC8 | +| D-Right | PC7 | +| L3 | PB13 | +| R3 | PB14 | **Vibration Motor** | Signal | STM32 Pin | |--------|-----------| -| PWM control | TIM channel (TBD) | +| PWM control | PB4 (TIM3 CH1) | + +**USB** +| Signal | STM32 Pin | +|--------|-----------| +| USB D- | PA11 | +| USB D+ | PA12 | --- @@ -170,26 +184,47 @@ The schematic covers the following connections: |--------|-------|-------| | STM32 Nucleo-U545RE-Q | Main microcontroller + USB HID | ~110 RON *(owned)* | | Joystick Module 2-Axis XY ×2 | Left + right joystick with L3/R3 | 5.45 RON × 2 | -| Tactile Button PCB 12×12×7.3mm ×20 | A, B, X, Y, D-Pad, L1, R1, Start, Select, Home | 1.33 RON × 20 | +| Tactile Button PCB 12×12×7.3mm ×12 | A, B, X, Y, D-Pad ×4, L1, R1, L3, R3 | 1.33 RON × 12 | | Linear Potentiometer Module 10K ×2 | Analog triggers L2 and R2 | 12.52 RON × 2 | | Vibration Motor Module DC PWM 3–5V | Haptic feedback | 5.36 RON | -| Breadboard 400p ×3 | Prototyping base | 6.62 RON × 3 | +| Breadboard 800p ×1 | Prototyping base | ~14 RON | | Dupont Wire 30cm M-M ×2 (40pcs/set) | Breadboard connections | 8.39 RON × 2 | | Dupont Wire 30cm M-F ×1 (40pcs/set) | Module connections | 7.59 RON | | Ceramic Capacitor Set 300pcs | VCC / ADC decoupling | 12.55 RON | | Resistor Kit 30 values 600pcs | Pull-up / protection | 15.16 RON | -| | Subtotal (components) | 139.84 RON | +| | Subtotal (components) | 123.34 RON | | | Delivery | 15.15 RON | -| | **Total (cart incl. VAT)** | **154.99 RON** | -| | **Grand Total (incl. Nucleo)** | **~265 RON** | +| | **Total (cart incl. VAT)** | **138.49 RON** | +| | **Grand Total (incl. Nucleo)** | **~248 RON** | --- ## Software -*(To be developed)* +Firmware is written in **Rust** using the **Embassy** async framework for STM32. + +### Key components + +- **USB HID** — `embassy-usb` with a custom 8-byte gamepad report descriptor (12 buttons + 4 axes + 2 triggers). The device presents itself as a Game Pad (Usage Page 0x01, Usage 0x05) for maximum OS compatibility. +- **ADC** — `embassy-stm32` ADC1, blocking reads at ~19.5 cycles sample time. Raw 14-bit values mapped to signed 8-bit axis values via `adc_to_axis()`. +- **GPIO** — 12 buttons, active-low with internal pull-up. Press events detected on falling edge (bit was 0, now 1). +- **PWM** — TIM3 CH1 on PB4 drives the vibration motor. Duty cycle: 100% when R2 trigger is maxed out, 70% for 500 ms every 10 seconds otherwise. +- **Clocks** — HSI @ 16 MHz for the CPU; HSI48 (synced from USB SOF) for the USB peripheral; SYS clock routed to ADC. + +### HID report layout (8 bytes) + +| Byte | Content | +|------|---------| +| 0 | Buttons 0–7 (A, B, X, Y, L1, R1, D-Up, D-Down) | +| 1 | Buttons 8–11 (D-Left, D-Right, L3, R3) + 4-bit padding | +| 2 | LX axis (i8) | +| 3 | LY axis (i8) | +| 4 | RX axis (i8) | +| 5 | RY axis (i8) | +| 6 | L2 trigger (u8, 0–255) | +| 7 | R2 trigger (u8, 0–255) | -Firmware will be written in **Rust** using the **Embassy** async framework for STM32. Implementation details will be added as development progresses. +The main loop runs at ~200 Hz (5 ms `Timer::after`). USB HID and USB stack are joined as two concurrent async tasks via `embassy-futures::join`. --- diff --git a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg index 0b62b75f25c..fef124fbc39 100644 --- a/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg +++ b/website/versioned_docs/version-acs_cc/project/2026/mihai.topa/schematic.svg @@ -1 +1 @@ - \ No newline at end of file +SVG Image created as Schematic.svg date 2026-05-17T13:53:06 Image generated by Eeschema-SVG123456123456ABCDABCDDate:KiCad E.D.A. 10.0.1Rev:Size: A4Id: 1/1Title:File: schematic.kicad_schSheet: /SW3XPWR_FLAGGND+3V3+3V3+3V3+3V3+3V3+3V3SW7D-UpGNDGNDGNDSW12R3VBAT1PC132PC143PC154PH05PH16NRST7PC08PC19PC210PC311VSSA12VDDA13PA014PA115PA216PA317VSS18VDD19PA420PA521PA622PA723PC424PC525PB026PB127PB228PB1029VCAP30VDD32PB1233PB1334PB1435PB1536PC637PC738PC839PC940PA841PA942PA1043PA1144PA1245PA1346VDDUSB48PA1449PA1550PC1051PC1152PC1253PD254PB355PB456PB557PB658PB759PH360PB861PB962VDD64U1STM32U545RETxGNDGNDPWR_FLAG123J5Vibration_Motor+3V3SW4YGNDGNDSW1B+3V3GNDGNDSW11L3GNDGND+3V3123J3Trigger_L2123J4Trigger_R2SW9D-LeftGNDSW2ASW8D-DownGNDGNDSW10D-Right+3V3+3V3GND12345J2Joystick_Right12345J1Joystick_LeftGNDSW6R1GNDSW5L1GNDSW1B+3V3GNDGNDSW2ASW8D-DownGNDGND+3V3J2Joystick_Right12345J1Joystick_Left12345GNDSW3XGNDSW5L1GNDSW6R1GND+3V3GNDSW10D-RightGNDSW9D-LeftJ4Trigger_R2123J3Trigger_L2123+3V3GNDGNDSW11L3GNDGNDSW4Y+3V3J5Vibration_Motor123PWR_FLAGGNDGNDU1STM32U545RETxVBAT1PC132PC143PC154PH05PH16NRST7PC08PC19PC210PC311VSSA12VDDA13PA014PA115PA216PA317VSS18VDD19PA420PA521PA622PA723PC424PC525PB026PB127PB228PB1029VCAP30VDD32PB1233PB1334PB1435PB1536PC637PC738PC839PC940PA841PA942PA1043PA1144PA1245PA1346VDDUSB48PA1449PA1550PC1051PC1152PC1253PD254PB355PB456PB557PB658PB759PH360PB861PB962VDD64SW12R3GNDGNDGNDSW7D-Up+3V3+3V3+3V3+3V3+3V3+3V3PWR_FLAG \ No newline at end of file