Week 11 — Machine Week
For machine week I joined the candle team with Alex. The shared goal was to design a mechanism that could make five LED candles tilt and fall on command: each candle sits on a circular platform driven by a servo underneath. Alex focused on the servo mechanism and I focused on the candle geometry, internal electronics, and how the candle would behave mechanically when tipped.
Process
Goal and concept
For networking and communication I wanted to turn the XIAO ESP32S3 into a tiny web server that can listen to NFC tags and serve different pages on the local network. Each NFC tag has a unique UID, and the idea is to map every UID to a specific webpage so that tapping a tag on the reader becomes a way to jump into different scenes or environments on my headset or laptop.
The prototype works in three pieces. The XIAO reads the UID from an RC522 NFC reader, shows the tag information and network status on a small OLED screen, and at the same time exposes a local HTTP server. A browser on the same WiFi can open the XIAO IP address, watch the current UID, and either display it or automatically redirect to a mapped URL.
Setting up Arduino IDE for XIAO ESP32S3
I started by setting up support for the XIAO ESP32S3 in Arduino IDE. Following the Seeed Studio guide, I added the Espressif board manager URL to the Additional Boards Manager URLs field, installed the ESP32 package, and selected the correct XIAO ESP32S3 board entry. After that the board could be programmed directly over USB as long as the drivers and ports were behaving.
Reading NFC UIDs and showing them on the OLED
The first step was to confirm that the XIAO, RC522 reader, and OLED could all talk to each other at the same time. I wired the RC522 over SPI and the OLED over I2C using the XIAO pins that fit my eventual board layout. A small test sketch read the tag UID, printed it to the serial monitor, and showed the hex string on the OLED.
| XIAO | RC522 | OLED |
|---|---|---|
| GPIO2 | RST | |
| GPIO5 / SDA | SDA | |
| GPIO6 / SCL | SCL | |
| GND | GND | GND |
| 3V3 | 3.3V | VCC |
| GPIO9 / MOSI | MOSI | |
| GPIO8 / MISO | MISO | |
| GPIO7 / SCK | SCK | |
| GPIO44 / RX | SDA |
In this stage the OLED simply showed a splash screen while idle and then displayed the UID in large text whenever a tag was present. A small debounce loop waited until the tag was removed before returning to the ready state, which already felt like a first version of the Memory Dock interface.
Turning the XIAO into a tiny web server
After the basic NFC and display test worked, I added WiFi and HTTP support. The XIAO connects to my local network, prints the IP address to the serial monitor, and also shows the SSID and IP on the OLED so that anyone can type the address into a browser on the same network.
On the software side the board runs a very small HTTP server. The root path serves a simple web page that shows the current UID and label and includes a script that polls a JSON endpoint. The JSON endpoint returns a tiny object containing the last UID, a human readable label, and a URL. When the browser sees that a tag has a URL it automatically redirects to that page. When the tag is removed, reloading the root page returns to the waiting screen.
To make this setup reusable there are only two places in the code that need manual editing. One part holds the WiFi name and password. The other part is a small mapping structure that relates each UID to a short label and a full URL. I copy the UID from the serial monitor, then hand type a descriptive name and the target link. This keeps the hardware generic while the content remains flexible.
Final prototype behavior
With everything running together the XIAO behaves like a tiny server for physical memories. On boot the OLED shows the WiFi SSID and IP address so people know what to type into their device. When someone visits the IP, they see a neutral Memory Dock page in the browser. Once a tag is placed on the reader, the UID is captured, matched to its label and URL, and the browser jumps straight into that experience. Removing the tag and revisiting the root address brings the interface back to the idle state, ready for the next token.
PCB design and milling
Once the breadboard prototype felt stable, I designed a custom PCB so that the XIAO, NFC reader, OLED, and connectors could live on a single board. The layout brings out the XIAO pins I am actually using, arranges headers for the RC522 and the display, and leaves space for mounting inside the final Memory Dock enclosure.
The milling step did not come out perfectly. The top edge of the board was not cleared well, which left a few traces fragile and close to shorting. Electrically the board mostly works and is enough to prove that the tiny server concept functions, but it is not yet something I would trust as a final piece of hardware. For a future iteration I would either refine the tool paths and milling settings or send the design to a board house to get a cleaner and more robust version.