Home > Microcontroller >Microcontroller Production > Circuit design analysis of smart car image recognition system

Circuit design analysis of smart car image recognition system

Source: InternetPublisher:清宁时光 Keywords: Image Identification Updated: 2023/12/15

The smart car system studied in this article uses the TSL1401CL linear CCD image acquisition module, which uses serial communication to connect to the main control CPU. It not only has a simple circuit, stable performance, but also has a fast acquisition rate. Through experimental testing, the smart car designed in this article can analyze the path ahead and obstacles based on the collected images to achieve intelligent driving, which has strong practical value and market prospects.

System design thinking

After research and analysis, this smart car system was designed and developed using MC9S12XS128 microcontroller, TSL1401CL linear CCD image acquisition module, voltage stabilizing chip, LCD OLED and other peripheral devices. MC9S12XS128 high-speed microcontroller is a newly launched 16-bit high-performance high-speed microcontroller by Freescale. It has rich interfaces, low power consumption, and powerful information processing capabilities. It can conduct timely analysis of the path and obstacles in front of the car, with fast processing and stable performance. In order to improve the speed and quality of road image collection, we selected the TSL1401CL linear CCD image sensor. TSL1401CL has the advantages of low power consumption, stable performance, high sensitivity, and fast response speed. Its working process is to first convert the road optical signal into an analog current, and then amplify the analog current and then perform A/D conversion into a digital signal, and finally pass the serial port Sent to the main control CPU. The CPU of the smart car analyzes and processes the information collected by the CCD, thereby realizing automatic control of the system, obstacle handling, and path detection. In the software design, we adopt advanced PID (proportional, integral, differential) algorithm, whose operation parameters can be adjusted in time according to the dynamic characteristics of the process. Through PID algorithm and fuzzy PID algorithm, precise automatic control of smart car steering, speed control, etc. is realized. In addition, it also has good obstacle avoidance function, realizing fully intelligent safety control.

System hardware design

This project adopts modular design and development, mainly including CCD acquisition module, power module, motor drive module, vehicle speed control module and the overall design block diagram of the system in Figure 1.

Circuit design analysis of smart car image recognition system

CCD acquisition module

This module uses the TSL1401CL linear CCD image sensor, which internally consists of a 128&TImes1 photodiode array, associated charge amplifier circuitry and an internal pixel data retention function, which provides simultaneous integration of start and stop times for all pixels. For the driving and use of the TSL1401CL linear sensor, this project uses the PA0 and PA1 pins of MC9S12XS128 to send square wave signals to its CLK and SI pins at a specific timing. The AO pin of TSL1401CL will output 128 pixels in sequence. The analog signal is given to MC9S12XS128, and its circuit is shown in Figure 2. We found through testing that the output signal of the sensor is closely related to ambient light. The AO output value is much higher during the day than at night. There is also a big difference between the light and backlight, and there is a big difference between incandescent light and fluorescent light conditions. The same lens or signal magnification is bound to be unable to adapt to various environments. The signal is often too weak or saturated, and the adaptability to the environment is very weak. For this, dynamic exposure time can be used through software or the magnification of the op amp can be dynamically changed through a microcontroller. .

Circuit design analysis of smart car image recognition system

 Power module

The system is composed of different modules, each module operates at a different voltage, and the power required by each module must also be considered during design. In addition, a battery detection system needs to be designed to intuitively understand the battery condition. The power requirements required by smart cars include 5V, 7.2V, etc. For the 5V power supply design, we chose LM2940-5. Compared with 7805, the advantage of 2940 is low voltage dropout regulation, and its voltage regulation difference is less than 500mV. This ensures that the battery can still make the microcontroller and sensors work normally under low voltage conditions. At the same time, The output current of LM2940 can reach 1A, which is enough to supply the work of the amplification circuit and keyboard display circuit. The circuit design diagram of the LM2940 module is shown in Figure 3.

Circuit design analysis of smart car image recognition system

Motor drive module

The drive circuit provides control and drive for the smart car drive motor. The design requirement of this part of the circuit is to be able to pass large current as the main indicator. The basic principle of the drive circuit is the H-bridge drive principle. Currently, the popular H-bridge drive circuits include: H-bridge integrated circuits, such as MC33886; integrated half-bridge circuits, such as BTS7970, and H-bridge circuits built with MOS tubes. For the design of this system, we chose the BTS7970 with better performance as the main chip of the motor drive module. Its working circuit diagram is shown in Figure 4.

Circuit design analysis of smart car image recognition system

speed control module

The speed of the smart car mainly adopts incremental PID control and positional PID control. Fuzzy control and PID control are combined to enable the smart car to drive smoothly and quickly on the track. The smart car speed control system uses the XS128 microcontroller as the core. The microcontroller gives the motor a given speed, that is, the theoretical speed, and establishes a fuzzy PID controller. The fuzzy PID controller is used to control the speed of the motor, that is, to control the actual speed of the smart car. The photoelectric encoder is then used to measure the actual speed of the smart car, and the actual speed is fed back to the fuzzy PID controller to form a closed-loop negative feedback loop. Steering control module, the servo SD-5 of the smart car adopts positional PD control. Because the control accuracy of the servo is high and different PWM duty cycles correspond to different steering angles of the servo, open-loop control is adopted. When the car is on a straight road, straighten the servo; when the car is on a curve, the greater the curvature of the curve, the greater the steering angle of the servo. The difference between the weighted average deviation of the image and the center of the image is used as the control quantity.

System software design

The system software is written in C language and compiled through Code Warrior IDE. The idea of ​​software design is to drive the linear CCD optical device to collect single-line image information, process the collected images to determine the position of the car and determine the route in the forward direction of the car, and then convert the processed information into changing The PWM quantity is sent to the steering gear, motor and encoder processing module to control the walking direction and speed of the car. The system flow chart is shown in Figure 5.

Circuit design analysis of smart car image recognition system

For the design and development of the smart car system in this project, the MC9S12XS128 high-speed microcontroller was selected as the control core. The TSL1401CL linear CCD acquisition information and angle measurement information were obtained through the A/D conversion method, and the fuzzy PID algorithm was used to realize the straight, steering and speed control of the car model. plan. Among them, MC9S12XS128 is the core of information processing and control commands of the entire system. The linear CCD sensor is used to identify the running path of the car. The collected information is compared in real time on the microcontroller. The speed and steering of the car are controlled through the PID control algorithm, thereby realizing the intelligence of the car. Autopilot.

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号