125KHz
125KHz
Up to 10cm (4 inches)
UART or TTL serial communication
9600bps (default), adjustable
<100mA
3.3V to 5.5V
40mm x 20mm (1.57in x 0.79in)
<5g
Applications
The 125KHz EM4100 RFID Card Read Module is suitable for various IoT applications, such as |
Conclusion
The 125KHz EM4100 RFID Card Read Module is a compact and low-power RFID reader module designed for reading and decoding EM4100 protocol RFID tags. Its simplicity, low power consumption, and compact design make it an ideal choice for various IoT applications that require RFID tag reading capabilities.
125KHz EM4100 RFID Card Read Module Documentation
Overview
The 125KHz EM4100 RFID Card Read Module is a low-frequency RFID reader module that operates at 125KHz and is compatible with EM4100 protocol RFID cards. This module is widely used in various applications such as access control, inventory management, and smart home systems.
Pinout and Connections
The module has the following pinouts:
VCC: 5V power supply
GND: Ground
RX: Data output
TX: Data input
EN: Enable pin (active low)
Communication Protocol
The module communicates using a serial protocol at a baud rate of 9600. The data is transmitted in the following format:
Header: 0x02
Card ID: 10 bytes (5 bytes for EM4100 protocol)
Checksum: 2 bytes (XOR of card ID bytes)
Footer: 0x03
Code Examples
### Example 1: Reading RFID Card using Arduino
This example demonstrates how to use the RFID reader module with an Arduino board to read an RFID card.
```cpp
#include <SoftwareSerial.h>
#define RFID_RX 2
#define RFID_TX 3
#define RFID_EN 4
SoftwareSerial rfidSerial(RFID_RX, RFID_TX);
void setup() {
pinMode(RFID_EN, OUTPUT);
digitalWrite(RFID_EN, LOW);
rfidSerial.begin(9600);
Serial.begin(9600);
}
void loop() {
if (rfidSerial.available() > 0) {
char header = rfidSerial.read();
if (header == 0x02) {
char cardId[10];
for (int i = 0; i < 10; i++) {
cardId[i] = rfidSerial.read();
}
char checksum = rfidSerial.read();
char footer = rfidSerial.read();
if (footer == 0x03) {
Serial.print("Card ID: ");
for (int i = 0; i < 10; i++) {
Serial.print(cardId[i], HEX);
Serial.print(" ");
}
Serial.println();
}
}
}
delay(50);
}
```
### Example 2: Integrating with Raspberry Pi (Python)
This example demonstrates how to use the RFID reader module with a Raspberry Pi board running Python to read an RFID card.
```python
import serial
ser = serial.Serial('/dev/ttyUSB0', 9600)
while True:
if ser.in_waiting > 0:
header = ser.read(1)
if header == b'x02':
card_id = ser.read(10)
checksum = ser.read(1)
footer = ser.read(1)
if footer == b'x03':
print("Card ID: ", end="")
for byte in card_id:
print("{:02x}".format(byte), end=" ")
print()
```
Note: In this example, `/dev/ttyUSB0` is the serial port connected to the RFID reader module. You may need to adjust this depending on your setup.
These code examples demonstrate the basic usage of the 125KHz EM4100 RFID Card Read Module with different microcontrollers and programming languages. You can modify and extend these examples to suit your specific application requirements.