Vertical Car Parking System With RF-ID Card

by MD Jahid Hassan in Circuits > Arduino

510 Views, 2 Favorites, 0 Comments

Vertical Car Parking System With RF-ID Card

6360149798452271539183585.png

A vertical car parking system, also known as a vertical parking garage or vertical parking system, is a type of parking system that utilizes vertical space to park multiple vehicles in a compact manner. Instead of parking vehicles horizontally in traditional parking lots, vertical parking systems stack cars on top of each other in a vertical configuration.


Here's how a typical vertical car parking system works:


1. Entrance: Vehicles enter the parking system through a designated entrance. Drivers may need to follow instructions or guidance provided by signage or automated systems.


2. Vehicle Placement: Once inside, the driver parks their vehicle on a platform or platform-like structure specifically designed for vertical parking. This platform can be elevated to a certain height to accommodate the parking of multiple vehicles.


3. Lifting Mechanism: The platform with the parked vehicle is lifted by mechanical means, such as hydraulic lifts, automated lifts, or motorized systems. The lifting mechanism allows the platform to move vertically and create space for additional platforms or levels.


4. Storage and Retrieval: As the platform is lifted, it reveals an empty space below where another vehicle can be parked. This process continues until the available vertical space is utilized efficiently. When a driver needs to retrieve their vehicle, the appropriate platform is lowered to ground level for easy access.


5. Exit: Once the driver retrieves their vehicle, they can exit the parking system through a designated exit point, typically located near the entrance.


Vertical car parking systems offer several advantages:


1. Space Efficiency: Vertical parking systems maximize the use of vertical space, allowing more vehicles to be parked in a smaller footprint compared to traditional parking lots.


2. Time Efficiency: Retrieving a vehicle from a vertical parking system is often faster compared to traditional parking lots, as there is no need to search for an available parking spot or navigate through multiple levels.


3. Security: Since vertical parking systems are often enclosed structures, they provide a higher level of security for parked vehicles. Unauthorized access and theft are typically minimized.


4. Environmental Benefits: Vertical parking systems can contribute to reducing the overall environmental footprint by using less land area and potentially reducing the need for driving around in search of parking spots.


It's important to note that there are different designs and variations of vertical car parking systems available, ranging from simple mechanical systems to more sophisticated automated systems that utilize robotics and advanced technology for parking and retrieval operations. The specific features and capabilities may vary depending on the manufacturer and the intended application of the system.

Supplies

16X2LCD with i2c.JPG
maxresdefault.jpg
tcrt5000-connection.jpg
A000066-pinout.png
Untitled.jpg
images.jpg

This model project needs the following equipment:

  • Atmega328p(Arduino uno)
  • RC522(RF - ID Card Reader)
  • 10k resistor
  • Male/female rail header
  • 16*2 Display with i2c
  • Gear motor
  • ESP8266 Module
  • proximity sensor ir
  • MRS Plain MDF Board,12mm Thickness
  • 8mm Stainless steel rod
  • GT2 Timing belt
  • GT2 pulley (dia-5mm)
  • Ball Bearing (8mm)
  • PVC board
  • 12v 5 Amp Power Supply
  • AMS-1117-3V3
  • wire
  • Power cable
  • 3D printed GT2 pulley
  • Dotted PCB
  • Screw terminal
  • BTS7960

Circuit Diagram

circuit diagram.JPG

This is the circuit diagram.

Source Code/Program

#include <Wire.h>
#include <SPI.h>
#include <MFRC522.h>
// DISPLAY
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);


/* ---------------------------*/


#define RST_PIN 9  // Configurable, see typical pin layout above
#define SS_PIN 10
#define LED 13
// motor pins--->> BTS
#define RPWM 5
#define LPWM 6
#define EN 7


int IRSensor1 = 7;
int IRSensor2 = 8;
String uid1 = "E38A22AA";
String uid2 = "3088D9F";  
String uid3 = "B9C63CD5";
String uid4 = "CA9AF8AF";
String tagID = "";
int n = 0;
int x = 0;
// Configurable, see typical pin layout above
MFRC522 mfrc522(SS_PIN, RST_PIN);


int slot;
int park[] = { 1, 1, 1, 1 };
int currentslot;
int speed = 50;
int count = 0;


/* Uno's A4 to SDA & A5 to SCL */


void setup(void) {


  pinMode(IRSensor1, INPUT);
  pinMode(IRSensor2, INPUT);
  // .......................... motor pin define.....
  pinMode(RPWM, OUTPUT);
  pinMode(LPWM, OUTPUT);
  pinMode(EN, OUTPUT);
  analogWrite(RPWM, 0);
  analogWrite(LPWM, 0);
  /*.................................Display................*/
  lcd.init();       //Init the LCD
  lcd.backlight();  //Activate backlight
  lcd.setCursor(4, 0);
  lcd.print(" WELCOME");
  delay(4000);
  lcd.setCursor(2, 0);
  lcd.print("Please Scan ");  // scan card
  lcd.setCursor(4, 1);
  lcd.print("The Card");
  //lcd.home();


  Serial.begin(115200);  // Initialize serial communications with the PC
  while (!Serial)
    ;                                 // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
  SPI.begin();                        // Init SPI bus
  mfrc522.PCD_Init();                 // Init MFRC522
  delay(4);                           // Optional delay. Some board do need more time after init to be ready, see Readme
  mfrc522.PCD_DumpVersionToSerial();  // Show details of PCD - MFRC522 Card Reader details
                                      // Serial.println(F("Scan PICC to see UID, SAK, type, and data blocks..."));
}


void loop() {


  // Serial.println("\nScan a NFC tag\n");
  int sensor1 = digitalRead(IRSensor1);
  int sensorValue = analogRead(A0);
  int sensorvalue2 = analogRead(A1);
  Serial.println(sensorValue);


  if (sensorValue <550) {
    n = 1;
    Serial.println(n);
    delay(120);
    digitalWrite(EN, LOW);
  } else {
    n = 0;
  }


  while (readID()) {
    if (tagID == uid1 || n == 1) {
      digitalWrite(LED, !digitalRead(LED));
      // Serial.println("slot1");


      slot = 1;  // Turn on or off the onboard led
      // Serial.println(n);
      if (n == 0) {
        digitalWrite(EN, HIGH);
        digitalWrite(LPWM, LOW);
        analogWrite(RPWM, speed);
      }


      lcd.clear();
      lcd.setCursor(2, 0);
      lcd.print("Slot No 2");
 


    } else if (tagID == uid2 || n == 1) {
      digitalWrite(LED, !digitalRead(LED));
      // Serial.println("slot2");
   
      slot = 2;
      if (n == 0) {
        digitalWrite(EN, HIGH);
        digitalWrite(LPWM, LOW);
        analogWrite(RPWM, speed);
      }
      lcd.clear();
      lcd.setCursor(2, 0);
      lcd.print("Slot No 3");

    } else if (tagID == uid3 || n == 1) {
      digitalWrite(LED, !digitalRead(LED));
      // Serial.println("slot3");
      lcd.clear();
      lcd.setCursor(2, 0);
      lcd.print("Slot No 4");
      slot = 3;  // Turn on or off the onboard led
      if (n == 0) {
        digitalWrite(EN, HIGH);
        digitalWrite(LPWM, LOW);
        analogWrite(RPWM, speed);
      }
    } else if (tagID == uid4 || n == 1) {
      digitalWrite(LED, !digitalRead(LED));
      // Serial.println("slot4");
      lcd.clear();
      lcd.setCursor(2, 0);
      lcd.print("Slot No 1");
      slot = 4;  // Turn on or off the onboard led
      if (n == 0) {
        digitalWrite(EN, HIGH);
        digitalWrite(LPWM, LOW);
        analogWrite(RPWM, speed);
      }
    }
    //  else{
    //   Serial.println("no slot");
    //   slot=0;
    // }
  }


  //UID 1C B4 E9 21 slot1, UID 55 51 14 2A slot2, F3 9A D8 18 slot3,73 32 D5 18 slot4, 73 8E DB 18 slot5, D3 B3 DE 18 slot6, 13 1C BF 18 slot7
  currentslot = slot;
  // Serial.println(park[currentslot - 1]);
}
boolean readID() {
  //Check if a new tag is detected or not. If not return.
  if (!mfrc522.PICC_IsNewCardPresent()) {
    return false;
  }
  //Check if a new tag is readable or not. If not return.
  if (!mfrc522.PICC_ReadCardSerial()) {
    return false;
  }
  tagID = "";
  // Read the 4 byte UID
  for (uint8_t i = 0; i < 4; i++) {
    //readCard[i] = mfrc522.uid.uidByte[i];
    tagID.concat(String(mfrc522.uid.uidByte[i], HEX));  // Convert the UID to a single String
  }
  tagID.toUpperCase();
  // Serial.println(tagID);  
  mfrc522.PICC_HaltA();  // Stop reading
  return true;
}


int rotate(int slot) {
  // digitalWrite(enable,LOW);
  int sensor2 = digitalRead(IRSensor2);
  //  Serial.println(sensor2);
  int pos;
  if (slot == 1) {
    pos = 1;
    ;
    // if(sensor2 == 0){
    //    analogWrite(PWM_PIN,0);
    // }
    //else{
    //analogWrite(PWM_PIN,0);
    //}
    // stepper.moveTo(pos);
    digitalWrite(EN, HIGH);
    digitalWrite(LPWM, LOW);
    analogWrite(RPWM, 50);
    // delay(4500);
    while (n == 1) {
      digitalWrite(EN, LOW);
      // Serial.println(n);
      break;
    }
    Serial.println("Reached slot1");
  } else if (slot == 2) {
    pos = -5000;
    digitalWrite(EN, HIGH);
    digitalWrite(LPWM, LOW);
    analogWrite(RPWM, 40);
    delay(3000);
    while (sensor2 == 1) {
      digitalWrite(EN, LOW);
      Serial.println(sensor2);
      break;
    }
    Serial.println("Reached slot2");
  } else if (slot == 3) {
    pos = -10000;
    digitalWrite(EN, HIGH);
    digitalWrite(LPWM, LOW);
    analogWrite(RPWM, 50);
    delay(4500);
    while (sensor2 == 1) {
      digitalWrite(EN, LOW);
      Serial.println(sensor2);
      break;
    }
    Serial.println("Reached slot3");
  } else if (slot == 4) {
    digitalWrite(EN, HIGH);
    digitalWrite(LPWM, LOW);
    analogWrite(RPWM, 50);
    delay(4500);
    while (sensor2 == 1) {
      digitalWrite(EN, LOW);
      Serial.println(sensor2);
      break;
    }
    Serial.println("Reached slot3");
  } else {
    Serial.println("enter correct slot");
    slot = 0;
  }
}


void blink() {
  park[currentslot - 1] = !park[currentslot - 1];
  Serial.println("interrupt recieved");
}

void scan() {
  lcd.setCursor(2, 0);
  lcd.print("Please Scan ");  // scan card
  lcd.setCursor(4, 1);
  lcd.print("The Card");
}

Structure

1.JPG
2.JPG
3.JPG
4.JPG
5.JPG
6.JPG
IMG_20230314_230641.jpg
IMG_20230314_230650.jpg
IMG_20230314_230829.jpg
IMG_20230314_230830.jpg
IMG_20230317_151209.jpg
IMG_20230317_151241.jpg
IMG_20230317_151248.jpg
IMG_20230317_151402.jpg
IMG_20230322_214830.jpg
IMG_20230322_214901.jpg
IMG_20230322_214912.jpg
IMG_20230322_214919.jpg
IMG_20230322_214936.jpg
IMG_20230322_214951.jpg