Вы находитесь на странице: 1из 8

Building and Using a Handheld RFID Reader

Adam Rea, Pauline Powledge, Gaetano Borriello {area, powledge} at intel-research.net, gaetano at cs.washington.edu 12/17/03 Intel Research Seattle 1. Introduction Intel Research Seattle has gotten a great deal of interest in its Handheld RFID reader and glove design. Crossbow and Skyetek, the maker of the RFID board used in our design, are working with Intel Research Seattle to develop a Mica2Dot RFID daughterboard and commercially available kit. The kit should be available soon, and for most people interested in experimenting with the Handheld RFID reader and glove, it will be their best option. If, however, you have experience with electronics and component assembly, you can also build your own Handheld RFID readers and gloves. This technical note describes how to build them, how to interface the Handheld RFID reader and glove to an external laptop or PC, and how to access the tag data programmatically from that system. 2. Hardware Assembly The Intel Research Seattle Handheld RFID reader was developed in an effort to give the user a way to easily interact with RFID tags in the environment. The reader is approximately 2.5 x 2 x .75 inches in its current form, but is currently being reduced to the size of an average key fob. The major components of the reader are a Skyetek M1-5232 RFID board, a Crossbow Mica2Dot Mote, an UltraLife UBC322030 lithium polymer rechargeable battery and some extra logic to "glue" the system together. We will first identify the parts and give instructions for assembling the reader and glove. 2.1. Parts list RFID Antenna/Reader - SkyeTek M1-5-232 o Compact Design (38mm x 40 mm) o Internal loop antenna eliminates need for a separate antenna o Compatible with many 13.56MHz RF tag families: o ISO-15693 (Tag-It HF-I, I-Code SLI, etc) o ISO-14443-A-B o Also reads Tagsys, TI and Phillips non-ISO tags 2 o Interfaces via RS232, TTL, SPI and I C o Firmware upgradeable for future tag compatibility o Requires only 45mA when using 5V supply

Skyetek Homepage

Crossbow/UCB Mica2Dot Mote o Single, compact solution for two major components o 4MHz Atmega128L micro-controller for processing o ChipCon 1000 RF Transceiver for wireless o Roughly the size of a US Quarter (21mm diameter) o TinyOS provides the programming interface o Radio transmission timing already handled behind the scenes o Serial interfaces, timers and interrupts can be modularized and modified to fit SkyeTek protocol o Low power requirements o Only needs a 3V supply o Draws around 12mA peak during RF transmission Crossbow Homepage UltraLife UBC322030 Polymer o Incredibly Small Package o 31mm x 21mm x 3.7mm o Only 2.4 cm3 o Very Respectable power capabilites o 3.7V output (Average) o 120mAh capacity o Capable of delivering 240mA continuous o Built in protection circuit o Rechargeable UltraLife Homepage Voltage Regulation/RS232 conversion o Glues the battery, mote and RFID board together o Voltage Regulation o National Semiconductor LM3352MTC-3.0 16TSSOP o Delivers 3.0V from a 2.5V - 5V supply o Needed to satisfy Mote requirements (Skyetek board has its own internal regulator) o RS232 Conversion o Necessary because mote is 3V and Skyetek part is 5V

o Texas Instruments MAX3221IPWR 16-TSSOP o Single channel driver/receiver converter A schematic for the voltage regulator/RS232 converter is included as a separate pdf file. 2.2. Assembly Instructions Connect the parts as follows:

The glove antenna is a simple loop antenna (N=1) tuned to 13.56 MHz:

In our current version R = 100k, Cp = 100pF and Cs is shorted (although theoretically it would improve the antenna). Our antenna trace is 1/4 inch copper tape and is roughly 2 inches square. Bear in mind that each antenna made will need to be independently tuned for optimal performance. Once you have built a glove antenna, it is connected to the M1-5-232 by making the following changes:

3. Installing TinyOS on the Mote. Now we need to install TinyOS on the Mote controller. The latest TinyOS binary is part of the Handheld RFID toolkit, downloadable from http://seattleweb.intelresearch.net/projects/HandheldRFIDReader. We will include the TinyOS source code in future releases. We have found an Atmel JTAG ICE to be the most reliable method for programming our Motes. Once you have attached the Mote to the JTAG ICE with the following settings, use AVR Studio (www.atmel.com) to transfer the binary file to the Mote.
Crossbow Mote Pin ADC4 ADC5 ADC6 ADC7 VCC GND JTAG ICE Pin TDI TFO TMS TCK VREF GND

Table 1: JTAG/Mote connection reference

4. Charging the Handheld RFID Reader

The charger circuit used for our RFID reader is based on the Linear LTC4054-4.2 Lithium Ion charging chip. The datasheet and ordering information available at http://www.linear.com/prod/datasheet.html?datasheet=961. We followed the datasheet instructions and used a 16.2k! resistor for RPROG to limit the charging current to the 60mA. 5. Interfacing the Handheld RFID Reader and glove to a laptop or PC. The first step is to install a mote device on your laptop or PC to talk to the Handheld RFID Readers Mote. You will need to program a mote with a Generic Base receiving program (supplied) and connect it to a host. This connection will be a serial interface; we interfaced the Mote with Bafos BF-810 USB to serial adapter, and plugged that into our laptop. Note that the voltage levels are different between PC serial and the Crossbow Mote. We compensated for this with a Maxim MAX322x series RS-232 conversion IC (www.maximic.com). On Windows we used the BAFO-810 driver from http://www.bafo.com/dldrivers.cfm The usbserial module loaded without manual configuration on a stock RedHat 8.0 system. You can verify your basic connection to the Handheld RFID Reader with Hyperterminal (Windows) or minicom (Linux) or a similar terminal program. Set your connections to 19200/n/8/1 and see if you see if you can make a connection. If you can, turn on the HandheldRFIDReader and press R directly over a RFID tag. You should see data in the terminal window. Dont worry if its unreadable at this point you just want to see something. Now that you have the Handheld RFID Reader or glove interfaced to your computer, youll want to process the tag data programmatically. The Handheld RFID Reader application software is C++ code that runs on both Windows and Linux. There are also JNI bindings for the application, allowing Java applications to access the C++ classes. These are all part of the Handheld RFID toolkit, downloadable at http://seattleweb.intelresearch.net/projects/HandheldRFIDReader. Youll need to unpack the tarball or ZIP file in a suitable directory, and compile the code. On a Linux system, change to the src directory and type make. On a Windows system, bring up Visual Studio and open the HandheldReader.dsw file. In the workspace window, file tab, select HandheldRFIDReader, and right click to build. This will build a demo console application. If all goes well, you should be able to start reading tags. On Linux, open a terminal window and type HandheldRFIDReader /dev/ttyUSB0(or whatever your device name is). You might need to be root in order to read the device. On Windows, open a console window and type HandheldRFIDReader COM4, (or whatever your device name is). In either case, you should turn on the HandheldRFIDReader, press R, and see decoded tag data on your screen.

Now that you have the demo working, youll want to write your own application using the HandheldRFIDReader. The easiest way to do this is subclass HandheldRFIDReader and override the processReadTagHeaderReplyMessage method. Then you'll get all the tag seen events and can do whatever you want with them. The HandheldRFIDReader comes with a Java Native Interface library, so you can access HandheldRFIDReader's C++ classes from Java. There is a sample Java Swing program in the java_gui_example directory that shows the JNI library doing callbacks into Java code with tag seen events. To build the JNI library under Linux, edit the macros in src/Makefile.jnilib to point to your local java installation. Then build the library by typing make -f Makefile.jnilib". If you get complaints about missing or multiple definitions of processReadTagHeaderReplyMessage, touch JNI_wrapper.cpp and try the build again. To build the library under Windows, open Visual Studio and open the HandheldReaderJNIlib.dsw file. Tweak the project settings for your local java installation as necessary, then go to the workspace window, file tab, select HandheldRFIDReaderJNILib and right click to build. If you get complaints about a missing or multiple definitions of the processReadTagHeaderReplyMessage, do a clean and try the build again. Once the JNI library has been built, change to the java_gui_example directory and compile the java source. Now run HandheldRFIDReaderDisplay with the JNI library on its library path and your desired communication device as its argument, e.g.,: java -Djava.library.path=../Release HandheldRFIDReaderDisplay /dev/ttyUSB0 Make sure you have permission to open the device. To write your own Java application, start by looking at java_gui_example/HandheldRFIDReader.java. It shows all the relevant native calls, and demonstrates receiving callbacks from the JNI library by implementing the processReadTagHeaderReplyMessage method. 6. Summary In this technical note, we described how to assemble a Handheld RFID Reader and glove, and how to interface the Reader or glove to a PC or laptop running Windows or Linux. Finally, we explained how to build and run the C++ and Java demo applications, and sketched out how to access Reader and glove data from your own application. 7. Acknowledgements Waylon Brunette of the University of Washington wrote the inter-Mote protocol.

Вам также может понравиться