* Team Number: 17
* Team Name: CircuitBreaker
* Team Members: Yuetian Zhao&Shuowen Gu
* Github Repository URL: https://github.com/ese5160/a14g-final-submission-s25-t17-circuitbreaker
* Description of test hardware: (development boards, sensors, actuators, laptop + OS, etc)
https://drive.google.com/file/d/1Q8Uip4zGH3cBUoYxHP9DGPIWs58QoFy_/view?usp=sharing https://drive.google.com/file/d/13tFrA57lfs7_Pe5DuiQjUAeWHU28Ekg5/view?usp=sharing
The Magic Wand IoT Device is a handheld, gesture-controlled interface that lets users perform smart-home actions with intuitive “spell” motions. Inspired by the desire to make everyday home automation more playful and accessible, it solves the problem of complex multi-app control by providing a single, gesture-driven tool. The wand leverages Wi-Fi and MQTT to send commands to cloud or local hubs, enabling real-time control of lights, music, and more.
{ "gesture": "Circle"} on wand/gesture topic.

{ "user_id": 2 } is published on wand/auth/request; BM-Lite replies on wand/auth/response.wand/gesture; maps gestures → home-automation actions; then publishes control messages on topics like home/lights/bedroom/set with payload { "state": "ON" }.If rebuilding:
Below is a review of each hardware and software requirement from our project specification, including how we validated performance, whether the requirement was met, and relevant data.
| Requirement | Target | Test Method | Result | Met? |
|---|---|---|---|---|
| UART Communication Rate | 115200 bps | Measured UART TX from MCU to PC using a logic analyzer. Verified baud rate. | 115211 bps (error: +0.01%) | ✅ Yes |
| I2C Communication Rate | 100 kHz | Used logic analyzer to capture SCL frequency between MCU and IMU. | 98.7 kHz (±1.3%) | ✅ Yes |
| IMU Data Accuracy | Accel ±16g, Gyro ±2000°/s | Compared raw sensor data to known motion (manual swing + phone IMU baseline). | Within ~5% drift over 5s | ⚠️ Partial |
| IMU Data Sampling Period | 200 Hz target (5ms) | Captured timestamped data samples via UART and computed average interval. | ~5.03 ms/sample | ✅ Yes |
| UART Data Integrity | No data corruption | Sent known pattern (0xAA, 0x55, etc.) repeatedly and checked on receiver. | 0 errors in 1000 packets | ✅ Yes |
We validated the IMU data by manually moving the device to the right for approximately 5 seconds and collecting real-time readings from the accelerometer and gyroscope. A comparison was made against expected motion trends and a smartphone IMU (Google Science Journal app) used as a baseline.
| Sample | Accel X | Accel Y | Accel Z | Gyro X | Gyro Y | Gyro Z |
|---|---|---|---|---|---|---|
| 1 | 88 | 727 | 2314 | -695 | -276 | 41 |
| 2 | 69 | 749 | 2138 | -186 | -479 | 189 |
| 3 | 90 | 682 | 1797 | 336 | 58 | 168 |
| 4 | 98 | 608 | 2065 | -216 | -479 | 67 |
| 5 | 333 | 604 | 2123 | -1009 | -1054 | -78 |
| 6 | 174 | 620 | 1952 | -530 | -516 | -52 |
These values were collected at approximately 5 ms intervals using a FreeRTOS task. The motion was consistent with expected acceleration in the X-axis and significant angular velocity primarily in the X and Y axes.
The IMU measurements were consistent and within acceptable error for gesture recognition. Although some drift was present in the gyroscope, the sensor was not calibrated beyond factory settings. Future work could include:
Overall, the IMU performance meets the requirements of our application, though not perfectly accurate in absolute terms.
| SRS ID | Requirement Description | Type | Target |
|---|---|---|---|
| SRS-01 | UART communication with host PC | Functional | 115200 bps |
| SRS-02 | I2C communication with IMU | Functional | 100 kHz |
| SRS-03 | IMU must support 16g accel, 2000°/s gyro | Functional | ±16g, ±2000°/s |
| SRS-04 | IMU data sampled and processed at a minimum of 200 Hz | Performance | ≤ 5 ms/sample |
| SRS-05 | UART transmission should be error-free for 1000+ packets | Reliability | 0% data corruption |
| SRS-06 | IMU must provide stable readings during motion classification | Accuracy | Drift < ±5%, jitter < ±0.2 ms |
| Requirement | SRS ID | Test Method | Result | Met? |
|---|---|---|---|---|
| UART Communication Rate | SRS-01 | Measured UART TX from MCU to PC using a logic analyzer. Verified baud rate. | 115211 bps (error: +0.01%) | ✅ Yes |
| I2C Communication Rate | SRS-02 | Used logic analyzer to capture SCL frequency between MCU and IMU. | 98.7 kHz (±1.3%) | ✅ Yes |
| IMU Data Accuracy | SRS-03,06 | Compared raw sensor data to known motion (manual swing + phone IMU baseline). | Within ~5% drift over 5s | ⚠️ Partial |
| IMU Data Sampling Period | SRS-04 | Captured timestamped data samples via UART and computed average interval. | ~5.03 ms/sample | ✅ Yes |
| UART Data Integrity | SRS-05 | Sent known pattern (0xAA, 0x55, etc.) repeatedly and checked on receiver. | 0 errors in 1000 packets | ✅ Yes |
We validated the IMU by collecting real-time data while performing a rightward motion over ~5 seconds. A phone IMU was used as a qualitative baseline for reference.
| Sample | Accel X | Accel Y | Accel Z | Gyro X | Gyro Y | Gyro Z |
|---|---|---|---|---|---|---|
| 1 | 88 | 727 | 2314 | -695 | -276 | 41 |
| 2 | 69 | 749 | 2138 | -186 | -479 | 189 |
| 3 | 90 | 682 | 1797 | 336 | 58 | 168 |
| 4 | 98 | 608 | 2065 | -216 | -479 | 67 |
| 5 | 333 | 604 | 2123 | -1009 | -1054 | -78 |
| 6 | 174 | 620 | 1952 | -530 | -516 | -52 |
Most hardware and software requirements were met, including communication speeds, data integrity, and real-time sampling constraints. The IMU showed small drift and bias, but remained consistent and responsive enough for gesture recognition purposes.
Future improvements could involve sensor calibration and digital filtering to further reduce IMU bias and noise.