Automated Parking

Introduction

For the project of Microprocessor Architecture, i have made a automated parking. It count the number of car inside it, print the number on a screen and open the gate automaticly. It really usefull to understand how works all the parking you see everyday around you. }

Overview

Block Diagram of the project :

Hardware Design

To create this project, i used an Arduino Uno R3, 5 HC-SR04 Ultrasonic Sensors, 2 SG90 Micro Servo Motors, a 1602 LCD with I2C Interface, 4 Infrared Obstacle Sensors and wires

Software Design

The project is suppose to detect a car at the entrance or exit and open the coresponding gate and verify the number of parking place availible for printing the result into the LCD screen. The detection for the gate are made with the infrared obstacle sensor who send back an high level when an obstacle is detected. If there is a car detected, we open the gate and keep it open until the two sensor stop sending high level. For the parking place, those check the distance of object in front of it so if a value is small enough then the parking place is taken. The LCD screen print the result with some text. I'm using libraries to help me with my code in the arduino program.

This libraries are Ultrasonic.h, Wire.h, LiquidCrystal_I2C.h and Servo.h.

Ultrasonic is used to define verible for the ultrasonic sensor and ease to recuperate the data form them. LiquidCrystal_I2C help to configurate the LCD screen by I2C and add method to clear and print string on it. Meanwhile, Servo does the same than Ultrasonic but for servomotors.

To ease the connection of the arduino, i'm defining each pin for their use : all the pin between 2 and 9 are use by the Ultrasonic sensor and those between 11 and 14 are for IR sensor. For the LCD screen, it need to be connected on SDA and SCL on the pin A4 and A5 while i define A2 and A3 for the entry and exit servo.

Then comes the setup where i define the data rate.

Serial.begin(9600);

I initialise the LCD screen, i add a backlight to it to ease the reading on it. For the IR sensor, i place the pin in Input mode to recieve the data. And for the servo, i use the .attach() methods to create the variable Entrance_servo and Exit_servo with the pin, the minimum and maximum as parameters.

Entrance_servo.attach(EntryServo, 1000, 2000);

For the loop, i just called function i created to split the diffrent part of the project. We can find UltrasonicDistance that recuperate the distance for the sensors.

void UltrasonicDistance()

PlaceUpdate that compare the distance with the integer cm to see if a place is taken.

void PlaceUpdate()

LCDUpdate that do as it said (it update the screen).

void LCDUpdate()

IRUpdate that check the Ir sensor and store their state.

void IRUpdate()

DoorEntryCheck and DoorExitCheck that move the servo based on the state of infrared sensor.

void DoorEntryCheck()

void DoorExitCheck()

Results Obtained

The project worked as espected, the gate open when corresponding IR sensors are detecting an obstacle. The LCD screen is printing the number of place availible in the parking and change when the Ultrasonic sensor detect a car in the place. But it seems that the IR sensor have some problem detecting.

Conclusions

This project was my first of that kind and also a great experience. It made me put in use what i have learned during the laboratories while fixing the problem that appear during this one.

Download

Log

25/04/2022 - Selection of theme

04/05/2022 - Order of parts

05/05/2022 - Creation of ocw page

11/05/2022 - Arrival of parts

18/05/2022 - Update of scheme

24/05/2022 - Recieve of missing part / finish of the branching the project

26/05/2022 - Update of ocw page

Bibliography / Resources

pm/prj2022/apredescu/automatedparking.txt · Last modified: 2022/05/27 10:06 by mathis.vaugeois
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0