Summary of the ATMEL STUDIO Smart Parking Solution Based on Atmega32

This project provides a detailed introduction to an Automatic Parking System (APS) managed by the Atmega32 microcontroller. It uses sensors to detect whether parking spaces are occupied and indicates the status through LED lights—green for available and red for occupied. The system also integrates relays and transistors to control the LED indicators based on sensor inputs. It has been simulated and tested in Proteus, effectively managing four parking spaces and updating occupancy status in real-time to optimize parking space utilization.

Components used in the Automatic Parking System:

·Atmega32 microcontroller chip

·5V VCC power supply

·Switch button or infrared sensor

·10k ohm resistor

·Ground connection

·LEDs (green and red)

·Relay

·12V DC motor for relay operation

·2N3904 transistor

·The intelligent microcontroller is responsible for monitoring the operation of the automatic parking system. This project utilizes sensors to provide real-time feedback through an LED display.

·In the Automatic Parking System (APS), vehicles are stacked vertically to optimize space utilization. The unique system design helps vehicles move from the entrance to designated parking spaces.

·When a car enters the parking lot, the sensors detect available or occupied parking spaces. The status of these spaces is indicated by LED lights or displayed on an LCD screen.

·Our project requires creating the automatic parking system using Atmega32 in Atmel Studio and then testing its functionality in Proteus.

·First, let’s delve into the components used in the project.

·Components of the Atmega32 Automatic Parking System

·The project includes the following components:

·Atmega32 microcontroller chip 5V VCC Switch button or optional infrared sensor (for practical implementation) 10k ohm resistor Ground connection LED Relay for relay operation 12V DC motor for switch operation 2N3904 transistor

·Automatic Parking System based on Atmega32

·In our automatic parking system project, we integrated a sensor. When a vehicle approaches a parking space, the sensor quickly identifies the vehicle and assesses whether the available parking space is occupied. If the parking space is unoccupied, the green light turns on, indicating that there is a space available for parking. Conversely, if the parking space is occupied, the red light turns on, indicating that the space is in use.

·Now, let’s continue testing our project in Proteus.

·First, press the F7 key and access the code file stored on your computer to build the project. As shown in the figure below, the setup includes four 10k ohm resistors, four switches, a green LED (representing free slots), a red LED (representing filled slots), and a relay.

Summary of the ATMEL STUDIO Smart Parking Solution Based on Atmega32

·Assuming there are four vacant parking spaces, and a car occupies space D1. When the vehicle arrives at the parking space, the sensor detects this action and sends a value of 1. Therefore, the LED indicator changes from green to red, indicating that the parking space has been reserved.

Summary of the ATMEL STUDIO Smart Parking Solution Based on Atmega32

Additionally, when a vehicle enters parking space D4, the sensor immediately detects the presence of the vehicle, causing the green light to turn off and the red light to turn on. The relay acts as a switch: when the sensor output reads 0, it triggers the green light. Conversely, when the sensor reads 1, the relay closes, activating the red light, indicating that the parking space has been reserved.

Summary of the ATMEL STUDIO Smart Parking Solution Based on Atmega32

Code Implementation

·/* 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

Welcome to follow us, click the blue text at the top “Embedded Simulation Engineering” or long press to identify the QR code to follow

Summary of the ATMEL STUDIO Smart Parking Solution Based on Atmega32

Leave a Comment