Design of multifunctional car recorder based on GPS and GPRS

Abstract: This paper proposes a design scheme of multi-function car recorder. The system adopts AT91SAM9260 ARM processor as controller, Linux operating system, K91G08UOB type Nand Flash as storage medium, and receives GPS signal through ET_318 SiRF StarIIIGPS chipset for positioning. The GPRS module uses SIM300C to transmit data. The car recorder can record and monitor the driving state and position of the car in real time, upload the driving record and current information to the server through GPRS, realize remote monitoring, and have the function of overspeed and fatigue driving alarm. Data can be uploaded to the host computer via USB or RS-232 serial port. The recorder has been tested to be stable and reliable.
Keywords: ARM; GPS; GPRS; car drive recorder

The car tachograph (car black box) is a digital electronic recording device used in automobiles to store state information such as the speed, time, mileage and brakes of the car and to export data via USB or serial port. The automobile recorder plays an important role in restraining the driver's bad driving behavior, analyzing and identifying road traffic accidents, improving traffic management law enforcement level and transportation management level, and ensuring vehicle operation safety.
The current automotive tachograph technology is relatively mature. Low-end products generally use 8-bit or 16-bit MCUs as the main processor, while mid-to-high end uses 32-bit ARM processors. However, these products can only record the car and Monitoring, vehicle travel records need to be collected by car, not convenient for large fleets and enterprise management. Here, a design scheme of a multi-function car recorder based on GPS and GPRS is proposed. The design is based on the basic functions of the recorder, adding GPS and GPRS modules for positioning and data remote transmission, combined with database technology and The corresponding monitoring and management software realizes comprehensive monitoring, scheduling and management of vehicles and drivers.

1 System components and main functions The system mainly includes car recorder terminal, server and monitoring management software. The car recorder terminal includes signal acquisition, data recording, GPS and GPRS. The server receives the data sent by the recorder via GPRS and saves it. The monitoring management software collects and analyzes the data of the server, and obtains information such as speeding, fatigue driving, and mileage.
Recorder finalization is the basis of the entire system, its main functions are:
1) The real-time positioning function can record and record the current position data of the vehicle in real time, and send the position data to the monitoring center management platform to display the driving trajectory of the vehicle on the monitoring platform; the monitoring center (monitoring station) can also issue instructions to find Location data of the target vehicle;
2) Operational restriction area setting function The monitoring platform can be used to limit the range of the driving area of ​​the operating vehicle. Once the vehicle exceeds the limited area, the monitoring platform will issue an alarm;
3) After parking the anti-theft function, press the parking anti-theft button and the vehicle enters the parking anti-theft state. If the vehicle moves illegally, the monitoring platform immediately sends a text message to the master mobile phone and reports the current vehicle location;
4) Emergency help alarm When the vehicle is robbed or needs help, the driver can alarm to the center by pressing the button, and send the longitude, latitude, travel speed, direction, time and other information of the vehicle to the monitoring center;
5) Vehicle full-time driving data record The vehicle terminal collects and records all data of vehicle driving and driver operation and sends it to the data center. These include: vehicle time, speed, mileage, status, location, engine speed and other data. Using the whole travel data recorded by the all-in-one machine, the monitoring platform provides a speed-state curve and a mileage-speed-state curve for each travel record. Use these curves to view the driver's entire driving process;
6) Overspeed alarm and overspeed recording The vehicle terminal can perform overspeed alarm according to the preset speed limit. When the driving speed of the vehicle exceeds the set value, the vehicle terminal will alarm in the sound/light mode to remind the driver to decelerate in time. At the same time, the vehicle speeding information is sent to the monitoring center;
7) Driver fatigue driving alarm and recording vehicle terminal can record all fatigue driving data of the driver's continuous driving time over 4 hours;
8) Accident suspect recording The vehicle terminal records the speed value, brake signal and other vehicle status signals of the vehicle corresponding to the real-time time in the 20 s period before the vehicle is parked as the accident suspect data at intervals of 0.2 s. Store all accident suspect data for the last 2 months;
9) Vehicle oil level monitoring function The vehicle terminal can monitor the oil level of the fuel tank in real time. When the oil level changes abnormally, the vehicle terminal can record the change amount in real time and send abnormal change data to the monitoring center;
10) The video monitoring function can be connected to two cameras, and the photos inside and outside will be captured and sent to the monitoring center;
11) Driver identification function The vehicle terminal uses the IC card method to realize the driver identification function. The driver's basic information can be set in the IC card using the management software used with the vehicle terminal, including: "driver name", "driver code", and "driver's license number". Insert the set IC card into the recorder, and the recorder automatically recognizes the driver;
12) Data communication function The vehicle terminal realizes data communication with the monitoring center through the built-in GPRS communication module; the vehicle terminal has a standard USB interface, and the U disk can be used to take out all the data recorded by the vehicle terminal; the USB port of the vehicle terminal can be used for the vehicle. The terminal can also perform program loading on the vehicle terminal by performing parameter setting;
13) Read the short message function to read any short message content sent by the monitoring platform.

2 Recorder hardware design The overall structure of the recorder is shown in Figure 1. It mainly includes ARM processor, GPS module, GPRS module, signal acquisition circuit, real-time clock circuit, voice alarm circuit and data storage circuit.

This article refers to the address: http://

a.JPG


2.1 Main processor In order to meet the requirements of the system for real-time, large-scale data processing, GPS signal reception, GPRS transmission data control, etc., the 32-bit ARM processor AT91SAM9260 is selected. The AT91SA-M9260 uses the ARM926EJ-S core. The external bus interface contains controllers for controlling SDRAM and static memory including NAND Flash and Compact Flash. 7-way US-ART, 1 dual-wire interface (TWI) and 4 Channel 10-bit A/D converter.
2.2 Power supply circuit The current car battery voltage is between 9 and 36 V. Due to the environmental impact of the vehicle itself, the vehicle supply voltage is unstable and there are various kinds of interference. Therefore, the system uses a three-stage voltage conversion circuit, as shown in Figure 2. . The external power supply is converted to 7, 5, and 3 V by the LM2576HVT-ADJ, LM2940-5.0, and LMlll7, respectively, and supplied to the corresponding module. The first stage LM2576HVT-ADJ converts the 7-40 V voltage to 7 V, making the system suitable for use in any vehicle. By LC filtering before the power input voltage conversion module, AC interference can be effectively filtered out, and the back end of each power converter passes 100 and O. The 1μF capacitor is connected in parallel to eliminate the ripple voltage to ensure stable system power supply. The circuit has been tested to stabilize the output of 5 and 3.3 V.

b.JPG


2.3 Speed ​​Acquisition Circuit Obtaining accurate speed is the basis for the normal operation of the recorder. Most cars are equipped with speed sensors, which output a certain number of pulses every revolution of the wheel. It is critical to accurately determine these pulses. The speed acquisition circuit used in this system is shown in Figure 3. First, the high-frequency interference is removed by the front-end RC filter. After a follower, the output of the comparator circuit is controlled to control the on-off transistor VQ1 to generate a stable pulse signal.

c.JPG


2.4 GPS
GPS is the core part of the system's positioning, using Gloabalsat's ET-318 SiRF StarIIIGPS chipset, which has high sensitivity (tracking sensitivity: -159 dbm), fast TTFF (first positioning time) under low signal, 20 channels of full field of view Tracking, speed accuracy of 0.1 m / s, support NMEA0183 and SiRF binary protocol, fixed output NMEA0183 data information through the serial port. Communication parameters: baud rate is 4 800 b/s, data bit is 8 bit, stop bit is 1 bit. No parity. The ARM receives the RMC (Recommended Positioning Information) and obtains information such as time, latitude and longitude, ground speed, and ground heading.
2.5 GPRS
The system sends the current speed, latitude, longitude, direction and time to the server via GPRS every 10 s. The management software can read the information to monitor the current state of the vehicle. The GPRS module uses the SIM300C, which is small in size, uses DIP board-to-board connectors, low power consumption, high-speed transmission of voice, SMS (SMS), data and fax information. The most important thing is that it has a built-in powerful T-CP/ The IP protocol stack supports the standard AT instruction set. The system establishes TCP pipe transmission data through SIM300C. The establishment process is as follows:
G.jpg
Among them, 1 024 specifies that the maximum amount of transmission per time does not exceed 1 KB.
2.6 Voice module system When speeding and fatigue driving, the corresponding high-brightness LED flashes, and the voice alarm function is activated at the same time, and the warning voice of “speeding, please slow down” is issued, and the recorder can play the content of the short message sent by the monitoring platform. That is TTS (from text to speech). The recorder uses the second generation speech synthesizer OSYNO 6288 in the voice world. It is compatible with the synthesis of four internal code formats such as GB2312, GBK, BIG5 and Unicode. It can work normally at baud rates of 9 600, 19 200, 38 400 b/s, and adds various control commands. Such as synthesis, stop synthesis,
Suspend synthesis, continue synthesis, change baud rate, etc., can automatically recognize phrases, multi-phonetic words. The voice is output to the speaker through PWM (Pulse Width Modulation). Compatible with monitoring software, database and GPRS module, adopts more versatile Unicode code, communication parameters: baud rate is 4 800 b/s, data bit is 8 bit, stop bit is 1 bit without parity, OSYNO The 6288 has a built-in amplifier, and the software adjusts the volume to level 11. The external 8 Ω/0.5 W speaker makes the playback sound loud and clear, and the content can be clearly heard even in a noisy environment.
2.7 Data Storage The vehicle tachograph is an electronic device that records various states of the car while the car is running. Various state data storage is an important part of the car tachograph. Most of the previous designs used Flash and ferroelectric memory. But for the real-time operating system Linux, just use a piece of Flash to meet the needs. At present, the Linux operating system can support NandFlash very well. The AT91sam9260 supports Nand Flash startup, and the corresponding yaffs2 file system has matured to ensure the accuracy of the data. Because the system needs to save a large amount of data: GPS positioning information, suspect point records, driving records, power failure records, fatigue driving records, oil level, etc., so use K9F1G08UOB type 128Mx2 K page NandFlash memory.
2.8 Oil level sensor This system is equipped with accurate oil level sensor, which records the oil level in real time and transmits it to the monitoring platform through GPRS. The vehicle operation enterprise can grasp the oil level of the vehicle in real time and completely prevent the driver from stealing oil and selling oil. The situation of private life occurs.
The electric environment of the vehicle is complicated and complicated, so a current type sensor is used. This system adopts CR-606 capacitive oil level sensor. When the oil enters the container, it changes between the sensor housing and the sensing electrode. It is suitable for any non-conductive liquid. The oil level is high and the oil level is less than 1 mm. The linear current signal with a measurement error of less than 0.1% and a standard output of 4 to 20 mA is converted to a voltage of 0.6 to 3 V by a 150Ω precision resistor, and converted into a digital quantity by the A/D conversion module of the AT91sam9260 and stored.
2.9 Real-Time Clock Although the main processor AT91sam9260 has a built-in clock, when the processor is powered off, the contents of all registers of the real-time clock will be lost. To do this, the system requires an external real-time clock. The PCF8563 meets this requirement. The PCF8563 has a brownout detector. When the supply voltage is lower than a certain value, a certain flag in the second register will be set to 1, indicating that the real-time clock may generate inaccurate clock/calendar information. This avoids the recorder's recording of the error time. In addition, the PCF8563 can work in a wide voltage range of 1 to 5.5 V, and has the advantages of small size, simple peripheral circuit, stable operation, high precision, low power consumption, etc. The Linux kernel supports it stably and reliably, and satisfies the system. Requirements.
2.10 Communication interface According to GB/T19056-2003, the standard recorder should be equipped with at least two standard interfaces: USB standard interface and standard RS-232 type 9-pin interface. Data transmission directly through the RS-232 serial port is relatively easy to implement and has high reliability. The AT91sam9260's serial port level converter MAX232 converts to EIA/TIA-232-E level, providing a standard RS-232 interface. AT91sam
The 9260 supports USB master-slave mode and can also be directly connected to the USB interface.

3 car recorder software design car recorder is unmanned, automatically start when the car starts running, the system uses Linux operating system, the running process is: car power-on recorder starts, start boot Bootstrap, Uboot, call through the bootloader The Linux kernel loads the yaffs2 file system and automatically launches the application.
3.1 Main program The application is written in C language. The main program is responsible for the initialization of the entire system. The hardware device interacts with the main program through signals (soft interrupts) to complete the corresponding operations. The main program flow is shown in Figure 4.

d.JPG
3.2 GPRS data transmission The data recorded by the system design includes driving records. Between power-on and power-down, time, speed, status, GPS positioning information and angle are saved every 3 s; suspect points are recorded, and each time before parking is saved 20 In s, the speed and status information every 0.2 s; power-off record, save the time when the system is powered off; fatigue driving record, save the start time of the driver's continuous driving for more than 4 hours. All recorded data is required to be stored for 2 months, so the amount of data stored is large, and the amount of data that needs to be transmitted is also large.
The data is compressed before the GPRS transmits the data and is transmitted when a new record occurs in the system. When compiling busybox, select gzip function, compress data through gzip, the general compression ratio can reach 9:1. Since GPRS transparent transmission requires a maximum of 1 KB per data transfer, the data to be transmitted is divided into 1000 bytes of data per packet, and the ID number is identified for each packet of data.
The server receiving end recombines the data according to the received data packet lD, and decompresses the decompressing software to obtain the recorded data of the recorder.
3.3 Realization of power failure records In large fleets and transportation companies, drivers are not bound by the recorder, and often illegally power off the recorder during operation, so that the recorder can not work normally, so as to avoid monitoring. Therefore, the system specifically designed the power-off record to supervise the driver's illegal power-off behavior. When the system starts, compare the current clock with the last stop clock. The time from the crash to the restart of Linux should be within 5 min. If the comparison time exceeds 5 min, the recorder will be powered off for a long time, and the last downtime will be taken as the break. The electrical record is saved and sent to the server.
3.4 Time and speed calibration The ARM receives the RMC information of the GPS. If the GPS time differs from the current system time by 30 s, the GPS time is used and the system time and hardware clock are calibrated. The current speed is compared with the GPS speed. If the GPS speed is greater than 0 for 30 consecutive s, and the speed acquisition circuit receives always O, then the speed sensor is judged to be faulty, and the GPS speed is used as the current speed of the system, and the monitoring center is alerted.

4 Prototype testing After hard work, the system has been completed and a prototype is produced. The test vehicle is installed in the test vehicle for various performance and functional tests. The test results are shown in Table 1, Table 2.

e.JPG

f.JPG


5 Conclusion The car recorder combines GPS and GPRS to achieve precise positioning and remote data transmission. The management software can obtain current vehicle status information in real time, and can timely view vehicle travel records, real-time vehicle alarm and audit, and accident handling of public security traffic police department. Play an important role, increase the power-off record and a variety of alarm functions, that is, it can prevent burglary, and meet the needs of large and medium-sized fleets and enterprises for vehicle management and driver operation monitoring.