Intelligent car data remote transmission system based on MC9S12 single chip microcomputer

Publisher:数据之翼Latest update time:2013-10-21 Source: 单片机与嵌入式系统 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
    China has become one of the world's largest automobile markets, and the important role of automobiles in national economic production and life is becoming increasingly prominent. In recent years, research on how to make vehicle driving safer, more efficient, environmentally friendly and comfortable has attracted more and more attention from researchers in various countries. The relevant wireless communication network circuit processes this information in real time. For example, it provides drivers with road prompts, warnings and other information. In this way, the driving risks caused by factors such as fatigue can be greatly reduced, and the safety of road traffic and drivers can be enhanced; in addition, once a vehicle failure, traffic jam or traffic accident occurs, it will cause inconvenience to vehicle dispatching and passenger travel.
    With the rapid development of society and the acceleration of commercialization, more and more industries and departments need to grasp the real-time information of vehicles or other mobile targets and can remotely control the targets. Such needs have made vehicle data remote transmission control systems gradually become a research hotspot at home and abroad. The vehicle data remote transmission control system sends vehicle information and driving information to the dispatching station in a timely manner through the station terminal, and displays vehicle and road information in real time, which will realize scientific and reasonable vehicle dispatching, reduce passenger travel inconvenience, and can transmit real-time information for auxiliary driving or accident avoidance, or provide entertainment information, life information and other data services.

1 Design and implementation of vehicle-mounted data remote transmission control system
1.1 Overall system design
   
The vehicle-mounted remote transmission control system mainly includes two parts: intelligent vehicle model and remote transmission control system.
    The intelligent vehicle model is mainly composed of MC9S12 core control module, road detection module, steering module, speed detection module, motor drive module, etc. The intelligent vehicle model identifies road information through the road detection module, transmits the information to the core control module through AD conversion, and then the core control module analyzes and processes it, and uses PID control to drive the steering module and motor, so as to realize automatic path finding. The
    remote transmission control system consists of two MC9S12 single-chip microcomputers in a master-slave structure. The wireless transceiver module NRF24L01 is used in the middle to realize the remote transmission of vehicle data and control commands. When the system is working, the host first sends a command to the slave, and then the slave and the single-chip microcomputer on the intelligent vehicle model use parallel port communication to convey the host's command, and at the same time, the speed, position, steering gear, motor and other parameters of the model car are sent back to the host. This cycle continues, and two-way communication between "master to slave, slave to master" is realized within a time period, so that the data of the smart car can be received and the smart car can be controlled. The block diagram of the remote control system is shown in Figure 1.

a.JPG


1.2 System Hardware Design
   
The circuit modules of the telecontrol system mainly include the MC9S12 single-chip microcomputer minimum system, power module, motor drive module, NRF14L01 module, etc.
1.2.1 MC9S12 single-chip microcomputer minimum system
   
MC9S12XS128 is just one member of the HCS12X family. The device includes a large number of on-chip processors and external I/O. MC9S12XS128 is a 16-bit device with a 16-bit central processing unit (128KB Flash), 128 kBFlash, 8 kB RAM, and 2 kB EEPROM to form the on-chip memory. It also includes 2 asynchronous serial communication interfaces (SCI), 2 serial peripheral interfaces (SPI) and an 8-channel input capture/output compare (IC/OC) enhanced capture timer (ECT), a 16-channel 10-bit A/D converter (ADC) and an 8-channel PWM. Figure 2 shows the 112 package pin diagram of MC9S12XS 128.

b.JPG[page]

1.2.2 Power module
   
The power supply is the basis for the normal operation of a system. The power module provides the required energy guarantee for other modules of the system, so the design of the power module is crucial. The parts that receive power in the model car system include: sensor module, minimum system module, drive motor module, steering servo module and other peripheral auxiliary modules. In the design, in addition to considering basic parameters such as voltage range and current capacity, it is also necessary to optimize the power conversion efficiency, noise, interference and circuit simplicity.
    The power supply of the system hardware circuit is provided by a 7.2 V, 2 A/h rechargeable nickel-cadmium battery. The battery voltage can reach 8.2 V when fully charged. Since the working current capacity required by different circuit modules in the circuit is different, the power module should contain multiple voltage stabilization circuits and separate power supply circuits to convert the rechargeable battery voltage into the voltage required by each module. The power management structure diagram of this system is shown in Figure 3.

c.JPG


1.2.3 Motor drive module
   
In this system, the motor drive module is designed as an H-bridge DC motor drive circuit composed of IR2104S half-bridge driver chip and IRF3205MOSFET produced by International Rectifier. Two IR2104S chips drive a half-bridge each, and finally form a full bridge, as shown in Figure 4.

d.JPG


1.2.4 Wireless Module NRF24L01
   
NRF24L01 is a new single-chip RF transceiver device that operates in the 2.4-2.5 GHz ISM band. It has built-in frequency synthesizer, power amplifier, crystal oscillator, modulator and other functional modules, and integrates enhanced ShockBurst technology, in which the output power and communication channel can be configured through the program. NRF24L01 has low power consumption. When transmitting at a power of -6 dBm, the operating current is only 9 mA; when receiving, the operating current is only 12.3 mA. Multiple low-power operating modes (power-down mode and idle mode) make energy-saving design more convenient, as shown in Figure 5.

e.JPG

[page]

1.3 System software design
   
The software design of the system is mainly to realize the communication between three MC9S12 microcontrollers, two of which use wireless communication.
    After initializing the microcontroller and the wireless module NRF24L01, the data of the host is stored in the buffer area of ​​24L01, and the data is ready to be sent. Since the wireless module cannot realize full-duplex function, but the communication time between the master and the slave is microseconds, which is very short. Therefore, the host and the slave adopt the following method to form a switching "master-slave" structure.
    In the same cycle, the host is configured to send mode and the slave is configured to receive mode in the previous period. After the host sends a command to the slave, the slave communicates with the smart model car to realize the transmission of the command. In the next period of time of this cycle, the slave is configured to send mode and the host is configured to receive mode. The slave sends the running data of the smart car model back to the host, and the host displays the received smart car model data through the LCD screen, and so on. Its design flow chart is shown in Figure 6.

f.JPG


2 System Debugging
   
During the program development process, the development platform Codewarrior provided by Metrowerks for the MC9S12 series microcontrollers was used. Through BDM, the program can be burned into the microcontroller and can also be debugged online. CodeWarrior can automatically check the syntax errors in the code. It scans the code through an integrated debugger and editor to find and reduce obvious errors, and then compiles and links the program so that the computer can understand and execute the program. The mc9s12xs128.h file in Codewarrior has macro definitions for the storage mapping addresses corresponding to all registers of the MC9S12XS128 microcontroller. These macros can be directly called during software development. The CodeWarrior running interface is shown in Figure 7.

g.JPG



3 Conclusion
   
A wireless data remote transmission system is designed in this paper. The system is based on the 2.4 GHz band RF chip NRF24L01 produced by Nordic and the Freescale single-chip microcomputer MC9S12. It is combined with peripheral drive electronic circuits such as power supply, motor, and sensor. The hardware structure is simple, small, low cost, and low power consumption. The software adopts a switching "master-slave" structure, which makes its data transmission high, the working mode stable, and the detection data reliable and intuitive. Using this system, the motion state and driving trajectory of the model car are collected in real time, and the model car is remotely controlled to improve the driving speed and handling stability of the model car.

Reference address:Intelligent car data remote transmission system based on MC9S12 single chip microcomputer

Previous article:Design of Ultrasonic Vehicle Alarm System Based on Single Chip Microcomputer
Next article:Smart car hardware system design based on camera recognition

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号