125Khz RFID module RDM6300 - UART

MSRP: $14.95
Was: $14.95
Now: $9.95
(You save $5.00 )
SKU:
RFID_RDM6300
Adding to cart… The item has been added

Product Overview

This low cost RFID module is perfect for connecting to an Arduino.  It connects via a 9600 bps UART serial connection and outputs the tag number when an EM4100 compatible RFID card comes near.  Perfect for access control projects.

  • Includes external antenna
  • Maximum effective distance approx 5 cm.
  • Less than 100ms decoding time
  • UART interface (5 Volt TTL RS232)
  • Support EM4100 compatible read only or read/write tags
  • Small outline design (3.85cm x 1.9cm)

Example Code

#include <SoftwareSerial.h>

// Define pins for SoftwareSerial (RDM6300 TX → Arduino RX pin)
#define RDM6300_RX_PIN 2 // Connect RDM6300 TX to Arduino pin 2
#define RDM6300_TX_PIN 3 // Not used (RDM6300 is transmit-only)

// Create SoftwareSerial instance
SoftwareSerial rdm6300Serial(RDM6300_RX_PIN, RDM6300_TX_PIN);

const byte PACKET_SIZE = 14; // RDM6300 sends 14-byte ASCII packet
char rfidBuffer[PACKET_SIZE];
byte bufferIndex = 0;

void setup() {
    Serial.begin(9600); // Serial Monitor
    rdm6300Serial.begin(9600); // RDM6300 default baud rate

    Serial.println("RDM6300 RFID Reader Ready");
}

void loop() {
    // Read incoming data from RDM6300
    while (rdm6300Serial.available()) {
    char incomingChar = rdm6300Serial.read();

    // Start of packet
    if (incomingChar == 0x02) { // STX
        bufferIndex = 0;
    }
    // End of packet
    else if (incomingChar == 0x03) { // ETX
        rfidBuffer[bufferIndex] = '\0'; // Null-terminate string
        processTag(rfidBuffer);
        bufferIndex = 0;
    }
    // Store data in buffer
    else {
        if (bufferIndex < PACKET_SIZE - 1) {
                rfidBuffer[bufferIndex++] = incomingChar;
            }
        }
    }
}

// Function to process and display tag ID
void processTag(char *tagData) {
    // First 10 characters are the tag ID in ASCII HEX
    char tagID[11];
    strncpy(tagID, tagData, 10);
    tagID[10] = '\0';

    Serial.print("Tag detected: ");
    Serial.println(tagID);

    // Example: Compare with a known tag
    if (strcmp(tagID, "0001234567") == 0) {
        Serial.println("Access Granted");
    } else {
        Serial.println("Access Denied");
    }
}