Wednesday, July 30, 2025

Monday, July 21, 2025

RFID DOOR JASKIRAT

 

1. RC522 RFID Reader to Arduino Uno:

RC522 PinArduino Uno PinDescription
SDAD10Slave Select (SS) for SPI
SCKD13SPI Clock
MOSID11SPI Master Out
MISOD12SPI Master In
IRQNot connectedInterrupt (not used here)
GNDGNDGround
RSTD9Reset Pin
3.3V3.3VPower Supply

🛑 Note: RC522 works on 3.3V, do not connect to 5V.


📌 2. Servo Motor to Arduino Uno:

Servo WireArduino Uno PinDescription
SignalD3PWM control signal
VCC5VPower
GNDGNDGround



CODE:   


#include <SPI.h>
#include <MFRC522.h>
#include <Servo.h>

#define SS_PIN 10     // SDA pin of RC522
#define RST_PIN 9     // RST pin of RC522
#define SERVO_PIN 3   // Servo control pin

MFRC522 rfid(SS_PIN, RST_PIN);  // Create MFRC522 instance
Servo myServo;

// ✅ Your RFID UID
byte authorizedUID[4] = {0xE0, 0x2A, 0x0D, 0x18};

void setup() {
  Serial.begin(9600);
  SPI.begin();          // Init SPI bus
  rfid.PCD_Init();      // Init MFRC522
  myServo.attach(SERVO_PIN);
  myServo.write(0);     // Initial lock position
  Serial.println("RFID Door Lock System Initialized.");
}

void loop() {
  // Check for new RFID card
  if (!rfid.PICC_IsNewCardPresent() || !rfid.PICC_ReadCardSerial())
    return;

  Serial.print("Scanned UID: ");
  for (byte i = 0; i < rfid.uid.size; i++) {
    Serial.print(rfid.uid.uidByte[i], HEX);
    Serial.print(" ");
  }
  Serial.println();

  if (isAuthorized(rfid.uid.uidByte)) {
    Serial.println("✅ Access Granted!");
    myServo.write(120);     // Unlock
    delay(3000);           // Keep unlocked for 3 seconds
    myServo.write(0);      // Lock again
  } else {
    Serial.println("❌ Access Denied!");
    // Optional: Add buzzer or red LED here
  }

  rfid.PICC_HaltA();       // Halt PICC
  rfid.PCD_StopCrypto1();  // Stop encryption
}

bool isAuthorized(byte *uid) {
  for (byte i = 0; i < 4; i++) {
    if (uid[i] != authorizedUID[i]) return false;
  }
  return true;
}

Thursday, July 17, 2025

Keywords to search about competition

1. Upcoming 3 D designing competition

2. Upcoming technical contest for school level 

3. Upcoming AI, coding hackathon 

4. Upcoming School level innovation competition

5. Upcoming School level Science competition

6. Upcoming AI based competition

7. Upcoming MNC based challenges for School

8

Project Reminder Previous school done projects

 1. Smart Parking system

2. U- Turn accident prevention project

3. Wire buzzer game

4. Matrix to display your name (Welcome board)

5. Pahalgam attack project (GSM based)

6. Smart ID card (GSM + GPS)

7. Cardboard Prothetic hand 

8. RFID Based toll collect system

9. Vehicle headlight beam control up and down sensor based (GSM based)

10. Carbon capture conveyor based project

11. Calculator

12. Quadruped (servo based)

13. RFID Based voting card 

14. RFID Based Smart ID card to do payment in school canteen

MUD Three Mode operation Manual Automatic GPS

 Code for three mode operation: /*   3-Mode Headlight Controller   - Manual mode (driver uses a toggle to pick high/low)   - Auto mode (LDR...