Interfacing RFID Reader (RC522) with Raspberry Pi 3 ๐ชช
The RC522 is a widely used RFID reader for 13.56 MHz tags. With a Raspberry Pi 3, we can use it to identify and authenticate users using RFID cards. ๐งพ
๐ง Components Required
| Component | Quantity |
|---|---|
| Raspberry Pi 3 | 1 |
| RC522 RFID Reader | 1 |
| RFID Tags/Cards | 1+ |
| Jumper Wires | 7 |
๐ Pin Connections
| RFID Pin | Raspberry Pi Pin | Pin Number |
|---|---|---|
| SDA | GPIO 8 (CE0) | Pin 24 |
| SCK | GPIO 11 (SCLK) | Pin 23 |
| MOSI | GPIO 10 (MOSI) | Pin 19 |
| MISO | GPIO 9 (MISO) | Pin 21 |
| IRQ | Not Connected | - |
| GND | Ground | Pin 6 |
| 3.3V | 3.3V | Pin 1 |
Figure: RFID Reader RC522 connected to Raspberry Pi 3
๐ป Python Code
# Install library
# git clone https://github.com/pimylifeup/MFRC522-python.git
import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
try:
print("Place your tag...")
id, text = reader.read()
print("ID:", id)
print("Text:", text)
except KeyboardInterrupt:
GPIO.cleanup()
๐ Summary
RFID readers add access control, attendance tracking, and inventory automation to any project. Ideal for schools, labs, and offices! ๐ท️๐
Raspberry Pi 3 เคธोเคฌเคค RFID Reader (RC522) เคตाเคชเคฐเคฃे ๐ชช (เคฎเคฐाเค ी)
RC522 เคนे 13.56 MHz RFID เคाเคฐ्เคกเคธाเค ी เคตाเคชเคฐเคฒे เคाเคฃाเคฐे เคเค เคธाเคฎाเคจ्เคฏ เคฐीเคกเคฐ เคเคนे. เคเคฒा Raspberry Pi 3 เคธोเคฌเคค เคฏाเคे เคंเคเคฐเคซेเคธिंเค เคถिเคूเคฏा!
๐ง เคฒाเคเคฃाเคฐे เคธाเคนिเคค्เคฏ
| เคธाเคนिเคค्เคฏ | เคช्เคฐเคฎाเคฃ |
|---|---|
| Raspberry Pi 3 | 1 |
| RC522 RFID Reader | 1 |
| RFID เคॅเค/เคाเคฐ्เคก | 1+ |
| เคंเคชเคฐ เคตाเคฏเคฐ | 7 |
๐ เคชिเคจ เคเคจेเค्เคถเคจ
| RFID เคชिเคจ | Raspberry Pi เคชिเคจ | เคชिเคจ เคจंเคฌเคฐ |
|---|---|---|
| SDA | GPIO 8 (CE0) | เคชिเคจ 24 |
| SCK | GPIO 11 (SCLK) | เคชिเคจ 23 |
| MOSI | GPIO 10 (MOSI) | เคชिเคจ 19 |
| MISO | GPIO 9 (MISO) | เคชिเคจ 21 |
| IRQ | เคोเคกเคฒे เคจाเคนी | - |
| GND | GND | เคชिเคจ 6 |
| 3.3V | 3.3V | เคชिเคจ 1 |
๐ป Python เคोเคก
# เคตเคฐीเคฒ เคंเค्เคฐเคी เคोเคก เคตाเคชเคฐा (เคคेเค เคोเคก เคตाเคชเคฐเคคा เคฏेเคเคฒ)
๐ เคธाเคฐांเคถ
เคฏा เคช्เคฐोเคेเค्เคเคฎुเคณे เคเคชเคฒ्เคฏाเคฒा เค ॅเค्เคธेเคธ เคंเค्เคฐोเคฒ, เค เคेंเคกเคจ्เคธ เคฎॅเคจेเคเคฎेंเค เคเคฃि เคเคจ्เคต्เคนेंเคเคฐी เคเคोเคฎेเคถเคจ เคเคฐเคคा เคฏेเคคे! ๐จ๐ผ๐
Comments