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.
Previous article:Principle and application of new temperature sensor SHT10
Next article:Application of optical sensor ISL29004 in intelligent lighting control system
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- i.MX6ULL Embedded Linux Development——by DDZZ669
- The three-phase high current (30A~40A) of the motor is connected through the PCB, and the heat dissipation hole blind hole problem
- EEWORLD University ---- Key Isolation Gate Driver Specifications
- RTT Studio is an open source and free one-stop development tool for embedded systems. It’s really great to use it!
- PCB Design and Wiring Skills Album
- Help with information about injection locking
- [Zero-knowledge esp8266 tutorial] Quick start 30 rc-switch wireless transceiver module usage
- Where can I download the Datasheet from the official website of HuaDa Semiconductor?
- [BearPi-HM Nano, play with Hongmeng's "touch and pay" function] Part 3: Is the OLED screen lit up?
- Fluke always has an infrared thermal imager that suits your needs! Participate in the event to win gifts and start