DIY Projects

ATtiny816 PCB Business Card Runs 21 LEDs on Harvested NFC Power

ATtiny816 PCB Business Card Runs 21 LEDs on Harvested NFC Power

Battery-free is not the same thing as unpowered. A card you can tap against a phone and watch light up, with no cell to die and no port to charge, runs on energy the phone’s own NFC field is already radiating. Wilson Harper built exactly that into a PCB business card, and the detail worth stealing is that it runs a real microcontroller off harvested power, not just a static tag.

What the card does

Tap it to a phone and 21 LEDs come alive. Harper started the project to learn KiCad and ended up with a credit-card-thin board carrying an NXP NTAG I2C Plus alongside a 3mm x 3mm ATtiny816. The NTAG chip is the clever half: on top of serving the record your phone reads, it routes surplus harvested DC out to external hardware, which is what keeps the ATtiny running. The ATtiny816 got picked for its QFN package and its 17 GPIOs, and thirty RoHS-compliant boards came back from JLCPCB.

The antenna is the hard part

A rectangular spiral fills the entire card, sized with STMicro’s inductance calculator to land near 2.75uH so it resonates at 13.56MHz. No existing KiCad plug-in could draw that shape, so the repo ships a Python script that generates it. Two routing decisions keep the thing alive: no closed loop, and no ground plane, because eddy currents would otherwise swallow the field before the chip sees it. Six GPIO pins drive 20 Charlieplexed LEDs plus one indicator, and the firmware is bare-metal C clocked down to 1MHz to keep the flicker invisible. Every trace is mirrored onto the back silkscreen next to a block diagram and the BOM.

Build it yourself

Three exposed pads sit on the back at breadboard spacing, so programming happens over UPDI with a pogo-pin clip rather than a soldered header. A TVS diode guards the MCU against the static your wallet builds up. One gotcha is worth the price of admission: a Pico-based UPDI programmer produced nothing at all on the scope, and an Adafruit UPDI Friend worked on the first try, so budget for the known-good tool before you spend an evening probing. The tag itself was written with NXP TagWriter. A second revision with different LED colors and a button or two for arcade-style games is on the table.

The full writeup, the antenna generator script, and the BOM are at wilsonharper.net. If you want to try the idea on a breadboard first, an NTAG I2C Plus breakout and any UPDI-programmable ATtiny will get you to the energy-harvesting part without waiting on a board order.

Frequently Asked Questions

How does the card run a microcontroller with no battery?

The NXP NTAG I2C Plus does more than answer the phone’s NFC read. It rectifies the 13.56MHz field into DC and routes the surplus out to external hardware, which powers the ATtiny816. The firmware runs at 1MHz specifically to keep the current draw inside what the field can supply.

Why does the antenna avoid a ground plane?

A ground plane or any closed copper loop under a 13.56MHz spiral develops eddy currents that absorb the field before the chip can harvest it. The spiral is sized to roughly 2.75uH with STMicro’s inductance calculator so it resonates correctly, and the rest of the board layout is kept clear underneath it.

What will I learn if I build this?

This is a compact crash course in real PCB work: drawing a resonant antenna in KiCad with a Python generator script, Charlieplexing 20 LEDs across six GPIO pins, programming an ATtiny over UPDI with pogo pins instead of a header, and adding ESD protection with a TVS diode. Those four skills transfer directly to thesis and capstone hardware, and the whole thing is cheap enough to iterate on.

This article was inspired by reporting from Adafruit. Find the parts and modules to build it at Circuitrocks.

// written by Ann Arandia

Ann Arandia covers community projects and maker events for the Circuitrocks blog. She writes about local workshops, kid-friendly electronics, and the Philippine maker scene — the people, the meet-ups, the projects that come out of them.