Design of intelligent car system based on infrared sensor

Publisher:数字火花Latest update time:2011-06-14 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Abstract: Based on Freescale Semiconductor's MC9S12DGl28B series MCU, the system framework of the smart car is designed, and the software and hardware design schemes are designed. The problems and solutions encountered in the design process of the power module and motor drive module are introduced in detail.
Keywords: smart car; HCSl2 microcontroller; infrared sensor


0 Introduction
The "Freescale Cup" Smart Car Competition originated in South Korea. It is an extracurricular science and technology competition for college students sponsored by the Automotive Control Laboratory of Hanyang University in South Korea and sponsored by Freescale Semiconductor, with HCSl2 microcontroller as the core. The organizing committee provides a standard car model, DC motor and rechargeable battery. The participating teams need to make a smart car that can autonomously identify the path and automatically identify the road on a specially designed runway. The winner is the one who runs the fastest without running out of the runway and has a higher technical report score. The design content covers knowledge of multiple disciplines such as control, pattern recognition, sensor technology, automotive electronics, electrical, computer, machinery, energy, etc., which has a good role in promoting students' knowledge integration and practical skills. Our school participated in the third college student smart model car competition in August 2007 and won the third prize.


1 System Analysis
The smart car system is generally composed of power supply module, sensor module, DC motor drive module, path identification module, communication and debugging module, single chip microcomputer module, etc.
The core processing unit of this smart car adopts MC9S12DG128B series MCU of Freescale Semiconductor. The system block diagram is shown in Figure 1. The design of this smart car adopts multi-module technology: the path detection module and speed monitoring module are designed using reflective infrared sensors; PWM technology is used to control the steering of the servo and the speed of the motor: the system also expands the LCD display and keyboard module to realize human-computer interaction operation, so as to facilitate the adjustment of relevant parameters of the smart car. In addition, the PID tracking algorithm combined with ABS (Anti-skid Brake System) technology enables our car to drive stably at a faster speed on a winding track.


2 System Hardware Design
2.1 Power Supply The power supply required by each hardware part is different. To meet this requirement, the power supply part of this system is designed. The power supply is a 7.2V 2000mAh Ni-cd battery for standard car models, which provides 6V, 5V voltage and ground through a voltage regulator chip. The 6V voltage regulator circuit is shown in Figure 2. The 6V voltage is supplied to the servo motor, and the 5V voltage is supplied to the microcontroller system, the photoelectric sensor and receiver circuit for path identification, the vehicle speed sensor circuit, and the LCD display circuit. In the circuit design, considering the unstable power output caused by the motor drive (mainly transient pulses), a filter circuit is added to the power supply pins of each chip at the power output end. In order to avoid electromagnetic interference caused by the rotation of the drive motor, copper is applied on the printed circuit board, and the "ground" in the circuit is connected to the copper surface.

2.2 Information acquisition module This module includes two submodules: speed information acquisition and position information acquisition. They respectively acquire the current position information and speed information of the smart car, and transmit the acquired information to the MCU. Its core is the reflective infrared sensor. The speed sensor is installed near the right rear wheel of the smart car. A black and white disc with 36 equal parts is attached to the axis close to the wheel. The black line is detected by the reflective infrared sensor. The time T taken for the wheel to rotate one circle can be obtained by counting the black marks. The current running speed V of the smart car can be obtained by calculating through the formula.
2.3 Information processing module The information processing module includes information processing and control modules. Its core is MCU. MCU receives the acquired signal, processes the signal, makes a judgment, and issues a control command.
2.4 Execution module This module includes the drive motor and the steering gear. When receiving the command of the MCU, it executes the corresponding operation. At the same time, the information acquisition module acquires the status information of the motor and the steering gear and feeds it back to the MCU. Thus, the whole system constitutes a closed-loop system. During the operation, the system automatically adjusts to achieve the purpose of correct driving.
The chip MC33886 is used to drive the motor. The speed of the motor is controlled by adjusting the voltage applied to both ends of the motor, thereby controlling the speed of the car. The full-bridge control of the chip is used to reverse the motor. It is known from the experiment that when using a single chip, the heat is serious, so that the chip is overheated and automatically protected. For this reason, we have taken three measures to solve the problem of chip heating: first, multiple chips are connected in parallel to reduce the current passing through the single chip; second, a heat sink is installed on the upper part of the MC33886; third, a large copper-clad area is left on the circuit board, and the lower part of the chip is closely attached to the copper-clad area for heat dissipation. In order to improve the heat dissipation effect, thermal conductive silicone grease is applied to the upper and lower surfaces of the chip to make it close to the heat sink and the copper-clad area. It is known from the experiment that the driver chip can run stably.
2.5 Human-computer interaction module This module includes key input and LCD display, where the key is used to adjust the working mode of the car, and is also used to adjust some parameters required for the car to travel; combined with LCD display, the entire car system is more humane.


3 System software design
Software design is an important part of the whole system. Whether the software design is reasonable directly affects whether the smart car can run stably. Freescale MC9S12DGl28B series microcontrollers can use C language and assembly language to write source code. Using C language is simpler and easier to transplant. Write source code in IAR environment, compile and generate hexadecimal files, which can be downloaded to the program memory through JTAG, and can be debugged and modified online, which greatly improves development efficiency. This system software includes main program, system initialization subroutine, LCD subroutine, key subroutine, timer interrupt service program, etc. Each subroutine can complete relatively independent functions, and the main program needs to complete the following tasks:
(1) Initialize each functional submodule:
(2) Detect user key input;
(3) Call the function of each submodule;
(4) Coordinate and allocate system resources occupied by each submodule. Its system control flow is shown in Figure 3.

4 Conclusion
This paper combines actual design experience to discuss how smart cars can run smoothly from the aspects of hardware design and software design. In the design, the author found that choosing suitable devices, selecting reasonable control algorithms, and designing reasonable software programs are the key to whether smart cars can run quickly and smoothly.

Reference address:Design of intelligent car system based on infrared sensor

Previous article:Principle and application of new temperature sensor SHT10
Next article:Application of optical sensor ISL29004 in intelligent lighting control system

Latest Industrial Control Articles
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号