6155

Last year, a client came to us with an unusual request. They wanted to build a jukebox — not the vinyl kind, but something that would work in gyms, arcades, and fitness centers. The catch? No touchscreens. No complicated interfaces. Just tap a card, hear a song.

They wanted something that would work alongside vending machine fitness centers — those spaces where people scan memberships, grab a protein bar, and move on. The idea was simple: give users a physical token that triggers a specific track. Tap it on the reader, the music changes.

We said yes. Here's how we built it.

The Hardware Stack

The system needed to be fast, reliable, and dead simple. No pairing phones, no WiFi setup, no app downloads. Just tap and play.

Core components:
- Microcontroller: nRF52840 — chosen for its built-in NFC support and Bluetooth 5.2. The chip handles both RFID reading and audio streaming over BLE to a receiver unit.
- RFID Reader: MFRC522 module on the receiver side for reading 13.56MHz MiFare cards. We used ISO/IEC 14443 Type A cards — the same kind used in transit passes and gym memberships.
- Audio Output: I2S DAC (MAX98357A) feeding into a 4Ω 10W speaker. No headphone jacks, no aux cables. Just clean digital audio.
- Storage: 16MB SPI flash (W25Q128JV) for storing compressed MP3 files. We fit about 200 tracks at 128kbps.
- Power: 5V USB-C input with a 3.3V LDO regulator for the nRF52. The whole unit draws under 200mA during playback.

Receiver unit (the brain):
- ESP32-S3 for handling MQTT communication back to a central server
- 2.4" TFT display showing current track info and queue
- Solder-in PCB with KiCad layout — 4-layer board with dedicated ground plane for audio clarity

We shipped the first prototype in 6 weeks. Board files, enclosure STLs, firmware — everything.

How It Works: The User Experience

Walk into a fitness center that has one of these installed. You see a small box near the vending machine or arcade cabinet. Maybe it's mounted on the wall next to the arcade machine software terminal.

You pick up a card from a rack. Each card has a song name printed on it — classic rock, hip-hop, EDM, whatever the venue curates. Tap it on the reader.

The nRF52 reads the card UID in under 50ms. It matches the UID to a track stored in flash. Audio starts playing within 300ms of the tap. No lie. No "connecting..." message.

The ESP32 logs the play event to a cloud dashboard via MQTT. The venue owner sees which tracks are popular, when people are using the system, and how many plays per day.

The Firmware Side

We wrote the nRF52 firmware in C using Zephyr RTOS. The main loop is simple:

1. Poll the MFRC522 every 100ms for a card presence
2. On card detection, read UID and look up in a hash table
3. If match found, start streaming the MP3 file from flash through the I2S DAC
4. Send a play event via UART to the ESP32 for logging

The ESP32 runs MicroPython for quick iteration. It connects to WiFi, subscribes to an MQTT topic, and publishes play counts every 60 seconds. We used AWS IoT Core on the backend — cheap, reliable, and easy to scale.

Key technical decisions:
- We used a hash table instead of a lookup loop. Card reads happen in O(1) time. No delays.
- MP3 files are stored as raw binary in flash, not in a file system. This saves overhead and keeps the boot time under 1 second.
- The audio buffer is 512 bytes. We double buffer to avoid underruns. The nRF52840's M4 core handles this at 64MHz with headroom to spare.

Why This Works in Fitness Centers and Arcades

The client specifically wanted this for vending machine fitness centers — the kind where people buy a day pass, use the machines, and leave. No staff. No interaction. The jukebox becomes a social hook.

Someone taps a card. A song starts playing. Other people notice. They grab a card and tap theirs. Suddenly the room has a shared soundtrack. It's not passive background music — it's participatory.

For arcades, the same logic applies. The arcade machine software ecosystem usually focuses on scoreboards and leaderboards. This adds an audio layer. Tap a card between games. The whole room hears your pick.

What We Learned

RFID range matters. The MFRC522 works best within 3-4cm. We designed the enclosure with a marked tap zone and a slight recess so users naturally place the card in the right spot.

Audio quality surprised us. With the MAX98357A and a decent speaker, we got clean sound up to 10W. No hiss, no distortion. The nRF52's I2S peripheral is surprisingly capable.

MQTT is overkill for a single unit. But when you have 20 units across multiple locations, it becomes essential. The dashboard showed us that peak usage happens between 5-7 PM — after work hours. We tuned the volume curve for that time window.

The enclosure matters more than you think. We designed it in Fusion 360 and printed on a Bambu Lab X1C. The final version has a slight angle on the tap surface so users can see the card slot without bending down. Small things.

Shipping a Complete Product

We handled everything in-house:
- PCB design in KiCad — 2 revisions before final
- 3D design and printing — 4 iterations on the enclosure
- Firmware — Zephyr RTOS for nRF52, MicroPython for ESP32
- Assembly — hand-soldered prototypes, then contracted SMT for the first 100 units
- Testing — 5000 tap cycles with no failures

The client got a working prototype shipped to their office in Chicago. They're now testing it in three fitness centers across the Midwest.

The Takeaway

This wasn't a "smart" product for the sake of being smart. It solved a real problem: how do you let people control music in a shared space without phones, apps, or complexity?

If you're running a fitness center, arcade, or any space where people gather around vending machines or game cabinets, this kind of physical interface works. It's tactile. It's immediate. And it doesn't require anyone to download anything.

We're shipping the next batch next month. If you want one for your space — or if you have a different idea that needs hardware — reach out. We build this stuff.