Readout and parameterization

Richard Schmidmaier | Lukas Dehling,

The NFC alternative

NFC can be found in more than 1.5 billion smartphones and is primarily used in the consumer sector. The simple and intuitive communication over short distances also predestines the technology for industry.

© Zapp2Photo/Shutterstock.com

Be it switching thresholds for sensors, switch-on characteristics for power supplies, speeds for motor controls or delay times and switching programs for timers: These parameters mostly control devices in industrial environments. But how do these parameters get into the device? DIP or rotary selector switches are often used. These also work when switched off - but only for a few bits of configuration data. More data can be programmed from the PC via a UART or USB interface. However, as with the switch, this is not usually dustproof or waterproof. Bluetooth could also be used for configuration in conjunction with smartphones. However, the module to be parameterized must be supplied with power. There is also a risk of confusion with several modules and accidentally addressing the wrong module. The situation is similar for diagnostics or firmware updates, where service UART or USB interfaces are often used.

All the solutions described above are widely used, but each has its own individual disadvantages - and are also relatively expensive: you have to pay around EUR 0.30 for an 8-way DIP switch in medium quantities, and often more than EUR 1 for a Bluetooth chip.

Advertisement

Smaller, better, cheaper

Near Field Communication (NFC) is an interesting alternative here: with the help of a passive and inexpensive 'Connected NFC Tag' chip in the device, 2 kByte or more of configuration data can be transferred from a standard NFC smartphone to the device.

This works passively, so the device itself does not need to be supplied with power. For battery-operated devices, this is a major advantage over Bluetooth or WiFi, as NFC communication does not draw any power from the battery. For mains-powered assemblies, the advantage is that users can carry out the parameterization before switching on for the first time, allowing a defined switch-on characteristic to be specified.

As the NFC signals also penetrate plastic or glass surfaces, the device can be sealed so that it is waterproof and dustproof, achieving high IP protection classes and thus preventing corrosion caused by water, dirt and chemicals. Compared to DIP or rotary selector switches, NFC offers the possibility to configure significantly more parameters without enlarging the front panel. An area of around 22 cm² is required to configure 10 bytes with switches. An NFC antenna is considerably smaller at around 6 cm² - and this means that not just 10 bytes, but 2 kbytes of parameters can be programmed. In addition, the user receives an explanation of the parameters on the smartphone screen or can even read the complete operating instructions for the device.

The user does not have to carry out the parameterization - the manufacturer can also carry out customer-specific programming, in many cases even through the product packaging. For example, if the manufacturer has produced, packaged and stocked the device to be parameterized with standard parameters. As soon as a customer order with certain parameters arrives, these are written to the chip of the device via an NFC smartphone or an industrial NFC reader/writer. This saves warehousing costs, as only one type of device needs to be stocked and different device variants are only produced immediately before delivery.

A 'Connected NFC Tag' and an NFC smartphone with a corresponding app enable parameterization, diagnostics and firmware updates via NFC.

© NXP Semiconductors

NFC is also suitable as a diagnostic interface: status information and error codes can be read out via smartphone with a simple tap or by bringing the NFC smartphone close (a few centimetres) to the device. Here, too, the device or module does not need to be supplied with power, so NFC can also be used for post-mortem analysis of a module that no longer boots. Firmware updates are also possible via NFC, again without a power supply. Despite all these additional possibilities and advantages, 'Connected NFC Tag' chips cost less than a DIP switch.

Two components enable the parameterization and diagnosis of devices:

  • A 'Connected NFC Tag' chip (for example 'NTAG I²C plus') in the device. It is connected to the MCU via the I²C bus and also connected to a small NFC antenna, which can be designed as a conductor track coil with three to five windings
  • An NFC smartphone with an app tailored to the device or a dedicated NFC reader.

The developer kit 'NTAG I²C plus kit for Arduino pinout' makes development easier.

© NXP Semiconductors

The NTAG I²C plus chip offers an EEPROM with 2 bytes that can be read and written both by the MCU via the I²C bus and from the NFC side with NFC smartphones and NFC readers. In addition, energy is obtained from the NFC field of the smartphone, which can be used to supply the module (or part of it) with up to 15 mW as long as the NFC field is present. Another signal - field detect - can trigger an interrupt in the MCU as soon as an NFC phone is within range.

For parameterization, the user makes all the settings in the smartphone app and then touches the device or module with the smartphone. The app now writes the configuration data to the EEPROM of the 'NTAG I²C plus' via NFC. During the next boot process (or immediately if triggered by the field detect signal), the MCU reads the parameters from the chip via the I²C bus and configures the device.

The process is similar for diagnostics, but in reverse order: during runtime, the MCU writes data to the chip's EEPROM, which can later be read out with the smartphone (even when the device is switched off or defective) and displayed in the app. This can include error codes, usage statistics, operating hours counters, firmware versions, serial numbers and much more.

As firmware updates typically comprise more than 2 kByte, a 64-byte SRAM buffer is used here instead of the EEPROM, which is also included in the 'NTAG I²C plus'. The significantly faster SRAM makes it possible to transfer the firmware from the smartphone or the dedicated NFC reader to the MCU in blocks of 64 bytes. Transmission speeds of up to 40 kbit/s are achieved. The device or module can be de-energized, as the MCU is supplied with power by the NFC chip.

The NFC Forum - a public platform for the promotion of near-field communication - has defined the data format and content of NFC tags with NDEF (NFC Data Exchange Format). This allows additional information to be stored in a Connected NFC Tag, which then triggers a defined action on any standard-compliant NFC smartphone: For example, you can store a URL to the operating instructions or start a predefined app.

Smartphone selection almost unlimited

While until recently only NFC smartphones with Android were able to interact with electronic devices via NFC, Apple has also made the newer iPhones fit for this with the latest update to IOS11. With iPhone 7, 7 Plus, 8, 8 Plus and X, there are now Apple phones that can handle Connected NFC tags. One restriction remains at the moment: iPhones can only read Connected NFC tags, not write to them, so they are only suitable for diagnostic applications. Android NFC phones are therefore currently used for parameterization and firmware updates.

Another option is to equip your own programming device with NFC. This allows a manufacturer to tailor hardware and software precisely to their products and make it even easier for customers to parameterize them.

Development made easy

Implementing NFC on an assembly is easy with Connected NFC Tags. The steps are essentially:

  • Hardware: Connect the chip to the MCU via I²C bus and develop the NFC antenna. NXP provides several antenna sizes as Gerber files for download. If a different shape is required, there is a configuration tool that can be used to calculate the geometry.
  • Firmware: The NFC chip appears to the MCU like a serial memory. Writing the firmware is therefore limited to register write and read operations and is comparable to connecting other peripheral chips.
  • App: For the smartphone, an 'NTAG I²C plus' looks like a normal NFC tag, so a smartphone app is also no witchcraft. The operating system functions can be used to read and write tag content via NFC. It is even easier with a software development kit such as Taplinx, which is available free of charge.

Instructions for development can be found on the Internet with pictures, videos and references to data sheets. Two different development kits simplify the design-in depending on the required interfaces: The NTAG I²C plus Explorer kit (OM5569-NT322E) and the NTAG I²C plus kit for Arduino pinout (OM23221ARD).

The read and write range depends on various factors: The antenna size in the reader/smartphone and on the board as well as the output power. In terms of performance, specialized readers have an advantage over NFC smartphones, as the latter usually operate at lower power for energy-saving reasons. Under normal conditions, a smartphone will achieve ranges of between 2 and 5 cm, while a special reader can achieve ranges of up to 10 cm.

The material environment also plays a major role. While plastic, glass and wood practically do not attenuate the NFC signal, a metal housing completely shields the signal so that no communication is possible. Attaching the tag to the outside of a metal surface is a special case. This is possible if a ferrite foil is placed between the tag and the metal - otherwise the NFC field is extinguished by eddy currents in the metal.

Customized security

Of course, the data must be protected against unauthorized reading or overwriting. NFC allows a graduated security concept, depending on requirements: Medium security is provided by password protection in the chip. The chip's EEPROM can be read or write-protected with a 32-bit password. A second sector can even be hidden by default from the NFC side and only temporarily released by the MCU, so that unauthorized reading is also not possible. In addition to password protection, end-to-end encryption or access protection can be implemented to ensure a high level of security. For example, data can be encrypted in the module's firmware before it is written to the Connected NFC Tag. The smartphone app then decrypts it. The NFC channel only passes the encrypted data - and even an attacker would only be able to read crypto text. Users can select a stronger or weaker encryption method depending on the value of the data to be protected.

In addition, NFC operation can be temporarily muted from the MCU using 'silent mode'. In this mode, it is no longer recognized by the NFC phone and is therefore invisible and unresponsive. However, the MCU can reactivate it at any time using an I²C command.

Author:
Richard Schmidmaier is Senior Marketing Manager NFC at NXP.

NFC products on the market

One example is the 'Zelio NFC Timer Relay' from Schneider, which is configured entirely via NFC and thus implements 28 different functions with one piece of hardware. It offers a timer accuracy of 10 ms.

© NXP Semiconductors

The potential of NFC is being exploited by more and more industrial products. In addition to the two examples presented here, there are power supplies, soft starters, motor controls and timers on the market that can already be parameterized via NFC.

With the 'Mini Analog Pro' isolating amplifier from Phoenix Contact, signal ranges, sampling rates, user-specific characteristics and device labels can be set via NFC smartphone. Measured values can also be viewed.

© Phoenix Contact
  • Xing Icon
  • LinkedIn Icon
Advertisement
Advertisement

You might also be interested in

Advertisement
Advertisement
Advertisement
Advertisement

Phoenix Contact

New production facility in Mexico

In order to meet the growth potential of the North American market, Phoenix Contact is planning a new building for electronic and electromechanical production in Mexico. Production is scheduled to start after the first construction phase at the end...

read more...
Advertisement
Advertisement
Advertisement
Subscribe to our newsletter
Advertisement
Back to home