Doing NFC Card Tricks

Researchers turned ordinary NFC readers into highly accurate gesture recognition systems that enable contactless swipes, taps, and shakes.

Nick Bild
2 days agoAI & Machine Learning
This NFC reader recognizes gestures (📷: ACM SIGCHI)

Repurposing existing technologies has been a fertile ground for innovation through the years. Take Post-it Notes, for instance. Initially developed as a weak adhesive for use in aerospace applications, they found new life as small, removable notes for everyday use. Similarly, microwave technology was originally developed for radar applications before being adapted for cooking.

Lately, a lot of effort has gone into finding new uses for the wireless signals that already surround us. One research group has shown that the Wi-Fi signals that already fill your home can be repurposed to measure your heart rate without contact (and you can try it for yourself with a pair of ESP32s). Now, a pair of computer scientists at the University of British Columbia has just demonstrated that near-field communication (NFC) has also got some new tricks up its sleeve.

NFC has always been pretty one-dimensional — tap a credit card to pay for groceries, or maybe tap your badge at work for building access. But as the team showed, NFC can do a lot more than just pass along credentials with a tap. By analyzing the raw signals captured by a receiver, it is possible to detect the motions of an NFC tag. This discovery led the team to build what they call NFCGest, which is a contactless gesture recognition platform.

NFCGest relies on the same technology used in millions of payment terminals around the world — the PN532 NFC chip. Normally, this chip handles simple communication tasks, like verifying your credit card or ID badge. But hidden within the chip are analog test pins that expose the raw signals it receives during an NFC transaction. These signals are usually ignored, but the researchers realized they contained rich information about how the NFC tag moves relative to the reader.

To capture these signals, the team connected the PN532’s test outputs to a custom-built sampler based on an STM32H747 microcontroller. Dual analog-to-digital converters that the team configured to record data at 2 million samples per second, with 14-bit resolution, collect the raw data. That’s fast enough to capture the subtle fluctuations in amplitude and phase that occur as the NFC tag moves. The data is streamed over USB to a computer for real-time visualization and classification, though the researchers note that future versions could run entirely on the microcontroller itself.

To give NFCGest a better sense of direction, the team added interference coils — small wire loops strategically positioned over the reader’s antenna. These coils slightly distort the magnetic field, creating asymmetry that helps distinguish gestures in different directions. With this enhancement, the system can tell whether a user swiped left, right, up, or down, or performed more complex motions like a double tap or shake.

Once the raw signals are captured, NFCGest processes them in real time. The system converts the incoming data into amplitude and phase values, which can be plotted on what’s called the I-Q plane, a two-dimensional representation of the signal’s behavior. Different gestures trace out distinct shapes on this plot, allowing the system to identify what kind of motion occurred.

To make sense of these shapes automatically, the researchers extracted 14 statistical features from each gesture, such as amplitude peaks, phase ranges, and signal duration. These features were then fed into a random forest classifier, which is a lightweight machine learning model. This model achieved an impressive 91.8% accuracy in evaluating a set of nine gestures across multiple users in real-time tests.

By expanding NFC’s limited interaction vocabulary, NFCGest opens up a world of new possibilities for secure, hygienic, and low-cost interfaces. And best of all, it does so using the same chips already embedded in countless devices.

Nick Bild
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles