This application note describes the basics of the near-field communication (NFC)/radio frequency identification (RFID) MAX66242EVKIT board and an application utilizing the NFC capabilities of iOS and Android® based mobile devices to exercise board functionality. It then demonstrates how the application enables the user with the ability to use the memory and secure features of the MAX66242. It also shows how to use the MAX66242 with an onboard I2C temperature sensor which demonstrates the energy harvesting feature of the device.
This application note discusses the features of both the MAX66242EVKIT and the MAX66242 IC along with a mobile application available on both Apple App Store and Google Play. How to quickly bring up the mobile application is also discussed.
In addition to covering the memory and security features of the device, a practical example is given to highlight the energy harvesting feature of the MAX66242. The MAX66242 serves as an NFC to I2C bridge to communicate with an external device. The external device used is a DS7505 I2C temperature sensor.
For more detailed device operation and specifications, refer to the MAX66242 data sheet. The part number of the EV kit to order is MAX66242EVKIT#.
The MAX66242 combines several capabilities with its NFC/RFID tag feature, including advance security, user programmable memory, data protection, an I2C interface, and energy harvesting. The block diagram in Figure 1 shows the relationships between the major components, including the control sections, memory sections, and interfaces such as the RF front end and the I2C.
Advanced security is provided through a SHA-256 crypto engine which provides a symmetric challenge-and-response authentication capability based on a shared secret key. Therefore, the MAX66242 can be selective about the readers that it communicates with and provides a secure way to store the keys and protect sensitive data.
The 4Kb EE user memory has been partitioned into 16 pages of 32 bytes. Each page is portioned into eight 4-byte blocks. Protection settings are applied to an entire page. As per data protection, several modes are available:
- Read protect (RP)
- Write protect (WP)
- EPROM Emulation Mode (EM)
- Authentication protection (AP)
The MAX66242 supports 25 fixed-function commands that fall into two groups: ISO 15693 standard commands and ISO 15693-compliant custom commands that are maintained through the device function control block.
In addition to the ISO 15693 RF front end, the part has also an open-drain multipurpose pin (PIO) and an I2C interface. The device can operate as a slave (responder) or as a master (controller) depending on the application requirement.
The MAX66242 can also be used to harvest energy from the RFID reader and operate a connected device such as a sensor or a low-power microcontroller.
MAX66242 EV Board
As shown in Figure 2, the MAX66242EVKIT board has a MAX66242 IC in SO8 package, a 5µH spiral antenna that resonates at 13.56MHz, a DS7505 temp sensor and a pin header for easy pin access. The MAX66242 is also available in wafer-level package (WLP) with small Au (gold)-bump for conductive adhesive attach to a label.
The header available on the board enables the capability to swap the connection between the onboard DS7505 and an external I2C sensor such as the MAX31875 which is supported by the mobile applications as well. A schematic is provided in the appendix that shows how the MAX31875 can be connected to the MAX66242EVKIT board (Figure 3). The accuracy of the DS7505 temperature sensor is 0.5°C and the operating voltage is in the range of 1.8V and 3.3V.
MAX6624X Mobile Application
The MAX66242 NFC Reader Mobile Application supports multiple MAX662XX EV kit boards. This demo application provides a quick path to demonstrating the features of both the MAX66242 and the MAX66240. To run the demo, the application should be downloaded to either an iOS® or Android® NFC compatible smartphone or tablet.
How to Download Application
The mobile application is available for both iOS® and Android®. It can be found in the Apple App Store and in Google Play for downloading and installation. Please search with the "MAX66242 NFC Reader" keyword (Figure 4). The application allows the user to send commands through the NFC interface to evaluate the features of the MAX6624X Devices.
The App can also be found through the following links:
- Android Store: MAX66242 NFC Reader - Apps on Google Play
- Apple App Store: MAX66242 NFC Reader - Apps on Apple's App Store
The mobile application has four main tabs that allow user to switch the focus between distinct features of the MAX66242. Each tab covers different functionalities of the MAX66242 as shown in Figures 5, 6, 7, and 8.
- Basic Command—Reading the UID
- Device Features—Exploring the devices Memory functions
- Cryptography—Exercising the Devices Cryptographic functions
- Temperature—Temperature measurement and data logging
Basic Command (Figure 5)
- Read the MAX66242 64-bit unique identifier (UID)
- Turn On/Off the On-board LED
Device Features (Figure 6)
- Read/Write User electrically erasable programmable read-only memory (EEPROM)
- Set Protections on EEPROM Pages
- Read Status of Protection settings on an EEPROM Page
Cryptography (Figure 7)
- Write a SHA2 Secret
- Perform SHA2 Authenticated Writes
- Perform a Challenge/Response SHA2 MAC Sequence
- Compares the MAC values between the one calculated in device and the one calculated programmatically in the app.
Temperature (Figure 8)
- Perform Temperature Measurement with the on-board DS7505 or an externally connected MAX31875* (see the appendix for the connection proposal with external pullups added).
- Data recorded and plotted over time as measurements are repeated.
*The MAX31875 is not included with the MAX66242EVKIT#.
MAX66242EVKIT Board Bring-Up
The MAX66242EVKIT board is required to be powered up through an active NFC reader. As the smart phone radio is used, the external VCC should not be used to power up the board while using the mobile application. In order to verify the communication between application and the MAX66242, the following procedure should be used:
- Start the MAX66242 mobile application.
- Navigate to the first tab called Basic Command.
- Click the Read UID.
- Wait for 'Ready to Scan' notification.
- Get the board within the proximity of smart phone's antenna on the back (Figures 9 and 10).
- Wait for the board to respond with UID.
- Check out the received UID in the result label.
After verifying the communication between MAX66242 and mobile application, one can continue with turning on and off the on-board LED with the associate buttons on the application's Basic Command tab.
As shown in Figure 9, the power harvested through the mobile highly depends on the distance between the MAX66242EVKIT board and the mobile. As the distance increases, the harvested power decreases. It is most effective when the distance is below the 3.2cm. At 3.2cm or less, VOUT can output 3.3V or 1.8V depending on the user configuration. At distances greater than 10.2cm, no harvested voltage regulation is present at VOUT.
Demonstration of MAX66242 Capabilities
In this section, the capabilities of MAX66242 are demonstrated through four tabs of mobile application. Figures 11, 12, 13, 14 depict the major functionalities of mobile application.
Basic Command (Figure 11)
- Read the MAX66242 64-bit UID which uses a portion of the Maxim 64-bit ROMID. The lower 28 bits of UID are the IC serial number which are derived from 28 bits of ROMID serialization. The upper 36 bits are fixed at E02B00800h. For details, see Appendix: 64-Bit UID and the ROMID of the MAX66242.
- Turn LED on by setting VOUT to 3.3V mode through the Energy Harvesting Output Enable (EHOE) bit.
- Turn LED off by setting VOUT to 1.8V mode through the EHOE bit.
Note: The LED does not stay on continuously with an iPhone. Once enabled, it intermittently turns on/off by moving the board around.
Device Features (Figure 12)
- Page selection, the 4Kb E2 user memory partitioned into 16 pages of 32 bytes.
- Block selection within a page. Each page is portioned into eight 4-byte blocks. Writes are performed on a block basis. For details, see Appendix: MAX66242 User Memory Organization.
- Four bytes of data for the block selected, writes, or reads.
- For writes, 'Rand' populates the Data field with 4 equal bytes. Each press changes the data. Pressing trash clears the Data field.
- Sliders for protection to apply to the page with Set Protection or for indicating protection settings from Read Status.
- Set Protection is used to permanently enable a protection mode to an E2 user memory page. Protection is on a per-page basis. Read Status is used to read the protection settings for a page.
- Result: It displays 32 bytes of page data from Read Page Memory or protection settings from Read Status.
Cryptography (Figure 13)
- Page selection for SHA2 operation.
- Block within page selection for SHA2 operation.
- Thirty-two bytes for either setting the App SHA2 secret and/or writing to the MAX66242. The App does not WP the secret in the MAX66242 so this can be changed at any time. 'Rand' populates the Secret field with 32 equal bytes. Each press changes the data or 32 bytes can be hand-entered.
- 'Rand' populates the Challenge field with 32 equal bytes. Each press changes the data. Or 32 bytes can be hand entered.
- 'Rand' populates the Data field with 4 equal bytes. Each press changes the data. Pressing trash clears the corresponding data field.
- If a page has AP authentication set, Authenticated Write uses the App SHA2 secret to attempt a write to the selected page and block with 4 bytes in the data field.
- For a challenge/response sequence, Compare MAC uses the selected page and Challenge data field to compute a MAC and compare to the MAC returned from the MAX66242. If they match, the App and MAX66242 have the same secret.
- Use Write SHA Secret to write the 32 bytes in the field App SHA Secret to the MAX66242.
Temperature (Figure 14)
- No change to device or I2C address for use with the board.
- Temperature measurements are plotted or put in a tabular form.
- Temperature measurement display options Plot/Table switches between graph and the table view. Table view lists the measurement along with the timestamp. °C/°F changes the unit of the measurement between Celsius and Fahrenheit.
- Perform a DS7505 temperature measurement.
- Delete previous measurements.
The communication between the mobile phone and the MAX66242 is a master-transponder type transaction and is based on the exchange of data packets. The mobile phone initiates every transaction. Only one device, either the mobile phone or the MAX66242 can transmit information at any time. The mobile application can also communicate with other I2C devices connected to MAX66242. The DS7505 is the I2C temperature sensor that resides on the EV board.
This application note covers the basic operations of the MAX66242 mobile application and how to get quickly up and running to experience its features and measure the temperature data. The same principles can be easily applied to communicate with any device with an I2C interface. A more detailed command description is available upon request.
Android is a Google Inc. registered trademark.
Interfacing with the MAX31875 EV Board
The MAX66242 mobile application is able to get the temperature data from the MAX31875 as well. Two external pullup resistors are required for proper operation. See Figure 16.
64-Bit UID and ROMID of the MAX66242
Figure 17 shows the layout of UID and ROMID registers of the MAX66242.
MAX66242 User Memory Organization
Figure 18 shows the organization of the user memory. It is organized as 16 pages of 32 bytes each. Each page is divided into 8-page blocks which holds 32 bits.