Tekko BDSimSimulatorProjects

স্মার্ট পার্কিং: কোন স্লট খালি তার হিসাবSmart Parking System using Arduino

প্রতিটা স্লটের উপরে একটা করে sensor গাড়ি দেখে। সবুজ LED মানে ঢোকো, লাল মানে ব্যস্ত; LCD তে দেখায় কয়টা স্লট খালি, আর শেষ স্লটটাও ভরে গেলে buzzer পরের গাড়িকে ফিরিয়ে দেয় — পার্কিংয়ের গেটের সাইনবোর্ড, ছোট করে বানানো।

Every slot has a sensor watching for a car. Green LED = drive in, red = taken; the LCD counts how many slots are free, and when the last one fills the buzzer turns the next car away — the sign at the car-park entrance, miniaturised.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

Smart Parking System using Arduino circuit diagram — Arduino Uno, IR obstacle sensor (FC-51), LED (green), Resistor 220Ω, LED (red), LCD 16x2 with I2C, Buzzer, Jumper wires

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

IR obstacle sensor (FC-51) VCC→Arduino Uno 5V
IR obstacle sensor (FC-51) GND→Arduino Uno GND
IR obstacle sensor (FC-51) OUT→Arduino Uno D2
IR obstacle sensor (FC-51) VCC→Arduino Uno 5V
IR obstacle sensor (FC-51) GND→Arduino Uno GND
IR obstacle sensor (FC-51) OUT→Arduino Uno D3
IR obstacle sensor (FC-51) VCC→Arduino Uno 5V
IR obstacle sensor (FC-51) GND→Arduino Uno GND
IR obstacle sensor (FC-51) OUT→Arduino Uno D4
Arduino Uno D5→Resistor a
Resistor b→LED A
LED K→Arduino Uno GND.3
Arduino Uno D6→Resistor a
Resistor b→LED A
LED K→Arduino Uno GND.3
Arduino Uno D7→Resistor a
Resistor b→LED A
LED K→Arduino Uno GND.3
Arduino Uno D11→Resistor a
Resistor b→LED A
LED K→Arduino Uno GND.3
Arduino Uno D12→Resistor a
Resistor b→LED A
LED K→Arduino Uno GND.3
Arduino Uno D13→Resistor a
Resistor b→LED A
LED K→Arduino Uno GND.3
LCD 16x2 with I2C VCC→Arduino Uno 5V
LCD 16x2 with I2C GND→Arduino Uno GND
LCD 16x2 with I2C SDA→Arduino Uno A4
LCD 16x2 with I2C SCL→Arduino Uno A5
Arduino Uno D8→Buzzer +
Buzzer -→Arduino Uno GND.3

Code (Arduino C++)

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Parking guidance: every slot has an IR sensor looking down at it (HIGH = a car
// is parked there). Green LED = free, red = taken. The LCD counts the free slots
// and the buzzer sounds when another car tries to enter a full lot.
LiquidCrystal_I2C lcd(0x27, 16, 2);
const int ir[3] = {2, 3, 4};
const int greenLed[3] = {5, 6, 7};
const int redLed[3] = {11, 12, 13};
const int buzzer = 8;

void setup() {
  for (int i = 0; i < 3; i++) {
    pinMode(ir[i], INPUT);
    pinMode(greenLed[i], OUTPUT);
    pinMode(redLed[i], OUTPUT);
  }
  pinMode(buzzer, OUTPUT);
  lcd.init();
  lcd.backlight();
  Serial.begin(9600);
}

void loop() {
  int freeSlots = 0;
  for (int i = 0; i < 3; i++) {
    bool taken = digitalRead(ir[i]) == LOW;    // sensor above the slot: seeing the car (LOW) = taken
    digitalWrite(greenLed[i], taken ? LOW : HIGH);
    digitalWrite(redLed[i], taken ? HIGH : LOW);
    if (!taken) freeSlots++;
  }
  bool full = freeSlots == 0;
  digitalWrite(buzzer, full ? HIGH : LOW);
  lcd.setCursor(0, 0);
  if (full) lcd.print("Parking FULL   ");
  else { lcd.print("Free slots: "); lcd.print(freeSlots); lcd.print("  "); }
  lcd.setCursor(0, 1);
  lcd.print(full ? "No space, sorry " : "Welcome!        ");
  Serial.print("Free: "); Serial.println(freeSlots);
  delay(300);
}

আরো project · More projects