“This paper mainly describes the realization of intelligent parking system with 51 single chip microcomputer. The intelligent parking system can realize the function of automatically driving the car into the designated parking space in the laboratory. Park the car at the entrance of the parking lot, and then the owner can leave the car. At this time, the car can introduce the car into the parking lot according to the vehicle guidance signal (light source guidance signal) in the parking lot, so as to realize the automatic parking process.
This paper mainly describes the realization of intelligent parking system with 51 single chip microcomputer. The intelligent parking system can realize the function of automatically driving the car into the designated parking space in the laboratory. Park the car at the entrance of the parking lot, and then the owner can leave the car. At this time, the car can introduce the car into the parking lot according to the vehicle guidance signal (light source guidance signal) in the parking lot, so as to realize the automatic parking process.
With the rapid increase in the number of cars in my country year by year, the number of parking spaces and parking lots cannot keep up with the pace of its growth, and more and more people worry about how to park. The increasingly crowded parking environment requires people to be more proficient in car parking technology, which makes people more nervous outside of work and reduces people’s quality of life. Therefore, how to solve the inconvenience in the parking process, eliminate potential safety hazards, and park the car to a suitable location quickly, accurately and safely has gradually attracted people’s attention.
1. The 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 intelligent parking system
The working principle of the system is as follows: After the car is started, the speed of the car is detected by the Hall sensor A44E, and the speed of the car is intelligently limited. The infrared photoelectric sensor is used to avoid obstacles during the car’s travel. The garage system sends the light source indication signal, and the phototransistor receives the garage. Instructions to make the car park after reaching the designated garage.
1.1 Minimal system design of single chip microcomputer
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 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, compatible with standard MCS-51 instruction system, built-in general-purpose 8-bit central processing unit and FLASH storage unit, on-chip ROM/EPROM, therefore, this chip is composed of The minimum system is simple and reliable, as long as the microcontroller is connected to the clock circuit and the reset circuit.
1.2 Design of obstacle avoidance circuit
Infrared photoelectric sensors have many characteristics such as non-contact, fast response, reliable performance, small size, and easy installation, so 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 modulation infrared light signal into electrical The signal is then amplified by the preamplifier and the automatic gain control circuit, and then filtered by the band-pass filter. The filtered signal is demodulated by the demodulation circuit, and finally reverse amplified by the output circuit and output a low level. ; When the carrier signal is not received, the circuit outputs a high level. Infrared transmitting circuit generates square wave by 555 timing circuit, modulates 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 the wheel speed. Every time the wheel rotates, 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 speed of the motor:
In the formula: n is the speed of the motor; P is the number of pulses in 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 single-chip 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 trolley, and by controlling their rotational speeds, the motion state of the trolley 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 turn-on and turn-off times of the triodes, the H-bridge built with triodes often occurs micro-short circuits when the motor current is commutated, which makes the triode heating very serious, and the power supply of the entire circuit fluctuates greatly. , very power-hungry. Therefore, the design finally adopts the integrated H-bridge L298. In addition, in the design process, it is found that the back electromotive force generated by the motor rotation will seriously affect the output state of the sensor, and send the wrong path information to the processor, causing the car to often An error action occurs. Therefore, this design uses a dual power supply, that is, the sensor and the chip share a set of power supplies, and a set of power supplies is dedicated to the motor. The transmission of the intermediate signal uses a 4N25 optocoupler circuit for electrical isolation.
1.5 Light source guide circuit design
This design uses a phototransistor as the light source detection sensor, because its photosensitive voltage changes obviously (the voltage value changes around 60~100mV), and the price is cheap. The light source guide module needs to install 3 phototransistors in front of the car, and guide the car to the designated garage for parking through the light source signal sent by the garage, and use LM324 as the core amplifier of the light source guide module to amplify the signal.
1.6 Design of parking lot system
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 design of the parking lot system is shown in Figure 2.
Figure 2 Design of parking lot system
2. Software design
The system software design is carried out under the Keil C51 integrated development environment. The software mainly includes system main program, obstacle avoidance subroutine, light source guidance subroutine and speed measurement and speed limit subroutine. The overall flow of the parking system is shown in Figure 3, and the flow chart of the obstacle avoidance procedure and the flow chart of the light source guidance procedure are shown in Figure 4 and Figure 5, respectively. The design idea of the speed-limiting circuit software is to convert the time of each lap into the speed, and then compare it with the set speed. If the measured speed is greater than the set value, control the motor to decelerate to the set value; if the measured speed is less than the set value value, then control the motor 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. Module test
3.1 Connection between modules
The left turn input terminal of the trolley steering gear is connected to P3.4; the right turn input terminal of the trolley steering gear 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 photoelectric obstacle avoidance module The output terminal of the left sensor is connected to P1.0; the output terminal of the right sensor of the photoelectric obstacle avoidance module is connected to P1.1; the output terminal of the left sensor of the light source guide module is connected to P1.2; the output terminal of the middle sensor of the light source guide module is connected to P1.3; The sensor output terminal is connected to P1.4.
3.2 Functional Test
Put the car at the entrance of the parking lot, turn on the power of the car, and turn on the power of the light source in the garage corresponding to the position of the garage. The car avoids obstacles and passes through the downhill area of the parking lot to the front of the designated garage.
Figure 4 Flowchart of obstacle avoidance procedure
Figure 5 Flow chart of light source bootstrap program