Design of software and hardware circuits of intelligent parking system using AT89C52 microcontroller

Publisher:SereneSoul55Latest update time:2023-09-25 Source: elecfansKeywords:AT89C52 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

As the number of cars in our country increases sharply 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 become more proficient in car parking technology, which increases people's stress outside of work and reduces people's quality of life. Therefore, how to solve the inconvenience during parking, eliminate safety hazards, and quickly, accurately and safely park the car in the appropriate location 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 block diagram of the basic module of the intelligent parking system is shown in Figure 1.

Design of software and hardware circuits of intelligent parking system using AT89C52 microcontroller

Figure 1 Basic block diagram of intelligent parking system

The working principle of the system is as follows: after the car is started, the speed of the car is detected through the Hall sensor A44E, and the car is intelligently limited. The car avoids obstacles through the infrared photoelectric sensor while the car is traveling. The garage system sends a light source indication signal, and the photosensitive transistor receives the garage signal. Instruction information to park the car after arriving at the designated garage.

1.1 Minimum system design of microcontroller

AT89C52 is a type of 51 series microcontroller. It is a low-power, high-performance, CMOS 8-bit microcontroller. It contains 8KB of rewritable FLASH read-only program memory and 256B of random access data memory (RAM). Produced by ATMEL company using high-density, non-volatile storage technology, it is compatible with the standard MCS-51 instruction system. It has a built-in general-purpose 8-bit central processor and FLASH storage unit, and there is ROM/EPROM on the chip. Therefore, this chip consists of The minimum system is simple and reliable, as long as the microcontroller is connected 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 light 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 modulated signal with a carrier frequency of 38kHz, first, the infrared sensitive element in HS0038B converts the pulse modulated infrared light signal into electrical The signal is then amplified by the preamplifier and automatic gain control circuit, and then filtered by the band-pass filter. The filtered signal is demodulated by the demodulation circuit, and finally the output circuit reversely amplifies and outputs a low level. ; When no carrier signal is received, the circuit outputs high level. The infrared transmitting circuit uses a 555 timing circuit to generate a square wave 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 once, the magnet passes through the A44E once, and the third pin of the A44E outputs a pulse signal. The period of the pulse signal has the following relationship with the motor speed:

Design of software and hardware circuits of intelligent parking system using AT89C52 microcontroller

In the formula: n is the motor speed; P is the number of pulses for one revolution of the motor; 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 the P3.2 port.

1.4 Motor drive circuit design

The action execution unit is two decelerated DC motors that drive 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 H bridge. During the design process, it was discovered that due to the inconsistent turn-on and turn-off times of the triodes, the H-bridge built with triodes often experienced micro-short circuits when the motor current was commutating, causing serious heating of the triodes and causing great fluctuations in the power supply of the entire circuit. , very power-consuming. Therefore, this design finally adopted 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, sending erroneous path information to the processor, causing the car to frequently An error occurs. Therefore, this design uses a dual power supply, that is, the sensor and the chip share a set of power supplies, and the motor has a dedicated power supply. The transmission of the intermediate signal uses a 4N25 optocoupler circuit for electrical isolation.

1.5 Light source guidance circuit design

This design uses a phototransistor as the light source detection sensor because its photosensitive voltage changes significantly (the voltage value changes around 60~100mV) and is cheap. The light source guidance module needs to install three photosensitive transistors in front of the car. It 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 component of the light source guidance module to amplify the signal.

1.6 Parking lot system design

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

Design of software and hardware circuits of intelligent parking system using AT89C52 microcontroller

Figure 2 Parking lot system design diagram

2 Software design

System software design is carried out under the Keil C51 integrated development environment. The software mainly includes the system main program, obstacle avoidance subprogram, light source guidance subprogram and speed measurement and speed limiting subprogram, etc. The overall process of the parking system is shown in Figure 3, and the flow chart of the obstacle avoidance program and the light source guidance program are shown in Figures 4 and 5 respectively. The design idea of ​​the speed measurement and speed limit circuit software is to convert the time of each lap 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 value, the motor is controlled to accelerate to the set value and the intelligent speed limit of the car is completed.

Design of software and hardware circuits of intelligent parking system using AT89C52 microcontroller

Figure 3 Overall flow chart of the intelligent parking system

3. Testing and connection of 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, and turn on the light source power supply corresponding to the garage position in the garage. The car avoids obstacles and passes through the downhill area of ​​the parking lot, reaches the front of the designated garage, relies on the light source to guide it into the garage, and parks. .

Design of software and hardware circuits of intelligent parking system using AT89C52 microcontroller

Figure 4 Obstacle avoidance program flow chart

Design of software and hardware circuits of intelligent parking system using AT89C52 microcontroller

Figure 5 Light source guidance program flow chart


4 Conclusion

The intelligent parking system designed in this article can realize the function of automatically driving a car into a designated parking space in the laboratory. Park the car at the entrance of the parking lot, and then the car 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, thereby realizing the automatic parking process.


Keywords:AT89C52 Reference address:Design of software and hardware circuits of intelligent parking system using AT89C52 microcontroller

Previous article:Design of digital capacitance meter using AT89C2051 microcontroller
Next article:Detailed explanation of the internal system structure and functions of STC89C52RC microcontroller

Recommended ReadingLatest update time:2024-11-16 11:50

Design of an Intelligent Power Supply Monitoring System
  0 Preface   UPS power supply system is an essential power supply for power, communication, banking and other industries. It has a history of several decades since its creation. In the process of continuous development and improvement of technology, its protection function is also constantly changing. UPS can be di
[Microcontroller]
Design of an Intelligent Power Supply Monitoring System
Design of robot toy control system using magnetoresistive sensor and AT89C52 microcontroller
The chip only completes the main operations related to communication, computing, etc. When there is no operation, it is maintained by the operating system uClinux running on it. The maintenance and control of all peripheral devices unrelated to the core calculation, control, communication and operation of the EZ328 ar
[Microcontroller]
Design of robot toy control system using magnetoresistive sensor and AT89C52 microcontroller
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号