Handson Technology: Rdm6300 125Khz Rfid Card Reader Module
Handson Technology: Rdm6300 125Khz Rfid Card Reader Module
User Guide
SKU: MDU1090
Brief Data:
1 www.handsontec.com
Interface Pins Function:
P1 P2 P3
1: TX 1: ANT1 1: LED
2: RX 2: ANT2 2: +5VDC
3: NC 3: GND
4: GND
5: +5VDC
2 www.handsontec.com
Mechanical Dimension:
Unit: mm
3 www.handsontec.com
Application Example with Arduino:
/*==========================================================================
// Author : Handson Technology
// Project : Arduino Uno
// Description : RDM6300 125KHz RFID Card Reader Module
// Source-Code : RDM6300.ino
//==========================================================================
*/
#include <SoftwareSerial.h>
const int BUFFER_SIZE = 14; // RFID DATA FRAME FORMAT: 1byte head (value: 2), 10byte
data (2byte version + 8byte tag), 2byte checksum, 1byte tail (value: 3)
const int DATA_SIZE = 10; // 10byte data (2byte version + 8byte tag)
const int DATA_VERSION_SIZE = 2; // 2byte version (actual meaning of these two bytes
may vary)
const int DATA_TAG_SIZE = 8; // 8byte tag
const int CHECKSUM_SIZE = 2; // 2byte checksum
4 www.handsontec.com
uint8_t buffer[BUFFER_SIZE]; // used to store an incoming data frame
int buffer_index = 0;
void setup() {
Serial.begin(9600);
ssrfid.begin(9600);
ssrfid.listen();
Serial.println("INIT DONE");
}
void loop() {
if (ssrfid.available() > 0){
bool call_extract_tag = false;
if (call_extract_tag == true) {
if (buffer_index == BUFFER_SIZE) {
unsigned tag = extract_tag();
} else { // something is wrong... start again looking for preamble (value: 2)
buffer_index = 0;
return;
}
}
}
}
unsigned extract_tag() {
uint8_t msg_head = buffer[0];
uint8_t *msg_data = buffer + 1; // 10 byte => data contains 2byte version + 8byte
tag
uint8_t *msg_data_version = msg_data;
uint8_t *msg_data_tag = msg_data + 2;
uint8_t *msg_checksum = buffer + 11; // 2 byte
uint8_t msg_tail = buffer[13];
Serial.print("Message-Head: ");
Serial.println(msg_head);
5 www.handsontec.com
Serial.print(char(msg_data_version[i]));
}
Serial.println(" (version)");
for (int i = 0; i < DATA_TAG_SIZE; ++i) {
Serial.print(char(msg_data_tag[i]));
}
Serial.println(" (tag)");
Serial.print("Message-Tail: ");
Serial.println(msg_tail);
Serial.println("--");
long checksum = 0;
for (int i = 0; i < DATA_SIZE; i+= CHECKSUM_SIZE) {
long val = hexstr_to_value(msg_data + i, CHECKSUM_SIZE);
checksum ^= val;
}
Serial.print("Extracted Checksum (HEX): ");
Serial.print(checksum, HEX);
if (checksum == hexstr_to_value(msg_checksum, CHECKSUM_SIZE)) { // compare
calculated checksum to retrieved checksum
Serial.print(" (OK)"); // calculated checksum corresponds to transmitted checksum!
} else {
Serial.print(" (NOT OK)"); // checksums do not match
}
Serial.println("");
Serial.println("--------");
return tag;
}
Open the Serial Monitor from Arduino IDE with baudrate set to 9600, the below window will pop up with
“INIT DONE”:
6 www.handsontec.com
Put the RFID card or the keychain to the reader. Let the reader and the tag closer until all the information is
displayed.
7 www.handsontec.com
Web Resource:
MDU1040 RC522
https://www.mschoeffler.de/2018/01/05/arduino-tutorial-how-to-use-the-rdm630-rdm6300-rfid-
reader/
8 www.handsontec.com
Handsontec. com
We have the parts for your ideas
9 www.handsontec.com
The Face behind our product quality…
In a world of constant change and continuous technological development, a new or replacement
product is never far away – and they all need to be tested.
Many vendors simply import and sell wihtout checks and this cannot be the ultimate interests of
anyone, particularly the customer. Every part sell on Handsotec is fully tested. So when buying from
Handsontec products range, you can be confident you’re getting outstanding quality and value.
We keep adding the new parts so that you can get rolling on your next project.
P
Engineering Material Mechanical Hardware Electronics Components
10 www.handsontec.com