饥荒怎么在木牌上写字:Tutorial of Xbee Based Arduino Mega UHF RFID Reader up to 5 meters distance

来源:百度文库 编辑:九乡新闻网 时间:2024/04/29 03:15:13
Tutorial of Xbee Based Arduino Mega UHF RFID Reader up to 5 meters distance 
http://www.soliddepot.com/index.php?main_page=product_info&cPath=7&products_id=27
In this tutorial, we are going to demo two parts:
1. Using the UHF demo GUI, and host PC GUI actively scans the tag over Xbee. This will demonstrate the RSSI and tag information. Arduino mega acts as a serial bridge between the UHF RFID reader and the Xbee.
2. Using the Arduino mega to issue scan tag command, and report the number of found tags on the LCD. Debug information is sent wirelessly to the serial terminal using Xbee.
 
Hardware:
Arduino Mega
Xbee
Xbee 3.3V to 5V breakout board
Xbee USB Adapter
TTL UART UHF RFID Reader
RFID Reader Antenna
3V/2A DC Wall Adapter
2X16 LCD
 
Pin 1 of Xbee (VCC) is connected to Arduino Mega's 5V.
Pin 2 of Xbee (DOUT) is connected to Arduino Mega's digital 1, TX.
 
Pin 3 of Xbee (DIN) is connected to Arduino Mega's digital 0, RX.
 
Pin 10 of Xbee (GND) is connected to Arduino Mega's ground.
 
Ground of RFID module is connected to Arduino mega's gound.
RX of RFID module is connected to Arduin mega's digital 18, TX1.
TX of RFID module is connected to Arduin mega's digital 19, RX1.
 
For the 16X 2 LCD:
pin 1 of LCD -> Ground
pin 2 of LCD -> +5V
pin 3 of LCD-> the center leg of a 10K potentimeter, where the other two legs are connected to 5V and ground.
pin 4 of LCD -> digital pin 12 of arduino mega
pin 5 of LCD -> Ground
pin 6 of LCD -> digital pin 11 of arduino mega
pin 11 of LCD -> digital pin 5 of arduino mega
pin 12 of LCD -> digital pin 4 of arduino mega
pin 13 of LCD -> digital pin 3 of arduino mega
pin 14 of LCD -> digital pin 2 of arduino mega
 
 The Xbee module on the PC side, which sits on the Xbee USB adapter, needs to be configureed to 115200.



The other xbee, which sits on on the Xbee 3.3V to 5V on the arduino mega sides, needs to be configured to 9600.
 


Part 1: Scan tags using PC GUI over Xbee
The PC GUI can be downloaded from: http://www.linksprite.com/download/showdownload.php?id=118&lang=en.
The sample Arduino code can be downloaded from: http://www.linksprite.com/download/showdownload.php?lang=en&id=122
Launch the GUI, and add a serial reader.



Click the scan button:




Note: if it doesn't work, you can use serial terminal to monitor the PC sides's Xbee output, sometimes, if the power supply can't provide enough current, the RFID module will reset. This can be confirmed by checking to see if "hello" message pop up when you did a scan. If it does, that means the module restart due to low current from the wall adapter.
 
Part 1: Scan tags using Arduino mega
The sample Arduino code can be downloaded from:http://www.linksprite.com/download/showdownload.php?lang=en&id=123
Now, in X-CTU, by pressing 'r', the LCD will display the number of tags found.
Note: the number of tags can vary. Multiple scans are needs to allow the collision avoidance.