Design of car black box based on uClinux embedded system

Publisher:数字探险家Latest update time:2010-07-06 Source: 微计算机信息Keywords:S3C44B0X Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

汽车黑匣子就是汽车行驶记录仪,它是用来记录汽车在行驶中的状态。随着黑匣子在飞机上的成功运用,越来越多的国家也在汽车上运用这种技术。早在1990年以前欧共体就通过了在汽车上安装黑匣子的立法,要求欧共体的15个成员国在10年内给使用中的900万辆商用车中安装这个装置。美国、日本、香港及马来西亚等国家和地区也相继广泛使用汽车黑匣子 [1] 。从使用的效果来看,汽车黑匣子不但可以在事故放生后准确的反映当时汽车的状态同时也在预防汽车事故方面取的了显著的效果。在2004年10月1日,我国推出了新的《机动车运行安全技术条件》(GB7428-2004),明确要求用于公路运营的载客汽车、重型载货汽车、半挂车应当安装、使用符合国家标准的汽车行驶记录仪。

At present, there are more than 60 domestic companies that have passed the national standard test for producing car black boxes, of which 2/3 are OEMs or agents selling other companies' products; there are only about 18 companies that really have technology, capital and production lines, among which the more famous ones are Sichuan Dakexing, Beijing Weihang, Huizhou Ruishen, etc. However, most of their car black boxes use 8-bit or 16-bit single-chip microcomputers as processors, use assembly language, and the application programs are relatively simple. Although some companies have developed the second-generation car black box with more functions, they still do not use the operating system on it, so there are still defects in scalability and stability. Abroad, the latest car black box developed by Russia can record the changes in the physical quantity of the vehicle's spatial motion clearly after an accident, so as to help people analyze how the accident happened and how the car can be improved in the future. In terms of embedded systems, Europe's ICE has successfully applied embedded systems to car black boxes.

1 Overall structure of the system

1.1 Requirements Analysis

According to the latest national standards for vehicle driving recorders: vehicle driving recorders are required to be able to collect, record and store real-time clock, date and driving time, measure, record and store vehicle speed and mileage, etc. For suspicious accident data, the recorder should continuously record and store the vehicle speed value and vehicle braking status signal corresponding to the real time of 20 seconds before parking at an interval of no more than 0.2 seconds [2] .

1.2 System Structure

The main hardware used in this system is: 32-bit Samsung S3C44B0X processor, signal processing circuit, RS232 standard interface and USB1.1 standard interface, 4M Flash, 8M SDRAM, 4K FRAM, operation keyboard and expansion interface. The operating system used is uClinux operating system. The system structure is shown in Figure 1.

1.3 Structure Description

1. The 32-bit Samsung S3C44B0X processor has a built-in RTC (real-time time chip) that can realize the date and clock of Beijing time. The date and clock are used to mark the date and clock for all functions of the recorder (recording, storage, output, etc.). At the same time, its powerful other functions provide good support for the application of this system and future upgrades or expansions. 2. The signal processing circuit processes the signals collected by the car black box to meet the requirements of our system. 3. This system is equipped with RS232 standard interface and USB1.1 standard interface. The USB interface is used to complete the communication between the car black box and the computer, making the communication between data more convenient and rapid. 4. The main storage unit is 4M Flash used to store uClinux operating system and recorded data, 8M SDRAM and a 4K FRAM. When the car is running, the recorder continuously records and stores the vehicle speed corresponding to the real-time time of 20s before parking at an interval of 0.2s, and records the 8 signal quantities including braking, and stores them in the FRAM memory. These data will be used as accident suspicious data. At the same time, the recorder will sample from FRAM at an interval of 0.5 minutes and store the sampling results in Flash memory. 5. The software adopts uClinux operating system, which can better meet the system stability, scalability and diversity of application programs.

2 Key technologies

2.1 Signal data acquisition and processing

In order to reduce costs and achieve practicality, the signals used in this system are directly collected from various sensors on the car. The main collected signals are vehicle speed signals, brake signals and various light signals.

2.1.1 Collection and processing of vehicle speed signals

The vehicle speed signal collected by this system is the signal from the ABS wheel speed sensor on the car. At present, the ABS sensor wheel speed sensor widely uses a variable reluctance electromagnetic sensor. Through research, it is found that the signal emitted by the ABS sensor is a sine wave signal, and the frequency of the signal is proportional to the speed of the car. Therefore, we need to convert the frequency of the signal into a corresponding voltage value and then send it to the A/D converter. However, since the car has a very large interference on the signal emitted by the ABS sensor when it is driving, it is necessary to process the signal before the frequency-voltage conversion.

[page]

The signal processing process is as follows: (1) Through the limiting circuit. Since the faster the wheel speed, the larger the amplitude of the sine wave signal. Therefore, the amplitude of the signal is limited to within positive and negative 5 amplitudes through two voltage-stabilizing diodes. (2) Through the filtering circuit. Since the car will generate a large high-frequency interference signal when it is running, a second-order active filter with feedback is used to remove the high-frequency interference signal. (3) Through the shaping circuit, the sine wave signal is converted into a square wave signal. (4) Finally, through the frequency-voltage conversion circuit. The conversion process is shown in Figure 2.

Figure 2

2.1.2 Collection and processing of brake signals and various light signals

The brake and light signals on the car are collected directly through the brake circuit or light circuit on the car, and the output is a ground jump signal with a voltage of 12V. Therefore, we use an optoelectronic isolator to achieve anti-interference and voltage stabilization.

2.2 Design of USB interface

USB is a universal serial bus, which is a fast and flexible bus interface. Compared with other communication interfaces, the most prominent features of USB interface are ease of use and fast transmission rate. Therefore, USB interface is adopted by more and more systems. In order to realize this system, this project transmits the data recorded and stored in the car black box to the computer or PDA through the USB interface. We consider the whole system as a U disk, so that data transmission can be realized conveniently and quickly.

The USB organization defines a series of device classes and device subclasses according to the different properties of the devices. The advantage of combining these devices with the same properties is that the driver program of this class, which is mainly based on the PC host, can be developed at the same time. Currently, the following classes are defined in USB: Audio, Communication, Display, Human Interface, Mass storage, Image, Printer, Power, PC Legacy, and Physical interface. Because what our project needs to do is to treat the entire system as a USB flash drive to transfer data, we need to follow the Mass storage protocol. At the same time, Microsoft Windows provides support for the Mass storage protocol, so USB mobile devices only need to follow the Mass storage protocol to organize data and process commands, that is, they can realize data exchange with the PC. At the same time, the FAT16 file system is used in the storage unit organization form of Flash, so that data can be exchanged directly through the removable disk in the Windows browser.

The USB organization has now defined two Mass Storage protocol transmission specifications, namely: 1. USB Mass Storage Class Control/Bulk/Interrupt (CBI) Transport 2. USB Mass Storage Class Bulk-Only Transport. However, CBI cannot be used for high-speed devices, so the second transmission method, Mass Storage Class Bulk-Only, is selected in our system.

In this transmission mode, you need to pay attention to the settings of some values ​​in the interface descriptor. Set the value of bInterfaceClass to 08, which means that this device is Mass storage Class. Set the value of bInterfaceSubClass to 06, which indicates that the USB device follows the SCSI protocol in transmission. This is because the General Mass Storage Device is a random access, block/sector storage-based device. It can only store and retrieve data from the CPU. The interface of this device follows the Direct Access Storage Device protocol of the SCSI-2 standard. Set the value of bInterfaceProtocol to 50, which means that the USB device is in Bulk-Only Transport transmission mode.

When the device is inserted into the USB, the USB searches for the device and requires the device to provide the corresponding descriptor. After the USB Host obtains the above descriptor, the device configuration is completed, and the Bulk-Only Mass Storage device is identified, and then the Bulk-Only transmission mode is entered. In this transmission mode, three types of data are transmitted between the USB and the device, CBW, CSW and ordinary data. CBW (Command Block Wrapper) is a command sent from the USB Host to the device. The command format follows the command block specified by bInterfaceSubClass in the interface, which is the SCSI transmission command set. The USB device needs to extract the SCSI command from the CBW and execute the corresponding command. After completion, it sends a CSW (Command Status Wrapper) reflecting the current command execution status to the Host. The Host decides whether to continue to send the next CBW or data based on the CSW. The command that the Host requires the USB device to execute may be to send data, so specific data needs to be transmitted at this time. After completion, a CSW is issued to enable the Host to proceed to the next operation. The operations performed by the USB device can be shown in Figure 3.

[page]

It should be noted here that the read and write characteristics of Flash are that it can be read randomly, but not randomly written. Flash must be erased before writing, and each erase must erase a block or a sector, so before erasing a block or sector, the relevant data in the same block or sector must be saved. If the system performs an erase, save, and write operation every time data is received, the system task will be very heavy and cannot respond to the request of the USB Host in time, so this needs to be solved by setting a buffer of a certain size.

3 uClinux operating system

In the design of embedded systems, the choice of operating system is crucial. Different operating systems are required for different system requirements. This system mainly considers stability and security, so the uClinux operating system is used. The uClinux operating system is basically the same as the Linux operating system. (1) It is license-free and has high stability, security and scalability. (2) It supports powerful network functions, which makes our system more scalable. For example, we can implement GPRS and other network functions on it in the future. (3) It has a wealth of open tools, providing C, C++, JAVA and many other development tools, which greatly facilitates the development of our application programs. (4) There are a lot of documents for our reference. The biggest difference between them is that uClinux is specially designed to meet the needs of processors without MMU, that is, uClinux cannot use the processor's virtual memory management technology but adopts a real memory management strategy.

There are three main aspects that need to be paid attention to during the porting process. 1. If the core of the processor is not supported by uClinux, we need to add a new architecture in uclinux/linux-2.4.x/arch/, and the workload will be huge. But in our system, the ARM 7TDMI architecture already exists in the uclinux/linux-2.4.x/arch/armnommu/ directory. 2. Find a configuration file of a processor that is close to your processor in the same architecture directory and modify it to make it suitable for your processor. If there is no suitable one, you need to write it yourself, and the workload is also quite large. 3. If some peripheral device circuits of this system are not supported by uClinux, you need to write their device drivers yourself.

4 Conclusion

This car black box is based on an embedded system with a 32-bit Samsung S3C44B0X microprocessor as the core and uClinux operating system . It can better meet the system stability and application diversity, so it can record the driving status of the car more completely, accurately and diversely, providing an accurate basis for accident analysis, and also plays a great role in preventing traffic accidents. In addition, in this system, we make the entire system into a U disk, so that the recorded data can be easily and quickly transferred to a computer or PDA. References

[1] Horabao et al., Embedded UClinux: Hardware, Software and Interface, Electronic Industry Press, 2003

[2] GB/T 19056-2003, Normative Standard for Vehicle Driving Recorders[S]

[3] Arpith Chacko Jacob, uClinux porting HOWTO, http://www.arpith.com/, 2004

[4] David A. Patterson and John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, second edition, San Francisco: Morgan Kaufmann, 1988

Keywords:S3C44B0X Reference address:Design of car black box based on uClinux embedded system

Previous article:A new anti-interference design in vehicle-mounted electronic compass
Next article:Every detail is visible - Application of machine vision technology in engine production

Recommended ReadingLatest update time:2024-11-16 21:48

Design of USB interface for ECG and blood pressure monitor based on S3C44B0X
Introduction     The home ECG and blood pressure monitoring system consists of a data acquisition and recording device and a host computer electronic medical record management system. Therefore, the problem of data transmission mode needs to be solved. The traditional communication interface uses a simple RS-232 seria
[Microcontroller]
Design of USB interface for ECG and blood pressure monitor based on S3C44B0X
Design and implementation of communication interface between S3C44B0X and multi-channel simulator control board based on ARM 7
  0 Introduction   ARM (Advanced RISC Machines) is a 32-bit microprocessor that has been increasingly widely used in various fields in recent years. It is not only the name of a company, but also the general name of a class of microprocessors, including ARM7, ARM9, ARM9E, ARM10E, SecurCore and other series. Among th
[Microcontroller]
Design and implementation of communication interface between S3C44B0X and multi-channel simulator control board based on ARM 7
Design of multi-channel MP3 player based on S3C44B0X chip
1 Introduction With the rapid development of microelectronics technology, embedded products have been rapidly promoted and achieved great success with their natural human-computer interaction interface and rich multimedia processing capabilities. Currently, in the field of multimedia audio, MP3 players occupy an absol
[Microcontroller]
Design of multi-channel MP3 player based on S3C44B0X chip
Design of LED display screen based on ARM S3C44B0X
In order to simplify the driving circuit of the LED display screen and save the port resources of the single-chip microcomputer, the common LED display screen driving circuit was improved. All universal serial-in-parallel-out shift registers were used as the selection drive. The system was fully controlled by serial
[Microcontroller]
Design of LED display screen based on ARM S3C44B0X
Latest Automotive Electronics 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号