Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

RFID Vehicle Detection System with Arduino and Buzzer Alert

View and Edit Project In Cirkit DesignerImage of RFID Vehicle Detection System with Arduino and Buzzer Alert

Circuit Documentation

Summary of the Circuit

This circuit is designed to implement a vehicle detection system using RFID technology. It consists of multiple Arduino UNO microcontrollers, an RFID-RC522 module, a buzzer, LEDs, and resistors. The RFID reader detects the presence of RFID tags, which are used to represent vehicles in this context. Upon detection, the system activates a buzzer and a green LED as an indication of vehicle presence. If no vehicle is detected, a red LED is illuminated. The circuit uses digital I/O pins for interfacing with the RFID module and the indicators (buzzer and LEDs).

Component List

Microcontrollers

RFID Module

Indicators

Resistors

Wiring Details

Arduino UNO

Buzzer

RFID-RC522

LEDs

Resistors

Documented Code

Arduino UNO (Vehicle Detection System)

/*
 * Vehicle Detection System using RFID
 * This system uses an RFID reader to detect vehicles and triggers a buzzer
 * and green LED when a vehicle is detected. If no vehicle is detected, the
 * red LED will glow.
 */

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

// Pin definitions
#define RST_PIN 9
#define SS_PIN 10
#define GREEN_LED_PIN 4
#define RED_LED_PIN 5
#define BUZZER_PIN 7

// Initialize RFID
MFRC522 rfid(SS_PIN, RST_PIN);

void setup() {
  // Initialize serial communication
  Serial.begin(9600);

  // Initialize RFID
  SPI.begin();
  rfid.PCD_Init();

  // Initialize pins
  pinMode(GREEN_LED_PIN, OUTPUT);
  pinMode(RED_LED_PIN, OUTPUT);
  pinMode(BUZZER_PIN, OUTPUT);

  // Welcome message
  Serial.println("Vehicle Detection System Ready");
}

void loop() {
  // Check for RFID card
  if (rfid.PICC_IsNewCardPresent() && rfid.PICC_ReadCardSerial()) {
    // Vehicle detected
    Serial.println("Vehicle Detected");
    triggerAlert();
    rfid.PICC_HaltA();
  } else {
    // No vehicle detected
    digitalWrite(GREEN_LED_PIN, LOW);
    digitalWrite(RED_LED_PIN, HIGH);
  }
}

void triggerAlert() {
  // Turn on green LED
  digitalWrite(GREEN_LED_PIN, HIGH);
  digitalWrite(RED_LED_PIN, LOW);

  // Activate buzzer
  digitalWrite(BUZZER_PIN, HIGH);
  delay(1000);
  digitalWrite(BUZZER_PIN, LOW);

  // Turn off green LED
  digitalWrite(GREEN_LED_PIN, LOW);
}

(Note: The code provided is for one of the Arduino UNO microcontrollers in the circuit. The other microcontrollers' code is not included as it was not provided or was empty.)