Team MasterDoom · University of Pennsylvania ESE 5160
Custom Embedded PCB & Firmware
An embedded systems project spanning custom SiWG917 PCB design and validation, verified firmware-programming recovery, CMSIS-RTOS firmware, and MQTT/LCD/joystick integration. The complete poker-assistant application was demonstrated on reference SiWG917 development hardware; successful custom-board flashing verified the programming path, not full-system execution on the custom PCB.
Altium DesignerSiWG917CMSIS-RTOSMQTTJ-Link / SWDSimplicity CommanderPCB Bring-Up
Overview
Project Strengths
- Custom SiWG917 PCB spanning hierarchical schematics, PCB layout/routing, component placement, power architecture, USB/protection, battery charging, regulated 3.3 V and 5 V rails, and peripheral interfaces.
- Manufacturing preparation followed by board fabrication, assembly, optical inspection, manual soldering/rework, and electrical validation.
- Bring-up workflow centered on subsystem checks, test points/jumpers, power-mode validation, oscilloscope captures, electronic-load testing, thermal imaging, and programming/debug attempts.
- Firmware and system integration across MQTT messaging, ST7735R LCD UI, joystick input, camera capture/upload, Node-RED dashboard flow, and OTA-oriented command handling.
- Root-caused repeated `.rps` flashing failures to an unhalted Cortex-M4 and restored programming through a verified J-Link/SWD halt-and-reset sequence.
- Published a step-by-step recovery procedure for classmates experiencing the same custom-board programming issue.
My Contribution
- Designed and brought up the custom SiWG917 PCB through schematic capture, layout, 3D verification, power-path validation, thermal checks, and rework.
- Integrated and debugged firmware paths across MQTT/networking, LCD UI, joystick input, camera upload, and game-state behavior.
- Validated board power behavior and documented the engineering tradeoffs behind reference-hardware firmware execution.
- Diagnosed the custom-board flashing failure, developed the J-Link/SWD recovery procedure, verified successful programming, and documented the process for the class.
- Team MasterDoom included Yunzhe Deng and Jilu Wang; the site presents the work as a team ESE 5160 project.
System / Architecture
Architecture
- 01Problem / goal: build a connected embedded poker assistant while designing a custom SiWG917 PCB rather than treating the project as only development-board firmware.
- 02PCB design: integrate MCU, 3.3 V and 5 V power, battery charging, USB/protection, SD card support, LCD/camera interfaces, motor/encoder-related interfaces, test points, and jumpers.
- 03Manufacturing and assembly: prepare manufacturing outputs, fabricate and assemble the board, inspect it, and rework population/orientation issues recorded in bring-up notes.
- 04Hardware bring-up: validate power paths and subsystems with oscilloscope captures, electronic loads, thermal imaging, peripheral checks, and programming/debugging attempts.
- 05System integration: the final full-system application remained on reference SiWG917 development hardware, while the custom-board firmware-programming path was separately recovered and verified through J-Link/SWD and Simplicity Commander.
Implementation
Implementation
- Created Altium Designer schematic/layout/manufacturing artifacts for the custom SiWG917 board and reviewed the design through PCB layout and 3D render evidence.
- Validated 3.3 V and 5 V rails under 50 mA through 600 mA electronic-load tests, oscilloscope startup/steady-state captures, and thermal imaging.
- Retained main-controller firmware modules for board/BSP mapping, GPIO/I2C/SPI wrappers, ST7735R display rendering, joystick ADC/switch input, MQTT, vision bridge, simulation, and strategy logic.
- Retained camera-node firmware for OV2640 register/SPI/I2C control, image capture, HTTP upload, retry handling, and local JPEG inspection.
- Moved card recognition off-device after SiWG917 memory constraints made useful on-device YOLO detection impractical; FastAPI/YOLOv3 results return through MQTT.
- Validated a known-good `.rps` image, halted the SiWG917 Cortex-M4 through J-Link over SWD, verified the halted state, and applied a timing-sensitive RESET during Simplicity Commander chip erase.
Visual Evidence
Hardware and system artifacts
Results / Validation
- Custom PCB was designed, fabricated, assembled, visually inspected, reworked, and electrically validated.
- 3.3 V and 5 V power rails were tested with oscilloscope captures and electronic-load testing from 50 mA through 600 mA.
- Successfully restored the custom PCB’s ability to accept `.rps` firmware.
- Documented the verified recovery procedure for classmates.
- Working prototype architecture demonstrated on reference SiWG917 development hardware with OV2640 capture, MQTT messaging, LCD output, joystick input, Node-RED dashboard interaction, and OTA-oriented firmware logic.
- The complete application remained a reference-hardware demonstration; successful custom-board programming did not establish full-system execution on the custom PCB.
Challenges / Decisions
- RESET + ISP did not reliably halt the Cortex-M4 before flashloader handoff; recovery required an explicit J-Link/SWD CPU halt and a short reset-timing window during Simplicity Commander chip erase.
- MCU memory limits pushed the card-detection workload off-device to FastAPI + YOLOv3.
- End-to-end integration depended on Wi-Fi, HTTP upload, inference service availability, MQTT broker reliability, and display-state synchronization.
- The public firmware snapshot is curated and excludes generated SDK trees, build output, credentials, and third-party font data without clear redistribution permission.