In order to achieve energy, reducing emissions, electronic control technology has developed rapidly and applied on trucks, engineering vehicles, and agricultural vehicles. With the development of locomotive, the data acquisition interaction of the in-vehicle positioning terminal and the stability of operation have become an important indicator of the equipment. In order to further enhance the real-time and stability of the car positioning terminal, a vehicle positioning terminal based on the ARM processor and μC / OS-II operating system is designed. Applying the ARM processor to implement the high speed of the data interaction, apply the stability problem of the program operation of the μC / OS-II operating system resolve.
1. Introduction to the overall structure and function of the car terminal
The in-vehicle positioning terminal is mainly composed of CPU (including S3C44Box chip, 2MBytenorflash, and 8MBytesdram), GPS satellite data receiving circuit, GPRS wireless data upload circuit, and CAN controller and data transceiver module. As shown in FIG. 1: +12 V DC electricity from the in-vehicle battery is converted into the CAN data transceiver module of +5 V, + 4.2 V and +3.3 V, and the direct current of +5 V, + 4.2 V, and +3.3 V, and the CAN data transmission and reception module of the vehicle positioning terminal. S3C44BOX chip, GPS satellite data receiving circuit, and GPRS wireless data transmission circuit power; CAN data transceiver module receives data from the reaction electric control vehicle operating capacitor sent by the ECU, EGR, TCU through the CAN bus, two of the CAN bus ends A 120-euro resistor is impedance matching resistance; GPS receives satellite data in real time and outputs data according to NMEA-0183 protocol to the CPU; the CPU receives data from the CAN data transceiver module by the answer mechanism, and receives GPS from the interrupt mode. The data is processed by the corresponding algorithm, after the received satellite data, then packed all the data in a fixed format, and sent it to the GPRS; GPSR receives the corresponding packet, and is uploaded to the monitoring center in real time through the wireless mode.
Be
Among the actual applications of the vehicle positioning terminal, the main factors affecting the speed of data interaction depends on the processing speed of the CPU, the information reading of the electric control vehicle, and the real-time factor reception of GPS satellite data; the main factors affecting stability are hardware Anti-electromagnetic interference performance and μC / OS-II operating system for reasonable scheduling allocation of different priority tasks. The following will be elaborated and analyzed about several major influencing factors such as CPU circuit, GPS satellite data receiving circuit, GPRS wireless data upload circuit, and system software.
2, hardware circuit design
1) S3C44BOX processor
The S3C44BOX processor is a 16/32-bit RISC processor using the ARM7TDMI kernel introduced by Samsung. The processor has a rich built-in component: 8kbcache, LED controller, SDRAM controller, 5 channel PWM customizer, PLL multiplier, IIC bus interface, IIS bus interface, 2 channel UART, 4 channels DMA and 8 channels 10 AD converter. These components make the S3C44Box processor to ensure high performance (running speed up to 66 MHz), which reduces the cost of design and development. Compared to the traditional 8-bit microcontroller, the S3C44BOX processor can maximize the need for the vehicle positioning terminal on the data processing speed.
2) GPS anti-electromagnetic interference circuit
As shown in Figure 2, the device of the GPS circuit is a GS-89M-J module. The MTK3329 chip is used as the master chip, and the positioning time is only 1 s in thermal start mode. The MIC29302BU module is a voltage regulation module for high current high stability. It is mainly used to provide a working voltage of 4.2 V to the GS-89M-J module. The 5 foots in the module are adjustable output pins, in the adjustable mode This pin outputs a fixed 1.25 V DC voltage, in order to ensure that the module can provide a stable 4.2 V voltage, the precision resistors R521X and R525X are composed of 43 k and 100 k, respectively, in the design, respectively, the serial voltage boost circuit, The DC voltage S3C44Box of the output pin output of the module is output to control the module by outputting a high or low level by outputting a high or low level to the 1 pin (EN end-enable output, high level active). Whether the capacitor C564, the polar capacitor C562, the resistor R550, and R551 are separately used to isolate the GPS circuits and other circuits on the in-vehicle terminal to prevent the GPS circuit from being caused by common impedance coupling. Cross interference; for ensuring that the vehicle positioning terminal operation stability is considered, a general I / O pin and the triode Q501, the resistor R502, R505, and R507 of the S3C44BOX chip are composed of GS-89M-J reset control circuitry to ensure GS-89M. -J The main controller of the program runs in time to reset the operation in time; the impedance value of the GPS antenna selected in this design is 50 ohms, since the GPS signal is 1575. 42 MHz high-frequency carrier signal, during transmission It is easy to reflect signal reflection due to the characteristic impedance of the transmission line and the terminal impedance mismatch, in order to prevent this phenomenon, the characteristic impedance value of the radio frequency used to connect the GPS antenna and the GS-89M-J module RF_IN pin in this design is 50 ohms. The GS-89M-J module receives the signal from the satellite in real time simultaneously to decgrate it, and packages the decision result into the NMEA0183 protocol to GPGGA, GPGSA, GPGSV, GPRMC, GPVTG, and GPGLL7 frame data output to S3C44BOX. S3C44BOX receives the data frame from GS-89M-J in real time through the serial port interrupt mode.
Be
3) GPRS anti-electromagnetic interference circuit
As shown in Figure 3, the device of the GPRS circuit is the SIM900 module. The SIM900 is designed with power-saving technologies. It consists only 1.0 mA in sleep mode, and the module is embedded in the TCP / IP protocol, and improves the development efficiency of the user to use the module for data wireless transmission.
The NC7WZ07 in the circuit is a high speed level conversion chip, and the SIM900 output can be converted to the S3C44BOX to receive the 3.3 V serial signal to achieve the accessible communication of SIM900 and S3C44BOX; Molex in the circuit. 91228 is a SIM card, in order to prevent the SIM card from being interfected with electrostatic discharge and high frequency signals, SMF05C is used to protect the SIM card; to prevent the high frequency signal from SIM900 from passing to the SIM card to form signal reflection, lowered The signal quality, the two-Europe resistors R614 and R613 are selected to impedance matching; S3C44BOX can transmit the pulse width of 1 s by 1 pin (PWRKEY pin-electric switching foot) to the SIM900, Controlling the closure and opening of the module; S3C44BOX can reset the operation by sending a high level by sending a high level to the SIM900 14 pin (NRESET pin - low reset pin); like the GPS circuit, GPRS circuit The characteristic impedance of the RF line for connecting the GPRS antenna and the SIM900 RF_ANT pin is 50 Ω; the SIM900 receives the data packet from the S3C44B OX through the serial port, and uploads the packet to the monitoring center via the serial port.
Be
3, system software design
In order to achieve the real-time and operational stability of the vehicle positioning terminal data processing, ensuring that the electric control vehicle working condition information read tasks and GPS satellite data reception tasks can be completed within time, this design introduces the μC / OS-II operating system. The μC / OS-II can dynamically switch tasks based on the priority of the task to ensure the requirements of the system on real-time.
As shown in FIG. 4 is a system main function flow chart, the system is powered on, and the initialization operation of S3C44BOX is complete, then the OSINIT () function completes the initialization operation of μC / OS-II after the clock circuit and associated register configuration. The system then creates the application task of the on-board positioning terminal through ostaskcreate (void (* task) function, and the task scheduling function osctxsw () function is called through the OsStart () function. Scheduling. Synchronization and data interaction between each application task are completed by semaphore and message mailboxes.
Be
Based on the main function of the car positioning terminal, the vehicle positioning terminal application mainly includes three tasks and 2 interrupts. They are electronic control vehicle conditions information reading tasks (Void Vehinf Read_Task (Void * PADA)), which is primarily used to receive information from the reaction vehicles from ECU, EGR and other in-vehicle controller, such as the engine. Coolant temperature, engine lubricating oil pressure, engine crankshaft rotation speed, engine camshaft rotation speed, after exhaust gas posture valve opening degree, etc., because the vehicle positioning terminal should simultaneously receive data of multiple in-vehicle controller, to ensure that the vehicle positioning terminal can identify each Data uploaded in the in-vehicle controller, using the call-answering mechanism to realize data communication between vehicle positioning terminals and various car controllers; GPS satellite data processing tasks (Void SatdatPro_Task (Void * Pada)) is mainly to GS-89M- The data frame from the J module performs filtering and extracting the location of the vehicle position from the filter data frame; GPRS data upload task (Void Datsend_Task (Void * PADA)) mainly puts the vehicle operating information and location information according to fixed data frames Format is packaged and uploaded to the monitoring center in wirelessly through the SIM900; the CAN receives the interrupt function (VOID_IRQ CANREV (VOID)) is triggered by the CAN transceiver, and the CAN transceiver is transmitted, and the CAN transceiver receives data from each vehicle controller, each receives data from each vehicle controller. The interrupt is triggered, the interrupt function mainly transmits the data frame through the message mailbox to the electronic control vehicle working condition information reading task; the serial port receiving interrupt function (VOID_IRQ Seri Rev (VOID)) is mainly in GS-89M-J The satellite signal is completed and triggered when data is output to the serial port of S3C44BOX.
The main factor affecting the real-time real-time real-time in the vehicle positioning is the processing speed of the GPS satellite data, so the priority allocation of each task in the on-board positioning terminal is as follows (the higher the priority of the priority value).
Be
4, conclude
The in-vehicle positioning terminal designed in the article applies the ARM processor and μC / OS-II operating system to ensure the stability of the real-time and operation of the terminal data exchange. It has been confirmed that the car positioning terminal has broad application prospects in the fields of trucks, engineering vehicles, and agricultural vehicles.
Be
Source: Wiku Electronic Market Network
Our other product: