Stufin
Home Quick Cart Profile

RFID Access Control Door Lock

Buy Now on Stufin

Operating Frequency

13.56 MHz

RFID Card Formats

Mifare, Desfire, iCLASS

User Capacity

Up to 1,000 unique user IDs

Communication Protocol

Wiegand 26-bit or 34-bit

Power Supply

12V DC

Operating Temperature

-20C to 50C (-4F to 122F)

Dimensions

120 mm x 50 mm x 25 mm (4.7 in x 1.9 in x 0.9 in)

Material

Weather-resistant ABS plastic

Weight

250 g (8.8 oz)

Applications

The RFID Access Control Door Lock is suitable for various applications, including

Office buildings and commercial spaces

Industrial facilities and warehouses

Residential areas and apartment buildings

Healthcare facilities and hospitals

Educational institutions and universities

Government buildings and agencies

Pin Configuration

  • RFID Access Control Door Lock Component Documentation
  • Pinout Description:
  • The RFID Access Control Door Lock component has a total of 10 pins, which are used to connect to a microcontroller or a dedicated access control system. Below is a detailed description of each pin:
  • 1. VCC (Power Supply)
  • Pin type: Power input
  • Description: This pin connects to a power source, typically a DC voltage (e.g., 5V or 12V), to power the RFID module.
  • Recommended voltage range: 4.5V to 15V
  • 2. GND (Ground)
  • Pin type: Ground
  • Description: This pin connects to the ground of the power source and provides a return path for the current.
  • Recommended connection: Connect to the ground of the power source or a common ground point.
  • 3. RX ( Receive Data)
  • Pin type: Digital input
  • Description: This pin receives data from the microcontroller or access control system.
  • Recommended connection: Connect to the TX (Transmit) pin of the microcontroller or access control system.
  • 4. TX (Transmit Data)
  • Pin type: Digital output
  • Description: This pin transmits data from the RFID module to the microcontroller or access control system.
  • Recommended connection: Connect to the RX (Receive) pin of the microcontroller or access control system.
  • 5. GPO (General Purpose Output)
  • Pin type: Digital output
  • Description: This pin can be configured as an output to control an external device, such as a buzzer or LED.
  • Recommended connection: Connect to an external device, such as a buzzer or LED, for indication or notification purposes.
  • 6. RST (Reset)
  • Pin type: Digital input
  • Description: This pin is used to reset the RFID module.
  • Recommended connection: Connect to a digital output pin of the microcontroller or access control system to reset the RFID module.
  • 7. EN (Enable)
  • Pin type: Digital input
  • Description: This pin enables or disables the RFID module.
  • Recommended connection: Connect to a digital output pin of the microcontroller or access control system to enable or disable the RFID module.
  • 8. AN1 (Analog Input 1)
  • Pin type: Analog input
  • Description: This pin is used to connect an external analog sensor, such as a photocell or temperature sensor.
  • Recommended connection: Connect to an external analog sensor.
  • 9. AN2 (Analog Input 2)
  • Pin type: Analog input
  • Description: This pin is used to connect an external analog sensor, such as a photocell or temperature sensor.
  • Recommended connection: Connect to an external analog sensor.
  • 10. ANT (Antenna)
  • Pin type: RF antenna connection
  • Description: This pin connects to an external RFID antenna.
  • Recommended connection: Connect to a suitable RFID antenna.
  • Connection Structure:
  • To connect the RFID Access Control Door Lock component to a microcontroller or access control system, follow these steps:
  • 1. Connect VCC to a power source (e.g., 5V or 12V).
  • 2. Connect GND to the ground of the power source or a common ground point.
  • 3. Connect RX to the TX pin of the microcontroller or access control system.
  • 4. Connect TX to the RX pin of the microcontroller or access control system.
  • 5. Connect GPO to an external device, such as a buzzer or LED, for indication or notification purposes (optional).
  • 6. Connect RST to a digital output pin of the microcontroller or access control system to reset the RFID module.
  • 7. Connect EN to a digital output pin of the microcontroller or access control system to enable or disable the RFID module.
  • 8. Connect AN1 and AN2 to external analog sensors, such as photocells or temperature sensors (optional).
  • 9. Connect ANT to a suitable RFID antenna.
  • Note:
  • Make sure to follow the recommended voltage range and connection guidelines to avoid damage to the component or other connected devices.
  • The RFID Access Control Door Lock component may have additional features or configurations depending on the specific model or manufacturer. Refer to the component's datasheet or user manual for more information.

Code Examples

RFID Access Control Door Lock Documentation
Overview
The RFID Access Control Door Lock is a secure and convenient entry control system that uses Radio Frequency Identification (RFID) technology to authenticate and grant access to authorized individuals. This component is designed to provide a secure and efficient way to manage access to physical spaces, making it an ideal solution for various applications such as office buildings, homes, and industrial facilities.
Technical Specifications
Operating Frequency: 13.56 MHz
 Reading Distance: Up to 5 cm
 Communication Interface: UART, I2C, SPI
 Power Supply: 5V DC
 Operating Temperature: -20C to 80C
Pinout
| Pin | Description |
| --- | --- |
| VCC | Power supply (5V DC) |
| GND | Ground |
| TX | UART transmission pin |
| RX | UART reception pin |
| SCL | I2C clock pin |
| SDA | I2C data pin |
| SCK | SPI clock pin |
| MOSI | SPI master output pin |
| MISO | SPI master input pin |
Code Examples
### Example 1: Basic RFID Authentication using UART (Arduino)
In this example, we will demonstrate how to use the RFID Access Control Door Lock with an Arduino board to authenticate users and grant access.
```c++
#include <SoftwareSerial.h>
#define RFID_RX_PIN 2
#define RFID_TX_PIN 3
SoftwareSerial rfidSerial(RFID_RX_PIN, RFID_TX_PIN);
void setup() {
  Serial.begin(9600);
  rfidSerial.begin(9600);
}
void loop() {
  if (rfidSerial.available() > 0) {
    String rfidTag = rfidSerial.readStringUntil('
');
    Serial.println("RFID Tag: " + rfidTag);
if (rfidTag == "Authorized_Tag_1" || rfidTag == "Authorized_Tag_2") {
      // Grant access
      Serial.println("Access granted!");
      // Unlock door lock mechanism
      digitalWrite(LOCK_PIN, HIGH);
      delay(5000);
      digitalWrite(LOCK_PIN, LOW);
    } else {
      Serial.println("Access denied!");
    }
  }
}
```
### Example 2: Implementing Access Control using I2C (Raspberry Pi)
In this example, we will demonstrate how to use the RFID Access Control Door Lock with a Raspberry Pi to create a more advanced access control system using I2C communication.
```python
import smbus
import time
# I2C bus number (0 or 1)
bus = smbus.SMBus(1)
# RFID Access Control Door Lock I2C address
rfid_address = 0x27
def read_rfid_tag():
  # Send read command to RFID module
  bus.write_byte(rfid_address, 0x01)
  # Read response from RFID module
  rfid_tag = bus.read_byte(rfid_address)
  return rfid_tag
def grant_access():
  # Unlock door lock mechanism
  print("Access granted!")
  # GPIO code to control door lock mechanism
def deny_access():
  # Alarm or notification code
  print("Access denied!")
while True:
  rfid_tag = read_rfid_tag()
  if rfid_tag in ["Authorized_Tag_1", "Authorized_Tag_2"]:
    grant_access()
  else:
    deny_access()
  time.sleep(1)
```
### Example 3: Integrate with a Web Interface using SPI (ESP32)
In this example, we will demonstrate how to use the RFID Access Control Door Lock with an ESP32 board to create a web-based access control system using SPI communication.
```cpp
#include <WiFi.h>
#include <SPI.h>
// RFID Access Control Door Lock SPI pins
#define RFID_SCK_PIN 18
#define RFID_MOSI_PIN 23
#define RFID_MISO_PIN 19
WiFiServer server(80);
void handleAccessRequest() {
  // Read RFID tag using SPI
  digitalWrite(RFID_SCK_PIN, LOW);
  digitalWrite(RFID_MOSI_PIN, LOW);
  digitalWrite(RFID_MISO_PIN, LOW);
  delayMicroseconds(10);
  digitalWrite(RFID_SCK_PIN, HIGH);
  delayMicroseconds(10);
  uint8_t rfidTag[5];
  for (int i = 0; i < 5; i++) {
    rfidTag[i] = SPI.transfer(RFID_MOSI_PIN);
  }
// Check if RFID tag is authorized
  if (rfidTag == "Authorized_Tag_1" || rfidTag == "Authorized_Tag_2") {
    // Grant access
    server.send(200, "text/plain", "Access granted!");
    // Unlock door lock mechanism
    digitalWrite(LOCK_PIN, HIGH);
    delay(5000);
    digitalWrite(LOCK_PIN, LOW);
  } else {
    // Deny access
    server.send(401, "text/plain", "Access denied!");
  }
}
void setup() {
  Serial.begin(115200);
  WiFi.begin("your_wifi_ssid", "your_wifi_password");
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
  server.begin();
pinMode(RFID_SCK_PIN, OUTPUT);
  pinMode(RFID_MOSI_PIN, OUTPUT);
  pinMode(RFID_MISO_PIN, INPUT);
}
void loop() {
  server.handleClient();
}
```
These examples demonstrate how to use the RFID Access Control Door Lock in various contexts, including UART, I2C, and SPI communication protocols. The code examples illustrate how to read RFID tags, authenticate users, and control access to physical spaces.