Like bar code recognition, RFID relies on tagging objects in order to identify them. Unlike bar codes, however, RFID tags don’t need to be visible to be read. An RFID reader sends out a short-range radio signal, which is picked up by an RFID tag. The tag then transmits back a short string of data. Depending on the size and sensitivity of the reader’s antenna and the strength of the transmission, the tag can be several feet away from the reader, enclosed in a book, box, or item of clothing. In fact, some large clothing manufacturers are now sewing RFID tags into their merchandise, to be removed by the customer.
There are two types of RFID system: passive and active. Passive RFID tags contain an integrated circuit that has a basic radio transceiver and a small amount of nonvolatile memory. They are powered by the current that the reader’s signal induces in their antennas. The received energy is just enough to power the tag to transmit its data once, and the signal is relatively weak. Most passive readers can only read tags a few inches to a few feet away.
In an active RFID system, the tag has its own power supply and radio transceiver, and transmits a signal in response to a received message from a reader. Active systems can transmit for a much longer range than passive systems, and are less error-prone. They are also much more expensive. If you’re a regular automobile commuter and you have to pass through a toll gate in your commute, you’re probably an active RFID user. Systems like E-ZPass, shown in Figure 1-1, use active RFID tags so that the reader can be placed several meters away from the tag.
You might think that because RFID is radio-based, you could use it to do radio distance ranging as well, but that’s not the case. Neither passive nor active RFID systems are typically designed to report the signal strength received from the tag. Without this information, it’s impossible to use RFID systems to determine the actual location of a tag. All the reader can tell you is that the tag is within reading range. Although some high-end systems can report the tag signal strength, the vast majority of readers are not made for location as well as identification. You can do some limited location detection using multiple readers, however. Because most passive RFID readers (like the one used in this book) have a short range, you can be assured that if you get a signal from a tag on a particular reader, the tag is within a few centimeters of the reader. By using an array of readers spaced half a meter or so apart, you could determine the rough location of a tag by knowing that it’s in a given reader’s range.
RFID systems vary widely in cost. Active systems can cost tens of thousands of dollars to purchase and install. Commercial passive systems can also be expensive. A typical passive reader that can read a tag a meter away from the antenna typically costs a few thousand dollars. At the low end, short-range passive readers can come as cheap as $30 or less. As of this writing, $30 to $100 gets you a reader that can read a few centimeters. Anything that can read a longer distance will be more expensive.
There are many different RFID protocols, just as with bar codes. Short-range passive readers come in at least three common frequencies: two low-frequency bands at 125 and 134.2 Khz, and high-frequency readers at 13.56MHz. The higher-frequency readers allow for faster read rates and longer-range reading distances. In addition to different frequencies, there are also different protocols. For example, in the 13.56 band alone, there are the ISO 15693 and ISO 14443 and 14443-A standards; within the ISO 15693 standard, there are different implementations by different manufacturers: Philips’ I-Code, Texas Instruments’ Tag-IT HF, Picotag, and implementations by Infineon, STMicroelectronics, and others. Within the ISO 14443 standard, there’s Philips’ Mifare, Mifare UL, ST’s SR176, and others. So you can’t count on one reader to read every tag. You can’t even count on one reader to read all the tags in a given frequency range. You have to match the tag to the reader.
There are a number of inexpensive and easy-to-use readers on the market now, covering the range of passive RFID frequencies and protocols. Maker Shed sells a 125KHz reader from Parallax that can read EM Microelectronic tags, such as EM4001 tags. It has a built-in antenna, and the whole module is about 2.5″ × 3.5″, on a flat circuit board. The EM4001 protocol isn’t as common in everyday applications as the Mifare protocol, a variation on the ISO 14443 standard in the 13.56 MHz range. This book doesn’t cover the Mifare tags, but Making Things Talk, second edition (O’Reilly, 2011) does.
RFID tags come in a number of different forms, as shown in Figure 1-2: sticker tags, coin discs, key fobs, credit cards, playing cards, even capsules designed for injection under the skin. The last are used for pet tracking and are not designed for human use, though there are some adventurous hackers who have had these tags inserted under their own skin. Like any radio signal, RFID can be read through a number of materials, but it is blocked by any kind of RF shielding, like wire mesh, conductive fabric lamé, metal foil, or adamantium skeletons. This feature means that you can embed it in all kinds of projects, as long as your reader has the signal strength to penetrate.
Before picking a reader, think about the environment in which you plan to deploy it, and how that affects both the tags and the reading. Will the environment have a lot of RF noise? In what range? Consider a reader outside that range. Will you need a relatively long-range read? If so, look at the active readers, if possible. If you’re planning to read existing tags rather than tags you purchase yourself, research carefully in advance, because not all readers will read all tags. Pet tags can be some of the trickiest, as many of them operate in the 134.2 KHz range, where there are fewer readers to choose from.
In picking a reader, you also have to consider how it behaves when tags are in range. For example, even though the Parallax reader used in this book and a compatible reader from ID Innovations can read the same tags, they behave very differently when a tag is in range. The ID Innovations reader reports the tag ID only once. The Parallax reader reports it continually until the tag is out of range. The behavior of the reader can affect your project design, as you’ll see later on.
The Parallax reader has a TTL serial interface, so it can be connected to a microcontroller or a USB-to-serial module very easily. You’ll see sketches in Processing (which run on a computer and connect to the reader over USB-to-serial) for the Parallax reader in this book, in fact.