In today’s world, the demand for smart solutions is growing rapidly, especially in urban environments where space and efficiency are critical. One such innovation is the Smart Parking System with Automated Gate Control, designed in 2014 by Nooruddin Mohammed. This system not only optimizes parking space usage but also enhances the user experience by automating the process. In this blog, we’ll dive into how this system works and how it was built using Arduino.
Introduction to Smart Parking Systems
A smart parking system automates the process of managing parking spaces. It counts available spots, controls entry and exit gates, and displays real-time information to users. This system reduces human error, improves efficiency, and ensures that parking facilities are used to their full potential.
Project Overview
The Smart Parking System developed by Nooruddin Mohammed is designed to manage a parking lot with a limited number of spaces. It features automated gate control using a servo motor and a 7-segment display to show the number of available parking spots. The system is intuitive, reliable, and easy to implement.
Hardware Components
The following hardware components are needed to build this smart parking system:
Arduino Uno: The brain of the system, responsible for controlling the entire operation.
Servo Motor: Controls the gate that allows cars to enter or exit the parking lot.
7-Segment Display: Displays the number of available parking spots.
Push Buttons: Used to simulate car entry and exit.
LEDs (Green and Red): Indicate whether the gate is open or closed.
Resistors and Wires: For connections and ensuring correct current flow.
Power Supply: Powers the Arduino and other components.
Software Requirements
The Arduino IDE is used for programming the microcontroller. The code controls the servo motor, reads input from the buttons, and updates the 7-segment display according to the number of available parking spots.
Arduino Code Walkthrough
Here’s a breakdown of the main sections of the Arduino code that powers the Smart Parking System:
Library Inclusions and Pin Definitions:
#include <Servo.h>
#define ServoM 12
#define Bright 11
#define Exit 9
#define In 8
#define green 7
#define red 13
This section includes the Servo library and defines the pins for the servo motor, buttons, and LEDs.
Initialization:
void setup(){
myservo.attach(ServoM);
pinMode(Exit, INPUT);
pinMode(In, INPUT);
digitalWrite(Exit, HIGH);
digitalWrite(In, HIGH);
pinMode(segA,OUTPUT);
pinMode(segB,OUTPUT);
pinMode(segC,OUTPUT);
pinMode(segD,OUTPUT);
pinMode(segE,OUTPUT);
pinMode(segF,OUTPUT);
pinMode(segG,OUTPUT);
pinMode(Bright,OUTPUT);
pinMode(green,OUTPUT);
pinMode(red,OUTPUT);
analogWrite(Bright,255*INTEN/100);
myservo.write(BarLow);
}
The setup() function configures the pin modes, initializes the servo motor, and sets the barrier to its default (low) position.
Handling Car Entry:
if(digitalRead(In)==0)
{
if(Available != 0){
Available--;
myservo.write(BarUp);
delay(3000);
digitalWrite(green,HIGH);
delay(3000);
myservo.write(BarLow);
digitalWrite(red,HIGH);
}
}
When the “IN” button is pressed, the system checks if there are available spots. If there are, it decrements the count, opens the gate, allows the car to pass, and then closes the gate.
Handling Car Exit:
if(digitalRead(Exit)==0)
{
if(Available != CAPACITY){
Available++;
myservo.write(BarUp);
delay(3000);
digitalWrite(green,HIGH);
delay(3000);
myservo.write(BarLow);
digitalWrite(red,HIGH);
}
}
Similar to the entry process, when the “EXIT” button is pressed, the system increments the count of available spots, opens the gate, and then closes it after the car has exited.
Displaying Available Spots:
void Display(int number){
byte segs = ~segments[number];
digitalWrite(segA, bitRead(segs, 0));
digitalWrite(segB, bitRead(segs, 1));
digitalWrite(segC, bitRead(segs, 2));
digitalWrite(segD, bitRead(segs, 3));
digitalWrite(segE, bitRead(segs, 4));
digitalWrite(segF, bitRead(segs, 5));
digitalWrite(segG, bitRead(segs, 6));
}
This function updates the 7-segment display to show the current number of available spots.
Conclusion
The Smart Parking System with Automated Gate Control is a practical and efficient solution for managing parking lots. By utilizing Arduino, servo motors, and a 7-segment display, this system offers an automated and user-friendly way to control parking spaces. Whether you’re looking to implement this in a commercial parking lot or as a personal project, this system is a perfect example of how technology can simplify and enhance everyday tasks.
The project not only showcases the potential of Arduino in smart systems but also highlights the importance of automation in modern infrastructure. With a few tweaks and customizations, this system can be adapted to different environments, making it a versatile solution for parking management.
If you’re interested in creating your own Smart Parking System, feel free to explore the code and components discussed in this blog. Happy building!