Design of Automobile Driving Recorder Based on Embedded System
introduction
The car driving recorder is a digital electronic recording device capable of recording and reproducing the driving state of the car. It can record the driving data of the car throughout the journey, and through the analysis of the recorded driving information data, the driving status of the vehicle can be accurately Take control. Car driving recorder can effectively prevent drivers from driving illegally and reduce traffic accidents of vehicles. As early as the 1970s, the European Community began to compulsorily use electromechanical analog car driving recorders and reduced the traffic accident rate by 30% -50%. Since the 1990s, the United States, Japan, Malaysia, Singapore and other countries have also formulated regulations for car driving recorders.
China began to develop car driving recorder from the 1980s. On April 15, 2003, it was drafted by the relevant departments of the Ministry of Public Security, approved by the National Standardization Management Committee, and the State Economic and Trade Commission. The General Administration of Quality Supervision, Inspection and Quarantine issued the national standard for vehicle driving recorders (GB / T19056-2003) in It will be officially implemented from September 1, 2014. The implementation objects include all in-use vehicles and new vehicles, which will be gradually expanded from point to face, and carried out in batches and time.
1. Function of car driving recorder
The car driving recorder includes two parts: the host of the car driving recorder and the data analysis software on the computer side. This subject focuses on the design of the host part of the vehicle traveling data recorder. With reference to the requirements of the national standard (GB / T19056-2003) for car driving recorders, the car driving recorders designed in this project mainly implement the following functions: self-checking function; real-time time, date and driving time collection, recording and storage functions ; Measuring, recording, and storage functions of vehicle driving speed; measuring, recording, and storage functions of vehicle mileage; driver identity recording function; keyboard operation function; data display; data printout function; data communication function. In addition to the two communication methods of the USB standard interface and the standard RS232CD 9-pin interface specified in the national standard in the data communication interface part, the CAN bus interface function is also added to the subject.
2. The hardware design of the system
The car driving recorder designed for this subject uses LPC2292 with ARM7TDMI-S core as the microcontroller, and the operating system adopts UC / OS-â…¡ embedded operating system. The system can realize the collection, processing and real-time storage and display of vehicle speed signals, switching signals and analog signals. Data communication with PC can be realized through serial port and USB interface, and can be realized through CAN bus interface. Data communication between CAN nodes on the car. The peripheral interface modules of the system include power supply module, reset circuit module, signal acquisition module, keyboard operation module, memory module, clock module, display module, JTAG debugging interface and communication interface module. The block diagram of the system is shown in Figure 1.
Figure 1 Block diagram of car driving recorder
2.1 Microcontroller
LPC2292 is a microcontroller based on a 32-bit ARM7TDMI-S CPU that supports real-time simulation and tracking developed by PHILIPS, and has a 256kB embedded high-speed flash memory. The 128-bit wide memory interface and unique acceleration structure enable 32-bit code to run at the maximum clock rate. The controller has two CAN channels and 10 A / D conversion channels, and has an external memory interface, which can easily expand the external memory.
2.2 Power module
Due to the instability of the on-board power supply, the 12v power supply in the car must be stabilized first, and then the voltage is converted to 5V through the linear voltage regulator chip L7805. Because the power supply voltage of the microcontroller LPC2292 is 3.3v and 1.8v, it is also necessary to convert 5v to 3.3v and 1.8v through low-dropout (LDO) regulators SPX117M3-3.3 and SPX117M3-1.8, respectively.
2.3 Signal acquisition module
The signals to be collected by the signal acquisition module include 1 road speed signal, 15 road switch signals and 2 road analog signals.
The vehicle speed signal of the car is output through the Hall-type vehicle speed sensor. Since the signal output by the sensor is not a standard pulse signal, the vehicle speed signal needs to be shaped. The vehicle speed signal is amplified by the operational amplifier OP2340, and then the vehicle speed signal is shaped into a pulse signal by the Schmitt trigger 74HC14, and then the pulse signal is connected to the P0.11 CAP1.1 pin of the microprocessor. Through the pulse capture function of the timer, the pulse width of the pulse signal can be measured, and the vehicle speed can be obtained after calculation. By counting the pulse signal, the mileage of the car can be obtained
The switch signals are: headlight high beam, headlight low beam, left turn switch, right turn switch, tail light, reverse light, car horn switch, wiper switch, ignition switch, brake switch, central control door Lock, door switch (driver side, front passenger side, rear left side, rear right side). The 15-channel switch signal is isolated by the TLP521 optocoupler, and then the signal channel is gated through the 16-channel switch signal detection chip CD4067, and the output signal is connected to the P0.8 TXD1 pin of the LPC2292. Through the four input terminals of CD4067, select the channels of the 15 switching signals in sequence, and then read the status of the P0.8 TXD1 pins respectively to know the status of each switch.
The two analog signals are the cooling water temperature signal and the throttle opening signal. Since the output signals of the cooling water temperature sensor and the throttle valve sensor are resistance signals, the resistance signal output by the sensor is first converted into a voltage signal, and the two voltage signals are shaped by a 4-way operational amplifier LM124, and then the two signals are reshaped The analog-to-digital conversion pins P0.27 ANT0 and P0.28ANT1 output to the microprocessor perform analog-to-digital conversion.
2.4 Memory module
According to national standards, the data in the car driving recorder should include two parts: real-time data of the car (storing the data within 20 s before and after the car accident); historical data of the car (storing the driving status of the car and the driver within 360 h) .
Because the real-time data of the car is updated frequently and high reliability is required, the NOR flash memory SST39VF1601 is selected as the data memory in this subject. The memory is a 1Mâ…¹16 CMOS multi-function Flash MPF device. SST39LF / VF160 has high-performance word programming function, the word programming time is 14us. The chip has a durability of 10,000 cycles and a data retention time of more than 100 years, and can be widely used in design, manufacturing, and testing applications. Its use can significantly enhance the performance and reliability of the system and reduce power consumption.
2.5 Real-time clock module
The vehicle traveling data recorder needs to record the corresponding time information when the state occurs for later analysis and use, so detailed time information is required. LPC2292 has a built-in real-time clock RTC module, but this module does not support the power-off mode of the microcontroller, so it is necessary to design an external real-time clock module for the car driving recorder. Because the drive recorder has high real-time requirements and the clock still needs to run even when the system is powered off, the DS1302 clock chip with power-off detection function and additional battery power supply is selected.
DS1302 is a trickle charge clock chip introduced by DALLAS. It contains a real-time clock / calendar and 31 bytes of static RAM. It can communicate with a microcontroller through a serial interface. Only three lines are required for synchronous serial communication . The real-time clock / calendar circuit can provide seconds, minutes, hours, days, periods, months, and years of information. The number of days in each month and the number of days in leap years can be adjusted automatically. The chip has low power consumption during operation and supports backup power supply.
2.6 Keyboard operation module
Because the pin position of the GPIO port of the LPC2292 is not continuous, the module uses the ZLG7290 to drive the 4â…¹4 row-type keypad. Among them, ZLG7290 is an I2C serial interface device, which can provide keyboard interrupt signal and can be easily connected to the processor. Set the speed display button, mileage display button, analog display button, USB data transmission button, serial data transmission button, driver information input button, time adjustment button, and print output button on the 4â…¹4 row-type keypad.
2.7 Display module
The display module in this system adopts YLF240128 dot matrix liquid crystal display module, the color of the light source is yellow-green, and STN LCD screen. Its embedded controller is T6963C of TOSHIBA company, and the external display memory is 32KB. The display module is used to display the driving data such as the instantaneous speed, maximum speed per minute, maximum speed in every 10 minutes, time, date, total mileage, cooling water temperature, throttle position, etc.
2.8 Communication interface module
The communication interfaces designed in this subject include USB standard interface, standard RS232CD serial interface and CAN bus interface. Among them, the USB standard interface and the standard RS232CD serial interface can realize the data download function from the PC to the vehicle driving recorder host and the data upload function from the recorder host to the PC. This can facilitate the identification of the driver and obtain the driving data of the car when a traffic accident occurs, thereby facilitating the analysis of the traffic accident. The USB standard interface uses a PDIUSBD12 device, which is fully compliant with USB1.1 specifications. RS232CD serial interface part adopts SP3232 for RS232 level conversion, SP3232 is a RS232 conversion chip of 3V power supply
With the development of bus technology, many electronic control systems on automobiles are equipped with CAN interface. In order to facilitate communication between the car driving recorder and the electronic control system with CAN interface on the car, a CAN interface is added to the system. Because the LPC2292 has two CAN channels, only the signal isolation and the design of the CAN bus transceiver need to be considered when designing the CAN bus interface circuit. The lead-out terminals TD1 and P0.25RD1 of the LPC2292 CAN controller are connected to the TXD and RXD of the CAN bus transceiver PCA82C250 after being isolated by the high-speed optocoupler TLP113. The CAN bus interface can communicate with other CAN nodes on the car.
3. System software design
The functions to be implemented in the software part of the car driving recorder in this subject are the timing collection and storage of the car's driving status data, serial and USB communication with the PC, communication with other CAN nodes of the car, LCD display, keyboard input , Printout and other functions. The main program flow chart of the system is shown in Figure 2.
Figure 2 The main program flow chart of the system
The car driving recorder has two working states. When the car is running, record the current driving information of the driver, such as speed, mileage, continuous driving time, overspeed record, parking time, etc., and provide a buzzer alarm when the car is overspeeding. When the car is stopped, the two scanning modes of USB or RS232 are used to exchange data with the PC through the keyboard scanning program. The data can be uploaded or downloaded.
An embedded operating system is a computer system that designs and completes complex functions of hardware and software and combines them. Embedded systems can improve system reliability, improve product development efficiency and shorten development cycles. At present, the commonly used operating systems are Linux, Windows CE, VxWorks, OSE, Nucleus, eCos, UC / OS-â…¡ and so on. UC / OS-â…¡ is a real-time multitasking operating system with open source code, portable, curable, curable and preemptive. UC / OS-â…¡ has been certified by the Federal Aviation Administration for commercial aircraft. Since its introduction in 1992, it has been applied to hundreds of products. Due to the above advantages of UC / OS-â…¡, UC / OS-â…¡ operating system is adopted in this subject.
In the process of writing software for car driving recorders, a modular programming method is used to establish different tasks, assign priority to tasks, and use two communication mechanisms between semaphores and message mailboxes between tasks. The file system structure of UC / OS-II includes the core code part, the setting code part, and the transplantation code part related to the processor. The core code has nothing to do with the processor. This part includes 7 source code files and 1 header file. The functions implemented by these files are core management, event management, message queue management, storage management, message management, semaphore processing, and tasks. Scheduling and timing management. The setting code is related to the application. This part includes 2 header files, which are used to configure the number of event control blocks and whether to include the code related to message management. The part of the migration code is related to the processor. This part needs to be modified during the system migration. This part includes OS CPU.H, the assembly files OS CPU AS and OS CPU.C. To transplant UC / OS-â…¡ to the LPC2292 microprocessor, the main work that needs to be completed is to modify these three files of the above transplant code part.
4 Conclusion
In this project, the hardware and software parts of the car driving recorder are designed. The recorder system completes the real-time collection, storage, and display of the vehicle speed pulse signal, switching value signal, water temperature, and throttle signal, and realizes the identity of the driver. Recording function, and successfully realized the two data transmission methods of USB and serial communication, which well meets the requirements of national standards (GB / T19056-2003).
The author of this article innovates: in the design of the car driving recorder system, the chip LPC2292 with ARM7 core is used as the microprocessor, the data communication module adds the CAN interface module, and the software design uses the UC / OS-â…¡ operating system, and Successfully implemented the transplantation of the operating system on LPC2292. The development cycle of this system is short, easy to maintain and modify, which is the direction of development of car driving recorders.
1200V DC Electronic Load is equipped with flippable front panel for 4U, 7U, 10U and 13U height models. Together with a large color touch screen provides simple and fast operation for customer. Real-time update of display input data, status and graphical display makes it more intuitive. Two or more loads can be connected in master-slave parallel mode to provide more power or current capacity,which can become 1200V DC Electronic Load System including 39600W/52800W/66000W.BTW,if the 1200V is too big voltage for application,it can also choose 200V DC Electronic Load and 600V DC Electronic Load.
kindly check below features are for your reference:
â— Flippable front panel and color touch screen allow convenient access and operation
â— Provides four kinds of basic working mode such as CV/CC/CR/CP, and CV+CC/CV+CR/CR+CC complex operating modes
â— Adjustable current slew rate, adjustable CV loop speed
â— Ultra high precision voltage & current measurement
â— OCP/OPP testing function
â— 50kHz high-speed CC/CR dynamic mode
â— 500kHz high-speed voltage and current sampling rate
â— Timing & discharging measurement for batteries
â— Short circuit test mode
â— Auto mode function provides an easy way to do complicated test
â— Dynamic frequency sweep function for determining worst case voltage peaks*
â— Non linear load mode function makes the simulated loading current more realistic*
â— Supports external analog control function*
â— V-monitor/I-monitor
â— LED load simulation function
â— Full protection: OCP, OPP, OTP, over voltage and reverse alarm
â— Up to 20 units master/slave parallel control
â— Front panel USB interface supports data import and export
â— SCPI language and standard rack size make it ideal for ATE System integration
â— Smart fan control with lower noise and better for environment
â— Multi versions to meet the cost performance and different applications
* Only professional Electronic Load units support these functions
1200V DC Electronic Load,DC electronic load tester,variable electronic load
APM Technologies Ltd , https://www.apmpowersupply.com