a14g-final-submission-s25-t16-slap-queen

Review Assignment Due Date

a14g-final-submission

* Team Number: T16
* Team Name: Slap Queen
* Team Members: Tianle Chen & Sitong Li
* Github Repository URL: https://github.com/ese5160/a14g-final-submission-s25-t16-slap-queen
* Description of test hardware: 1. SAMD21 + WINC1500 based PCBA 2.VEML7700 light sensor; MAX31855 temperature sensor 3. WS2812B RGB LED element; 5V 1A heating pad;ESP32-S3

1. Video Presentation

Youtube Link:

https://youtu.be/pzpXFrXEU1Y

2. Project Summary

Device Description:

Device Functionality:

Challenges:

Problem 1:

The I2C bus on the PCBA was non-functional; the light sensor soldered onto the board could not be initialized.

Solution: A logic analyzer showed that the SCL line was stuck high while SDA functioned normally, indicating a likely manufacturing defect. We desoldered the sensor and rerouted SDA and SCL to a breadboard, where communication worked. All I2C devices were moved off-board.

Problem 2: The RGB LED could not be controlled via the PCBA; the GPIO output pin did not respond.

Solution: After confirming that the control code worked on the SAMW25 dev board, we suspected a broken trace on the PCBA. As the pin lacked a test point, we used an ESP32-S3 to control the LED via PWM and sent I2C commands from the PCBA to the ESP32 for indirect control.

Problem 3: The SPI-based temperature sensor only returned valid data during the first read after reset, and failed afterward.

Solution: We identified a conflict between the SPI clock and FreeRTOS scheduling. Instead of delaying, we reinitialized and disabled the SPI peripheral for every temperature read, making each access act as a fresh initialization.

Problem 4: The USB-to-Serial chip was incorrectly flipped in the PCB layout, making it impossible to solder.

Solution: We used nearby test points for TxD and RxD to connect an external USB-to-Serial adapter and restored communication successfully.

Problem 5: The J-Link debugger could not detect the PCBA because the debugger port was miswired—pin 3 was incorrectly connected to 5V instead of GND.

Solution: We checked the schematic and compared it with the reference design, then used a drill to cut the 5V via, left pin 3 floating, and manually rewired it to GND using solder.

Problem 6: I2C devices could be initialized under FreeRTOS, but failed to return data during normal execution.

Solution: Tracealyzer revealed that the Wi-Fi task consumed most CPU time. After increasing the priority of the I2C task, communication worked reliably.

Prototype Learnings:

Next Steps & Takeaways:

Node Red backend:

http://52.151.18.200:1880/#flow/66f671320a5098f3

Node Red UI:

http://52.151.18.200:1880/ui/#!/2?socketid=uGIgYGEi1WTffyEBAABM

Altium Link:

https://upenn-eselabs.365.altium.com/designs/9CF3F784-0CCA-4230-B525-11A20F8A1D04

3. Hardware & Software Requirements

Hardware Requirements:

Software Requirements:

4. Project Photos & Screenshots

The final project:

1

1

Standalone PCBA:

1

1

Thermal camera image:

1

Altium Board Design (2D):

1

Altium Board Design (3D):

1

1

Node-Red Dashboard:

1

Node-Red backend:

1

1

1

1

Block Diagram:

1

Codebase