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

Arduino UNO Controlled Smart Parking System with RFID and IR Sensors

View and Edit Project In Cirkit DesignerImage of Arduino UNO Controlled Smart Parking System with RFID and IR Sensors

Circuit Documentation

Summary

The circuit is designed to interface various sensors, actuators, and an LCD display with an Arduino UNO microcontroller. It includes input devices like IR sensors and an LDR, output devices such as LEDs, a piezo buzzer, and a micro servo, as well as communication modules like an RFID-RC522 and an I2C LCD display. The circuit appears to be configured for a parking system with entry and exit control, slot occupancy detection, and adaptive street lighting based on ambient light levels.

Component List

Lcd 20x4 i2c

IR Sensor

LDR (Light Dependent Resistor)

LED: Two Pin (white)

RFID-RC522

Ultrasonic Sensor

Micro servo 9G

Piezo Buzzer

Arduino UNO

Resistor (220 Ohms)

Wiring Details

Lcd 20x4 i2c

IR Sensor

LDR

LED: Two Pin (white)

RFID-RC522

Ultrasonic Sensor

Micro servo 9G

Piezo Buzzer

Resistor (220 Ohms)

Documented Code

Arduino UNO Code

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

// RFID Configuration
#define SS_PIN 10
#define RST_PIN 7
MFRC522 rfid(SS_PIN, RST_PIN);

// LCD Configuration
LiquidCrystal_I2C lcd(0x27, 20, 4);

// Servo Configuration
Servo servo;
#define SERVO_PIN 6

// Ultrasonic Sensor Configuration
#define TRIG_PIN 5
#define ECHO_PIN 4

// Piezo Buzzer
#define BUZZER_PIN 8

// IR Sensors for Parking Slots
#define IR_SENSOR_1 0
#define IR_SENSOR_2 1
#define IR_SENSOR_3 2
#define IR_SENSOR_4 3
#define IR_SENSOR_5 A1
#define IR_SENSOR_6 A2

// LDR and LED Configuration
#define LDR_PIN A0
#define LED_1_PIN A3
#define LED_2_PIN A4

// RFID Card UIDs (replace with actual card UIDs)
byte cardUIDs[6][4] = {
  {0xDE, 0xAD, 0xBE, 0xEF},  // Nicholas
  {0xAA, 0xBB, 0xCC, 0xDD},  // Nathen
  {0x11, 0x22, 0x33, 0x44},  // Joshua
  {0x55, 0x66, 0x77, 0x88},  // Sarrvesh
  {0x99, 0xAA, 0xBB, 0xCC},  // Shalen
  {0x12, 0x34, 0x56, 0x78}   // Hassan
};
String cardNames[6] = {"Nicholas", "Nathen", "Joshua", "Sarrvesh", "Shalen", "Hassan"};

void setup() {
  Serial.begin(9600);
  
  // Initialize RFID
  SPI.begin();
  rfid.PCD_Init();
  
  // Initialize LCD
  lcd.init();
  lcd.backlight();
  
  // Initialize Servo
  servo.attach(SERVO_PIN);
  servo.write(0);  // Close the barrier initially
  
  // Initialize Ultrasonic Sensor
  pinMode(TRIG_PIN, OUTPUT);
  pinMode(ECHO_PIN, INPUT);
  
  // Initialize Buzzer
  pinMode(BUZZER_PIN, OUTPUT);
  
  // Initialize IR Sensors
  pinMode(IR_SENSOR_1, INPUT);
  pinMode(IR_SENSOR_2, INPUT);
  pinMode(IR_SENSOR_3, INPUT);
  pinMode(IR_SENSOR_4, INPUT);
  pinMode(IR_SENSOR_5, INPUT);
  pinMode(IR_SENSOR_6, INPUT);
  
  // Initialize LDR and LEDs
  pinMode(LDR_PIN, INPUT);
  pinMode(LED_1_PIN, OUTPUT);
  pinMode(LED_2_PIN, OUTPUT);
  
  // Display initial slots availability
  displayAvailableSlots();
}

void loop() {
  checkRFID();
  updateParkingSlots();
  controlStreetLights();
  checkExit();
}

// Additional functions are defined here...

RFID-RC522 Code

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

(Note: The code for the RFID-RC522 microcontroller is minimal and does not include any functional code. It is likely that the main code is intended to run on the Arduino UNO, and the RFID-RC522 is interfaced through the Arduino.)