Skip to main content

Interfacing RFID Module (RC522) with Raspberry Pi 3

 

๐Ÿ”น Overview

RFID (Radio Frequency Identification) is used for contactless authentication in access control systems, attendance tracking, and payment systems. The RC522 RFID module reads RFID cards and tags using SPI communication.


๐Ÿ› ️ Components Required

✔️ Raspberry Pi 3
✔️ RC522 RFID Module
✔️ RFID Card/Tag
✔️ Breadboard & Jumper Wires


๐Ÿ”Œ Circuit Diagram

๐Ÿ”— RC522 to Raspberry Pi Connections

RC522 Pin Raspberry Pi Connection
VCC            3.3V
GNDGND
RSTGPIO 25
SDAGPIO 8 (SPI CE0)
SCKGPIO 11 (SPI SCLK)
MOSIGPIO 10 (SPI MOSI)
MISOGPIO 9 (SPI MISO)

๐Ÿ“œ Python Code to Read RFID Card

Save the following Python script as rfid_reader.py and run it on Raspberry Pi.

python
import RPi.GPIO as GPIO from mfrc522 import SimpleMFRC522 reader = SimpleMFRC522() try: print("Place your RFID card near the reader...") id, text = reader.read() print(f"Card ID: {id}") print(f"Data on Card: {text}") except KeyboardInterrupt: GPIO.cleanup() print("\nProgram stopped.")

๐Ÿ’ก How It Works

  1. The RFID module reads the unique ID stored in the RFID card or tag.
  2. The script prints the card ID and any data stored on the card.
  3. The RFID system is commonly used in secure access control.

๐ŸŽฏ Applications

✅ Attendance tracking
✅ Door lock systems
✅ Contactless payments


๐Ÿ“ เคฎเคฐाเค ीเคค เคธเคฎเคœाเคตเคฃी (Marathi Explanation)

๐Ÿ”น เคชเคฐिเคšเคฏ

RFID (เคฐेเคกिเค“ เคซ्เคฐिเค•्เคตेเคจ्เคธी เค†เคฏเคกेंเคŸिเคซिเค•ेเคถเคจ) เคคंเคค्เคฐเคœ्เคžाเคจ เคธ्เคชเคฐ्เคถ เคจ เค•เคฐเคคा เค“เคณเค– เคธเคค्เคฏाเคชिเคค เค•เคฐเคฃ्เคฏाเคธाเค ी เคตाเคชเคฐเคฒे เคœाเคคे. RC522 เคฎॉเคก्เคฏूเคฒ RFID เค•ाเคฐ्เคก เค•िंเคตा เคŸॅเค— เคตाเคšเคคे เค†เคฃि SPI เคฆ्เคตाเคฐे เคกेเคŸा เคชाเค เคตเคคे.


๐Ÿ› ️ เค†เคตเคถ्เคฏเค• เค˜เคŸเค•

✔️ เคฐाเคธ्เคชเคฌेเคฐी เคชाเคฏ เฅฉ
✔️ RC522 RFID เคฎॉเคก्เคฏूเคฒ
✔️ RFID เค•ाเคฐ्เคก / เคŸॅเค—
✔️ เคฌ्เคฐेเคกเคฌोเคฐ्เคก เค†เคฃि เคœเคฎ्เคชเคฐ เคตाเคฏเคฐ


๐Ÿ”Œ เคธเคฐ्เค•िเคŸ เค•เคจेเค•्เคถเคจ

RC522 เคชिเคจเคฐाเคธ्เคชเคฌेเคฐी เคชाเคฏ เค•เคจेเค•्เคถเคจ
VCC3.3V
GNDGND
RSTGPIO 25
SDAGPIO 8 (SPI CE0)
SCKGPIO 11 (SPI SCLK)
MOSIGPIO 10 (SPI MOSI)
MISOGPIO 9 (SPI MISO)

๐Ÿ“œ เคชाเคฏเคฅॉเคจ เค•ोเคก

เคนा เค•ोเคก rfid_reader.py เคจाเคตाเคจे เคธेเคต्เคน เค•เคฐा เค†เคฃि เคšाเคฒเคตा.

python
import RPi.GPIO as GPIO from mfrc522 import SimpleMFRC522 reader = SimpleMFRC522() try: print("เคคुเคฎเคšे RFID เค•ाเคฐ्เคก เคตाเคšเค•ाเคœเคตเคณ เค ेเคตा...") id, text = reader.read() print(f"เค•ाเคฐ्เคก เค†เคฏเคกी: {id}") print(f"เค•ाเคฐ्เคกเคตเคฐीเคฒ เคกेเคŸा: {text}") except KeyboardInterrupt: GPIO.cleanup() print("\nเคช्เคฐोเค—्เคฐॅเคฎ เคฅांเคฌเคฒा.")

๐Ÿ’ก เคนे เค•เคธे เค•ाเคฐ्เคฏ เค•เคฐเคคे?

  1. RFID เค•ाเคฐ्เคกเคฎเคง्เคฏे เค…เคธเคฒेเคฒा เคฏुเคจिเค• เค†เคฏเคกी เคตाเคšเคฒा เคœाเคคो.
  2. เค†เคฏเคกी เค†เคฃि เคธेเคต्เคน เคกेเคŸा เคช्เคฐिंเคŸ เค•ेเคฒा เคœाเคคो.
  3. RFID เคช्เคฐเคฃाเคฒी เคธुเคฐเค•्เคทिเคค เคช्เคฐเคตेเคถ เคจिเคฏंเคค्เคฐเคฃाเคธाเค ी เคตाเคชเคฐเคฒी เคœाเคคे.

๐ŸŽฏ เค‰เคชเคฏोเค—

✅ เคนเคœेเคฐी เคช्เคฐเคฃाเคฒी
✅ เคธ्เคตเคฏंเคšเคฒिเคค เคฆเคฐเคตाเคœे
✅ เค•ॉเคจ्เคŸॅเค•्เคŸเคฒेเคธ เคชेเคฎेंเคŸ्เคธ

Comments

Popular posts from this blog

IOT : GARDEN WATER SPRINKLER SYSTEM

IoT projects have gained immense popularity due to their ability to leverage the power of interconnected devices and data to create innovative solutions across various domains. IoT projects involve integrating sensors, actuators, and communication technologies to enable the seamless exchange of data between physical devices and the internet. These projects range from simple DIY experiments to complex industrial applications, each offering unique opportunities to transform our lives and improve efficiency. Whether it's creating a smart home automation system, monitoring environmental conditions, optimizing energy usage, or developing intelligent transportation systems, applications of IoT open up a world of possibilities for innovation and connectivity. By harnessing the potential of IoT, we can build intelligent and interconnected systems that revolutionize industries, enhance daily life, and pave the way for a more efficient and sustainable future. In this project we will be using...

POWER BI - THE ARCHITECTURE

Power BI Architecture: A Comprehensive Guide to Building Effective Data Analytics Solutions     Understanding Power BI Architecture: Power BI's architecture comprises four main components, each playing a pivotal role in the data analytics process: Data Sources:   Power BI connects to a wide range of data sources, including databases, cloud services, Excel files, web services, and more. This versatility enables organizations to consolidate their data from various systems into a single dashboard. Data Transformation:   Once the data is sourced, it undergoes transformation and cleaning processes to make it suitable for analysis. Power BI's Power Query Editor provides a user-friendly interface to manipulate, filter, and shape data according to specific requirements. Data Model:   The heart of Power BI's architecture lies in its data model, whic...

TOUCH PLATE BASED DOOR BELL

Title:  Touch plate based door bell  Circuit:  Components: IC 555 Resistors: 1 M, 100k, 330 ohms Transistor: BC547  PN2222A Capacitor: 10n 1 Copper plate : as touch plate. A 6v battery An LED / Ic UM66 Description: This is the simple circuit for touch plate based security system. In this project what basically done is, circuit detects stray voltages produced by mains voltage and electrostatic built  up in the room.If sufficient static voltage is detected by the plate then chip will charge up. Transistor BC 547 or PN2222A is used basically to increase the sensitivity.In place of led just connect IC um 66(melody IC). Applications: In homes, of course. This can be specially used in places like hospitals, when patients need to call doctor by himself.