By: Matt Rose, Technical Business Development Manager
Near Field Communications (NFC) is a type of Radio Frequency Identification (RFID) that has recently become popular due to its inclusion into smartphones worldwide. With over one billion NFC- enabled devices on the market, the desire to add low cost connectivity to everyday products is increasing. A typical NFC-enabled Android smartphone can behave in three ways: card reader mode, card emulation mode, or peer-to-peer mode. First encounters with NFC can be a little confusing, so this article will cover three key points for understanding and applying the technology: NFC is like two tin cans on a string, NFC-enabled Apple phones only work in card-emulation mode, and how to program a NFC tag.
NFC communications as defined by ISO 18092 and the older 14443 specifications are characterized by the following parameters. Its operating frequency is 13.56MHz, an ISM-band frequency that was initially found to ex- cite RF plasma in the early years of RF generators. NFC’s maximum range is short, from 2cm to 10cm but the typical user expectation is to touch the tag to the reader. The air data rate is 106kbps, depending on the protocol and standard used, but actual data rates are closer to 10kbps-30kbps.
RFID is a method of communications where a powered reader, called the initiator, provides energy to a passive element called the target (or tag) wirelessly. Fundamentally NFC operates like two tin cans on a string. The reader “tin can” provides the “string”, i.e. the wireless transmission medium. The tag “tin can” receives the string’s communication and responds appropriately by “plucking”, i.e. modulating, the same “string” that the reader has provided (Figure 1). In short, NFC communication is achieved through magnetic induction. The two antennas of the reader and the tag essentially act like two coils in a transformer.
The above case of communication is also called the passive mode in that the reader is the only one providing energy to the system. The energy of the tone is harvested by the tag and its state machine comes alive. The reader then leaves the tone on and “listens” as the tag modulates the tone by changing its impedance within the field. This method is referred to as load modulation (Figure 2) and is used in the majority of applications.
The active mode of NFC is used in peer-to-peer file-sharing applications such as S-Beam or Android Beam to pass files, pictures or movies between two smartphones. In these cases both devices communicate in a time- domain division scheme. When NFC handshaking is complete, the devices hand over the higher rate data handling to either Bluetooth Classic or Wifi Direct.
In the past few years, applications for NFC technology have become more commonplace. Samsung Pay, Google Pay and Apple Pay have made using a smartphone a convenient way to make purchases. NXP’s family of Mifare standards (Ultralight, Classic, Desfire and Plus) are utilized in public trans- portation and access management systems (Figure 3). Hotel chains such as Marriott have been replacing magnetic strip door keys with NFC keys. The Nintendo Skylanders, Disney Infinity and Lego Dimensions video games implement NFC technology as character wallets to store gameplay information. NFC can be used to quickly pair phones to WiFi- enabled thermostats or Bluetooth-enabled audio speakers.
Application and Implementation
When adding NFC to your product, there are six elements to consider: tags, readers, software library, antenna design and layout, regulatory compliance, and creation of the phone application.
When considering which tag is the best for your application, there are three things to consider: protocol, memory size and form factor. There are five different standard tag types as defined by the NFC Forum. Type 1 is an older standard. Type 2 is the most common found in North America and Europe. Type 3 is mostly found in Japan and is based on the Sony Felica standard. Type 4 is the most sophisticated and is the type that is used when Android and Apple phones are in card-emulation mode. This is the second key thing to remember: the current batch of Apple phones only work in card-emulation mode for Apple Pay payment applications and
do not have the chipsets to allow them to act as readers. Type 5 is also known as the 15693 standard and is typically used in short-range inventory systems such as is found in libraries.
NFC Data Exchange Format (NDEF) records are used to organize data transfer between two devices. NDEF records include header information, message flags, and the payload information. The NDEF header includes information describing the type of record. For example the record could be a website URL, contact information, plain text, or custom data for a particular application. This organization makes it straightforward for a reader such as an Android smart phone to determine the type of application to utilize with the payload information.
While a great many NFC applications involve the phone as a reader, there are a number of applications where a standalone reader is required. This might be a point-of-sale box, a door entry system or a pairing-validation application. There are two options when designing the reader architecture. The first is to use a front-end device acting as a NFC transceiver connected to the designer’s preferred MCU. The second is to implement a turn-key solution called a controller, where the MCU and front end are in one single package (Figure 4). In this case the software protocol libraries lie within the MCU where in the first case they would be located on the host MCU.
Arguably the most mystical element of the NFC architecture is the antenna design. Specialized RF hardware and software tools are used to optimize antenna performance. The form factor of the antenna is also very important. The antenna can be square or circular but should be matched geometrically to the reader in order to best transfer magnetic energy between the coils. If the user application is in a metal environment, a coil with ferrite backing can be used to direct the energy away from the metal (Figure 5). The FCS team includes specialists with hardware and software tools to assist customers in antenna design and to bring their NFC-enabled product to market in a timely manner.
When creating a wireless-enabled product of any type, FCC compliance testing is typically required. This is the case when creating an NFC reader solution that is transmitting power at 13.56MHz. Both intentional and unintentional emissions testing would be required. However when creating a product with a smart-tag device like the NXP NTAG or STMicroelectronics STM24SR (Figure 6), no emissions testing is required, as the part behaves like a receiver. These inexpensive devices have an NFC interface and EEPROM memory like a regular tag but also have field detection, energy harvesting and an I2C serial interface to allow information to flow from the Android phone to the product’s microprocessor. This allows an “app” on the phone to pass warranty information or product diagnostics/error codes to the manufacturer’s CRM website or to pass firmware patch updates or configuration details from the CRM website into the product at any time during the product’s lifecycle. Apps are typically created by way of Apache Cordova/Phonegap or Android Studio/ Eclipse development platforms. Tutorials for these tools are easily found online as is NFC-related example code from the device suppliers.
A number of free apps are available for download from the Google Play Store to read and write NFC tags. Tags can be acquired by way of E-bay, websites or as samples from tag or inlay suppliers. For this exercise TAGWRITER from NXP will be used (Figure 7). Go to the phone settings and turn NFC on. The NFC logo should appear. Open the app and select READ TAGS to gather general information about the tag then hit the back button and select WRITE TAGS and NEW DATASET. Select BUSINESS CARD from the list of available record types (Figure 8) and select the contact information you would like to place in the tag. Hit SAVE & WRITE then WRITE to program the tag. Place the phone near the tag then WRITE SUCCESSFUL will appear if the write indeed was successful (Figure 9). Now go to the home screen of the Android phone and read the tag. The phone will automatically pull up your favorite contact information app (or ask you to select your desired contact app) and load the information into your contacts app. You have now successfully programmed a tag!
In summary, the recent introduction of NFC into smartphones has increased the opportunities for manufacturers to add inexpensive close- range wireless communications to their products. The three key things to preliminarily understand are: NFC is like two tin cans on a string in that one of the cans is providing the string, the current batch of NFC-enabled Apple products only work in card-emulation mode, and the process of reading and writing tags.