Share this

Design of a Car Driving Recorder Based on Embedded Systems

2026-04-06 05:06:28 · · #1
Abstract: This paper introduces a car driving recorder using an LPC2292 microcontroller with an ARM7 core and UC/OS-II as the operating system. The functions to be implemented by the car driving recorder are described, and the hardware circuit design and software design of the system are introduced. The system's hardware and software design includes modules for signal acquisition, data storage, keyboard operation, display, and data communication. Experiments show that the designed driving recorder conforms to the national standard GB/T19056-2003. Keywords: ARM7; LPC2292; UC/OS-II; operating system; car driving recorder; CAN bus Introduction A car driving recorder is a digital electronic recording device that can record and reproduce the driving status of a car. It can record the car's driving data throughout the entire process and, through the analysis of the recorded driving information data, accurately control the vehicle's driving status. Car driving recorders can effectively prevent drivers from violating driving rules and reduce traffic accidents. As early as the 1970s, the European Community began to mandate the use of electromechanical analog vehicle driving recorders, resulting in a 30%-50% reduction in traffic accident rates. Since the 1990s, countries such as the United States, Japan, Malaysia, and Singapore have also formulated regulations for vehicle driving recorders. China began research and development of vehicle driving recorders in the 1980s. On April 15, 2003, the State Administration for Quality Supervision, Inspection and Quarantine issued the national standard for vehicle driving recorders (GB/T19056-2003), drafted by relevant departments of the Ministry of Public Security, reviewed and approved by the State Standardization Administration and the State Economic and Trade Commission, and officially implemented on September 1, 2003. The standard applies to all in-use and new vehicles, and will be gradually rolled out from specific points to a wider scope, in batches and at different times. 1. Functions of Vehicle Driving Recorders A vehicle driving recorder consists of two parts: the main unit of the vehicle driving recorder and the data analysis software on the computer. This project focuses on the design of the main unit of the vehicle driving recorder. Referring to the requirements of the national standard for vehicle driving recorders (GB/T19056-2003), the vehicle driving recorder designed in this project mainly realizes the following functions: self-test function; real-time time, date, and driving time acquisition, recording, and storage functions; vehicle speed measurement, recording, and storage functions; vehicle mileage measurement, recording, and storage functions; driver identity recording function; keyboard operation function; data display; data printing output function; and data communication function. In addition to the two communication methods specified in the national standard—USB standard interface and standard RS232CD type 9-pin interface—this project also adds a CAN bus interface function. 2. System Hardware Design The vehicle driving recorder designed in this project uses an LPC2292 microcontroller with an ARM7TDMI-S core, and the operating system adopts the UC/OS-Ⅱ embedded operating system. This system can realize the acquisition, processing, real-time storage, and display of vehicle speed signals, switch signals, and analog signals. Data communication with a PC can be realized through serial port and USB interface, and data communication with the CAN node on the vehicle can be realized through CAN bus interface. The system's peripheral interface modules include a power supply module, a reset circuit module, a signal acquisition module, a keyboard operation module, a memory module, a clock module, a display module, a JTAG debugging interface, and a communication interface module. The system's block diagram is shown in Figure 1. Figure 1: Block Diagram of the Car Driving Recorder. 2.1 Microcontroller: The LPC2292 is a microcontroller developed by PHILIPS, based on a 32-bit ARM7TDMI-S CPU that supports real-time emulation and tracing, and features 256kB of embedded high-speed Flash memory. Its 128-bit wide memory interface and unique acceleration architecture allow 32-bit code to run at maximum clock speed. This controller has two CAN channels and 10 A/D conversion channels, and an external memory interface for easy expansion of external memory. 2.2 Power Supply Module: Due to the instability of the vehicle's power supply, the 12V power supply inside the vehicle must first be regulated, and then the voltage is converted to 5V using a linear voltage regulator chip L7805. Since the LPC2292 microcontroller operates on 3.3V and 1.8V power supplies, low-dropout (LDO) regulators SPX117M3-3.3 and SPX117M3-1.8 are needed to convert the 5V to 3.3V and 1.8V respectively. 2.3 Signal Acquisition Module The signal acquisition module needs to acquire one vehicle speed signal, 15 digital signals, and two analog signals. The vehicle speed signal is output from a Hall effect speed sensor. Since the sensor output signal is not a standard pulse signal, it needs to be shaped. The vehicle speed signal is first amplified by an operational amplifier OP2340, then shaped into a pulse signal by a Schmitt trigger 74HC14, and then connected to the microprocessor's P0.11 CAP1.1 pin. The pulse width of the pulse signal can be measured using the timer's pulse capture function, and the vehicle speed can be obtained through calculation. The vehicle's mileage can be obtained by counting the pulse signals. The switch signals are as follows: high beam headlights, low beam headlights, left turn signal switch, right turn signal switch, taillights, reversing lights, car horn switch, windshield wiper switch, ignition switch, brake switch, central locking, and door switches (driver's side, front passenger side, rear left side, rear right side). These 15 switch signals are first optocoupled by a TLP521, and then selected by a 16-channel switch signal detection chip CD4067. The output signal is connected to the P0.8 TXD1 pin of the LPC2292. By sequentially selecting the channels of these 15 switch signals through the four inputs of the CD4067, and then reading the status of the P0.8 TXD1 pin, the status of each switch can be determined. The two analog signals are the coolant temperature signal and the throttle opening signal. Since the output signals of the coolant temperature sensor and throttle sensor are both resistance signals, the resistance signals output by the sensors are first converted into voltage signals. These two voltage signals are then shaped by a four-channel operational amplifier LM124 before being output to the microprocessor's analog-to-digital conversion pins P0.27 ANT0 and P0.28 ANT1 for analog-to-digital conversion. 2.4 Memory Module According to national standards, the data in a vehicle driving recorder should include two parts: real-time vehicle data (data stored within 20 seconds before and after an accident); and historical vehicle data (data stored for 360 hours of vehicle and driver driving conditions). Due to the frequent updates of real-time vehicle data and the requirement for high reliability, the NOR flash memory SST39VF1601 was selected as the data storage in this project. This memory is a 1M×16 CMOS multi-functional Flash MPF device. The SST39LF/VF160 has high-performance word programming capabilities with a word programming time of 14µs. This chip boasts 10,000 cycles of endurance and over 100 years of data retention, making it widely applicable in design, manufacturing, and testing. Its use significantly enhances system performance and reliability while reducing power consumption. 2.5 Real-Time Clock Module The vehicle dashcam needs to record the time information corresponding to the occurrence of a state for later analysis, thus requiring detailed time information. The LPC2292 has a built-in real-time clock (RTC) module, but this module does not support the microcontroller's power-down mode; therefore, an external real-time clock module needs to be designed for the vehicle dashcam. Due to the dashcam's high real-time requirements and the need for the clock to continue running even when the system is powered off, the DS1302 clock chip, which features power-down detection and provides additional battery power, was selected. The DS1302 is a trickle-charged clock chip from Dallas Semiconductor, containing a real-time clock/calendar and 31 bytes of static RAM. It can communicate with the microcontroller via a serial interface, requiring only 3 I/O lines for synchronous serial communication. The clock/calendar circuit provides information on seconds, minutes, hours, days, periods, months, and years, with automatic adjustment for the number of days in each month and leap years. This chip has low power consumption and supports backup power. 2.6 Keyboard Operation Module: Due to the discontinuous pin positions of the LPC2292's GPIO ports, this module uses a ZLG7290 to drive a 4x4 matrix keypad. The ZLG7290 is an I2C serial interface device that provides keyboard interrupt signals, allowing for easy connection to the processor. The 4x4 matrix keypad includes buttons for vehicle speed display, mileage display, analog quantity display, USB data transmission, serial data transmission, driver information input, time adjustment, and print output. 2.7 Display Module: The display module in this system uses a YLF240128 dot-matrix LCD module with a yellow-green backlight and an STN LCD screen. Its embedded controller is a TOSHIBA T6963C, and it has 32KB of external display memory. This display module is used to display driving data information from the vehicle driving recorder, including instantaneous vehicle speed, maximum speed per minute, maximum speed within 10 minutes, time, date, total mileage, coolant temperature, and throttle position. 2.8 Communication Interface Module The communication interfaces designed in this project include a standard USB interface, a standard RS232CD serial interface, and a CAN bus interface. The standard USB interface and the standard RS232CD serial interface enable data download from the PC to the vehicle driving recorder host and data upload from the recorder host to the PC. This facilitates driver identification and the acquisition of vehicle driving data in the event of a traffic accident, thus aiding in traffic accident analysis. The standard USB interface uses a PDIUSBD12 device, which fully complies with the USB 1.1 specification. The RS232CD serial interface uses an SP3232 for RS232 level conversion; the SP3232 is a 3V RS232 converter chip. With the development of bus technology, many electronic control systems in automobiles now include CAN interfaces. To facilitate communication between the vehicle driving recorder and the vehicle's electronic control system with a CAN interface, a CAN interface was added to the system. Since the LPC2292 has two CAN channels, the design of the CAN bus interface circuit only needs to consider signal isolation and the design of the CAN bus transceiver. The CAN controller pins TD1 and P0.25RD1 of the LPC2292 are isolated by a high-speed optocoupler TLP113 and then connected to the TXD and RXD pins of the CAN bus transceiver PCA82C250. This CAN bus interface can communicate with other CAN nodes on the vehicle. 3. System Software Design The software part of the vehicle driving recorder in this project aims to implement functions such as timed acquisition and storage of vehicle driving status data, serial and USB communication with a PC, communication with other CAN nodes on the vehicle, LCD display, keyboard input, and print output. The main program flowchart of this system is shown in Figure 2. Figure 2: Main Program Flowchart of the System. The vehicle driving recorder has two working states. When the car is running, it records the current driver's driving information, such as speed, mileage, continuous driving time, speeding records, and stopping time, and provides a buzzer alarm when the car exceeds the speed limit. When the car is stopped, it exchanges data with the PC via either USB or RS232 communication mode after a keyboard scanning program. Data can be uploaded or downloaded. An embedded operating system is a computer system that combines hardware and software to perform complex functions. Embedded systems can improve system reliability, increase product development efficiency, and shorten development cycles. Currently commonly used operating systems include Linux, Windows CE, VxWorks, OSE, Nucleus, eCos, and UC/OS-II. UC/OS-II is an open-source, portable, firmware-enabled, customizable, and preemptive real-time multitasking operating system. UC/OS-II is certified by the Federal Aviation Administration for commercial aircraft and has been used in hundreds of products since its introduction in 1992. Due to the above advantages of UC/OS-II, this project adopts the UC/OS-II operating system. The software development for the car dashcam employs a modular programming approach, establishing different tasks, prioritizing them, and using semaphores and message mailboxes for communication between tasks. The UC/OS-II file system structure includes the kernel code, setup code, and processor-related porting code. The kernel code is processor-independent, comprising seven source code files and one header file. These files implement functions such as kernel management, event management, message queue management, memory management, message management, semaphore handling, task scheduling, and timer management. The setup code is application-dependent, including two header files used to configure the number of event control blocks and whether to include message management-related code. The porting code is processor-dependent and requires modification during system porting. This part includes OS CPU.H, the assembly files OS CPU AS, and OS CPU.C. Porting UC/OS-II to the LPC2292 microprocessor primarily involves modifying these three files in the aforementioned porting code section. 4. Conclusion This project designed the hardware and software components of a vehicle driving recorder. The recorder system successfully acquired, stored, and displayed real-time vehicle speed pulse signals, switch signals, water temperature, and throttle signals. It also implemented driver identification recording and successfully achieved data transmission via USB and serial communication, meeting the requirements of the national standard (GB/T19056-2003). The authors' innovations include using the LPC2292 chip with an ARM7 core as the microprocessor, adding a CAN interface module to the data communication module, and employing the UC/OS-Ⅱ operating system in the software design, successfully porting this operating system to the LPC2292. This system has a short development cycle, is easy to maintain and modify, and represents the future direction of vehicle driving recorder development. References: [1] Zhou Ligong et al. ARM Embedded System Basic Tutorial. Beijing University of Aeronautics and Astronautics Press, 2005 (3). [2] Zhou Ligong et al. ARM Embedded System Experiment Tutorial. Beijing University of Aeronautics and Astronautics Press, 2005 (2). [3] Zhong Ying. Design of ARM-based Car Driving Recorder - Host Module. Master Thesis of Zhejiang University. 2005. [4] Cheng Huiling. Application of USB Communication Interface in Car Driving Recorder. Master Thesis of Nanjing University of Science and Technology, 2004. [5] Xie Shengdong. Development of Car Driving Recorder Based on GB/T19056-2003. 2005. [6] Yuan Wenyan, Chi Ruijuan, Hu Guilan. Design of Car Body System Based on LIN Bus. Microcomputer Information, 2006, 9-2: 224-226.
Read next

CATDOLL 136CM Jing (Customer Photos)

Height: 136cm Weight: 23.3kg Shoulder Width: 31cm Bust/Waist/Hip: 60/54/68cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22