Abstract: Using embedded technology and image processing technology, a multi-functional smart car based on MC9S12XS128 single-chip microcomputer is designed and manufactured. The smart car can make autonomous route selection on the road surface containing the cornice. After reaching the end point, the intersection selection scheme, travel distance, travel time, and travel speed are displayed on the display. The system detects the road surface information through the CMOS camera OV5116, uses the comparator to perform hardware binarization of the image for road surface recognition, detects the real-time speed of the smart car through the photoelectric encoder, and adjusts the rotational speed of the driving motor and the steering servo using the PID control algorithm. The angle achieves closed-loop control of the speed and direction of movement of the smart car. The circuit structure of the whole system is simple, low in cost and high in reliability. After actual testing, all indicators of smart cars have reached the expected design goals.
This article refers to the address: http://
Smart car is a combination of intelligent system and automobile industry. It is a comprehensive system integrating computer, sensor, automatic control and artificial intelligence. It plays an increasingly important role in ensuring driving safety, improving driving experience, energy saving and environmental protection. As the development direction of the future automotive industry, its development is bound to promote the development of other industries, and to a certain extent represents a country's level of intelligent control.
The intelligent car system has many similarities with the intelligent car system in environment perception, data processing, control strategy and system construction. It can provide a safe path for scientific research and disaster relief, and can also be used for military detection, moving target tracking and early warning, etc. in the future. aspect. The research of smart car systems can promote the smart car industry to develop faster and better.
In this paper, the modules of the smart car are analyzed in depth. From the general overview of the system, hardware design, software design, etc., the design method of the smart car with the camera as the sensor is introduced: on the basis of the existing car model, by adding the camera The colony detector and the comparator realize real-time measurement of the speed, position and running condition of the trolley, and transmit the measurement data to the single-chip microcomputer for processing, and then implement intelligent control on the trolley through the single-chip microcomputer, and finally realize the autonomous traveling function of the trolley.
1 Overall overview of the system
The overall working mode of the smart car system is: using CMOS image sensor to capture the road image, output the image signal of PAL system, using LM1881 chip to separate the control signals, get the line and field synchronization signals, and then according to the given threshold, through the comparator Hardware image binarization; image signal, field sync signal, and line sync signal are input to the MC9S12XS128 MCU, and the main road information is obtained through algorithm optimization; the vehicle speed is detected by the photoelectric encoder, and the pulse is calculated by the counter of the MC9S12XS128 MCU. The speed and the distance are obtained; the steering angle of the steering gear and the rotational speed of the motor are obtained according to the road information and the speed information, and the control signals obtained after the decision are output to the steering gear and the motor to control the traveling of the trolley. In addition, through the LED display screen to show the driving state of the car, use the button to fine-tune the various modules of the car, the system structure is shown in Figure 1.
2 system hardware design
The smart car takes the MC9S12XS128 processor as the core, obtains the travel path through the CMOS analog camera OV5116, extracts the road information, generates the control amount according to the deviation between the attitude of the car and the road, controls the steering gear to turn, and the encoder feeds the motor speed in real time. To make the speed control more precise and achieve better control of the car. The hardware design of this system mainly includes the following four modules.
2.1 Image Acquisition Module
The camera has two kinds of CCD and CMOS: CCD camera has the advantage of high contrast, but needs to work at 12 V voltage. In order to ensure the flexibility of the car, the power capacity of the car will not be very large, and the CCD camera is powered by a small power supply. The system is too power-hungry, and the CCD camera is prone to blur and ghosting during the high-speed movement of the car, affecting the image quality. The CMOS camera is not only small in size, but also consumes less power, and the image is stable under high-speed motion and is not prone to distortion. Therefore, the system uses a CMOS camera, as shown in Figure 2. The analog signal collected by the OV5116 separates the field interrupt and the line interrupt signal through the LM1881. The analog signal is binarized by the comparator LM393. The chip array size is 352 x 288, and the effective photosurface is 312 x 215 pixels. The power supply is 6 V (DC). The black and white full TV signal output by the camera is PAL analog signal, 25 frames per second, and the TV scan line is 625 lines. The odd field is in front and the even field is in the back.
2.2 speed detection module
In order to get the real-time speed of the smart car, the 200-line encoder is used to measure the speed of the car from time to time, and the encoder and the car use the gear to make the speed measurement more accurate.
2.3 Motherboard Control Module
The control system circuit of the smart car consists of three parts: MC9S12XS128 is the core minimum system board, LED display and keyboard. The MC9S12XS128 processor is plugged into the system board and integrated with signal acquisition, signal processing, motor control, and servo control on the system board. In order to reduce the electromagnetic interference caused by the motor drive circuit, the main board control module and the motor drive part are separated and arranged at both ends of the trolley. The main circuit of the system is connected to the main board: power voltage regulator circuit, minimum system board socket, video synchronization separation circuit, comparator integrated module, camera interface, servo interface, motor drive module, encoder module, keyboard interface, LED display Screen, etc., as shown in Figure 3.
2.4 Power Driver Module
In this system, the power supply voltage regulator circuit has two paths, one is a +5 V voltage regulator circuit, and the other is a +12 V voltage regulator circuit. +5 V supplies power to the MCU, camera, LM1881, LED display module. +12 V supplies power to the motor drive circuit. The +5 V circuit in the system consumes less power and is used for digital signal processing, using a linear regulator. It is necessary to pay special attention to the fact that when the car accelerates, the drive motor will generate a very large current. In order to improve the stability of the system, it is necessary to use a high-power drive chip and ensure that the voltage regulator chip has a good heat dissipation environment.
3 system software design
The efficient software system is the soul of the smart car, and it is the guarantee for the fast and stable travel of the car. This system uses CMOS camera for road surface recognition, image acquisition and processing has become the core content of the whole software, the image acquisition process is shown in Figure 4.
3.1 Path extraction and optimization processing
Compared with infrared sensors and electromagnetic sensors, the camera sensor has a wide field of view and is affected by noise, cross-connection, reflection and various interferences. Therefore, the obtained image must be further optimized to eliminate Interference factors, more effective identification of the road surface, provide more accurate road information for the MCU to make optimization decisions. The road surface information extracted in the image signal processing mainly includes: the road center position, the road surface width, and the road surface curvature.
After analysis and verification, it is found that for the smart car, since the driving path has a certain continuity, it is not necessary to collect images line by line, and the path information can be well obtained by collecting several lines at intervals. Then the data processing and optimization can be carried out at the same time of image acquisition. The advantage of this method is that the image processing is embedded in the process of image acquisition, which effectively solves the defect that the single chip has insufficient ability to process image signals.
3.2 PID control algorithm for steering gear
The system determines the type of road ahead by comparing the measured road function with a known function. Therefore, according to the position of the black line, the PID parameters are dynamically changed, and a better control effect is obtained.
In order to improve the forward speed of the smart car in the straight or small curve, the system uses a different control algorithm than the large curve: the steering angle of the steering gear is controlled by the area ratio of the two sides of the road in the image. The advantage of this algorithm is that since the image information is a digital matrix, the single-chip microcomputer can calculate the area very quickly, and use the area ratio as a parameter to control the steering angle of the trolley, shortening the data processing time and improving the traveling speed.
3.3 PID Control Algorithm for Drive Motor
For speed control, an incremental PID control algorithm is adopted. The basic idea is straight-track acceleration and corner deceleration. After repeated debugging, the black line position obtained by each image and the speed PID reference speed value form a quadratic curve relationship. In the actual test, the acceleration and deceleration of the straight and curved lanes of the trolley are more sensitive, and the steering control of the steering gear is better.
4 system debugging
As the core of the entire smart car system, the image acquisition module must undergo rigorous testing to ensure its reliability. After the smart car completes the travel, the digital image information of the stored road surface is extracted through the serial port debugging tool, as shown in FIG. 5 .
In addition, the installation position of the camera also directly affects the performance of the car. In order to better grasp the information of the front path, so that the MCU can calculate the control amount in advance, the camera should be seen as far as possible. The algorithm of interlaced processing data and independent optimization of the straight channel greatly improves the processing capability of the single-chip microcomputer, and the number of image acquisition points per line is increased to 120, which successfully increases the field of view width of the image acquired by the CMOS camera. After taking into account the impact of road reflections, the length of the field of view (the distance between the farthest and the closest of the field of view) is appropriately increased to 1.40 m, and the farthest prospect is 1.60 m, which is enough to cover various road types. The overall implementation of the smart car system is shown in Figure 6.
5 Conclusion
This paper introduces the overall design of the CMOS camera smart car. From the system architecture design, hardware design, software design and system debugging, the design scheme and some innovations of the smart car are introduced in detail. After testing, the system can collect images in an efficient, accurate and real-time manner, has good anti-interference ability, can effectively provide more accurate input for the decision system of the car, and can travel autonomously and quickly on a complicated path. It also provides a software and hardware architecture solution for future low-cost navigation systems.
In the future, by studying a multi-sensor, multi-processor integrated navigation system with network connection, it can provide more abundant solutions for autonomous driving, intelligent navigation, and disaster relief, so that smart cars can be more widely used in life.
ZGAR FILTER TIP
ZGAR electronic cigarette uses high-tech R&D, food grade disposable pod device and high-quality raw material. All package designs are Original IP. Our designer team is from Hong Kong. We have very high requirements for product quality, flavors taste and packaging design. The E-liquid is imported, materials are food grade, and assembly plant is medical-grade dust-free workshops.
Our products include disposable e-cigarettes, rechargeable e-cigarettes, rechargreable disposable vape pen, and various of flavors of cigarette cartridges. From 600puffs to 5000puffs, ZGAR bar Disposable offer high-tech R&D, E-cigarette improves battery capacity, We offer various of flavors and support customization. And printing designs can be customized. We have our own professional team and competitive quotations for any OEM or ODM works.
We supply OEM rechargeable disposable vape pen,OEM disposable electronic cigarette,ODM disposable vape pen,ODM disposable electronic cigarette,OEM/ODM vape pen e-cigarette,OEM/ODM atomizer device.
Vape Filter Tip,ZGAR Filter Tip Disposable Pod Vape,ZGAR Filter Tip Disposable Vape Pen,ZGAR Filter Tip,ZGAR Filter Tip Electronic Cigarette,ZGAR Filter Tip OEM vape pen,ZGAR Filter Tip OEM electronic cigarette.
Zgar International (M) SDN BHD , https://www.zgarecigarette.com