Design and Implementation of "Black Box" for Automobile Based on ARM

0 Preface

The car tachograph, commonly known as the car black box, is an electronic device that records the speed, time, mileage, and other status information of the vehicle. The tachograph can record information about vehicle operation and driver's driving activities in real time, and can effectively realize the inspection, monitoring, feedback and interactive management of information such as vehicle speed, continuous driving time, mileage and other operating conditions. All-round restraint and control of the driver's driving time, driving speed, driving route, etc., to curb serious traffic violations such as fatigue driving and vehicle overspeed, prevent road traffic accidents, and standardize vehicle management. Statistics show that the use of black boxes has reduced the traffic accident rate by 37% to 52%, greatly reducing casualties and property losses, resulting in significant social and economic benefits. In October 2003, the Traffic Safety Product Quality Supervision and Inspection Center of the Ministry of Public Security released the national standard GB1 T1905622003 for automobile driving recorders. The "black box" of automobiles will undoubtedly become a new standard. With the increasing number of vehicles, traffic is constantly crowded. In order to ensure traffic safety, a mandatory installation of the drive recorder will be implemented in the future.

1 Classification of "Black Box"

Due to the different starting points of the various manufacturers, the types of products are different and the product structure is not the same. At present, the recorder on the market has formed a variety of product patterns with different performances. Car tachographs can be classified into single type, accident type, management type, integrated management type and 3G type according to their functions.

The 3G model is a new generation of vehicle drive recorders that have been optimized from software, hardware and system functions and developed with the aim of integrated management. The main features are multi-channel data acquisition and processing, continuous recording, large-capacity memory card and powerful integrated management software system to achieve resource sharing. This type of recorder utilizes powerful modern technology such as multi-channel data acquisition and processing platform, GPS satellite locator, large-capacity data storage card, increasingly mature geographic information system and back-end integrated management platform software, focusing on operational and special vehicles. Integrate management objectives to complete the vehicle integrated management process. Through the continuous recording of the whole process and the continuous state of each switch sensor on the computer software interface, the vehicle's operation, safety, quality and other comprehensive indicators can be fully monitored, and statistical charts can be printed according to requirements, and dynamic analysis can be adopted. The way to provide a highly valuable reference for the driver's safe driving.

This article introduces the design of the "black box" of the 3G-type car based on ARM.

2 overall system design

The system consists of a recorder-mounted host and monitoring software. The host adopts TI's 32-bit RISC microprocessor TMS470R1A256 as the main controller, including basic recording module, display module, printer module, GPS module, GPRS module and data communication module. The overall design block diagram of the system is shown in Figure 1.

Figure 1 System block diagram
Figure 1 System block diagram

The system uses the TMS470R1A256 to acquire the external analog signal input, digital signal input and digital input signal separately. The data to be saved is processed and stored in the internal large-capacity memory. Real-time data (such as real-time vehicle speed, real-time time) and alarm signals can be displayed on the display panel. The GPS module measures the latitude and longitude and speed, and realizes remote monitoring and real-time tracking through GPRS.

3 system hardware design

3. 1 TMS470R1A256.

The TMS470R1A256 is a family of TI TMS470R1 x general purpose 16/32-bit reduced instruction (RISC) microcontrollers.

The TMS470R1A256 mainly contains the following resources: 256 KBFlash, 12 KB SRAM, Zero-Phase Phase-Locked Loop (ZPLL) clock module, analog watchdog (AWD) timer, real-time interrupt (RTI), serial peripheral interface (SPI), string Line Communication Interface (SCIx), Standard CAN Controller (SCC), Type 2 Serial Interface (C2Sib), External Clock Divider (ECP), 10-bit Multi-Buffer ADC (MibADC), 16 Input Channel, High End Timer ( HET), up to 49 I/O ports and one input only.

The TMS470R1A256's Flash memory is non-volatile, electrically erasable, programmable, and has a 32-bit wide data bus interface. Flash operation is performed at the system clock frequency, up to 24MHz. In pipeline mode, the frequency can reach 48 MHz.

The SCI is a full-duplex, serial I/O interface that enables asynchronous communication between the CPU and peripherals in the standard non-return-to-zero (NRZ) format. SCC utilizes a serial, multi-master communication protocol for efficient distributed real-time control and stable communication up to 1 Mbit/s. SCC is ideal for demanding reliable serial communications and multi-channel communications applications in noisy and harsh environments. C2Sib enables the TMS470R1A256 to send and receive information in a Class 2 network that complies with the SAEJ I850 protocol standard.

This article refers to the address: http://



3. 2 Communication between TMS470R1A256 and MC33993

The programmable multi-switch detection interface IC MC33993 from MO TOROLA can detect up to 22 digital input signals and transmit the detected multi-switch status (three-state) signals through the SPI port of the chip. For the MCU. In addition, the device also has 22 analog multiplexer functions, which can be used to read multiple analog input signals. The analog input signal can be output by the analog multiplexer via the buffer for reading by the MCU. And the MC33993 allows the entire system, including the MCU, to operate at a lower quiescent current. This is important for systems such as remote monitoring because current loss is an important design consideration for them. Therefore, this design uses MC33993 as the multi-channel switch detection interface circuit.

In the system, the MC33993 uses SPI to connect to the MCU hardware, as shown in Figure 2. When there is a digital input externally and the state changes, the MC33993 will send an interrupt signal IN T to the TMS470R1A256. The TMS470R1A256 responds to the interrupt to read the digital input state. Improve the efficiency of the MCU.

Figure 2 Hardware connection of MC33993 and TMS470R1A256
Figure 2 Hardware connection of the MC33993 to the TMS470R1A256.

3. 3 Communication between TMS470R1A256 and FM24L256

In the automotive drive recorder industry, data security preservation is paramount. With the development of recorders, the amount of data stored is getting larger and larger, which requires large-capacity memory, and the large-capacity EEPROM index is not very high, especially the number of times of erasing and speed affect the quality of the energy meter itself. The FM24L256 is a new type of memory developed by RAMTRON. Its core technology is ferroelectric crystal material, which has the characteristics of random access memory and non-volatile memory products. The FM24L256 and A T24C256 have the same capacity and the bus structure is compatible, but the performance of the FM24L256 is much larger than that of the A T24C256.

The communication mode of the FM24L256 is a two-way two-wire protocol with fewer pins and less space on the board. Figure 3 depicts the FM24L256 and MCU hardware connections.

Figure 3 Hardware connection of FM24L256 and TMS470RIA256

Figure 3 Hardware connection of FM24L256 and TMS470RIA256


3. 4 Communication between TMS470R1A256 and SL811HS

The host of the USB in this system transmits data through the host controller and the USB device. The USB host should have: detect USB plug-in; manage control flow between the USB host and the USB device; manage data flow between the USB host and the device and collect the status of the USB host.

The SL811HS is a USB control chip manufactured by CYPRESS that supports full-speed data transfer. It includes a USB master-slave controller that supports full-speed, low-speed data transmission and automatically recognizes low-speed or full-speed devices. The interface provided by the SL811HS complies with the USB 1.1 standard and can be connected to the TMS470R1A256 microprocessor. The SL811HS's data interface interfaces with the microprocessor to provide 8-bit data I/O or bidirectional DMA channels and to support DMA data transfers in slave mode. The SL811HS has a 256-byte internal RAM that can be used as a control register or data buffer. The hardware connection between the SL811HS and the TMS470R1A256 is shown in Figure 4.

Figure 4 Hardware connection between the SL811HS and the TMS470R1A256
Figure 4 Hardware connection of the SL811HS to the TMS470R1A256.

3. 5 Communication between TMS470R1A256 and HOLUXGR285

The HOLUXGR285 intelligent satellite receiving module is a complete satellite positioning receiver designed by the second generation satellite positioning receiving chip designed by the US company. With all-round functions, it can meet the strict requirements of professional positioning and personal consumption needs. The scope of application is from car navigation, security systems, map production, etc.

The HOLUXGR285 communicates with other electronic devices via RS2232, TTL, and uses built-in rechargeable batteries to store satellite data.

It consumes low power and can track the signals of 12 positioning satellites at the same time. It receives once every 0.1 seconds and updates the positioning information every second.

HOLUXGR285 and TMS470R1A256 are both 3.

3V power supply, so data exchange can be realized through serial communication port without level conversion. The hardware connection is shown in Figure 5.

Figure 5 Hardware connection of HOLUXGR285 and TMS470R1A256

Figure 5 Hardware connection of HOLUXGR285 and TMS470R1A256

3. 6 Communication between TMS470R1A256 and Benq M22

Benq M22 is an embedded TCP/IP protocol stack that supports GSM/GPRS CLASS4. It can work in EGSM900MHz, DCS 1800MHz, PCS 1900MHz, and can support transparent and non-transparent transmission of data services. In terms of package, the M22 uses a docking station interface with an antenna MMCX connector on the module. Thanks to support for GPRS and even embedded TCP/IP, it can be used in car tachographs with high real-time requirements, relatively large data volume and relatively fast transmission speed.

The communication data interface between Benq M22 and the host computer is UART, the level is TTL/ CMOS, and the baud rate is the nominal adaptive baud rate of 300~115200bps. As long as it is the nominal baud rate of this interval, the module automatically Identification, without the need for user intervention, can be connected to full serial or semi-serial communication. The so-called full serial port means that the nine lines of DB9 need to be connected. The so-called semi-serial port only connects to RXD, TXD and GND. The system adopts half-duplex mode, the RXD of the module can be directly connected to the TXD of the TMS470R1A256, and the TXD of the module can be directly connected to the RXD of the TMS470 R1A256, as shown in Figure 6.

Figure 6 M22 and TMS470R1A256 hardware connection
Figure 6 M22 and TMS470R1A256 hardware connection


4 system software design

After the system is powered on, the system is first initialized. Then self-test is performed. The self-test range includes data memory, clock and I/O port. After self-test, the relevant information is displayed on the display according to the self-test result.

If the self-test does not pass, the "Self-test is not normal" and the error code is displayed.

After the self-test passes, it then enters the driver's identity authentication. After passing, the LCD displays the relevant data and waits for the data to be refreshed. The main program flow chart of the system is shown in Figure 7.

Figure 7 system main program flow chart

Figure 7 system main program flow chart

4. 1 Data collection

After the recorder reads the original data, it can calculate the total accumulated mileage, the accumulated mileage in the last 2 calendar days, the accumulated mileage in the last 360 hours, the speed every 200 milliseconds, and based on the pulse amount and vehicle characteristic coefficient. Speed ​​per minute.

The pulse collected by the recorder comes from the speed sensor, which produces 8 pulses per revolution, and the number of revolutions the vehicle rotates the speed sensor per kilometer is determined by the vehicle's characteristic coefficient. The recorder can obtain the mileage traveled by the vehicle based on the number of pulses recorded.

The travel speed is calculated from the number of pulses. As long as the mileage is calculated from the number of pulses, and then divided by the time, the speed can be obtained.

4. 2 GPRS design

M22 supports GPRS CLASS4, that is, the downlink speed is 42.8 Kbp s and the uplink speed is 21. 4 Kbp s. At the same time, M22 also supports embedded TCP/IP protocol. This embedded TCP/IP protocol solves a more complex process of connecting from command mode to data transfer mode.

Thanks to the embedded TCP/IP, a large amount of car record data can be transmitted in real time, realizing the real-time monitoring of the vehicle's operation. When using the TCP protocol for data communication, there must be three phases. The first phase is the connection establishment phase, the second phase is the data transmission and reception phase, and the third phase is the connection release phase.

In this system, short messages are sent in the PDU mode, because it not only supports Chinese text messages, but also can send English text messages. Three types of codes can be used to send and receive text messages in PDU mode: 72bit, 82bit and UCS2 encoding.

5 Conclusion

This design is on the traditional recorder, adding GPS, GPRS module, and the result of testing the system is to achieve precise positioning (civil standard), remote monitoring, electronic dog and data transmission, etc., to achieve the basic recorder and GPS navigation integration meets the design requirements of the system.

Schneider Electric Industrial Division is a global leader in machine automation, discrete automation and process automation. Through superior products, innovative solutions and a deep understanding of the industry, the Industrial Division continuously helps customers increase production capacity, ensure safety and reduce energy consumption. The continuous and rapid development of the Industrial Division benefits from a close and seamless care for the customer's entire life cycle, and a healthy partner ecosystem that embraces unique channel partners and technology partners. The unparalleled broad portfolio of industrial divisions includes industrial control components, frequency converters, motion control, robotics, PLCs, DCS, process safety, software, HMI and sensors.

Schneider Modicon: Quantum 140 series processors, control cards, power modules and so on.

140ACI04000



Schneider Modicon

Schneider Modicon,Modicon Plc Quantum Modicon,Original Schneider Modicon,Modicon Quantum

Xiamen The Anaswers Trade Co,.LTD , https://www.answersplc.com

Posted on