Arduino Projects

Car Parking System Using Arduino

Car Parking project using arduino


In this article, we will explore creating a car parking system using an Arduino microcontroller board, an I2C 20×4 LCD, an MG955 servo motor, and an IR sensor. The parking system will help automate the car parking process by providing real-time information and guiding the driver through the parking space. We will discuss the components used, their functionalities, and how they work together to create an efficient parking system.

Components Needed




Link To Buy


Arduino Uno



20x4 LCD Display



IR Sensor



MG995 Servo Motor






Zero PCB



9V Power Supply


Circuit Diagram

  • Connect the VCC and GND pins of the IR sensors to the 5V and GND pins of the Arduino board, respectively.
  • Connect the signal pins of the IR sensors (ir_enter, ir_back, ir_car1 to ir_car4) to any available digital input pins on the Arduino ( pins 2, 4, 5, 6, 7, 8).
  • Connect the signal wire of the servo motor to a digital output pin on the Arduino (pin 3).
  • Connect the SDA and SCL pins of the LCD module to the corresponding SDA and SCL pins on the Arduino (A4 and A5 for most Arduino boards).
  • Connect the VCC and GND pins of the LCD module to the 5V and GND pins of the Arduino board, respectively.

circuit diagram 21

Once the circuit connections are made, you can upload the provided code to the Arduino board using the Arduino IDE. The code initializes the sensors, servo motor, and LCD in the setup() function. The loop() function continuously reads the sensor inputs, updates the LCD, and controls the servo motor based on the sensor readings.

Source Code


GitHub e1697076839430


Setup Function

    • The setup() the function is called once at the beginning of the program.
    • It initializes the serial communication, sets the pin modes for the sensors, attaches the servo motor, and initializes the LCD.
    • The LCD shows introductory messages for a few seconds and then calculates the initial number of available slots.

Loop Function

    • The loop() a function is called repeatedly after the setup() function.
    • It starts by calling the Read_Sensor() function to update the slot occupancy variables (S1, S2, S3, and S4).



  • By integrating an I2C 20×4 LCD, an MG955 servo motor, an IR sensor, and an Arduino, we can create a car parking system that automates the parking process and enhances the overall user experience.
  • With further enhancements, this system can be expanded to handle multiple parking spaces, integrate with mobile applications, or incorporate advanced features like automatic payment systems.

More Arduino Tutorial


Hi, Prateek Here I’m interested in Electronics That's why I Make Soo Many Projects, I’m currently Pursuing M Tech.. if you Relay Like To My Blog Plz Comment Below...Thanks To All Electronics Lover...❤️

One Comment

  1. can you help me with a better circuit diagram of it and also can i connect a led to the servo motor so that it can also act as street light at tolls or the underground parking of malls, societies etc. please! help me with it

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker