Tracking filament use with Spoolman and NFC

Contents

Categories: How-to

I have about 20 partly-used spools of filament which i use with my 3d printer, and expect that number to grow as i start using more specialised filaments like ASA and ABS. I recently implemented a system to keep track of them all - this post is a brief walkthrough of the system.

The overall flow is tap → identify the spool in Spoolman → confirm its assignment in FilaBridge. From there, FilaBridge automatically accounts for printer usage against that spool. I chose to use NFC tags so that i don’t have to open my browser and manually select the spool in FilaBridge. And the display screen lets me see how much of my Filamet Basalt Moon Dust at $530 per 500g1 is left before i start printing.

Spool Tap system architecture showing how an NFC-tagged filament spool is scanned by a Grove U216 reader connected to an M5Stack CoreS3 SE touchscreen. The device communicates over HTTPS with Spoolman for filament inventory and tag identification, and FilaBridge for loaded-spool assignments. A Prusa Core One+ provides print and usage data through PrusaLink, allowing FilaBridge to update filament consumption in Spoolman. Both backend services run in a private Kubernetes homelab.

List of components

  • Tagged spool -. Manufacturer tags can be
    • proprietary - (such as Bambu) where we can only get the tag ID2.
    • open - such as tags containing OpenPrintTag CBOR or OpenSpool JSON payloads.
    • missing - many new filament spools contain an NFC tag. If they don’t, i just pop an NTAG213 sticker on the side. I picked up a pack of 100 from Aliexpress for a few quid a few years ago when i started developing Family Foqos.
  • Spool Tap - my implementation, combining:
  • Spoolman - an open source tool for managing spool records. A spool is a physical reel. Spools contain filament - the product like Prusament ASA or PLA. Each physical spool has an NFC which i have registered in Spoolman.
  • FilaBridge - another open source product, it connects to my Prusa Core One via PrusaLink, keeps track of which filament is loaded in the printer, and records filament consumption from each print job and updates usage accounting in Spoolman.

Implementation

Spoolman and FilaBridge run in containers on my homelab. Each has persistent storage for its SQLite database and an existing cluster-wide nightly restic job backs up their data to B2.

The CoreS3 runs a custom firmware in C++ using Arduino, PlatformIO, M5Unified and M5Unit-NFC entirely written by Claude and Codex to my specification. It periodically polls FilaBridge to get the currently assigned filament and displays this on the screen, with unload and status buttons. Presenting any NFC tag to the reader triggers a Spoolman query for the tag by tag UID. The reader handles NFC-A (most common) and NFC-V (ISO15693, as used by Prusament), with NDEF reading for Type 2 and Type 5 tags .

The finished Spool Tap on its white 3D-printed shelf mount: an M5Stack NFC reader unit on the left and the CoreS3 SE touchscreen on the right, whose screen reads “Prusament PETG Jet Black, 1000 g remaining, Tap reel to load” above green Unload and Status buttons.

If the tag is registered, Spool Tap asks the user if they want to load the filament. If it isn’t a recognised tag, and if there’s OpenPrintTag or OpenSpool data, the decoded data is displayed. I can then manually associate the tag with the correct spool in Spoolman - only the tag ID is sent, the OpenPrintTag and OpenSpool data aren’t sent to Spoolman. That’s how it works even with Bambu tags - Spoolman doesn’t care what the tag contains, it only cares about the tag’s UID.

Finally, there’s a white printed shelf mount (generated by ChatGPT as CadQuery), 5cm high, which fits my Ikea Lack shelf, stuck on with double sided tape on the top leaf.

All the code is available in GitHub.

Footnotes


  1. I don’t actually own this filament. It’s not actual moon dust - but contains around 60% basalt (the same rock as the moon’s surface), prints like regular PLA albeit with a 0.6mm hardened nozzle, and once “sintered” (cook) it in a furnace, among other uses, it’s suitable for “lunar and planetary regolith simulant studies” and “space habitat structural component research”. ↩︎

  2. There are reverse engineered tools to decode Bambu filament tags, but we dont really need that information, so i just don’t bother. ↩︎