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.

ESP32S3, RC522, and OLED prototype showing a tag working with the web interface
First working Memory Dock prototype, with the XIAO, RC522, and OLED talking to the local web page.

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.

Arduino IDE board manager setup for ESP32
Arduino IDE setup for ESP32 support on the XIAO board.

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.

Breadboard wiring of XIAO ESP32S3, RC522, and OLED
Breadboard prototype with the XIAO, RC522 NFC reader, and OLED all wired together.
XIAO RC522 OLED
GPIO2RST
GPIO5 / SDASDA
GPIO6 / SCLSCL
GNDGNDGND
3V33.3VVCC
GPIO9 / MOSIMOSI
GPIO8 / MISOMISO
GPIO7 / SCKSCK
GPIO44 / RXSDA
Wiring table for the XIAO, RC522 NFC reader, and I2C OLED screen.

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.

Web page showing last UID and label from the ESP32S3 server
Web interface of the tiny server, showing WiFi info and the last UID with its label.
Result of the browser redirecting to a mapped URL from the NFC tag
When a tag with a known UID is tapped, the browser automatically redirects to the mapped URL.

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.

Quest headset, NFC reader, and laptop participating in the same tiny networked system
Memory Dock in action: physical token, tiny server, and headset all connected through the same local network.

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.

PCB layout for the Memory Dock board
Board layout for the Memory Dock controller, with XIAO, NFC reader header, and OLED header.
XIAO ESP32S3 with pins soldered for through hole mounting
XIAO ESP32S3 prepared with pin headers for the custom PCB.
Soldered PCB with connectors mounted
Assembled board with the XIAO and connectors soldered in place.
Close view of the milled PCB where the upper part is not fully cleared
The milled board. The upper part did not mill very cleanly, so some traces are thin and the board is not completely reliable.

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.