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...

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.

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...