Week 15
System Integration

ASSIGNMENT
Make a plan for system integration of your final project, document it with CAD and sketches, implement packaging, and design it to look like a finished product.
TOOLS & COMPONENTS
XIAO ESP32 · IMU · Textile / Garment · Web Interface · Shapr3D
The Project
A wearable monitor for my Scotch Terrier Krypto
Krypto has Vestibular Disease Disorder (VDD) — a neurological condition that affects her balance, coordination, and movement patterns. Living with VDD means her activity levels and movement quality can change from day to day, and those changes matter clinically: they help the veterinarian understand how the condition is progressing and how well she is responding to any treatment.
The goal of this project is a wearable garment — a fitted vest — that Krypto can wear comfortably throughout the day. Embedded in the vest is an IMU (accelerometer and gyroscope) that continuously tracks her movement and activity. That data is processed by an XIAO ESP32, transmitted wirelessly to a web interface where I can see real-time alerts, and stored so it can be exported as a report to share with her vet.
Why this matters
VDD episodes can be subtle and brief — a slight loss of balance, an unusual gait, a drop in activity that happens while I am not in the room. A wearable monitor captures what I cannot observe directly and turns it into objective data. Instead of describing symptoms from memory at a vet appointment, I can hand over a downloaded log showing exactly what happened, when, and how often.
System Integration Plan
01. System Overview
The system has three layers: the physical layer (the garment and the electronics embedded in it), the communication layer (ESP32 sending data over Wi-Fi), and the software layer (the web interface that receives, displays, and stores the data).
Movement & balance data
Transmits over Wi-Fi
Data log · Export to CSV
| Layer | Component | Function |
|---|---|---|
| Physical | Textile vest / garment | Houses and protects electronics; worn by Krypto all day |
| Sensing | IMU (accel + gyro) | Captures movement, orientation, and balance data continuously |
| Processing | XIAO ESP32 | Reads IMU over I2C, processes data, transmits via Wi-Fi |
| Power | LiPo battery | Rechargeable; integrated into the vest pocket |
| Communication | Wi-Fi (ESP32 built-in) | Sends data packets to the web interface in real time |
| Software | Web dashboard | Displays alerts, logs data, allows export for the vet |
02. Packaging — The Garment
The packaging for this project is the garment itself — a fitted vest designed around Krypto's measurements. The electronics need to be integrated in a way that is safe for her, durable through daily wear, and accessible enough that the battery can be recharged and the PCB can be removed for maintenance.
The IMU is positioned on the back of the vest, below the neck height the point that best captures full-body movement and balance changes. The XIAO ESP32 and battery sit in a small internal pocket near the shoulder area, protected by a soft enclosure and kept away from any pressure points.
Initial Sketch
Vest — front view
Overall silhouette and fit planned around Krypto's measurements. Closure at the belly for easy on and off.
Vest — back view
IMU placement along the spine. Channels for routing wires to the electronics pocket at the shoulder.
Electronics pocket
Internal removable pocket housing the XIAO ESP32 and LiPo battery. Accessible via a small port for charging and maintenance.
Design as a finished product
The goal is that the vest looks and functions like a commercial product, not a prototype. All wires are routed inside the fabric layers. The electronics pocket is invisible from the outside. The only visible indicator is a small status LED on the shoulder panel that shows whether the system is recording. Krypto should be able to move, play, and rest without any component getting in her way.
03. CAD & Sketches
The integration plan was documented through both hand sketches — for the garment layout and wire routing — and CAD models in Shapr3D for the electronics enclosure that sits inside the pocket. The enclosure holds the XIAO ESP32 and the LiPo battery in a fixed position, with openings for the USB charging port and the IMU cable.
Electronics enclosure — Shapr3D
Printed enclosure designed to hold the XIAO ESP32 and LiPo battery. Press-fit lid for easy access during development.
System integration diagram
Full diagram mapping each component, its connections, and its physical location within the garment.
04. Data Flow & Interface
The XIAO ESP32 reads the IMU via I2C at a regular interval and computes basic activity metrics: movement intensity, orientation changes, and episodes where the readings suggest a loss of balance or an atypical gait pattern. These are the signals most relevant to monitoring VDD progression.
The data is sent over Wi-Fi to a lightweight web interface. The interface shows a real-time activity feed, flags any alert events with a timestamp, and keeps a running log that can be downloaded as a CSV — ready to hand to the veterinarian at the next appointment.
- 1 IMU sends raw accelerometer and gyroscope readings to the ESP32 over I2C.
- 2 ESP32 processes the readings and calculates activity intensity and orientation.
- 3 If a threshold is crossed — sudden movement change, low activity for too long, atypical orientation — an alert is flagged.
- 4 Data and alerts are transmitted over Wi-Fi to the web dashboard in real time.
- 5 The dashboard displays the live feed and stores the log locally.
- 6 At any point, the full log can be exported as a CSV file for the vet.
| Alert type | Trigger condition | Clinical relevance |
|---|---|---|
| Sudden movement spike | Acceleration above threshold | Possible balance episode or fall |
| Abnormal orientation | Tilt angle outside normal range | Head tilt — common VDD symptom |
| Low activity | Near-zero movement for extended period | Lethargy; possible episode aftermath |
| Erratic gait | High variance in step pattern | Coordination loss — key VDD indicator |
05. Next Steps
The system integration plan is complete. The following steps take it from plan to physical reality over the remaining weeks of the project.
- 1 Fabricate the custom PCB with the XIAO ESP32 footprint and IMU connector.
- 2 Print the electronics enclosure in Shapr3D and test fit with the PCB and battery.
- 3 Sew the vest garment to Krypto's measurements and integrate the wire channels.
- 4 Write the firmware: IMU reading, threshold logic, Wi-Fi transmission.
- 5 Build the web interface: real-time feed, alert panel, CSV export.
- 6 Test the full integrated system on Krypto and iterate on comfort and sensor placement.
Why integration had to be planned before fabrication
A wearable is not just electronics — it is electronics inside a garment worn by a living animal. The packaging decisions (where the IMU sits, how wires are routed, how the pocket opens for charging) affect every downstream step: the PCB shape, the enclosure dimensions, the garment pattern, and the firmware logic. Planning the full system first means none of those pieces have to be redesigned once fabrication starts.
06. Files
Source files for this week's system integration documentation.
↓ STL — Electronics enclosure ↓ PDF — System diagram