Skip to content

Week 16: System Integration

Week 16 Assignment:
  1. Design and document the system integration for your final project

System Integration — AWL

How does it work?

AWL is an offline-first quiz game for 3 teams playing together in the same room. Each team holds a wireless game controller. A shared big screen — driven by a Raspberry Pi — shows the quiz questions, the four answer options (A, B, C, D), and the live score rankings.

The game flow is like this:

1. Mode 1 — “Raise Hand” round (Family 100 style)

For open questions where the answer isn’t multiple choice:

  1. Big screen shows the question (no A/B/C/D options)
  2. First team to press “Raise Hand” wins the right to answer
  3. They speak the answer out loud
  4. The Pi displays a “correct?” prompt — the host (or that team) presses any button to mark right/wrong
  5. Correct -> team gets points; wrong -> next-fastest team gets a chance

2. Mode 2 — “A/B/C/D” round (Kahoot style)

For multiple choice questions where everyone can answer:

  1. Big screen shows the question + 4 options
  2. All teams press their A/B/C/D button (independently, in parallel)
  3. Speed matters — faster correct answers get more points (Kahoot-style scoring)
  4. Big screen reveals the answer + updates the scoreboard
  5. The “Raise Hand” button isn’t used in this mode

This rewards every team for participating, not just the fastest.

System Architecture

Three subsystems connected over a local WiFi network — no internet required.

Game Controller

  1. Custom PCB (JLCPCB, 2-layer, green soldermask, white silkscreen)

  2. XIAO ESP32-C3 microcontroller with external IPEX WiFi antenna

  3. 2.42” OLED display (SSD1309, I²C) — shows per-team status

  4. MAX98357A I²S amplifier + 4 Ω 3 W speaker — plays sound effects

  5. 5 tactile switches with button caps — Raise Hand (Silicone) + A / B / C / D (3D printed)

  6. Status LED with resistor

  7. Slide switch — power on/off

  8. LiPo 2000 mAh + TP4056 charging module

  9. 3D printed enclosure (Bambu PLA matte, red / yellow / blue per team)

Raspberry Pi

  1. Raspberry Pi 3+ as the game host (lent by my instructor)
  2. Local WiFi access point — controllers auto-connect
  3. FastAPI server with WebSocket endpoints for each controller
  4. First-press arbitration — uses millisecond timestamps so it’s fair
  5. AI-generated questions via the Claude API (different categories, difficulties)
  6. React + Tailwind frontend displayed full-screen via Chromium kiosk mode on the HDMI monitor

Integration

  1. Mechanical

    3D printed top + bottom shells with lip joint, button caps over tactile switches, 4 M2.5 screws, side-mounted speaker, recessed battery pocket

  2. Electronics

    Custom PCB with XIAO + OLED + amp + buttons + power management, hand-soldered SMD and through-hole, modular submodules socketed via headers

  3. Power

    LiPo -> TP4056 -> slide switch -> XIAO BAT_VIN, USB-C charging via TP4056, runs around 8 hours per charge

  4. Wireless

    WiFi via external IPEX antenna, WebSocket protocol to Pi

  5. Software

    Firmware in Arduino IDE, FastAPI on Pi, React frontend for big screen

Cable Management

(Updated on 24 June 2026)

This is how the electronics look without the enclosure — cables are loose and unmanaged.

To keep things tidy inside the enclosure, I designed two cable management features:

  • A cable pass-through on the bottom enclosure wall for the speaker cable.

  • A cable pocket on the inner wall to tuck the LiPo battery cable away from other components.

Here is the result after assembling everything into the enclosure:

Tools & Processes

  • KiCad — schematic + PCB design
  • JLCPCB — PCB fabrication
  • Fusion 360 — enclosure + button mold design
  • Bambu Studio - 3D print slicing
  • Bambu Lab printer — 3D printing the enclosure
  • KEXU CNC mill — milling the prototype PCB
  • Silicone — molding & casting button caps
  • Arduino IDE — embedded firmware
  • VS Code — documentation
  • Adobe Illustrator - logo and brand design