Introduction
UHF RFID MODULE-UART,this RFID tag reader is a remote read-write module of IC card using non-contact UHF technology . It can widely use in the field of vehicle monitoring, remote control, home alarm system, wireless meter reading, access control system, industrial data acquisition system, the wireless tag, identification, non-contact RF card, small wireless data terminals, fire-proof systems, wireless remote control system, biological signal acquisition, hydrological and meteorological monitoring, robot control, etc. . The UHF RFID MODULE-UART, a remote RFID tag reader module which DFRobot launched,can easily communicate through UART interface to other module , at the same time the module has another version with RS485 that makers can easily be integrated into the present wireless network.
Specification
- Interface:UART
- Max Working current:200mA
- Max Output Power: 24dBm
- Effective Range : 50cm (The come-along RFID tags could be detect within 30cm, actual range would be affect with antenna tag and environment)
- Sensitivity:-102dBm , at least -98dBm
- Support Baud Rate:9600、19200、38400、57600、115200(bps)
- Support Protocol:ISO18000-6C(EPC G2)
- Response time:read: less than 10ms per 8 bytes,write: less than 20ms per byte
- Environment temperature:-20℃~+65℃
- Size:155mm*100mm
Wire Definition
The wire definition of UHF RFID MODULE-UART is
- red:Input 7V/2A
- black:GND
- green:TX end
- yellow:RX end
Notes:When connect with arduino board using chip ATmega328P,please exchange the TX/RX port if you want to send command from usb terminal.
Tutorial
UHF RFID MODULE-USB ,the remote RFID tag reader module,transfer immobilize data format to achieve read-write. There are three common data frame format.For example:
Command frame is the data frame for operating the reader, the data transfer from host to slave, and the format as follow.
PacketType | Length | Command Code | Device Number | Command Data | ... | Command Data | Command Data | Checksum |
---|---|---|---|---|---|---|---|---|
0xa0 | n+3 | 1 byte | 1 byte | Byte 1 | Byte n-1 | Byte n | cc |
- Packet Type is a packet type domain, the command frame packet type is fixed at 0xa0;
- Length is a packet length domain, representing bytes number of frame after Length;
- Command Code is a command code domain;
- Device Number is a device number domain, when usercode, the device number, is 00, this data will be sent to group;
- Command Data is the parameter domain of command frame;
- Checksum is checksum domain, the provisions of checksum range is from packet type domain to the last byte of parameter domain .It’s need to compute the checksum to detect error after the module receives command frame.
Response frame of reader command completion is the data frame with immobilized length, the data transfer from slave to host,and the format as follow
PacketType | Length | Command Code | Device Number | Status | Checksum |
---|---|---|---|---|---|
0xe4 | 0x04 | 1 byte | 1 byte | 1 byte | cc |
- Status is the status field,show the status or result after the reader complete the command by PC, the description as follow;
SN. | value | name | description |
---|---|---|---|
1 | 0x00 | ERR_NONE | Command complete |
2 | 0x02 | CRC_ERROR | CRC check error |
3 | 0x10 | COMMMAND_ERROR | Illegal command |
4 | 0x01 | OTHER_ERROR | Other error |
Information frame is the data frame sent to host, such as used to send a tag to host,the data transfer from slave to host,and the format as follow:
PacketType | Length | Response Code | Device Number | Response Data | ... | Response Data | Checksum |
---|---|---|---|---|---|---|---|
0xe0 | n+3 | 1 byte | 1 byte | Byte 1 | Byte n | cc |
Response Code is the information code field, the value selection determine the type of information; Response Data is the field of the parameter in information frames;
As follow is some common command from host ,and more information and details please refer to the UHF RFID MODULE technical documentation.
Read tags | Kill tags | Stop reading tags | restart tag identification function | Control BUZZER |
---|---|---|---|---|
A0 06 80 00 01 02 01 D6 | A0 08 86 00 00 12 34 56 78 BE | A0 03 A8 00 B5 | A0 03 FC 00 61 | A0 04 B0 00 00(close) AC A0 04 B0 00 01(open) AC |
When the RFID tag reader module power on, and after a short "beep" sound, the module will enter continuous card-reading mode. Put the tag above the module, the module will begin to read the cards. For example,you can stop the card-reading by send a data through the serial port (stop reading data is A0 03 50 00 D).And if this operation is success, the module will return E4 04 50 00 00 C8.If fails, return data E4 04 50 00 (other value) C8.
Caution: Module has destroyed, lock and other special functions.If once the tag be destroyed, the tag will can never use again.So,please use these function cautiously!
Application
Sample 1
This sample shows that using Arduino to control the status exchanging between “Stop reading tags” and “Restart tag identification function”
Sample Code
unsigned char StopReadCode[5] = {0xa0,0x03,0xa8,0x00,0xb5};//Stop reading the label code
unsigned char ResetCode[5]={0xa0,0x03,0x65,0x00,0xf8};//Reset code
unsigned char StopReadCodeCB[6]={0xe0,0x04,0xa8,0x00,0x00,0x74};//Stop reading code success and return the value
unsigned char ResetCodeCB[6]={0xe4,0x04,0x65,0x00,0x00,0xb3};//Reset code success and return the value
unsigned char data[6]={};
void setup()
{
Serial.begin(9600);
}
void loop()
{
int i;
int n=1;
delay(2000);
while(n)
{
Serial.write(StopReadCode,5);
delay(200);
if(Serial.available())
{
for(i=0;i<6;i++)
{
data[i]=Serial.read();
delay(1);
}
for(i=0;i<6;i++)
{
if(data[i]==StopReadCodeCB[i])
n=0;
else
n=1;
}
}
delay(500);
}
n=1;
while(n)
{
Serial.write(ResetCode,5);
delay(200);
if(Serial.available())
{
for(i=0;i<6;i++)
{
data[i]=Serial.read();
delay(1);
}
for(i=0;i<6;i++)
{
if(data[i]==ResetCodeCB[i])
n=0;
else
n=1;
}
}
delay(500);
}
}
Sample 2
This sample shows that use PC to setting the module. In this application, we use serial monitor to help us more convenient to send and receive commands .By reading the tag command ,we can find out that RFID module do the response and return the tag name .Then we continue to try using other commands . Notes:Because using serial to send command from PC,we need to exchange RX/TX.