Skip to main content

Automatic Car Parking System with Solar Shed

Automatic Car Parking System Using Solar Shed | SimpleCircuits
Smart City · Renewable Energy

Automatic
Car Parking
Solar Shed System

A self-powered smart parking system with IR sensor detection, servo-controlled gate, real-time LCD slot display, and a complete solar-to-battery power chain — no external electricity needed.

Solar Panels
12VArray Output
4Parking Slots
BMSProtected
IRAuto Gate
Complete System Overview Complete System Overview

Key Features

What Makes This Special

A complete smart parking solution that runs entirely off solar energy — no wiring to the grid, no electricity bills, 24/7 operation thanks to battery backup.

☀️

Solar Powered

4× 6V panels charge the entire system independently.

🚗

Auto Gate

Servo-controlled barrier opens and closes automatically.

📺

Live Display

LCD shows real-time available slots and status messages.

🌧️

Weatherproof

3D printed waterproof structure with rain drainage design.

🛡️

BMS Protected

TP5100 + 2S BMS for safe, long-life battery charging.

🔋

24/7 Operation

Battery backup ensures function even without sunlight.


System Overview

How the System Works

IR1 detects entry, IR2 detects exit. Arduino checks slot availability, controls the servo gate, updates the LCD, and manages the slot counter. Solar panels continuously charge the battery through TP5100 and BMS.

01

Detect

IR1 (entry) or IR2 (exit) sensor triggers when a vehicle crosses the beam.

02

Check

Arduino checks slot count. If full, shows "SORRY — Parking Full" on LCD.

03

Open Gate

Servo rotates to 120°. Waits for vehicle to pass through second sensor.

04

Close & Update

After 2 s delay, gate closes to 10°. LCD updates available slot count.

Solar Power Chain:

2×6V Panel (parallel) + 2×6V Panel (parallel) → series → 12V Output TP5100 BMS 7.4V Battery Arduino + Servo

Bill of Materials

Components Required

Eleven components for a complete, self-powered automated parking system.

ComponentNotesBuy
Arduino UNOMain controllerBuy Now
IR Sensors (×2)Entry IR1→D3, Exit IR2→D2Buy Now
Servo Motor (SG90)Gate control, pin D13Buy Now
LCD 16×2 with I²CSDA→A4, SCL→A5Buy Now
6V Solar Panels (×4)2 parallel pairs in series = 12VBuy Now
TP5100 Module12V → 8.4V chargerBuy Now
2S 20A BMSBattery protectionBuy Now
7.4V Li-ion Battery2S, powers systemBuy Now
25V 2200µF CapacitorSmooths panel voltage spikesBuy Now
BreadboardPower distributionBuy Now
Jumper WiresM-M and M-F setBuy Now

3D Printable

3D Model Files

Download the waterproof solar shed structure, gate mechanism mounts, and sensor housings. Designed in Tinkercad with rain drainage channels built in.

Order via JLC3DP
ℹ️

Note: The solar shed structure was designed in Tinkercad and printed using JLC3DP's 3D printing services. The structure includes a waterproof rain drainage channel in the roof design.


Wiring Reference

Pin Connections

All connections in one place. IR sensors on D2/D3, servo on D13, LCD via I²C on A4/A5. Power flows from solar panels through the TP5100 and BMS to the battery and Arduino.

ComponentComponent PinArduino / DestinationNotes
IR Sensor 1 (Entry)OUTD3LOW when car detected
IR Sensor 2 (Exit)OUTD2LOW when car detected
Both IR SensorsVCC5VArduino 5V rail
Both IR SensorsGNDGNDCommon ground
SG90 ServoSignal (Orange)D1310° = closed, 120° = open
SG90 ServoVCC (Red)5VArduino 5V or battery direct
SG90 ServoGND (Brown)GNDCommon ground
LCD I²C ModuleSDAA4I²C data, addr 0x27
LCD I²C ModuleSCLA5I²C clock
LCD I²C ModuleVCC5VArduino 5V rail
LCD I²C ModuleGNDGNDCommon ground
6V Panels (pair 1)+/– parallel6V node APanel 1 + Panel 2 in parallel
6V Panels (pair 2)+/– parallel6V node BPanel 3 + Panel 4 in parallel
Both pairsNode A+ → Node B–12V series→ TP5100 IN+
25V 2200µF Cap+/–TP5100 IN+/IN–Across input, smooths spikes
TP5100OUT+ (8.4V)BMS B+Charging input to BMS
TP5100OUT–GND (common)Common ground
BMSP+ outputArduino VIN7.4V powers Arduino
BMSP– outputGND (common)Common ground rail
💡

TP5100 indicator: Red LED = charging in progress. Blue LED = battery fully charged. If no LED lights, check the solar panel series/parallel connections and verify 12V at TP5100 input with a multimeter.


Build Guide

Assembly Steps

01

Upload the Code First

Open Arduino IDE, paste the code, select Arduino UNO board and correct COM port, then upload before any wiring.

02

3D Print the Structure

Print all STL files. Use JLC3DP for professional waterproof quality. The roof has built-in drainage channels.

03

Wire Electronics

Follow the pin table above. Connect IR sensors, servo, and LCD to Arduino. Double-check I²C address (0x27 or try 0x3F).

04

Solar Panel Configuration

Pair 1: panels 1+2 in parallel. Pair 2: panels 3+4 in parallel. Connect both pairs in series → 12V to TP5100 input.

05

Capacitor Placement

Place the 25V 2200µF capacitor across TP5100 IN+ and IN– to smooth voltage spikes from the solar panels.

06

Adjust IR Sensors

Use a small screwdriver to adjust the sensitivity potentiometer on each IR sensor. Test with your hand before mounting.

07

Mount & Test

Mount all components in the enclosure. Power on and verify: LCD welcome message, gate movement, IR detection, slot counter update.

08

Verify Battery Charging

Place in sunlight. Red LED on TP5100 = charging. Monitor voltage at BMS output. System ready for 24/7 outdoor use.


Demo

Circuit & Assembly Video

Complete wiring diagram, solar panel configuration, IR sensor adjustment, and live parking gate demonstration.

🎥

Watch for the solar wiring sequence — the parallel-then-series panel configuration is shown clearly. Also demonstrates gate timing and LCD message flow.


Firmware

Arduino Code

Change Slot = 4 and MaxSlots = 4 to match your physical parking bay count. Gate angles: 10° = closed, 120° = open.

parking_system.ino — Arduino C++
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Servo.h>

#define servoPin 13

Servo myservo;
LiquidCrystal_I2C lcd(0x27, 16, 2);  // try 0x3F if blank

int IR1 = 3;          // Entry sensor
int IR2 = 2;          // Exit sensor

int Slot         = 4; // ← change to match your parking bays
const int MaxSlots = 4;

bool carEntering = false;
bool carExiting  = false;

void setup() {
  Serial.begin(9600);
  lcd.init();
  lcd.backlight();
  pinMode(IR1, INPUT);
  pinMode(IR2, INPUT);
  myservo.attach(servoPin);
  myservo.write(10);            // Closed position
  lcd.setCursor(0, 0);
  lcd.print("    ARDUINO    ");
  lcd.setCursor(0, 1);
  lcd.print(" PARKING SYSTEM ");
  delay(3000);
  lcd.clear();
}

void loop() {

  // ── Entry detection (IR1 triggered) ──────────────────
  if (digitalRead(IR1) == LOW && !carEntering && !carExiting) {
    carEntering = true;
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Car Detected!");
    delay(1000);

    if (Slot > 0) {
      myservo.write(120);       // Open gate
      Slot--;
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("Gate Opened!");
      delay(2000);

      while (digitalRead(IR2) == HIGH) delay(100);  // Wait for IR2 trigger
      while (digitalRead(IR2) == LOW)  delay(100);  // Wait for IR2 clear

      delay(2000);
      myservo.write(10);        // Close gate
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("Gate Closed!");
      delay(2000);
    } else {
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("    SORRY :(    ");
      lcd.setCursor(0, 1);
      lcd.print("  Parking Full  ");
      delay(3000);
      lcd.clear();
    }
    carEntering = false;
  }

  // ── Exit detection (IR2 triggered) ───────────────────
  if (digitalRead(IR2) == LOW && !carExiting && !carEntering) {
    if (Slot == MaxSlots) {
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print(" No Cars Left! ");
      delay(3000);
      lcd.clear();
    } else {
      carExiting = true;
      myservo.write(120);       // Open gate
      if (Slot < MaxSlots) Slot++;
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("Car Exiting...");
      delay(2000);

      while (digitalRead(IR1) == HIGH) delay(100);
      while (digitalRead(IR1) == LOW)  delay(100);

      delay(2000);
      myservo.write(10);        // Close gate
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("Gate Closed!");
      delay(2000);
      carExiting = false;
    }
  }

  // ── Idle display ─────────────────────────────────────
  lcd.setCursor(0, 0);
  lcd.print("    WELCOME!    ");
  lcd.setCursor(0, 1);
  lcd.print("Slot Left: ");
  lcd.print(Slot);
}

setup()

Initialises LCD, servo at 10° (closed), IR pin modes. Displays "ARDUINO PARKING SYSTEM" for 3 s on boot.

Entry Logic

IR1 LOW triggers entry. If Slot > 0, opens gate, decrements count, waits for IR2 to confirm car has passed.

Exit Logic

IR2 LOW triggers exit. If slots aren't full, opens gate, increments count, waits for IR1 to confirm car cleared.

Idle Display

When no car is detected, LCD shows "WELCOME!" and current available slot count continuously.


Troubleshooting

Common Issues & Fixes

🔧

Quick fixes for common problems:

  • Gate not opening — Check servo signal wire on D13 and power connections
  • IR sensors not detecting — Adjust sensitivity pot with a small screwdriver
  • Solar not charging — Verify parallel-then-series panel wiring; check 12V at TP5100 IN
  • LCD blank — Try I²C address 0x3F instead of 0x27 in the code
  • Battery not holding charge — Check BMS cell wiring; verify TP5100 output is 8.4V

Ultraviolet & Dark Theme · Designed for makers & builders

Comments

  1. Bro please make the 3d files for free

    ReplyDelete
  2. Man it's 1.89, come on! You don't even buy him a coffee for his work you are just getting and using for your project or anything. Are you for real?

    ReplyDelete

Post a Comment

Popular posts from this blog

Solar Tracking System

Dual-Axis Solar Tracking System | Arduino SimpleCircuits Arduino Solar DIY Renewable Energy Project Dual-Axis Solar Tracking System Build a high-performance solar tracker that follows the sun in real-time. Four LDR sensors, an Arduino UNO, and two servo motors — boosting energy capture by up to 40% versus fixed mounts. 40% More Efficient 4 LDR Sensors 2 Servo Axes <300mA Power Draw Finished Build System Overview How the System Works The tracker reads the sky through four LDR sensors placed around the panel, computes intensity deltas, and drives two SG90 servos in a real-time closed loop — keeping the panel perpendicular to sunlight from sunrise to sunset. ...

Arduino Code Car Parking System

 // Created by Simple Circuits  #include <Wire.h>  #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2);    #include <Servo.h>  Servo myservo; int IR1 = 2; int IR2 = 3; int Slot = 4;           //Total number of parking Slots int flag1 = 0; int flag2 = 0; void setup() {   Serial.begin(9600);      lcd.init(); //initialize the lcd     lcd.backlight(); //open the backlight     pinMode(IR1, INPUT); pinMode(IR2, INPUT);    myservo.attach(4); myservo.write(100); lcd.setCursor (0,0); lcd.print("     ARDUINO    "); lcd.setCursor (0,1); lcd.print(" PARKING SYSTEM "); delay (2000); lcd.clear();   } void loop(){  if(digitalRead (IR1) == LOW && flag1==0){ if(Slot>0){flag1=1; if(flag2==0){myservo.write(0); Slot = Slot-1;} }else{ lcd.setCursor (0,0); lcd.print("    SORRY :(    ");   lc...

Arduino Code

 //define Pins #include <Servo.h> Servo servo; int trigPin = 11; int echoPin = 12; // defines variables long duration; int distance; void setup()  {   servo.attach(13);   servo.write(180);  delay(2000);    // Sets the trigPin as an Output pinMode(trigPin, OUTPUT); // Sets the echoPin as an Input  pinMode(echoPin, INPUT); } void loop()  { // Clears the trigPin digitalWrite(trigPin, LOW); delayMicroseconds(2); // Sets the trigPin on HIGH state for 10 micro seconds digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); // Reads the echoPin, returns the sound wave travel time in microseconds duration = pulseIn(echoPin, HIGH); // Calculating the distance distance= duration*0.034/2; // Prints the distance on the Serial Monitor Serial.print("Distance: "); Serial.println(distance); if ( distance <= 25   ) // Change Distance according to Ultrasonic Sensor Placement  { servo.write(180); delay(3000); ...