Smart parking system solution implemented by single chip microcomputer

Publisher:雅致小筑Latest update time:2012-03-08 Source: 21IC Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction

As the number of cars in China increases dramatically year by year, the number of parking spaces and parking lots cannot keep up with the pace of growth. More and more people are worried about how to park. An effective intelligent parking system can not only help drivers complete parking operations quickly and safely, thereby reducing the burden on drivers and reducing traffic accidents, but also effectively improve the intelligence of cars and increase the added value of cars, thereby bringing huge economic benefits. Using the AT89C52 microcontroller as the main controller of the car, on the basis of the controller, photoelectric obstacle avoidance circuit, speed measurement circuit, light source guidance circuit and motor drive circuit are added to realize the design of the intelligent parking system. The system has a simple structure and low cost, and has achieved the expected results in the laboratory, enabling the car to enter the designated parking space.

1 Working principle and function of the system

The intelligent parking system can be divided into a control part and a signal detection part.

The signal detection part includes an obstacle detection module, a light source detection module and a speed detection module; the control part includes a controller module and a motor control module. The basic module block diagram of the intelligent parking system is shown in Figure 1.



Figure 1 Basic block diagram of the intelligent parking system

Figure 1 Basic block diagram of the intelligent parking system

The working principle of the system is as follows: after the car starts, the speed of the car is detected by the Hall sensor A44E, and the car is intelligently limited in speed. During the movement of the car, the infrared photoelectric sensor is used to avoid obstacles. The garage system sends a light source indication signal, and the phototransistor receives the garage indication information, so that the car stops after arriving at the designated garage.

1.1 Design of the minimum system of the single-chip

microcomputer AT89C52 is a type of 51 series single-chip microcomputer. It is a low-power, high-performance, CMOS 8-bit single-chip microcomputer. It contains 8KB of repeatedly erasable FLASH read-only program memory and 256B of random access data memory (RAM). It is produced by ATMEL using high-density, non-volatile storage technology, compatible with the standard MCS-51 instruction system, with a built-in general-purpose 8-bit central processor and FLASH storage unit, and a ROM/EPROM on the chip. Therefore, the minimum system composed of this chip is simple and reliable. As long as the single-chip microcomputer is connected to the clock circuit and reset circuit, it can be used.

1.2 Obstacle avoidance circuit design

Infrared photoelectric sensors have many characteristics such as non-contact, fast response, reliable performance, small size, and easy installation. Therefore, they are widely used in industrial automation devices and smart cars. The photoelectric obstacle avoidance sensor used in this design is HS0038B. The working principle of the infrared photoelectric receiving circuit is: when a pulse modulation signal with a carrier frequency of 38kHz is received, first, the infrared sensitive element in HS0038B converts the pulse modulated infrared light signal into an electrical signal, which is then amplified by the preamplifier and automatic gain control circuit, and then filtered by a bandpass filter. The filtered signal is demodulated by the demodulation circuit, and finally reversely amplified by the output circuit and outputs a low level; when the carrier signal is not received, the circuit outputs a high level. The infrared transmitting circuit generates a square wave by the 555 timing circuit to modulate the infrared transmitting tube.

1.3 A44E speed measurement circuit design

The main function of the Hall sensor A44E in the speed measurement system is to collect wheel speed. Every time the wheel rotates one circle, the magnet passes through A44E once, and the third foot of A44E outputs a pulse signal. The period of the pulse signal has the following relationship with the speed of the motor:

http://www.elecfans.com/uploads/allimg/120301/10513K949-1.jpg

Where: n is the motor speed; P is the number of pulses of the motor rotating one circle; T is the period of the output square wave signal.

The pulse signal is input from the P3.2 port as the external interrupt signal of the single-chip microcomputer AT89C52.

1.4 Motor drive circuit design

The action execution unit is the two deceleration DC motors that drive the left and right wheels of the car. Controlling their speed controls the motion state of the car. However, the control signal sent by the action control unit is very weak and cannot directly drive the DC motor. It must be matched with a reasonably designed drive circuit. The commonly used drive circuit is the H bridge. During the design process, it was found that due to the non-uniform conduction and shutdown time of the transistor, the H bridge built with the transistor often has a micro short circuit when the motor current is commutated, which makes the transistor heat up very seriously, and the power supply of the entire circuit fluctuates greatly, which consumes a lot of power. Therefore, this design finally uses the integrated H bridge L298. In addition, during the design process, it was found that the reverse electromotive force generated by the rotation of the motor would seriously affect the output state of the sensor, send the wrong path information to the processor, and cause the car to often produce wrong actions. Therefore, this design uses dual power supply, that is, the sensor and the chip share a set of power supplies, and the motor uses a dedicated set of power supplies. The transmission of the intermediate signal uses a 4N25 optocoupler circuit for electrical isolation.

1.5 Light source guidance circuit design

This design uses photosensitive transistors as light source detection sensors because their photosensitive voltage changes significantly (the voltage value changes between 60 and 100mV) and is cheap. The light source guidance module needs to install 3 photosensitive transistors in front of the car, and guide the car to the designated garage to park through the light source signal emitted by the garage. LM324 is used as the core amplifier of the light source guidance module to amplify the signal. [page]

1.6 Parking lot system design

In order to better complete the car's obstacle avoidance, light source guidance and storage process, the parking lot system design is also very important. The parking lot system design diagram is shown in Figure 2.


Figure 2

Figure 2 Parking system design


2 Software Design

The system software design is carried out in the Keil C51 integrated development environment. The software mainly includes the system main program, obstacle avoidance subroutine, light source guidance subroutine and speed measurement and speed limit subroutine. The overall process of the parking system is shown in Figure 3, and the obstacle avoidance program flow chart and light source guidance program flow chart are shown in Figure 4 and Figure 5 respectively. The software design idea of ​​the speed measurement and speed limit circuit is to convert the time of each circle into speed, and then compare it with the set speed. If the measured speed is greater than the set value, the motor is controlled to decelerate to the set value; if the measured speed is less than the set value, the motor is controlled to accelerate to the set value to complete the intelligent speed limit of the car.



Figure 3

Figure 3 Overall flow chart of the intelligent parking system[page]



3 Test and connection of each

module Connection of each module: The left turn input terminal of the trolley servo is connected to P3.4; the right turn input terminal of the trolley servo is connected to P3.5; the forward input terminal of the trolley drive motor is connected to P3.6; the backward input terminal of the trolley drive motor is connected to P3.7; the left sensor output terminal of the photoelectric obstacle avoidance module is connected to P1.0; the right sensor output terminal of the photoelectric obstacle avoidance module is connected to P1.1; the left sensor output terminal of the light source guidance module is connected to P1.2; the middle sensor output terminal of the light source guidance module is connected to P1.3; the right sensor output terminal of the light source guidance module is connected to P1.4.

Overall test of the trolley: put the trolley at the entrance of the parking lot, turn on the power of the trolley, turn on the power of the light source corresponding to the garage position in the garage, the trolley avoids obstacles and passes through the downhill area of ​​the parking lot, arrives in front of the designated garage, relies on the light source to guide into the garage, and parks.



 Figure 4 Obstacle avoidance program flow chart

Figure 4 Obstacle avoidance program flow chart

Figure 5 Flowchart of light source guidance program

Figure 5 Light source guidance program flow chart


4 Conclusion

The intelligent parking system designed in this paper can realize the function of the car automatically driving into the designated parking space in the laboratory. The car is parked at the entrance of the parking lot, and then the owner can leave the car. At this time, the car can lead the car into the parking lot according to the vehicle induction signal (light source guidance signal) in the parking lot, thus realizing the automatic parking process.

Keywords:MCU Reference address:Smart parking system solution implemented by single chip microcomputer

Previous article:Development of CAN bus distributed measurement and control system based on single chip microcomputer
Next article:Implementation of ASM5 calling C51 function without parameters

Recommended ReadingLatest update time:2024-11-16 19:28

How MCUs Improve System Performance in Robotic Motor Control Designs
Systems automate repetitive tasks, undertake complex and laborious operations, and work in environments that are dangerous or harmful to humans. Higher levels of integration and performance () enable greater power efficiency, smoother and safer motion, and higher precision, leading to increased productivity and auto
[robot]
Design of 16×16LED Chinese Character Matrix Scrolling Display Based on AT89C51 Single Chip Microcomputer
    LED display is a flat display screen composed of light-emitting diode dot matrix modules or pixel units. It has the advantages of high luminous efficiency, long service life, flexible configuration, rich colors and strong adaptability to indoor and outdoor environments. It is widely used for information release an
[Microcontroller]
Design of 16×16LED Chinese Character Matrix Scrolling Display Based on AT89C51 Single Chip Microcomputer
8051 MCU serial port baud rate calculation method
The STC12C5A60S2 microcontroller is compatible with the 80C51 microcontroller. Its serial port baud rate can be generated by a timer or an independent baud rate generator. Its baud rate mode can be fixed or variable. Fixed baud rate: When the communication speed setting bit UART_M0x6/AUXR.5 of mode 0 = 0, its baud r
[Microcontroller]
[51 microcontroller] STC89C52 lights up the LED light, including C code (2)
1. Reference tutorial: Qingxiang 51 microcontroller tutorial 2. Basic principles: By controlling the high and low electric frequency of the right output terminal, the light can be turned on and off. The voltage on the left side of the lamp is 5V, and if the right side is given logic 0 (0V), there is a voltage differen
[Microcontroller]
[51 microcontroller] STC89C52 lights up the LED light, including C code (2)
8051 MCU (STC89C52) two countdown timers asynchronous counting
#include STC89C5xRC.H   void delay() //Use timer 0 to achieve 5ms precise timing { TMOD = 0x01; TH0 = 0xEA; TL0 = 0x84; //65536 - 5000 = 60036   TF0 = 0; //Set the overflow flag to 0 TR0 = 1; //Start timer 0 while(TF0 == 0); TR0 = 0; // Pause timer 0 }   void disp_digit(int d, int r) { unsigned ch
[Microcontroller]
8051 MCU (STC89C52) two countdown timers asynchronous counting
Design Example of Intelligent Battery Charging Manager Using PIC Microcontroller
In order to automatically cut off the power after the battery is fully charged, a dedicated battery charging manager is designed using the PIC microcontroller. The manager has the function of self-learning, intelligently memorizing the full charge status of the battery, and can adapt to various existing battery charge
[Power Management]
Design Example of Intelligent Battery Charging Manager Using PIC Microcontroller
Design method of single chip computer password lock to prevent multiple password attempts
This paper proposes a design scheme of a single-chip microcomputer-based password lock which can prevent multiple password attempts. According to the user's 10 general requirements, the hardware circuit and software program of the single-chip microcomputer password lock are given. At the same time, the selection of si
[Microcontroller]
Design method of single chip computer password lock to prevent multiple password attempts
Application of single chip microcomputer in crane working condition safety monitoring system
Truck cranes are easy to move and convenient, so they are widely used. Although the operation is simple, the working conditions are very complicated. Operators often find it difficult to find potential dangers, and the safety production situation is very severe, especially for truck-mounted mobile cranes, which ofte
[Industrial Control]
Application of single chip microcomputer in crane working condition safety monitoring system
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号