• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Microcontroller Tips

Microcontroller engineering resources, new microcontroller products and electronics engineering news

  • Products
    • 8-bit
    • 16-bit
    • 32-bit
    • 64-bit
  • Applications
    • 5G
    • Automotive
    • Connectivity
    • Consumer Electronics
    • EV Engineering
    • Industrial
    • IoT
    • Medical
    • Security
    • Telecommunications
    • Wearables
    • Wireless
  • Learn
    • eBooks / Tech Tips
    • EE Training Days
    • FAQs
    • Learning Center
    • Tech Toolboxes
    • Webinars/Digital Events
  • Resources
    • Design Guide Library
    • DesignFast
    • LEAP Awards
    • Podcasts
    • White Papers
  • Videos
    • EE Videos & Interviews
    • Teardown Videos
  • EE Forums
    • EDABoard.com
    • Electro-Tech-Online.com
  • Engineering Training Days
  • Advertise
  • Subscribe

NFC Tag Basics: How to use for programming automation

May 31, 2018 By Scott Thornton 1 Comment

Near Field Communication (NFC) is a wireless communication technology that acts over short distances for two-way communication. The use of NFC tags is growing in several markets, including the medical, consumer, retail, industrial, automotive, and smart grid markets. NFC is a type of Radio-Frequency Identification (RFID) technology.

When two NFC enabled devices are very close to each other, about 4 cm or less, they can communicate with each other using the radio waves. Of the two devices communicating using NFC, at least of them has to be an active device (powered). In many cases, this would be a smartphone, tablet, security pad, or a payment terminal. The other device can be either active or passive (unpowered). Using NFC, two devices can be set up in less than one-tenth of a second.

NFC supports three modes of communication: peer-to-peer, read/write mode, and card emulation.

Peer-to-Peer (P2P) Mode

In an active peer-to-peer (P2P) mode, two active devices create a wireless communication channel between them. The active device, with an external power supply, can power the passive device with the electromagnetic field coming from the active device. NFC passive devices are used in many applications because the passive NFC device can be a simple tag.

NFC devices communicate with each other via radio waves. The active NFC device has to be enabled (turned on) first.  The radio waves for NFC are generated using an antenna. NFC works by exploiting the properties of electromagnetic fields, using the inductive coupling between NFC devices. It operates at the 13.56 MHz frequency, which is a license-free section of HF on the RF spectrum. (As a comparison, Wi-Fi commonly operates at 2.4 and 5 GHz).

As an example of active P2P communication, a smartphone might have an antenna that’s on the battery or case. People can share information using two smartphones as active devices, with the smartphones alternately generating radio waves. While one active NFC device sends signals, the other one listens. In the active P2P mode, both devices generate the radio wave alternately at a carrier frequency of 13.56 MHz. This is how people can share information and files with each other through NFC versus Bluetooth, for instance.

There is also a passive P2P mode. Passive NFC tags do not need a power supply because they take advantage of the slight current generated by the inductive coupling. NFC uses a compact antenna pattern that fits onto a retail tag, sticker, or card.

NFC tags
Figure 1: Near Field Communication passive mode of operation exploits the inductive coupling of the devices to generate enough current in the passive device to operate. (Image: st.com, TN216)

Mode: Reader/Writer

The second mode is the reader/writer mode.

One example is when you access data from the NFC tag using another NFC device (e.g., a smartphone). In reader/writer mode, an active device like a smartphone or tablet reads or writes the data on the NFC tag. An active device can read data from an NFC tag by generating  a radio wave using the 13.56 MHz carrier frequency.

The waves from the active device interact with the antenna of the passive NFC tag. The NFC tag “harvests” the energy from the time-varying electromagnetic field made by the active device. This creates enough voltage for the NFC tag to rectify it and power up the chip inside the NFC tag. The chip is tiny and has a clock, rectifier circuit, some memory and a simple controller.

Once the chip has power, the tag can respond to the active device using a technique called load modulation, and data gets sent to the active device.

Card Emulation Mode

Card emulation is the third mode, which is very much like reader/writer mode. A common use case is when smartphones are used to make mobile payments. In this case, a smartphone acts as a passive smart card for the benefit of a payment terminal. The smartphone does not generate radio waves but does respond back to the payment terminal with the requested data.

DIY NFC using your smartphone

NFC standards are derived from existing radio communication standards, and are known as NFC-A, NFC-B, NFC-F, and NFC-V. However, you don’t need to read a standard to start using NFC, as much of it is already set up for you in a smartphone. For instance, you can experiment with your smartphone’s NFC capabilities using an app called NFC Tools. NFC Tools allows you to read, write and program tasks on NFC tags or otherwise RFID compatible chips.

The NFC Tools app for smartphones lets you program tasks on an NFC tag to automate repetitive actions. According to NFC Tools’ description on the Google Play Store, “For example, a simple motion with your phone in front of your NFC tag before going to sleep and the WiFi will turn off, the phone will switch to silence and your alarm will be set for the next morning, all by itself.” NFC Tools’ description identifies several compatible NFC tags that you can buy (differentiated by the chip on the tags) such as NTAG 203, 210, 212, 213, 215, 216; Topaz 512 (BCM512), Ultralight and Ultralight C; MIFARE Classic 1k and 4k; and FeliCa.

As for using an MCU as an active NFC device, you can get Arduino NFC shields as a ready-made module solution from companies like Adafruit, which has the Adafruit PN532 NFC/RFID controller shield for various Arduino MCUs. Seeed Studio’s NFC shield and Grove RFID transponder tools are also an option for NFC with Arduino MCUs.

Filed Under: Applications, FAQ, Featured, microcontroller, Wireless Tagged With: basics, FAQ

Reader Interactions

Comments

  1. smbmiri says

    April 28, 2022 at 8:39 pm

    Very good

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Featured Contributions

Five challenges for developing next-generation ADAS and autonomous vehicles

Securing IoT devices against quantum computing risks

RISC-V implementation strategies for certification of safety-critical systems

What’s new with Matter: how Matter 1.4 is reshaping interoperability and energy management

Edge AI: Revolutionizing real-time data processing and automation

More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center

EE ENGINEERING TRAINING DAYS

engineering
“bills
“microcontroller
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

RSS Current EDABoard.com discussions

  • How to get started with RTL design?
  • RFsoc4x2 fpga diagram request
  • What is the purpose of the diode from gate to GND in normal Colpitts oscillator Circuits?
  • OFweek Mall Online Wholesale Sensors
  • How can I get the frequency please help!

RSS Current Electro-Tech-Online.com Discussions

  • 100uF bypass Caps?
  • Fuel Auto Shutoff
  • Actin group needed for effective PCB software tutorials
  • how to work on pcbs that are thick
  • compatible eth ports for laptop

DesignFast

Design Fast Logo
Component Selection Made Simple.

Try it Today
design fast globle

Footer

Microcontroller Tips

EE World Online Network

  • 5G Technology World
  • EE World Online
  • Engineers Garage
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • DesignFast
  • EDA Board Forums
  • Electro Tech Online Forums
  • EV Engineering
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips

Microcontroller Tips

  • Subscribe to our newsletter
  • Advertise with us
  • Contact us
  • About us

Copyright © 2025 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy