Automatic car parking system in Atmega32 using ATMEL STUDIO

Automatic Car Parking System in Atmega32

The automatic car parking system controls parking autos with an intelligent microcontroller. The project is controlled by sensors and will display the result on LED.

Video

Moreover, If you want to perform Project automatic car parking system in atmega32. Then, please watch this Video given below

Automobiles are stacked vertically to save space in the automatic parking system (APS). These distinctive systems’ designs make it possible to move cars from the entry to their parking spot.

When a car comes to the parking area, the sensor tells which slot is free or filled. Moreover, the filled or free slot can be represented using a LED light or display on LCD.

In this project, we will design an automatic car parking system using Atmel Studio and will test it in Proteus.

Let us first discuss the components used in our project.

Components of Automatic Car Parking System in Atmega32

The components used in our project are:

  • Atmega32 microchip
  • VCC 5 volt
  • Switch buttons or you can use IR Sensors when performing practically
  • Resistors 10k ohm
  • Ground
  • LEDs
  • RELAY
  • DC generator 12 volts for Relay
  • Transistor 2N3904 for switching

Working on Automatic Car Parking System in Atmega32

In our automatic parking system project, we have a sensor. When a car approaches the parking area, the sensor first detects the vehicle and determines whether the available slot is filled or empty. If the available slot is empty, a green light will be displayed, indicating that the slot is open for parking. Additionally, when a slot is filled, a red light indicates that it is currently booked.

Now, we test our project in proteus.

First, build the project by pressing the F7 key, and opening the code file where you have saved it on your computer. As you can see from the image below, we have four 10k ohm resisters, four switches, green (for Free Slots) and red LED lights (for Filled Slots), and one relay.

When automatic car parking system slots are available

Let’s say there are four parking spaces available for cars, and a car pulls into slot D1. When a car pulls into a parking space, the sensor detects it and sends value 1, which causes the LED light to change from green to red, signaling that the spot is now reserved.

when 1 automatic car parking system slot is filled

Additionally, when a car enters the D4 slot, the sensor will immediately detect the vehicle, turning off the green light and turning on the red light. In this case, the relay is acting as a switch, turning on the green light when the sensor outputs a value of 0. And when the sensor returns value 1, the relay will activate and turn on the red light, indicating that the slot is reserved.

automatic car parking system Multiple slots filled

Code


/*
Propose an Automatic Parking System. Whenever a car enters the parking area, 
system display the available slots on I/O ports. 
*/

.INCLUDE "M32DEF.INC"

CBI DDRA,0
CBI DDRA,1
CBI DDRA,2
CBI DDRA,3

SBI DDRC,0
SBI DDRC,1
SBI DDRC,2
SBI DDRC,3



PARKING1:
SBIS PINA,0
JMP PARKING2
SBI PORTC,0
CALL DelayMEGA
CBI PORTC,0
RJMP PARKING1

PARKING2:
SBIS PINA,1
JMP PARKING3
SBI PORTC,1
CALL DelayMEGA
CBI PORTC,1
RJMP PARKING2

PARKING3:
SBIS PINA,2
JMP PARKING4
SBI PORTC,2
CALL DelayMEGA
CBI PORTC,2
RJMP PARKING3

PARKING4:
SBIS PINA,3
JMP PARKING1
SBI PORTC,3
CALL DelayMEGA
CBI PORTC,3
RJMP PARKING4




DelayMEGA: // function used for delay
ldi R18,byte3(12* 1000 * 100 / 5)
ldi R17,high(12* 1000 * 100 / 5)
ldi R16,low(12* 1000 * 100 / 5)
subi R16,1
sbci R17,0
sbci R18,0
brcc pc-3
ret

I hope you have understood the working of the automatic car parking project.Additionally, If you want to see the project Density Based Traffic Light Control in Atmega32 then visit our website.If you have any queries, you can comment below. Thanks

Leave a Comment

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