Automatic Car Parking Toll Gate System using Arduino Uno

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Automatic Car

Parking Toll Gate


System using Arduino
Uno
Abstract:
This project implements an Automated car parking toll gate system
using an Arduino Uno, infrared (IR) sensors, and a servo motor to
control the barrier gate. The system detects a car entering or leaving
the parking lot, calculates the parking fee based on the duration, and
opens the barrier upon successful payment. The goal is to streamline
the car parking process, making it more efficient and convenient for
users.

1. Introduction:
With the increasing number of vehicles on the road, managing
parking lots efficiently has become a significant challenge. Traditional
parking systems require human intervention for ticketing and
payment, which can be time-consuming and prone to errors. The
automatic car parking toll gate system eliminates manual work,
automating the process of vehicle detection, fee calculation, and
access control. The system can be scaled for real-time parking
management in public or private parking areas.

2. Objectives:
 To design an automated car parking system that detects a car's
entry and exit.
 To calculate the parking fee based on the time spent in the
parking lot.
 To control the opening and closing of the parking gate using a
servo motor.
 To provide a user-friendly display interface for fee calculation
and payment.
3. Materials and Components:
1. Arduino Uno - The microcontroller to control the entire system.
2. IR Sensors (Infrared Sensors) - To detect the presence of
vehicles at the entry and exit gates.
3. Servo Motor - To operate the parking gate.
4. Real-Time Clock (RTC) Module - To keep track of the parking
time.
5. Relay Module - To control the servo motor that opens and
closes the gate.
6. Jumper Wires and Breadboard - For connecting components.
7. Power Supply - To power the Arduino and peripherals.

4. Circuit Connection:
 Ultrasonic sensor ------- Arduino
Trigger pin -------- Digital pin 6
Echo pin -------- Digital pin 7
Vcc -------- 5v
GND -------- GND
 Servo motor
Control signal of servo motor (ORANGE) ----- Digital pin Number 9 of
Arduino
Vcc of servo motor (RED) ----- 5v of Arduino
Servo motor (BLACK) ------ GND of Arduino

 PROGRAM
#include <Servo.h>

Servo myservo;

int pos = 0;

int cm = 0;

long readUltrasonicDistance(int triggerPin, int echoPin)


{
pinMode(triggerPin, OUTPUT);
digitalWrite(triggerPin, LOW);
delayMicroseconds(2);
digitalWrite(triggerPin, HIGH);
delayMicroseconds(10);
digitalWrite(triggerPin, LOW);
pinMode(echoPin, INPUT);
return pulseIn(echoPin, HIGH);
}
void setup() {
digitalWrite(12,LOW);
myservo.attach(9);
Serial.begin(9600);
}
void loop() {
cm = 0.01723 * readUltrasonicDistance(6, 7);

if(cm<30){
Serial.print(cm);
Serial.println("cm");

for (pos = 0; pos <= 120; pos += 1) {


myservo.write(pos);
delay(15);
}
delay(500);
for (pos = 120; pos >= 0; pos -= 1) {
myservo.write(pos);
delay(15);
}
delay(5000); //add delay how much you want
}
}

5. System Design and Working:


5.1 Entry Detection:
The system uses an IR sensor at the entrance of the parking lot.
When a car passes through the sensor, the Arduino detects the car's
presence and records the entry time via the RTC module. The system
displays a "Car Entered" message on the LCD screen and sets the
parking fee to zero.
5.2 Exit Detection:
At the exit, another IR sensor detects when a car is leaving the
parking lot. The Arduino calculates the total parking time by
comparing the entry and exit timestamps from the RTC module. The
fee is calculated based on the parking time
5.3
The parking fee is calculated based on the duration a car was parked.
If the car was parked for a few minutes, the fee is calculated
accordingly, and if it was parked for an extended period, the fee
increases proportionally.
5.4 Payment Process:
The system can simulate a manual payment process. Once the car is
ready to leave, the LCD shows the calculated fee. The driver can press
the push button to simulate a successful payment. If the payment is
successful, a confirmation message is shown, and the parking gate is
opened using a servo motor.
5.5 Gate Operation:
The servo motor is controlled by the Arduino and opens the gate
once the payment is confirmed. If the payment is not made, the gate
will remain closed, and the buzzer will sound an error signal.

Results: The automatic car parking toll gate system was successfully
implemented using Arduino. The ultrasonic sensor reliably detected
vehicles, and the servo motor operated the gate smoothly. The RFID
reader identified vehicles and displayed the toll fee on an LCD screen.
The gate opened and closed as expected based on vehicle detection,
and the toll fee was shown on the screen. However, challenges such
as sensor calibration and limited payment integration (just display of
fees) were encountered.
Conclusion: The project demonstrated the feasibility of using Arduino
for automating parking toll gates, successfully integrating vehicle
detection, gate control, and toll fee display. Future improvements
could include advanced payment methods, better vehicle detection,
and stronger motors for higher traffic. This system has great potential
for practical applications in parking facilities and could be further
enhanced for scalability and efficiency.
Index
1. Abstract

2. Introduction

3. Objectives

4. Materials and Components

5. Circuit Diagram and Connection

6. System Design and Working


7. Arduino Code Explanation

8. Testing and Results

9. Challenges and Solutions

10. Future Improvements

11. Conclusion

You might also like