Design of intelligent parking system based on single chip microcomputer

Publisher:blazingsLatest update time:2012-03-02 Source: 现代电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Abstract: 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, thus bringing huge economic benefits. Using the AT89C52 single-chip microcomputer as the main controller of the car, on the basis of this controller, photoelectric obstacle avoidance circuit, speed measurement circuit, light source guidance circuit and motor drive circuit are added to realize the design of intelligent parking system. The system has a simple structure and low cost, and has achieved the expected effect in the laboratory, which can enable the car to enter the designated parking space.

0 Introduction

As the number of cars in my country 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. The increasingly crowded parking environment requires people to be more proficient in parking skills, which aggravates people's tension outside of work and reduces their quality of life. Therefore, how to solve the inconvenience of parking, eliminate safety hazards, and park the car in a suitable position quickly, accurately and safely has gradually attracted people's attention.

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 obstacle detection module, light source detection module and speed detection module; the control part includes controller module and 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

The working principle of the system is as follows: after the car starts, the speed of the car is detected through the Hall sensor A44E, and the speed of the car is intelligently limited. 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 MCU Minimum System Design

AT89C52 is a kind 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 and is compatible with the standard MCS-51 instruction system. It has a built-in general-purpose 8-bit central processing unit and FLASH storage unit, as well as ROM/EPROM. Therefore, the minimum system composed of this chip is simple and reliable. Just connect the single-chip microcomputer to the clock circuit and reset circuit.

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 receiving a pulse modulation signal with a carrier frequency of 38kHz, 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 motor speed:

Where: n is the motor speed; P is the number of pulses per motor rotation; T is the period of the output square wave signal.

The pulse signal is used as the external interrupt signal of the microcontroller AT89C52 and is input from port P3.2.

1.4 Motor drive circuit design

The action execution unit is two deceleration DC motors driving the left and right wheels of the car. By controlling their speed, the motion state of the car is controlled. 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 transistors often has a micro short circuit when the motor current is commutated, which makes the transistor heating phenomenon very serious. The power supply of the entire circuit fluctuates greatly and 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 will 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, the motor uses a dedicated set of power supplies, and the transmission of the intermediate signal uses a 4N25 optocoupler circuit for electrical isolation.

1.5 Light source guidance circuit design

This design uses phototransistors as light source detection sensors because their light-sensitive voltage changes significantly (voltage value changes are around 60~100mV) and they are cheap. The light source guidance module requires the installation of three phototransistors in front of the car, and uses the light source signal from the garage to guide the car to the designated garage for parking. LM324 is used as the core amplifier of the light source guidance module to amplify the signal.

1.6 Parking system design

In order to better complete the process of car obstacle avoidance, light source guidance and storage, the parking system design is also very important. The parking system design diagram is shown in 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 Overall flow chart of the intelligent parking system

3. Test and connect each module

Connections of each module: the left turn input terminal of the car servo is connected to P3.4; the right turn input terminal of the car servo is connected to P3.5; the forward input terminal of the car drive motor is connected to P3.6; the backward input terminal of the car 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 car: place the car at the entrance of the parking lot, turn on the power of the car, turn on the power of the light source corresponding to the garage position in the garage, and the car will avoid obstacles and pass through the downhill area of ​​the parking lot. When it arrives in front of the designated garage, it will be guided into the garage by the light source and park.

Figure 4 Obstacle avoidance program flow chart

Figure 5 Flowchart of light source guidance program

4 Conclusion

The intelligent parking system designed in this paper can realize the function of automatically driving a car into a 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.


Reference address:Design of intelligent parking system based on single chip microcomputer

Previous article:Analysis of the analog front-end circuit AD8283 that completely changes the design of automotive radar
Next article:High-Performance Vehicle Computer Design Guide

Latest Automotive Electronics Articles
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号