XBee and RFID
XBee in 30 minutes Xbees are small radio modules that communicate with each other over radio using the Zigbee protocol (bu...
What Does an Xbee Network Need? One  coordinator  to manage the overall network. Multiple  endpoints/routers  to receive a...
What Hardware Do You Have? Arduino XBee Module XBee USB Explorer Arduino Xbee Shield
Loading Firmware You Need: -Xbee Module -Xbee USB Explorer -X-CTU software Digi’s X-CTU software is a program that lets yo...
Programming a Router <ul><li>In Windows XP or from </li></ul><ul><li>inside your emulator: </li></ul><ul><li>Insert the Xb...
Programming a Router There should be a com port  (probably the last) labeled  USB Serial Port . Click on it. Click on  Tes...
Programming a Router You should see this ==> Click OK, then click on the  Modem Configuration tab.
Programming a Router <ul><li>You should see </li></ul><ul><li>something like this ==> </li></ul><ul><li>You want these set...
Programming Arduino Remember the button you wired  earlier? Make that circuit again.  In the Arduino IDE, open  “ XBButton...
Programming Arduino <ul><li>Unplug your Arduino. </li></ul><ul><li>Unplug the wire connected to pin 2 from your Arduino. <...
What is Happening? <ul><li>The radio is now set up so that: </li></ul><ul><li>When you send data </li></ul><ul><li>from th...
RFID in 15 minutes RFID (radiofrequency identification) is a way of storing and communicating small amounts of data. RFID ...
What Hardware Do You Have? RFID reader RFID antenna Arduino
Connecting the Reader 4 5 5 +5V Ground
4 5 +5V Ground
Upload your Code Load “RFIDReader.pde” onto your Arduino board. Activate the serial debugger pane in Arduino. Touch an RFI...
What is Happening? The RFID reader communicates with Arduino using a  communication protocol called I2C, which Arduino cod...
The Xbee communicates with Arduino over the serial port. The RFID reader communicates with Arduino using I2C and analog pi...
Putting it All Together 4 5 5 +5V Ground
Xbee (beware of Series 1 vs Series 2 documentation) http://www.arduino.cc/playground/Main/InterfacingWithHardware http://w...
Upcoming SlideShare
Loading in …5
×

XBee and RFID

4,688 views

Published on

Introduction to using XBee and RFID with Arduino. Part of Internet of Things workshop at dConstruct 2009.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,688
On SlideShare
0
From Embeds
0
Number of Embeds
23
Actions
Shares
0
Downloads
140
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

XBee and RFID

  1. 1. XBee and RFID
  2. 2. XBee in 30 minutes Xbees are small radio modules that communicate with each other over radio using the Zigbee protocol (built on top of the IEEE 802.15.4 standard, if you care). They allow for drop-in, drop-out mesh networking. New devices can be automatically detected, and existing devices can be removed without disrupting the entire system. Each radio can broadcast or can address specific other modules. Today we will set up a very basic XBee network.
  3. 3. What Does an Xbee Network Need? One coordinator to manage the overall network. Multiple endpoints/routers to receive and pass on information. External sensors or other modules to collect and/or respond to the information that the radios communicated.
  4. 4. What Hardware Do You Have? Arduino XBee Module XBee USB Explorer Arduino Xbee Shield
  5. 5. Loading Firmware You Need: -Xbee Module -Xbee USB Explorer -X-CTU software Digi’s X-CTU software is a program that lets you load firmware onto your XBee module, configure settings, and test the radio’s functionality. It is only available for Windows but can be run in an emulator on an Intel Mac (load Arduino and the relevant drivers in Windows ). http://www.digi.com/support/productdetl.jsp?pid=3352&osvid=57&tp=5&s=316
  6. 6. Programming a Router <ul><li>In Windows XP or from </li></ul><ul><li>inside your emulator: </li></ul><ul><li>Insert the Xbee module into the USB explorer, connect with the USB cable to your computer </li></ul><ul><li>Double click on X-CTU, and you will see ==> </li></ul>
  7. 7. Programming a Router There should be a com port (probably the last) labeled USB Serial Port . Click on it. Click on Test / Query .
  8. 8. Programming a Router You should see this ==> Click OK, then click on the Modem Configuration tab.
  9. 9. Programming a Router <ul><li>You should see </li></ul><ul><li>something like this ==> </li></ul><ul><li>You want these settings </li></ul><ul><li>(highlighted): </li></ul><ul><li>Modem: XBEE: XB24-B </li></ul><ul><li>Function Set: ZNET 2.5 ROUTER/END DEVICE AT </li></ul><ul><li>PAN ID: 234 </li></ul><ul><li>Node Identifier (enter a name for your radio) </li></ul><ul><li>Click on Write </li></ul>
  10. 10. Programming Arduino Remember the button you wired earlier? Make that circuit again. In the Arduino IDE, open “ XBButton.pde” and load it onto your Arduino. You can test that the code is functioning by starting the serial monitor in Arduino. Every time you press the button, the pane should show “Hello world!” (Change the “Hello world!” to say whatever you want.)
  11. 11. Programming Arduino <ul><li>Unplug your Arduino. </li></ul><ul><li>Unplug the wire connected to pin 2 from your Arduino. </li></ul><ul><li>Bend the power and ground wires so they are flat against the Arduino pin sockets. </li></ul><ul><li>Place the XBee shield on the Arduino. </li></ul><ul><li>Make sure the jumpers on the shield are on the XBEE (not USB) side. </li></ul><ul><li>Place the XBee module on the XBee shield. </li></ul><ul><li>Plug the wire back into pin 2. </li></ul><ul><li>Connect the Arduino to your computer. </li></ul><ul><li>Press the button… </li></ul>
  12. 12. What is Happening? <ul><li>The radio is now set up so that: </li></ul><ul><li>When you send data </li></ul><ul><li>from the Arduino </li></ul><ul><li>over the serial port </li></ul><ul><li>to your Xbee module </li></ul><ul><li>The module broadcasts that data </li></ul><ul><li>over radio </li></ul><ul><li>to any other radios that are listening </li></ul><ul><li>When my coordinator receives data </li></ul><ul><li>broadcast from any of your radios </li></ul><ul><li>The coordinator echoes that data </li></ul><ul><li>over the serial port </li></ul><ul><li>to my computer </li></ul><ul><li>MUCH MORE is possible, but we don’t have time. </li></ul>
  13. 13. RFID in 15 minutes RFID (radiofrequency identification) is a way of storing and communicating small amounts of data. RFID tags store data (usually a serial number and a few bytes of changeable information), and RFID readers can read, decode, and sometimes change that data. RFID has historically been used in industrial logistics and tracking, but cheaper and more accessible technologies have recently opened it up for hacking and other creative uses. Today we will set up an RFID reader to read the serial numbers of tags.
  14. 14. What Hardware Do You Have? RFID reader RFID antenna Arduino
  15. 15. Connecting the Reader 4 5 5 +5V Ground
  16. 16. 4 5 +5V Ground
  17. 17. Upload your Code Load “RFIDReader.pde” onto your Arduino board. Activate the serial debugger pane in Arduino. Touch an RFID card to the antenna.
  18. 18. What is Happening? The RFID reader communicates with Arduino using a communication protocol called I2C, which Arduino code manages using the Wiring library, and which uses analog pins 4 and 5. This is one standard way that microcontrollers communicate with more complicated external devices. This Arduino code continually asks the RFID reader to look for the serial number of any tags near the reader. The RFID reader does the heavy lifting and returns a number to the Arduino--the serial number if it sees a tag, and a 2 if no tags are present. The Arduino then sends the tag’s serial number over the serial port, which you are monitoring on your computer.
  19. 19. The Xbee communicates with Arduino over the serial port. The RFID reader communicates with Arduino using I2C and analog pins 4 and 5. Can we combine these? 15 Minutes Left
  20. 20. Putting it All Together 4 5 5 +5V Ground
  21. 21. Xbee (beware of Series 1 vs Series 2 documentation) http://www.arduino.cc/playground/Main/InterfacingWithHardware http://www.humboldt.edu/~cm19/XBee%20setup.pdf http://hcgilje.wordpress.com/resources/xbee_arduino_code/ http://www.faludi.com/projects/zigbee/ RFID http://www.tinker.it/en/Teaching/RFID http://www.tigoe.net/pcomp/code/?s=RFID&searchsubmit=Find Some Resources

×