NTAG I²C plus Arduino-compatible Development kit - Review

Table of contents

RoadTest: NTAG I²C plus Arduino-compatible Development kit

Author: stevesmythe

Creation date:

Evaluation Type: Development Boards & Tools

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?: I'm not aware of anything directly comparable, although some of the functionality is also used in the NXP NTAG I²C Explorer Kit and the NFC Cube, both of which are covered in this review.

What were the biggest problems encountered?: The complexity of some of the demo applications when trying to modify them.

Detailed Review:

Introduction

Thanks to element14 and NXP for providing me with the NTAG I²C plus Arduino-compatible Development kit (OM23221ARD) to review. The NTAG I²C plus Arduino-compatible Development kit is not, in itself, very exciting as it is essentially just an NFC chip connected to an antenna board. The kit costs around £15 in the UK. Rather than just focus on that device, my review will attempt to describe what is special about NFC generally and NTAG I²C plus in particular, and how it can be used. To help me do this, I will use two other NXP NFC devices – the NXP NTAG I²C Explorer Kit (which I already owned) and the NXP NFC Cube (which was kindly supplied by of NXP to help me with this review). I will, of course, look at how the NTAG I²C plus Arduino-compatible Development kit can be used to develop NFC applications, and how I found the experience.

 

What's in the boxes?

For the RoadTest, element14 provided two (actually, three) things: an NTAG I²C plus kit and a FRDM-KW41Z development kit (which consists of two FRDM-KW41Z development boards).

image


image
image

The NTAG I²C plus kit consists of an antenna board which has an NTAG I²C plus chip mounted on it. The chip is connected to the antenna and its I²C bus is brought out via an adapter board to two rows of Arduino form-factor compatible pins. The NTAGI²C plus chip could be used with pretty much any microcontroller that supports I²C. NXP have designed the NTAG I²C plus Arduino-compatible Development kit to complement the low-power multi-wireless connectivity stacks offered by the FRDM-KW41Z board as a way of demonstrating some of the more advanced NTAG I²C use cases, such as BLE pairing.

 

image

 

What is NTAG I²C plus?

 

NFC

NTAG I²C plus is a type of Near Field Communications (“NFC”) tag. NFC tags (NTAGs) are radio frequency transponders that operate at 13.56 MHz. They are manufactured as surface-mount integrated circuits connected to an antenna. The chip has a unique ID and rewritable memory. The antenna allows the chip to interact with an NFC reader/scanner, such as an NFC-capable smartphone. NFC tags are available in many form factors such as key-fobs, credit card-sized plastic cards and stickers. Here are some of mine.


image

You can write information on the available memory of an NTAG. This information can be easily read (and executed) by an NFC device, like a smartphone or a tablet by tapping the NTAG with your device. An object equipped with an NTAG can also be uniquely identified thanks to the unique code of the chip. NTAGs do not need any direct power supply, because they are powered by the magnetic inductive field of the NFC sensor of the mobile phone or the device that reads them. The available memory of NTAGs varies according to the type of chip, but generally is less than 1 kilobyte. This is sufficient to store data as an NDEF (NFC Data Exchange Format) record. NDEF was defined by the NFC Forum specifically for the programming of NTAGs. The NDEF format supports the following use cases:

  • Open a web page, or a link in general
  • Send emails or SMS
  • Start a phone call
  • Simple text
  • Save a V-Card contact
  • Start an application (only applies to Android and Windows)

 

NTAG I²C

NXP NTAG I²C is a type of “connected” NTAG that combines a passive NFC interface with a contact I²C interface. It is an extension of the existing NTAG standards that provides extra features:

  1. I²C connectivity
  2. Energy harvesting
  3. A field detection pin (useful for waking up an MCU from sleep mode).

The NTAG I²C plus devices maintain backward compatibility with first-generation NTAG I²C products, while adding new features for password protection, full memory-access configuration from both interfaces, and an originality signature for protection against cloning. NTAG I²C plus devices act as a “bridge” between a passive NTAG and a microcontroller. This allows two devices (e.g.  microcontroller and the NFC phone) to be connected securely, and credentials exchanged without the need for any manual configuration.

 

image

 

As an example, you could connect your smartphone to a Bluetooth speaker with an NTAG I²C Plus interface just by tapping the NTAG antenna with your phone. This would automatically initiate the Bluetooth pairing process and start streaming audio from your phone to the speaker. As another example, you could update the firmware in a household device by loading new firmware to your phone, tapping the phone against an NTAG antenna in the device and initiating an “over the air” update. If you have a Nintendo Switch, or 3DS, you can enhance the game with “amiibos” (real-world figurines with NFC tags) that enable extra in-game characters. The most comprehensive description of the various use-cases for NFC are in the NXP document attached at the foot of this page. The NFC Cube and NTAG I²C Explorer kit provide a great way to demonstrate some of the various use-cases for NTAG I²C.

 

The NFC Cube comes with a set of demonstration NFC cards and an app. The video below shows the I²C Explorer Board being powered by the NFC energy harvesting field. It also shows bi-directional communication between the NFC Cube and the I²C Explorer Board - by selecting a coloured push button on the board, the NFC Cube lights up in the respective colour.

 

 

imageimage

imageimage

imageimageimageimage

 

imageimage

image

 

As soon as my 11-year-old son saw the NFC Cube, he suggested that we could use a Lego Mindstorms colour sensor to detect which of the sample cards had been touched on the reader and integrate a Lego mechanism with the Cube without having to delve inside it. He also thought we should make a motorised card reader like on cash machines. So we did!

 

image

image

 

 

RoadTest Hardware

 

FRDM-KW41Z Development kit


Although the RoadTest is primarily concerned with the NTAG I²C plus kit, some familiarity with the host MCU board is necessary before the NTAG I²C plus kit can be used.

 

The FRDM-KW41Z development kit provides you with two FRDM-KW41Z development boards plus USB cables. The rationale for this is that, by providing two boards, you can test its various wireless connectivity stacks by sending signals between the two boards. The boards provide the following wireless connectivity stacks:

  • BLE v4.2 host stack and application profiles
  • Generic FSK at 250, 500 and 1000Kbit/s
  • 802.15.4 MAC/PHY support
  • Thread network stack

 

The FRDM-KW41Z is, itself, designed so that it can function as an Arduino shield, and has extended header pins on the bottom, as well as header sockets on top. It provides four LEDs, including one RGB LED as well as an NXP FXOS8700CQ six-axis sensor with integrated linear accelerometer and magnetometer chip, two press switches, two capacitive touchpads and a thermistor temperature sensor. It’s a very low power board and there are many ways of powering it, including a built-in coin-cell holder, USB and header pins. For low-power applications, the coin cell option is useful and can be enabled by a jumper across J27.

image

 

 

NTAG I²C plus Arduino-compatible Development kit


This consists of an NTAG I²C antenna board soldered onto a daughter board that connects the different NTAG I²C connections to the appropriate pins on an Arduino-pin-compatible MCU (including, of course, the FRDM-KW41Z). The NTAG I²C antenna board is electrically identical to the other NTAG I²C antennae Product LinkProduct Link andProduct LinkProduct Link produced by NPX.

 

The NTAG I²C connections are:

  • FD – field detect
  • Vout – energy harvesting voltage output
  • SCL – I²C clock
  • SDA – I²C data
  • GND – common ground
  • VCC – supply voltage

The remaining connections on the Arduino headers are routed to the KW41Z and they can be configured according to your application. In practice, I didn’t find the Arduino shield format particularly useful because the NTAG I²C board needs to be on top and it stopped me from using the other pins on the KW41Z for the LCD that I wanted to use. The KW41Z does have long stacking header pins underneath the board, so these can be used – either by connecting wires individually, or by buying/making a proto-shield and sitting the KW41Z on top of it.

 

The proto-shield idea wasn’t particularly useful to me either, as you still wouldn’t be able to see the LEDS or LCD screen! NTAG I²C plus provides typically 5 mA at 2 V on the VOUT pin with an NFC Phone. There are other design considerations when using energy harvesting – e.g. If NTAG I²C also powers the I²C bus, then VCC must be connected to VOUT, and pullup resistors on the SCL and SDA pins must be sized to control SCL and SDA sink current when those lines are pulled low by NTAG I²C or the I²C host (the KW41Z allows weak internal pull-ups to be enabled on the I²C lines). The maximum harvested energy that can be delivered is around 15mW and I found that I could just about power the KW41Z and onboard LEDs from the NTAG I²C energy harvesting output. However, the energy harvesting pin didn’t deliver enough voltage (or current) for the LCD as well. The Arduino shield doesn’t connect the VOUT (energy harvesting pin) from the NTAG I²C to the correct pin on the KW41Z as far as I could see (it goes to the input side of an LDO regulator) but there are female connectors underneath the NTAG I²C board, so one of these could be used by adding a jump-wire from VOUT on the I²C board to J19 and jumper pins 2-3 on J23.

 

 

RoadTest Software

The KW41Z board can be programmed with various development IDEs, including MCUXpresso, arm MBED and Zephyr.

 

Coding with ARM Mbed online compiler

I had initially planned to test the KW41Z in the arm MBED environment but found that the online compiler does not currently support either BLE or Thread applications with this board, which is a bit of a limitation – particularly the lack of BLE, as automatic Bluetooth pairing via a connected tag is one of the key use cases for the NTAG I²C plus. The only KW41Z example code provided for arm MBED and Zephyr is a “blinky” (e.g. flash an LED on/off).

 

Coding with MCUXpresso

The NXP documentation says that the KW41Z is also supported by the IAR toolchain but, apart from a time-limited demo version, it appears that you have to buy a licence and to do that, you have to request a quotation to find out how much it would cost.

 

As all of the NXP documentation and examples are based on MCUXpresso, I decided to take the plunge with MCUXpresso (which I have not used before). It is based on Eclipse, which I have used before. All the examples provided are written in C, which I have also not really used before (except in so far as C++, which I have used, is a superset of C).

I wanted to connect an LCD display for my use cases, so my first task was to research how to do that (using C so I could use the NXP demo apps). I did not find this easy, but I sought help from the Internet and came up with a driver that was easy enough to integrate with other projects (except for one of the two NTAG I²C demo projects unfortunately, where there were a lot of broken dependencies).

 

There is a lot of software to download and install to get started with MCUXpresso. First you download and install the latest version of MCUXpresso (10.3 at the time of writing). You also need to build the appropriate software development kit (“SDK”) for your board (FRDM-KW41Z in my case). The review by contains a good tutorial on how to do this, complete with screenshots.

 

From the main Workspace in MCUXpresso, in the Quickstart menu, choose the option “Import SDK Examples”. Then you are presented with a list of examples (the titles of which are not always self-explanatory). I chose Driver Examples->GPIO->LED_Output. This creates a Project in your own MCUXpresso workspace which is a clone of the SDK example. This particular example just blinks the onboard RGB LED on and off.

 

If you haven’t used this IDE before (I hadn’t), there is also quite a steep learning curve. However, getting to grips with MCUXpresso was one of the reasons that I was keen to carry out this RoadTest.

 

Android apps

NXP have developed several apps that allow you to interact with NTAG chips, including the I²C variety and some of the MCUXpresso examples are supported by the NTAG I²C Demo app. The NTAG I²C Demo app was written to support both the NFC Cube and the NTAG I²C Explorer board.

 

The video below shows the Android app being used to control the RGB LED on the NTAG I²C Explorer kit. The NTAG I²C Explorer kit is also being powered by the phone's NFC energy harvesting field. The low-power LCD display can be turned on and off by the app, and displays the induced voltage, temperature and NDEF message.

 

 


 

The availability of these apps should alert you to the fact that you need to be careful when deploying your applications “in the wild” to ensure that people cannot just rewrite the contents of your NTAG I²C chip! Fortunately, NXP have thought of this, and there are two solutions – encryption and write flag.

 

As an example of what you can do with a passive NTAG costing less than $1 US and a free app from NXP, you can create a “smart poster”. This could take the form of a physical poster with an NTAG hidden underneath, advertising a product or film. If you place your NFC phone over the part of the poster with the NTAG, your phone immediately launches its browser and takes you to the website of the product or film. Alternatively, you could place an NTAG on a bus stop and tapping your NFC phone on it opens an app (e.g. London Live Bus Countdown, which uses geolocation to find the nearest bus stop and then displays the routes and live arrival information on your phone).

 

Example projects

To gain familiarity with MCUXpresso and the associated SDK, after the “LED Output” project, I tried out some of the SDK example projects for the KW41Z on its own (not involving the NTAG I²C plus kit) including:

  • Thread (a type of mesh network) – broadcasting the temperature reading from the onboard thermistor on the KW41Z to other devices on the Thread network.
  • BLE wireless UART - sending messages between your phone and the KW41Z using BLE.

 

These examples, and the associated Android app demonstrate the versatility of this board.

 

I then moved on to the three examples that involve the NTAG I²C board with the KW41Z.

 

The first example makes the onboard RGB LED blink when the presence of the NFC field is detected by the chip on the antenna board.

 

The second was Bluetooth pairing using I²C. See: https://freescale.jiveon.com/docs/DOC-335241 This project originally had nothing to do with NTAG I²C. The original project was a way of setting up pairing between a smartphone and the KW41Z and then displaying a moving mouse cursor (the HID) on the phone’s screen. By adding an NTAG I²C, the user no longer has to enter the pairing code into the phone’s Bluetooth settings and pairing takes place automatically. The moving mouse cursor is just to indicate that the two devices are communicating.

The demo also includes the option of reading the NDEF messages on the NTAG I²C board with an NFC phone (and opening the associated website or app automatically). Apart from the demo itself, the project documentation explains how to add NTAG I²C functionality to existing projects. In doing this, it skips over a few steps and is quite hard to follow. Also, the Bluetooth pairing project is already quite complex (several thousand lines of code) so it is not such a great tutorial if you just want to know how to use NTAG I²C in your own project.

 

Next, I tried the I²C explorer demo project (using the KW41Z and NTAG I²C board). This was simpler but also slightly frustrating as the code had been ported from the original explorer board (see above). The original NXP LPC 11U24 microcontroller board uses an I²C LCD screen and an I²C temperature sensor (neither of which is provided with the KW41Z development kit) and three push buttons. Although the KW41Z does have a thermistor and two push buttons, the demo project code does not support them - which is slightly disappointing.

 

 

 

 

Testing

After trying the demo applications, I wanted to develop an application of my own and I thought that an LCD screen could be useful for displaying additional information. As mentioned, the Arduino header board wasn’t particularly useable, so I used a different antenna board. The 3v HD44780 LCD was connected in 4-bit parallel mode, which uses 6 pins on the Arduino header. I made sure that I had enough pins left to connect the NTAG I²C board later. I did “borrow” the pin mappings for the onboard press switches for two of the LCD connections (RS and RW) but I wasn’t planning on using the press switches anyway.

 

LCD

I²C
Board

Function

KW41Z pin

J

Arduino header/routing

VSS

VSS

GND

 

J4

GND

VDD

VCC

  1. 3.3v power

 

J4

3V3

VO

 

Contrast adjustment

 

 

via pot to GND

RS

 

Register Select: 0=cmd, 1=data

41

J3

PTC5

RW

 

Read/Write: 0=Read, 1=R/W

40

J1

PTC4

E

 

Enable. Falling edge triggered

23

J4

PTB18

DO

 

Data Bit 0

 

 

n/a

D1

 

Data Bit 1

 

 

n/a

D2

 

Data Bit 2

 

 

n/a

D3

 

Data Bit 3

 

 

n/a

D4

 

Data Bit 4

18

J4

PTB2

D5

 

Data Bit 5

19

J4

PTB3

D6

 

Data Bit 6

45

J1

PTB16

D7

 

Data Bit 7/Busy Flag

48

J1

PTC19

A

 

Backlight anode

 

J4

3V3

K

 

Backlight cathode

 

J4

GND

 

SCL

 

 

J2

PTC2

 

FD

 

 

J1

PTC17

 

SDA

 

 

J2

PTC3

 

VOUT

 

 

J3

P5-9V IN

 

My first test was to display a message on the LCD screen.

 

image

 

Use case

By integrating the LCD driver with demo app, we can demonstrate one of the use cases for NTAG I²C. Let’s say we have a simple device that is in a sealed enclosure to keep it from being tampered with (maybe an interactive display in a museum) and we need to change some settings (in our case changing the colour of the LED, but it could be anything). By adding an NTAG I²C reader to the exhibit, we can use a smartphone app to change the settings (and receive confirmation via the LCD) without opening the case.

 

The video shows the two-way communication of the NTAG I²C board in “pass-through” mode. The energy harvesting voltage brought out onto the P5-9V IN connector on the Arduino header is measured by the KW41Z’s A/D converter and its value is passed to the smartphone display. Selecting one of the colour “buttons” on the phone’s screen results in the RGB LED on the KW41Z changing colour and the colour chosen appearing on the LCD screen.

 

 

Overall assessment of kit

 

I found this RoadTest quite challenging for a number of reasons:

  • Although the FRDM-KW41Z board is supported by extensive documentation based around the NXP MCUXpresso IDE, all the examples are written in C, which is a language of which I have very limited experience. Not a criticism of NXP, but a caveat emptor for people considering buying the kit.
  • The MCUXpresso IDE is very feature-rich but is a steep learning curve for people used to simpler environments, for example, the Arduino IDE.
  • An alternative development environment to MCUXpresso is the arm MBED online compiler but that does not currently support two of the key features of the KW41Z, namely BLE (a requirement for fully using the NTAG I²C plus kit) and Thread.
  • There are only two example projects provided by NXP that demonstrate the essential features of the NTAG I²C plus kit (not counting the very simple field detection example). As mentioned, one of these applications consists of several thousand lines of C code. Although it covers the basics, it is quite a leap to go from that to designing your own project.
  • I did not find the Arduino-style shield particularly helpful when developing my applications as I wanted to add additional components and preferred to use one of the NXP antennae which just connect via a row of male pins in breadboard-friendly 0.1mm spacing.
  • NXP has provided a ton of documentation for the OM23221ARD board but finding the right information is not easy, and some of it is out of date (e.g. refers to the Kinetis Design Studio IDE rather than MCUXpresso and relies on software components not available in MCUXpresso).

 

Having said that, if you can get to grips with embedded C programming, you can develop some great applications with this technology. The Arduino shield would be well-suited to software developments where you do not need to connect additional components. For the professional engineers out there, I’ll give this kit a big “thumbs up” and hope to see some cool applications using it.

 

As for me, I learned a lot about MCUXpresso and embedded C programming and I will be using the NTAG ²C plus kit and the FRDM-KW41Z boards for future projects, once I have learned a bit more.

Anonymous
  • Hi Steve,

     

    This was very useful, really great review!

    It was good to learn how useful the new NXP devices are. I'd used an earlier chip from NXP that had the NFC and I2C interface capability, and local energy-harvesting for the on-board memory, but it's super-impressive that with the new chip they have now have managed to get energy harvesting out to external circuitry too.

    I agree some of the demo code can be unnecessarily complex.. for the earlier NTAG chip, I gave up spending effort trying to decipher it, and just wrote my own (simpler) code based on the datasheet.. less features but it did what I wanted.