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
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:
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 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[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 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.
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
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Design of intelligent solar street light controller based on ATmega88PA
- 【RF】【MADE IN JAPAN】
- Methods and Techniques for Learning Circuit Diagrams (2nd Edition)
- The problem of increasing brackets in single chip computer programming
- lin communication problem
- La la la, sneak peek! The MM32 eMiniBoard is here!
- PD fast charging and QC3.0 fast charging protocol literacy
- MSP430 MCU Development Record (26)
- esp8266 for micropython - Tmall Genie turns on the light
- Can anyone recommend a driver chip that is compatible with TMC2208, or a chip with the same function?