Build guide · zmod_esp32-nfc
Build a Wi-Fi NFC filament reader for the AD5X and Creator 5
Hold a spool's NFC tag to a small reader on your desk, and the printer's slot gets the right material and colour. No USB cable to the printer, and it works on a completely stock Flashforge printer.
What it does
Filament makers like Bambu Lab, Creality, Snapmaker and Anycubic put NFC tags on their spools, and open formats like OpenSpool let you tag your own. My Flashforge printers can't read any of them. zmod_esp32-nfc is firmware for a cheap ESP32 board that reads the tag and tells the printer what you're loading, over your network.
One reader can serve several printers. What a scan does depends on what the printer runs:
| Printer runs | What a scan gets you |
|---|---|
| Stock Flashforge firmware | The slot's material and colour, through the same local API OrcaSlicer and FlashPrint use. Nothing is installed on the printer. |
| Zmod | The same, through Moonraker, plus lane data for OrcaSlicer. |
| Zmod + zmod_nfc | The full integration: every tag format, Spoolman matching and a slot prompt on the printer's screen. |
Parts
- An ESP32 board. I use the ESP32-C3 SuperMini. Classic ESP32 DevKits and the ESP32-S3 work too.
- A reader module. A PN532 is the one tested on hardware and the one I recommend. RC522 and PN5180 support is written but hasn't been tested on hardware yet. See PN532 vs RC522 vs PN5180.
- Some tags if your spools don't have them. See NFC tags for filament spools.
- Four or five jumper wires and a USB cable.
Wiring a PN532 to an ESP32-C3
Power the PN532 from 3.3 V so its signal levels match the ESP32's. Set the PN532's two mode switches to I2C: switch 1 ON, switch 2 OFF.
PN532 ESP32-C3 SuperMini
VCC ──────── 3V3
GND ──────── GND
SDA ──────── GPIO 6
SCL ──────── GPIO 7
Those are the default pins, and every pin can be changed later from the reader's web page. Pins for the classic ESP32 and the S3, and the wiring for the RC522 and PN5180, are in the project README.
ESP32-C3 SuperMini tip: these boards have a weak antenna. If the reader keeps dropping off your network, go to Settings › Wi-Fi transmit power. The commonly suggested 8.5 dBm lost most packets on my board. Anything from 11 dBm up worked well (15 dBm is the default).
Flash the firmware
Install PlatformIO (the VS Code extension, or pip install platformio), clone the repository, plug in the board and run:
pio run -e esp32-c3 -t upload # or esp32dev, esp32-s3
Once it's running, later updates can be uploaded from the web page under Settings › Firmware.
Set it up
- On first start the reader opens a Wi-Fi network called
zmod-nfc-setup-xxxx(passwordzmodnfc1). Join it, and the setup page opens. If it doesn't, browse tohttp://192.168.4.1. - Under Settings, enter your Wi-Fi network and password. The reader restarts and joins your network.
- Open the reader at
http://zmod-nfc-xxxx.local, or its IP address from your router. - Under Printers, add each printer: name, IP address, model (AD5X or Creator 5) and method. On stock firmware, enter the printer's serial number and the LAN check code it shows for OrcaSlicer. Click Test to check the connection.
- On the Scan tab, pick the printer and hold a tag to the reader.
One reader per slot
Each printer entry has a Slot for this reader setting. Build four readers, mount one at each IFS slot, give each its own slot, and loading a spool is just setting it on its slot's reader. No prompts, no taps.
What tags it reads
With a PN532: OpenSpool, OpenTag3D, TigerTag, Bambu Lab, Creality, Snapmaker, Anycubic, Elegoo, Qidi and SpoolEase tags, plus Spoolman spool links. Prusa's OpenPrintTag uses ISO 15693 tags, which only the PN5180 can read.
Status
Tested on an ESP32-C3 SuperMini with a PN532 over I2C, with OpenSpool and Snapmaker tags, on both a Creator 5 and an AD5X running Zmod. RC522 and PN5180 builds compile but haven't been run on hardware yet. If you try one, please open an issue and tell me how it went.