This article describes how to start developing applications for the TI RF430FRL152H RFID transponder chip using the RF430FRL152HEVM.
The RF430FRL152H is a 13.56 MHz passive RFID transponder chip.The RF430FRL152H contains a ISO 15693 and ISO 18000-3 compliant RFID interface as well as a programmable MSP430 16 bit microcontroller with 2 Kb of embedded FRAM, a 14 bit sigma delta ADC, SPI and I2c interfaces. It is capable of being powered either from a coin cell battery or from the RF field of the tag reader.
The RF430FRL15xH line of RFID transponders also has two other variations. The RF430FRL153H which is identical to the RF430FRL152H, but does not contain the SPI or I2C interfaces,but still contains the ADC. Likewise the RF430FRL154H is also identical to the RF430FRL152H, but it does not contain the ADC, however it still contains the SPI and I2C interfaces.
The RF430FRL152HEVM is an evaluation module for the RF430FRL152H. In addition to the chip, the module also contains an antenna optimized for 13.56 MHz, a JTAG header for programming and debugging, a coin cell battery holder, light sensor, user LED, user push button, micro USB connector for powering the chip and gpio headers which are compliant with TI's Launchpad series of MSP430 development boards.
RFID is a blanket term for a number of technologies for wirelessy identifying and tracking objects via tags either attached to or embedded in the objects. Typically these tags will contain a small amount of information such as a serial number. Some more advanced tags are capable of taking sensor readings and relaying that information to the RFID reader, these tags are referred to as sensor transponders or sensor tags.. Due to it's embedded microcontroller and ADC, the RF430FRL152 is well suited for creating such tags.
There are two types of tags, active and passive. Active tags contain their own their own power source and transmitter and are typically used for tracking high value assets at long distances. Passive tags are powered by the RF field of the rfid reader and communicate by modulating the reader's RF field rather than transmitting their own signal.They are typically used for inventory tracking of low cost items at short distances. The RF430FRL152h is optimized for passive operation but can also utilize a coin-cell battery for semi-active operation.
Tags operate on a variety of frequencies from a few hundred KHz up to several GHz and utilize either inductive or propagation coupling. Propagation coupling is only used by passive tags operating in the UHF band (300MHz to 3GHz) which are relatively uncommon. Most RFID tags, including the RF430FRL152H, utilize inductive coupling which serves as the basis for Near Field Communication (NFC) technology.
With inductive coupling, you can think of the antennas on the reader and tag as being similar to the coils of a transformer. The reader in this case is the primary, the tag is the secondary and instead of the magnetic field being transferred through a magnetic core; it is transferred through the open air.The reader chip generates a voltage signal on it's antenna which in turn creates a magnetic field. This magnetic field then creates a voltage signal on the tag's antenna which can then be modulated by the transponder chip. This is very similar to the process by which a voltage signal on the primary of a transformer creates a voltage signal on the secondary of a transformer. The communication is achieved by the tag changing the load on it's antenna, resulting in changes of the reader's magnetic field. The reader can sense these changes in the magnetic field and demodulate them to obtain the information being sent from the tag.
NFC is a subset of RFID technology operating in the HF (13.56 MHz) band. Unlike earlier RFID technology, NFC was designed specifically for applications such as contactless payment that require higher levels of security and larger amounts of data to be exchanged. Because of this, the NFC specification allows devices communicate in an ad-hoc fashion in addition to the reader/writer setup employed by traditional RFID. NFC also takes advantage of the limited communication range of this band as a security feature to limit the possibility of eavesdropping and thus typically operates at distances of 10 cm or less. To ensure effective communication, each NFC device must adhere to a data format known as NDEF, the NFC Data Exchange Format.
There are several different standards for RFID and NFC tags that specify the modulation type, maximum read distance and data rate of the tags. In addition, the standards will also typically have a series of supported standard commands to ensure functionality between compliant readers and tags. One of the more common standards, and the one that the RF430FRL152 supports, is ISO 15693.
ISO 15693 is the standard for vicinity tags. This standard specifies that tags operate at 13.56 MHz and have a maximum read distance of 1m (3.3 ft). Since ISO 15693 allows for a greater read range than 10 cm it technically doesn't adhere to the NFC spec. However, the NFC spec does support ISO 15693 tags that are formatted according to the NDEF format. In addition, many,(but not all), NFC compliant devices also have the ability to interface with ISO 15693 tags that are not NDEF compliant. Thus it is important to practice due diligence when selecting parts for a ISO 15693 system. It should also be noted that the range for the RF430FRL152 tops out at roughly 50cm (1.6ft).
There are several ISO 15693 standard commands, however tags are only required to support the Inventory and Stay Quiet commands, the rest are optional. A table of the standard commands that the RF430FRL152H supports is shown below.
|ISO 15693 Standard Commands|
|Inventory||Returns the tag's UID (serial) number|
|Stay Quiet||Puts the tag in the "Quiet" state. It will not respond to a reader in this state, except for the "Reset to Ready" command|
|Read Single Block||Reads a single block of the tag's memory|
|Write Single Block||Writes to a single block of the tag's memory|
|Read Multiple Blocks||Reads several blocks of the tag's memory|
|Write Multiple Blocks||Writes to several blocks of the tag's memory|
|Lock Block||Locks a specified block of memory to prevent editing|
|Select||Puts tag into the "Selected" state. In this state, a specific tag can be controlled without the reader having to send the tag's UID with each command.|
|Reset to Ready||Transfers the tag from the "Quiet" or "Selected" state to the "Ready" state|
|Get System Info||Retrieves technical info about the tag. (chip revision etc......)|
In addition, the RF430frl152h also supports the several TI custom commands. These commands function exactly the same as their corresponding standard commands except they are used to access the SRAM on chip,(the standard commands access the FRAM), and utilize a 16 bit block number as opposed to a 8 bit one.
|TI Custom Commands|
|Custom Read Single Block||Reads a single block of the tag's memory|
|Custom Write Single Block||Writes to a single block of the tag's memory|
|Custom Read Multiple Blocks||Reads several blocks of the tag's memory|
|Custom Write Multiple Blocks||Writes to several blocks of the tag's memory|
|Custom Lock Block||Locks a specified block of memory to prevent editing|
As noted above, the RF430FRL152 is both a microcontroller and NFC transponder. The first two examples below demonstrate how to use several features of the microcontroller. The other examples demonstrate how to use the NFC interface to relay data gathered from the RF430FRL152 to the NFC reader.
To perform the examples, you will need the following equipment.
Next, paste the following code in the main function. It is best to place it right after the DeviceInit() function. This code, initializes and toggles the GPIO pin attached to the alarm led on the evaluation module.
The ADC on the RF430FRL152 is a 14 bit first order sigma-delta with a max sampling frequency of 2kHz and maximum input voltage of 0.9V. The ADC can operate in single ended or differential mode and is capable of both unipolar and bipolar operation. The RF430FRL152 also contains other components needed to make a useful input signal chain such as a mutliplexer, PGA, etc... A block diagram of the ADC interface is shown below:
ADC Block Diagram courtesy of the RF430FRL15Xh family technical reference manual
In this example, we'll use ADC channel 0 to measure a voltage. The evaluation module has a light sensor, (U2) connected to channel 0 and we will use that as our voltage source.
First we'll set up two variables to hold our ADC reading and voltage value.
Next, we'll enable the ADC. In addition, we'll also enable the virtual ground to better measure small voltage values. We'll also set the ADC for unipolar operation since we'll only be measuring a positive voltage. Paste the following code inside the main function
Next we'll set the multiplexer to channel 0 and perform a conversion. Within the "while(1)" loop of the main function, paste the following code.
Now it's time to convert our ADC reading into a voltage. Since the RF430FRL152 is pretty constrained as far as memory is concerned, we'll need to do some scaling to get the appropriate answer. The formula to convert this voltage is shown below, add this code to your main() function. This formula will output the measured voltage in millivolts.
Of course in an actual NFC system, a much better method would be to simply transfer the raw ADC reading to NFC reader and then have the reader's more capable processor convert the reading into a voltage. The point of this step was to simply make it easier to interact with the ADC later in this example.
Your main function should now look similar to the following.
Now to actually utilize the chip's NFC capabilities. In this example we will take samples with the ADC and store them in FRAM so that they can be read by a RFID card reader. Before we start, we need to know a few things about how the RF430FRL152H works internally.
RF430FRL15x Functional Diagram: Courtesy of the RF430FRL15x Datasheet
As can be seen in the figure above, the RF430FRL152 contains 2Kb of FRAM. It is possible to write a custom application entirely in FRAM which controls ISO15693 interface as well as the other peripherals on the chip. However, to make the chip easier to use, TI has included firmware on the chip for controlling various functions. In this example we'll make use of the embedded RF stack to control the ISO 15693 interface and write custom code in FRAM to control the ADC.
Most of the FRAM is divided into ISO compliant "blocks" that can be either 4 or 8 bytes in size depending upon how the user configures the Firmware System Control Register. The blocks start at address 0xF868 and end at 0xFFFF. It is possible to lock blocks to prevent them from being written to via RFID interface however, it is not possible to prevent the blocks from being read via the RFID interface. In this example, the ADC value will be stored in block 9 and then read using a RFID reader.
The TI example project takes care of configuring the chip to use the RF stack so we'll only need to worry about the ADC portion of the application. We'll begin by configuring a portion of FRAM for storing the ADC value. Add the following code to the main.c file somewhere outside of the main() function.
Now, configure the ADC like we did in the previous example. This time, we'll also enable a interrupt to trigger once the ADC has completed a conversion. Add the following code to the main() function.
Next we'll setup the chip to begin a conversion and then enter low power mode in order to enable the RF stack. Ensure that while() loop in main() contains the following code.
Your main() function should now look like the following.
Next we need to add an ISR to service the ADC interrupt. Outside of main() add the following code.
In the final example, we'll use the embedded firmware on the RF430FRL152 to not only control the NFC interface, but to control the ADC as well. This is actually very simple to do, but can be a bit unintuitive.
The embedded sensor application allocates a series of registers in FRAM that control the RF430FRL152. These registers operate in a similar manner to the chip's working registers. By writing to these registers over the RFID interface, we can control the chip's functions wirelessly. A full description of these registers can be found in the RF40FRL152 firmware user's guide.
Hopefully this article helped you get started working with the RF430FRL152H. If you have any questions or comments about this article, feel free to contact me at EEWiki@digikey.com.