Based on AT91SAM926 car recorder program

The car driving recorder (car black box) is a digital electronic recording device used in a car, which can store the status information such as the car's driving speed, time, mileage, and braking, and export the data via a USB or serial port.
The car recorder plays an important role in analyzing and appraising road traffic accidents, improving the level of traffic management law enforcement and transportation management, and ensuring the safety of vehicle operations.
The current car driving recorder technology is relatively mature. Low-end products generally use 8-bit or 16-bit microcontrollers as the main processor, while high-end 32-bit ARM processors are used. However, these products generally can only record and monitor the car, and vehicle records need to be collected on a vehicle-by-car basis. Inconvenient for large fleets and business management. Here is a design proposal of a multi-functional car recorder based on GPS and GPRS. This design is based on the basic functions of the recorder. GPs and GPRS modules have been added for remote location and data transmission respectively. The combination of database technology and corresponding monitoring management software enables 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 and management software performs statistics and analysis on the server's data and obtains information such as speeding, fatigue driving, and mileage.
The recorder is the basis for the entire system and its main functions are:
1) The real-time positioning function can collect 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 trajectory of the vehicle on the monitoring platform; the monitoring center (monitoring station) can also issue instructions to find Target vehicle location data:
2) Operational restrictions Regional setting function The use of the monitoring platform can be used to define the scope of the running area of ​​the operating vehicle. Once the vehicle exceeds the limited area, the monitoring platform will issue an alarm.
3) After the park anti-theft function is parked, press the parking anti-theft button and the vehicle will enter the parking security state. If the vehicle is illegally moving, the monitoring platform immediately sends a text message to the main control mobile phone and reports the current vehicle position;
4) Emergency assistance alarm When the vehicle is robbed or needs help, the driver can press the key to report to the center and send the vehicle's longitude, latitude, driving speed, direction, time and other information to the monitoring center at the same time;
5) The vehicle's full travel data record The vehicle's on-board terminal collects and records all data of the vehicle's driving and driver's operations and sends it to the data center. Including: vehicle time, speed, mileage, status, location, engine speed and other data. Use the integrated machine to record the full travel data. The monitoring platform provides a speed-state curve and a mileage-speed-state curve for each trip record. Use these curves to see the driver's entire driving process:
6) Overspeed alarm and overspeed recording The vehicle terminal can perform speeding alarm according to preset speed limit. When the vehicle speed exceeds the set value. The vehicle terminal alarms by sound and light to remind the driver to slow down in time. At the same time, the vehicle speeding information is sent to the monitoring center:
7) Driver's fatigue driving alarm and recording The on-board terminal can record all fatigue driving data of the driver for continuous driving time exceeding 4 h:
8) Accident record of accidents The vehicle-mounted terminal records the speed value, brake signal and other vehicle status signals corresponding to the real-time time within 20 s before the vehicle is stopped as the data of accident doubt points at 0.2 S intervals. Store all accident data for the most recent 2 months:
9) Vehicle oil level monitoring function The vehicle terminal can monitor the fuel tank oil level in real time. When there is an abnormal change in the oil level. The on-board terminal can record changes in real time and send abnormal change data to the monitoring center:
10) The video surveillance function can connect two cameras to capture the photos inside and outside the car and send them to the monitoring center:
L1) Driver identification function The vehicle terminal uses the IC card method to realize the driver's identification function. Using the management software used with the vehicle terminal can set the driver's basic information on the IC card, including “driver name”, “driver code”, and “driver's license number”. Insert the set IC card into the recorder. The recorder automatically recognizes the driver:
12) Data Communication Function The vehicle-mounted terminal realizes data communication with the monitoring center through the built-in GPRS communication module; the vehicle terminal has a standard USB connection 121.
U disk can be used to take out all the data recorded in the car terminal: through the USB port of the car terminal can be set to the parameters of the car terminal can also be loaded on the vehicle terminal program;
13) Read SMS function Reads any SMS content sent by the monitoring platform.
2 recorder hardware design
Recorder overall block diagram shown in Figure 1, mainly including ARM processor, GPS module, GPRS module, signal acquisition circuit, real-time clock circuit, voice alarm circuit and data storage circuit.

2.1 main processor
In order to meet the real-time system, a large number of data processing, GPS signal reception, GPRS data transmission control and other aspects of the requirements. Use 32-bit ARM processor AT91SAM9260. The AT91SAM9260 uses the ARM926EJ-S core. The external bus interface contains many controllers for controlling SDRAM and static memories including NAND 171ash and Compact Flash. 7-way US-ART, 1 2-wire interface (TWI) and 4-channel 10-bit A/D converter.
2.2 Power Circuit
At present, the battery voltage of the car is between 9-36 V, and due to the environmental impact of the vehicle itself, the car power supply voltage is unstable and there are various interferences, so the system uses a three-level voltage conversion circuit. as shown in picture 2. External power is converted to 7, 5, and 3 V via the LM2576HVrr_ADJ, LM294o_510, and LMlll7, respectively.
Supply the corresponding module. The first stage, the LM2576HVT-ADJ, converts 7 to 40 V to 7 V, allowing the system to be applied to any vehicle. Before the power input voltage conversion module is ridiculed by the LC filter, AC interference can be effectively filtered out, and the back ends of the power converters are connected by 100 and 0.1 F capacitors to eliminate the ripple voltage and ensure the system power supply stability. After testing this circuit can stably output 5 and 3-3 V voltage.
2.3 Speed ​​Acquisition Circuit
Getting accurate speed is the basis for the recorder's normal operation. Most cars are equipped with speed sensors. Every rotation of the wheel will output a certain number of pulses. Accurately determining these pulses is the key. The speed acquisition circuit used in this system is shown in Figure 3. First of all, the front-end RC filter removes high-frequency interference. After a follower, the output of the comparator circuit controls the transistor V at the back end. The on and off, producing a stable pulse signal.
2.4 GPS
GPS is the core part of this system to achieve positioning. It uses Globesat's ET-318 SiRF Star III GPS chipset. This module has high sensitivity (tracking sensitivity: 159 dbm), fast TrrFF at low signal (first-time positioning), 2O channel Full-field tracking, speed accuracy 0.1 m/s, support NMEA0183 and SiRF binary protocol, fixed output NMEA0183 specified data information through the serial port. Communication parameters: baud rate 4 800 b/s, data bit 8 bit, stop bit l bit, no parity. ARM receives the RMC (Recommended Positioning Information) from it and obtains information such as time, latitude and longitude, ground speed, and ground direction.
2.5 GPRS
The system sends the current speed, latitude, longitude, direction, and time to the server every 10 seconds through GPRS. The management software can read this information to monitor the current status of the vehicle. The GPRS module uses the SIM300C, which is small in size, uses a DIP board-to-board connector, and uses low-power, high-speed voice, SMS (SMS), data, and fax information. The key is that it embeds a powerful TCPfiP protocol stack. Supports standard AT instruction set. This system establishes TCP pipeline transmission data through SIM300C. The establishment process is as follows:
Of these, 1,024 specifies that the maximum amount of transmissions should not exceed 1 KB.
2.6 Voice Module
When the system is driving at speed and fatigue, the corresponding high-brightness LED flashes and the voice alarm function is activated at the same time. Send "Speeding, Please Decelerate" warning voice, and the recorder can play the contents of the SMS sent by the monitoring platform, namely 1_I's (from text to voice). The recorder uses the second-generation speech synthesizer OSYNO 6288. It is compatible with the synthesis of 4 internal code format texts such as GB2312, GBK, BIG5 and Unicode, and can work normally at baud rates of 9 600.19 200 and 38 400 b/s. Add a variety of control commands. Such as synthesis, stop synthesis, pause synthesis, continue synthesis, change the baud rate, etc., can automatically identify phrases, polyphonic words. Speech is output to the speaker through PWM (Pulse Width Modulation). For compatibility with monitoring software, databases and GPRS modules. Use more universal Unicode code, communication parameters: baud rate is 4 800 b/s, data bit is 8 bit, stop bit is l bit, no parity, OSYNO 6288 has built-in amplifier, software adjusts volume to 11 Level, external 8 n/0.5 W speaker, playing sound loud, clear, even in a noisy environment can clearly hear the playback content.
2.7 Data Storage
The car driving recorder is an electronic device that records various states of the car during driving of the car. Various state data storage is an important part of the car driving recorder. Most of the previous designs used flash and ferroelectric memory in combination. However, for a real-time operating system, Linux can meet the needs of a flash. At present, the Linux operating system can support Nandnash, AT91sam9260 supports Nand Flash startup, and the corresponding yafs2 file system has matured, ensuring the accuracy of the data. Because this system needs to save a large amount of data: GPS positioning information, doubtful records, driving records, power failure records, fatigue driving records, oil level, etc., it uses the K9F1GO8UOB 128 Mx2 K page NandFlash memory 2.8 oil level sensor:
The system is equipped with an accurate oil level sensor, which records the oil level in real time and transmits it to the monitoring platform through GPRS. The vehicle operating company can grasp the oil level of the vehicle in real time and completely eliminate the driver from stealing oil to sell oil.
The electric environment of the vehicle is more complex and interferes, so current sensors are used. The system uses a CR-606 type capacitive oil level sensor, which causes a change between the sensor housing and the sensing electrode when the oil enters the container. Applicable to any non-conductive liquid, high oil level accuracy, the oil level fluid is less than 1 inm in the collection, the measurement error is less than 0.1%, standard output 4 ~ 2O mA linear current signal. After 150 n precision resistance converted to 0.6 ~ 3 V voltage signal. Through the AT91sam9260's A / D converter module to digital and save.
2.9 Real-time clock
Although the main processor AT9lsam9260 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 drops below a certain value, a flag in the second register will be set, indicating that the real-time clock may generate inaccurate clock/calendar information. This prevents the recorder from recording incorrect times. In addition, PCF8563 can work in a wide voltage range of 1 ~ 5.5 V, with the advantages of small size, simple peripheral circuits, stable operation, high precision, low power consumption. The Linux kernel is stable and reliable to meet the requirements of the system.
2.10 Communication Interface
According to GB/T 19056-2003, standard recorders should be equipped with at least two kinds of standard interfaces: USB standard interface, standard RS-232 type 9-pin interface. It is easier to implement data transmission directly through the RS-232 serial El, and the reliability is high.
The ArI'9lsam9260 serial port is converted to the EIMTIA-232E level via the level shifter MAX232 to provide a standard RS-232 interface. AT91sam9260 supports USB master-slave mode, but also directly external USB interface.
3 Car Recorder Software Design
The car recorder is unmanned and starts automatically when the car starts running. This system uses the Linux operating system. The running process is as follows: The car power-on recorder starts, and Bootstrap and Uboot are started. The Lin-I1x kernel is invoked by the bootloader, the yafs2 file system is loaded, and the application is automatically started.
3.1 The main program
The application program 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.
3.2 GPRS data transmission
The data recorded in this system design includes driving records. Between power-on and power-off, save the time, speed, status, GPS location information and angle every 3 seconds:
Suspect records, save every 20 seconds prior to each stop, every 0.2 S speed and status information; power records, save the time when the system is off; fatigue driving records, save the driver starting more than 4 hours of continuous driving. All the recorded data are required to be stored for 2 months, so the amount of saved data is large and the amount of data that needs to be transmitted is also large.
The data is compressed before the data is transmitted by GPRS and transmitted when a new record appears in the system. Choose gzip function when compiling busybox, compress data by gzip, general compression ratio can reach 9:l. Since the transparent transmission of GPRS requires that the maximum transmission data does not exceed 1 KB, the data to be transmitted is divided into data of 1 000 bytes per packet, and the ID number is identified for each packet of data.
The server receiver reassembles the data based on the received packet ID. The decompression software decompresses the recording data of the recorder.
3.3 The realization of power records
In large fleets and transport companies, the driver is free from the constraints of the recorder. In the course of operation, the recorder is illegally powered off, so that the recorder cannot work normally, so as to avoid monitoring. Therefore, this system is designed specifically for power failure records. Monitor the driver’s illegal power cuts. When the system is started, the current clock is compared with the clock at the time of the last shutdown. The time from the crash to the restart of Linux should be within 5 minutes. If the comparison time exceeds 5 minutes, it indicates that the recorder is powered off for a long time and the last shutdown time is taken as The electricity record is saved and sent to the server.
3.4 Time and Speed ​​Calibration
ARM receives GPS RMC information. If the difference between the GPS time and the current system time reaches 30 s, the GPS time will prevail and the system time and hardware clock will be calibrated. The current speed is compared with the GPS speed. If the GPS speed is continuously greater than 30 s and the speed acquisition circuit is always receiving 0, 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, this system has been completed and prototypes have been produced. The prototype is installed in the test vehicle to perform various aspects of performance and functional testing. The test results are shown in Table 1, Table 2.


5 Conclusion
The car recorder integrates GPS and GPRS to achieve precise positioning and remote data transmission. Through management software, it can obtain current vehicle status information in real time. It can also view vehicle driving records in real time, and plays an important role in the real-time alarm and audit of vehicles and accident handling in the ** department. Role, increase power records and multiple alarm functions, that can prevent robbery, but also meet the needs of large and medium-sized teams and companies for vehicle management and driver operation monitoring.

Knock Box

Stainless steel coffee knock box ,different style and different size for you to choose.

Also can be powder coating finishing or mirror polishing or satin polishing .

Also welcome to combine the tamer, brush, Tamper Station, portafilter as one set.

Welcome to ask for any question or sent inquiry.

Knock box drawer,knock box,coffee ground waste box

Jiangmen Wellway Houseware Co.,Ltd , https://www.hkwellway.com