# Car Driving Record System Based on Ferroelectric Memory Reading Function and SD Card Chip

Authors: Donghua Long
Journal: Advances in Materials Science and Engineering
 (2022)

---

## Abstract

The advent of the new era has promoted the rapid rise of technology. It drives the rapid development of the well-off economy. The car sales rate has also skyrocketed, but due to the frequent occurrence of various traffic accidents, it has become a difficult problem for relevant personnel to find the cause of the accident and driving. The arrival of the recorder is able not only to record the problems of traffic accidents but also to monitor the drivers as a basis for judging traffic violations. Based on the investigation and research on the current car driving recorders on the market, all the driving recorders on the market have relatively simple system structures and functions, and the transmission of communication information is slow. The SD card emphasizes the security of data and can set the stored usage rights to prevent the data from being copied by others, and the transmission speed is fast. Based on the problems described above, the design of the system program of the car driving recorder based on the reading function of the ferroelectric memory and the combination of the small size and large storage capacity of the SD card chip is proposed, and the combination of GPS positioning is added, to improve the accuracy of the positioning function. In order to obtain a more practical car driving recorder, the experimental results show that when the distance of each observation location is less than 0.45 m, its average accuracy factor is also less than 0.45 m, which can meet the requirements of the system for accuracy performance, that is to say, it can be shown under the accuracy analysis. The research and design system has a certain degree of practicability, and the stability function is very good.


---

## Body

## 1. Introduction

With people’s economic permission and travel demand, there are more and more vehicles on the road today. In order to ensure the safety of travel, the installation of a driving recorder can provide a large degree of safety guarantee for your travel, whether it is for you or for others, Today’s driving recorders on the market are mainly divided into two categories: portable driving recorders and rear loader integrated DVD driving recorders. One of them is the main portable driving recorder of this investigation. A driving recorder is very convenient to disassemble and install, and it is convenient to carry and travel. This type of recorder is concealed. It is the first choice for most people with strong functions and low prices. Based on these various advantages, in addition to ensuring its compact appearance, it also needs a larger capacity storage chip to support it, and it also needs to have the characteristics of convenient reading and convenient operation. This article proposes to explore the driving recorder, which combines the reading characteristics of the ferroelectric memory and the small and large capacity of the SD chip card. In the process of experimental exploration, the characteristics of the analog, digital, and switch signals of the vehicle are first explored. The focus is on the data acquisition module and circuit design. The chip control page is established based on the GPS positioning function to improve the human-computer interaction system. The use of SD chips to provide the system with a large-capacity information storage design can better serve it.With the passing of time, people’s economic conditions are also increasing, and the demand for life is gradually increasing in the fast-paced life. The fast-paced life also expresses the requirements for convenience in travel, and most people are in the right conditions. I chose to travel by car, but the increasing number of vehicles on the road has also led to an endless stream of traffic safety accidents every year. Traffic accidents in various situations continue to occur. In order to track and monitor the condition of the vehicle at any time, the appearance of the driving recorder is very necessary. However, based on the current recorders on the market, they have corresponding shortcomings. The driving recorder is a necessary recording tool for every vehicle, and it has a high advantage in the analysis of the cause of traffic accidents, so the research on the driving recorder is very necessary.Based on the incompleteness of the current driving recorders in automobiles, scholars have made corresponding academic investigations on the collection and storage of data or the inconvenience of operation. Studies have shown that the dense samples have fine grains and smooth film microstructures. Zannen et al. observed the pure perovskite structure by X-ray diffraction of all samples. The frequency dependence of dielectric constant and loss tangent was studied at room temperature, and the reduction of dielectric loss after the introduction of lanthanides was revealed. The energy storage density (Wrec) is calculated using the obtained P-E ring. The energy stored and transferred depends on the form and composition of the sample [1]. Considering ferroelectric/antiferroelectric materials, high energy harvesting and storage are essential. Patel S studied the high energy density (collection and storage) of Pb0.99Nb0.02[(Zr0.57Sn0.43)0.92Ti0.08]0.98O3 (PNZST). The Olsen cycle converts the material directly heat/waste heat to electrical energy. The results will enrich our understanding of PNZST materials that provide high-performance energy harvesting and storage applications. This work also helps improve the way energy is collected [2]. The behavior parameters of the car following are expected to be related to other driving behavior models. Kim and Mahmassani investigated the influence of ignoring the correlation among the three parameters of the car following model on the motion and characteristics of the simulated heterogeneous vehicle traffic flow. For each model specification, use next-generation simulation trajectory data to calibrate the parameters for the entire sample of a single driver. Perform factor analysis to understand the relationship pattern between the parameters based on the calibration data. Correlation coefficients have been used to show statistically significant correlations between parameters. The simulation experiment is performed using vehicle parameter sets generated with and without considering this correlation. First, the parameter values are sampled from the empirical quality function. When the parameter correlation (and ignorance) is captured, the simulation results show a significant difference in the output measurement [3]. Maciejewski et al. research proposed and evaluated an effective real-time taxi scheduling strategy, which solves the linear allocation problem to find the global optimal taxi-to-request allocation in each decision period. The author compares the allocation-based strategy with two popular rule-based strategies. They used the mini-large MATSim simulator to evaluate in detail the scheduling strategy of Berlin and the area around Brandenburg [4]. A memory processing (PIM) architecture based on ferroelectric FET (FeFET) to accelerate deep neural network (DNN) reasoning. Long et al. proposed a digital memory vector-matrix multiplication (VMM) engine design, using FeFET crossbar switches to achieve bit-parallel computing and eliminate the analog-to-digital conversion in the previous mixed-signal PIM design. A dedicated hierarchical network-on-chip (H-NoC) has been developed for input broadcasting and immediate partial result processing, which reduces the amount of data transmission and delay [5]. More information is transmitted with the same number through fewer interconnections, thereby reducing power consumption. Nam et al. proposed a new type of nonvolatile balanced ternary memory based on multiferroelectric material GeSnTe2. It is found that two different directions and amounts of electric polarization are stable in a two-dimensional structure of atomic thickness. The balanced ternary data set of {−1, 0, +1} can be realized in nanoscale two-dimensional materials [6]. Luo et al. proposed a new structure to build a high-density SSD in the RAID system by using SD or MMC/eMMC modules instead of independent drives. An SSD controller chip with embedded RAID (eRAID) multilevel functions was designed and applied to verify the scheme. By using this controller and eMMC module, a redundant array of independent modules (RAIM) was constructed as a cheap single drive and proved to be effective [7]. Many of the above scholars have put forward their own views and explored the research content in this direction. Most of them require an understanding of relevant computer professional applications, as well as a large number of relatively advanced calculation processes. Experiments are not comprehensive enough; all have corresponding shortcomings.The key points of innovation in this exploratory experiment are as follows: first, it integrates the features of ferroelectric memory in the read content; second, the large-capacity memory based on the SD chip card provides big data storage for the data content of the system; and third, because the traditional recorders on the market have slow transmission and insufficient positioning capabilities, the addition of GPS positioning and GPRS communication enables the system to quickly and accurately determine the specific location of the vehicle.


## 2. Theoretical Research on the Read-Write Circuit of Ferroelectric Memory

### 2.1. The Basic Storage Unit of Ferroelectric Memory

As shown in Figure1, the basic storage unit of a ferroelectric memory is generally divided into two structures, namely 1T1C (one transistor one capacitance) structure and 2T2C (two transistors two capacitance) structure [8]. The difference between the two structures is that the 1T1C structure uses only one transistor and a ferroelectric capacitor, while the 2T2C uses twice the former. The advantage of 1T1C is that it can save a larger chip area, but the voltage difference of the neutral line will be affected and become worse and lower. When reading data, a higher quality sensitive amplifier is required [9]; 2T2C will use larger. However, since each memory cell is double the former, the voltage difference between the two bit lines will change more, and the accuracy of reading data will be affected by it and improve [10].Figure 1
Two storage types of ferroelectric memory: (a) 1T1C type and (b) 2T2C type.The basic storage unit of the ferroelectric memory in this study adopts the 2T2C type. This type of model is mostly composed of two transistors and two iron capacitors [11].


### 2.2. Basic Architecture of Ferroelectric Memory

Ferroelectric memory acts as a kind of nonvolatile RAM. Compared with traditional nonvolatile memory, ferroelectric memory has the advantages of low power consumption, fast read and write speed, and strong radiation resistance. The core of ferroelectric memory is the ferroelectric memory cell, and most of the circuits of our ferroelectric memory are designed around the memory cell. In addition to the memory array composed of memory cells, ferroelectric memory generally includes the following modules: decoding, control logic, sensitive amplifier, ECC module, data path, address path, and so on [12]. The function of each module will be explained below in conjunction with Figure 2. The decoding circuit is a necessary circuit structure for any memory chip, and it is used to turn each address into a one-hot (one bit effective) control signal to control the memory cell [13]. Since the memory cells are arranged in a rectangular array in the array, there is a decoding module to position the memory cells in order to allow external control logic, such as a sensitive amplifier and so on [14], to read and write the memory cells. Both decoding modules will output a one-hot signal to the storage array. The point where the two signals intersect is the storage unit that needs to be read and written by the external circuit [15].Figure 2
Circuit flow diagram of ferroelectric memory.The function of the data path and address path can be understood as temporarily storing data and address. For the data path, the data outside the chip that wants to be written to the storage array needs to enter the cache and wait. The reasons for waiting are as follows: first, each externally written data may not be written to the storage array separately. It may be necessary to wait for several sets of data to be written continuously from the outside and then write all the data in the data latch to the storage array at one time [16]. The second is that due to the existence of the ECC circuit, we write data every time before writing the data to the storage array. It is necessary to read the data in the storage array and then store the new data in and re-encode the ECC module before writing the data to the storage array [17]. The third is the control logic module to control data writing modules of the storage array, but when the external data enters the memory, the control logic module needs a certain amount of time to prepare and generate the corresponding timing control signal before the data can be written into the storage array [18]. Therefore, due to the above factors, there must be a data path to temporarily store data [19], and more than one data latch may be needed (only one is shown in the Figure 2).


### 2.3. Application of SD Card in Electronics

SD card is a new type of storage device designed to meet the needs of security, capacity, and performance and use environment. SD chip card has the characteristics of small appearance, the low consumption rate of function use, low production cost, very good resistance to vibration, and so on [20]; it also has high read and write functions. The product function system has considerable expansion performance in storage applications and can meet most storage applications. Moreover, the chip card supports external interface extraction [21], and the operation and application are relatively simple. It is more flexible in application due to the convenience of carrying, and thus, it is welcomed by the public.Standard capacity SDSC memory card (SD memory card standard capacity SDSC) supports capacities below 2 GB. The large-capacity SD card supports capacities from 2 GB to 32 GB. Extended capacity SD card (SDXC extended capacity SD memory card) supports capacities from 32 GB to 2 TB [22]. Supports read and write speeds from 12.5 MB/s to 104 MB/s. Due to the above-mentioned characteristics of the SD card, as a mobile storage medium, the SD card occupies an important position in the field of home appliances. Most digital products, such as cameras, mobile phones, and personal computers, support reading and writing from SD cards. SD cards are becoming more and more popular in digital TV products and digital set-top boxes. The application structure is shown in Figure 3.Figure 3
Application of SD card in electronic products.


## 2.1. The Basic Storage Unit of Ferroelectric Memory

As shown in Figure1, the basic storage unit of a ferroelectric memory is generally divided into two structures, namely 1T1C (one transistor one capacitance) structure and 2T2C (two transistors two capacitance) structure [8]. The difference between the two structures is that the 1T1C structure uses only one transistor and a ferroelectric capacitor, while the 2T2C uses twice the former. The advantage of 1T1C is that it can save a larger chip area, but the voltage difference of the neutral line will be affected and become worse and lower. When reading data, a higher quality sensitive amplifier is required [9]; 2T2C will use larger. However, since each memory cell is double the former, the voltage difference between the two bit lines will change more, and the accuracy of reading data will be affected by it and improve [10].Figure 1
Two storage types of ferroelectric memory: (a) 1T1C type and (b) 2T2C type.The basic storage unit of the ferroelectric memory in this study adopts the 2T2C type. This type of model is mostly composed of two transistors and two iron capacitors [11].


## 2.2. Basic Architecture of Ferroelectric Memory

Ferroelectric memory acts as a kind of nonvolatile RAM. Compared with traditional nonvolatile memory, ferroelectric memory has the advantages of low power consumption, fast read and write speed, and strong radiation resistance. The core of ferroelectric memory is the ferroelectric memory cell, and most of the circuits of our ferroelectric memory are designed around the memory cell. In addition to the memory array composed of memory cells, ferroelectric memory generally includes the following modules: decoding, control logic, sensitive amplifier, ECC module, data path, address path, and so on [12]. The function of each module will be explained below in conjunction with Figure 2. The decoding circuit is a necessary circuit structure for any memory chip, and it is used to turn each address into a one-hot (one bit effective) control signal to control the memory cell [13]. Since the memory cells are arranged in a rectangular array in the array, there is a decoding module to position the memory cells in order to allow external control logic, such as a sensitive amplifier and so on [14], to read and write the memory cells. Both decoding modules will output a one-hot signal to the storage array. The point where the two signals intersect is the storage unit that needs to be read and written by the external circuit [15].Figure 2
Circuit flow diagram of ferroelectric memory.The function of the data path and address path can be understood as temporarily storing data and address. For the data path, the data outside the chip that wants to be written to the storage array needs to enter the cache and wait. The reasons for waiting are as follows: first, each externally written data may not be written to the storage array separately. It may be necessary to wait for several sets of data to be written continuously from the outside and then write all the data in the data latch to the storage array at one time [16]. The second is that due to the existence of the ECC circuit, we write data every time before writing the data to the storage array. It is necessary to read the data in the storage array and then store the new data in and re-encode the ECC module before writing the data to the storage array [17]. The third is the control logic module to control data writing modules of the storage array, but when the external data enters the memory, the control logic module needs a certain amount of time to prepare and generate the corresponding timing control signal before the data can be written into the storage array [18]. Therefore, due to the above factors, there must be a data path to temporarily store data [19], and more than one data latch may be needed (only one is shown in the Figure 2).


## 2.3. Application of SD Card in Electronics

SD card is a new type of storage device designed to meet the needs of security, capacity, and performance and use environment. SD chip card has the characteristics of small appearance, the low consumption rate of function use, low production cost, very good resistance to vibration, and so on [20]; it also has high read and write functions. The product function system has considerable expansion performance in storage applications and can meet most storage applications. Moreover, the chip card supports external interface extraction [21], and the operation and application are relatively simple. It is more flexible in application due to the convenience of carrying, and thus, it is welcomed by the public.Standard capacity SDSC memory card (SD memory card standard capacity SDSC) supports capacities below 2 GB. The large-capacity SD card supports capacities from 2 GB to 32 GB. Extended capacity SD card (SDXC extended capacity SD memory card) supports capacities from 32 GB to 2 TB [22]. Supports read and write speeds from 12.5 MB/s to 104 MB/s. Due to the above-mentioned characteristics of the SD card, as a mobile storage medium, the SD card occupies an important position in the field of home appliances. Most digital products, such as cameras, mobile phones, and personal computers, support reading and writing from SD cards. SD cards are becoming more and more popular in digital TV products and digital set-top boxes. The application structure is shown in Figure 3.Figure 3
Application of SD card in electronic products.


## 3. Experimental Car Driving Record System Hardware and System Design

### 3.1. Signal Acquisition Algorithm

#### 3.1.1. Collection of Vehicle Speed Signals

For the survey of vehicle speed, Hall sensors are used inside the vehicle for measurement [23]. A Hall sensor is a magnetic field sensor made according to the Hall effect. The Hall coefficient measured by the Hall effect experiment can determine important parameters such as the conductivity type, carrier concentration, and carrier mobility of the semiconductor material. The basic structure is shown in Figure 4. This is the magnetic field C generated by the magnet in the room, and the current L flows through the material with carriers. Assuming that the conversion rate E and the amount of charge a are under the influence of the magnetic field:(1)Fm=aE×C.Figure 4
Testing principle of Hall sensor.Due to the Lorentz force, the carriers are deflected to a certain extent, The Lorentz force refers to the force that the moving charge is subjected to in the magnetic field, that is, the force of the magnetic field on the moving charge. The charge carriers are also affected by the electric potentialHv, namely(2)Fa=aAH=aHvM,whereM is the charge distance between the two sets and AH represents the strength of the electric field. When the two forces reach equilibrium and the voltage Hv is stable, then(3)Fa=Fm⇒aHvM⇒aE×C⇒Hv=ME×C.According to the charge flowing in unit time:(4)L=NaER=NaEBM,where B is the thickness of the material, N is the density of carriers, and R is the cross-sectional area of a certain material. Obtained by (3) and (4):(5)Hv=ME×C=1NaB×C=HrLCb−1,whereHr is the material constant, and the voltage of the sensor is affected by it and the other three variables. If the other three variables remain unchanged, the output is proportional.The time interval between adjacent jumps of the level signal represents the speed. Calculate from the gear speedg as follows:(6)g=60Kbt=60K⋅1bt,where K represents the number of gears; the time for each gear to rotate is expressed as bt. In the situation where the gear row pitch law is equal, the voltage transmitted under different rotation speeds remains unchanged. In this case, the speed of the vehicle should be measured, which can be expressed by the speed of gear change.


#### 3.1.2. Acquisition of Analog Signals

(1) Detection of Oil Level Signal. The sensor of the oil drum is composed of two circles forming the two plates of the capacitor [24], and the capacitance changes with the dielectric constant [25]. Assume that the condenser B of the oil tank is the sum of the oil level n, the condenser B1, the air medium m−n, and the condenser B2. This is, B=B1+B2:(7)B1=2πδ0δrINA/anB2=2πδ0InA/am−n.Asn changes, the ΔBcapacitance is(8)ΔB=B−B0=2πδ0δr−1InA/an.The change of capacitanceΔBis proportional to the change in fuel tank level, and the relationship between the designed output circuit guarantee voltage V andΔBisV=Xn. The voltage at the output terminal is transferred to the host afterA/aconversion.(2) Collection of Switch Signals. If you want to collect the switch signal, you can measure it through the measurement characteristics of the vehicle itself, and the data measured in this way can be more conveniently transmitted to the host through the function of the connection line [26]. Because the level standards of each part are not uniform, the level difference between the switch variable and the microprocessor needs to be changed. Under the influence of the surrounding environment and its own independent variables, the signal transmission is not accurate enough. In order to further ensure that the microprocessing will not be damaged by the influence of high-voltage signals, the switching signal of the vehicle must be isolated and processed [27].


### 3.2. Power Supply Circuit Design

The power supply design for providing power to the program system of driving record mainly includes the following three power supply designs:(1)
The circuit of the power protection module [28]:In the research circuit of this article, the main body’s functional system is powered by the onboard power supply. As shown in Figure5, it is a protection circuit to protect the power module.(2)
The 5VDC power supply generates electricity. DC_IN is a DC input wire, which is mainly used for external DC power input, and then flows through the MP2359 chip [29]. Under the force of the chip, the voltage is converted to 5V output power and then output.In the circuit, feedback resistorsP1 and P2 are often used for adjustment. For the compensation capacitance of the bandwidth and internal difference power factors in the feedback loop, the feedback resistor and external resistance are used to adjust the transmitted output voltage. Based on voltages higher than 1.8, this is usually a constant P1, and P2 can be obtained by Uout=5V in the following way:(9)P2=P1Uout/0.81−1=9.53.(3)
3.3 V DC power supply design: The design of this kind of circuit usually uses a 3.3 V LM1117-3.3 voltage regulator chip to provide a stable 3.3 V voltage power supply. The decoupling method converts the voltage that flows back and forth [30]. Decoupling is the main way to solve power supply noise problems. This method is very effective for improving the response speed of the transient current and reducing the impedance of the power distribution system. Or filter capacitors to remove high-frequency noise and spurious signals from the input and output voltage signals.Figure 5
Preprotection circuit of the power block.


### 3.3. The Main Program Design of the Recording System

The system software is divided into modules according to the modules of the hardware circuit, and then the entire program flow is scheduled. The software block diagram is shown in Figure6.Figure 6
System program flow diagram.The recording system of the driving recorder of a car mostly has two working conditions: one is when the vehicle is running and starting; at this time, the recording system is collecting at the same time interval according to a certain time rule. Then the collected vehicle information data is written into the memory. At the same time, through the short message sent to the monitoring center at the set time interval through the GPRS module, the monitoring system interprets the transmitted information, extracts effective information and displays or stores the interface; second, when the vehicle is in a stopped state, read and store information through the upper body [31, 32]. Most of the storage methods are to pass the output through the USB interface or to store the information when the SD card is pulled out.


#### 3.3.1. Program Design of Data Acquisition Module

(1) Vehicle Speed Detection. The speed of the vehicle is detected by a pulse signal that is more discrete than the ordinary signal in the speed sensor. Because the pulse signal has a unique periodicity, the speed of the vehicle can be measured and calculated based on it. Therefore, for vehicle speed measurement, two variables need to be measured. One is the pulse signal measured by the vehicle’s own measurement system; the second is the systematic indispensable characteristic parameter obtained by the speed sensor for the speed of the vehicle for each kilometer traveled.During a certain period of time, two variables are measured according to the above-mentioned measurement method. Assuming that the recording system detects the pulse signalt at time x, the calculation equations for distance and speed can be expressed as follows:(10)S=tH×n,U=Sx=tx×H×n,where S is the cumulative total mileage, H is the characteristic coefficient of the vehicle, n is the number of revolutions of the characteristic sensor, and U is the average speed.The design of the human-computer interaction part: all the various data collected by the module part need to be processed to a certain extent through the STM32 system main control module, and the processed data are transferred to the LCD. When programming the LCD, first reset and initialize the system and then set the busy detection function and write command function, data erasing function, and display position adjustment function. Finally, call the write function to input the displayed characters. Busy detection must be performed when reading and writing the LCD. The LCD is under the action of the controller, and when the refresh operation is performed by it, the rest of the various operations cannot be performed in time, and a certain amount of cache time is required to complete. The external controller that cannot send commands to the LCD under any circumstances can only work when the LCD is in the sleep state. Reading the actual status of the LCD cyclically is a busy detection to see if it is in sleep mode.


### 3.4. Memory Module Programming

#### 3.4.1. Ferroelectric Memory-SD Card Data Transmission Subroutine

As shown in Figure7, the running process of the internal storage module, in order to better and more completely obtain the driving information of the tracked vehicle, needs to be operated by the computer system of the upper machine, and the collected data is transferred to the current vehicle. Compared with the commonly used RS232 serial port for data transmission, the SD chip card has more advantages. Although both can complete the data transfer between the computer and the host computer, the data transmission speed of the RS232 serial port is slower, and the transmission distance is short and much faster when transferring on an SD chip card [33]. Based on the above description, the system in this study uses an SD chip card with faster data transmission.Figure 7
Memory module program diagram.Figure 8
SD card initialization process.Figure 9
SD card operation process.Table 1
Mean and variance of GPS data.
SpeedLatitudeLongitudeMean0.059883511.154911315.3469Variance0.001520.004430.00298


#### 3.4.2. SD Card Operation

(1)
Initializing the SD chip card: When saving data and information content on the SD chip card in the system, the SD chip card must be initialized first. In the hardware circuit of this study, in order to ensure the synchronization of time, in the SPI working mode, the first event of connecting to the power supply is to reset, activate, and use other commands after the delay. The operation process of the initialization of the SD card is shown in Figure8.(2)
SD card writing process: The SD card writing process is used to save the information collected by the system. The write operation uses a “write once” command with a limited number of bytes and writes one sector at a time. The recording process uses send and response commands to confirm the receipt of data. The specific process is shown in Figure9.


## 3.1. Signal Acquisition Algorithm

### 3.1.1. Collection of Vehicle Speed Signals

For the survey of vehicle speed, Hall sensors are used inside the vehicle for measurement [23]. A Hall sensor is a magnetic field sensor made according to the Hall effect. The Hall coefficient measured by the Hall effect experiment can determine important parameters such as the conductivity type, carrier concentration, and carrier mobility of the semiconductor material. The basic structure is shown in Figure 4. This is the magnetic field C generated by the magnet in the room, and the current L flows through the material with carriers. Assuming that the conversion rate E and the amount of charge a are under the influence of the magnetic field:(1)Fm=aE×C.Figure 4
Testing principle of Hall sensor.Due to the Lorentz force, the carriers are deflected to a certain extent, The Lorentz force refers to the force that the moving charge is subjected to in the magnetic field, that is, the force of the magnetic field on the moving charge. The charge carriers are also affected by the electric potentialHv, namely(2)Fa=aAH=aHvM,whereM is the charge distance between the two sets and AH represents the strength of the electric field. When the two forces reach equilibrium and the voltage Hv is stable, then(3)Fa=Fm⇒aHvM⇒aE×C⇒Hv=ME×C.According to the charge flowing in unit time:(4)L=NaER=NaEBM,where B is the thickness of the material, N is the density of carriers, and R is the cross-sectional area of a certain material. Obtained by (3) and (4):(5)Hv=ME×C=1NaB×C=HrLCb−1,whereHr is the material constant, and the voltage of the sensor is affected by it and the other three variables. If the other three variables remain unchanged, the output is proportional.The time interval between adjacent jumps of the level signal represents the speed. Calculate from the gear speedg as follows:(6)g=60Kbt=60K⋅1bt,where K represents the number of gears; the time for each gear to rotate is expressed as bt. In the situation where the gear row pitch law is equal, the voltage transmitted under different rotation speeds remains unchanged. In this case, the speed of the vehicle should be measured, which can be expressed by the speed of gear change.


### 3.1.2. Acquisition of Analog Signals

(1) Detection of Oil Level Signal. The sensor of the oil drum is composed of two circles forming the two plates of the capacitor [24], and the capacitance changes with the dielectric constant [25]. Assume that the condenser B of the oil tank is the sum of the oil level n, the condenser B1, the air medium m−n, and the condenser B2. This is, B=B1+B2:(7)B1=2πδ0δrINA/anB2=2πδ0InA/am−n.Asn changes, the ΔBcapacitance is(8)ΔB=B−B0=2πδ0δr−1InA/an.The change of capacitanceΔBis proportional to the change in fuel tank level, and the relationship between the designed output circuit guarantee voltage V andΔBisV=Xn. The voltage at the output terminal is transferred to the host afterA/aconversion.(2) Collection of Switch Signals. If you want to collect the switch signal, you can measure it through the measurement characteristics of the vehicle itself, and the data measured in this way can be more conveniently transmitted to the host through the function of the connection line [26]. Because the level standards of each part are not uniform, the level difference between the switch variable and the microprocessor needs to be changed. Under the influence of the surrounding environment and its own independent variables, the signal transmission is not accurate enough. In order to further ensure that the microprocessing will not be damaged by the influence of high-voltage signals, the switching signal of the vehicle must be isolated and processed [27].


## 3.1.1. Collection of Vehicle Speed Signals

For the survey of vehicle speed, Hall sensors are used inside the vehicle for measurement [23]. A Hall sensor is a magnetic field sensor made according to the Hall effect. The Hall coefficient measured by the Hall effect experiment can determine important parameters such as the conductivity type, carrier concentration, and carrier mobility of the semiconductor material. The basic structure is shown in Figure 4. This is the magnetic field C generated by the magnet in the room, and the current L flows through the material with carriers. Assuming that the conversion rate E and the amount of charge a are under the influence of the magnetic field:(1)Fm=aE×C.Figure 4
Testing principle of Hall sensor.Due to the Lorentz force, the carriers are deflected to a certain extent, The Lorentz force refers to the force that the moving charge is subjected to in the magnetic field, that is, the force of the magnetic field on the moving charge. The charge carriers are also affected by the electric potentialHv, namely(2)Fa=aAH=aHvM,whereM is the charge distance between the two sets and AH represents the strength of the electric field. When the two forces reach equilibrium and the voltage Hv is stable, then(3)Fa=Fm⇒aHvM⇒aE×C⇒Hv=ME×C.According to the charge flowing in unit time:(4)L=NaER=NaEBM,where B is the thickness of the material, N is the density of carriers, and R is the cross-sectional area of a certain material. Obtained by (3) and (4):(5)Hv=ME×C=1NaB×C=HrLCb−1,whereHr is the material constant, and the voltage of the sensor is affected by it and the other three variables. If the other three variables remain unchanged, the output is proportional.The time interval between adjacent jumps of the level signal represents the speed. Calculate from the gear speedg as follows:(6)g=60Kbt=60K⋅1bt,where K represents the number of gears; the time for each gear to rotate is expressed as bt. In the situation where the gear row pitch law is equal, the voltage transmitted under different rotation speeds remains unchanged. In this case, the speed of the vehicle should be measured, which can be expressed by the speed of gear change.


## 3.1.2. Acquisition of Analog Signals

(1) Detection of Oil Level Signal. The sensor of the oil drum is composed of two circles forming the two plates of the capacitor [24], and the capacitance changes with the dielectric constant [25]. Assume that the condenser B of the oil tank is the sum of the oil level n, the condenser B1, the air medium m−n, and the condenser B2. This is, B=B1+B2:(7)B1=2πδ0δrINA/anB2=2πδ0InA/am−n.Asn changes, the ΔBcapacitance is(8)ΔB=B−B0=2πδ0δr−1InA/an.The change of capacitanceΔBis proportional to the change in fuel tank level, and the relationship between the designed output circuit guarantee voltage V andΔBisV=Xn. The voltage at the output terminal is transferred to the host afterA/aconversion.(2) Collection of Switch Signals. If you want to collect the switch signal, you can measure it through the measurement characteristics of the vehicle itself, and the data measured in this way can be more conveniently transmitted to the host through the function of the connection line [26]. Because the level standards of each part are not uniform, the level difference between the switch variable and the microprocessor needs to be changed. Under the influence of the surrounding environment and its own independent variables, the signal transmission is not accurate enough. In order to further ensure that the microprocessing will not be damaged by the influence of high-voltage signals, the switching signal of the vehicle must be isolated and processed [27].


## 3.2. Power Supply Circuit Design

The power supply design for providing power to the program system of driving record mainly includes the following three power supply designs:(1)
The circuit of the power protection module [28]:In the research circuit of this article, the main body’s functional system is powered by the onboard power supply. As shown in Figure5, it is a protection circuit to protect the power module.(2)
The 5VDC power supply generates electricity. DC_IN is a DC input wire, which is mainly used for external DC power input, and then flows through the MP2359 chip [29]. Under the force of the chip, the voltage is converted to 5V output power and then output.In the circuit, feedback resistorsP1 and P2 are often used for adjustment. For the compensation capacitance of the bandwidth and internal difference power factors in the feedback loop, the feedback resistor and external resistance are used to adjust the transmitted output voltage. Based on voltages higher than 1.8, this is usually a constant P1, and P2 can be obtained by Uout=5V in the following way:(9)P2=P1Uout/0.81−1=9.53.(3)
3.3 V DC power supply design: The design of this kind of circuit usually uses a 3.3 V LM1117-3.3 voltage regulator chip to provide a stable 3.3 V voltage power supply. The decoupling method converts the voltage that flows back and forth [30]. Decoupling is the main way to solve power supply noise problems. This method is very effective for improving the response speed of the transient current and reducing the impedance of the power distribution system. Or filter capacitors to remove high-frequency noise and spurious signals from the input and output voltage signals.Figure 5
Preprotection circuit of the power block.


## 3.3. The Main Program Design of the Recording System

The system software is divided into modules according to the modules of the hardware circuit, and then the entire program flow is scheduled. The software block diagram is shown in Figure6.Figure 6
System program flow diagram.The recording system of the driving recorder of a car mostly has two working conditions: one is when the vehicle is running and starting; at this time, the recording system is collecting at the same time interval according to a certain time rule. Then the collected vehicle information data is written into the memory. At the same time, through the short message sent to the monitoring center at the set time interval through the GPRS module, the monitoring system interprets the transmitted information, extracts effective information and displays or stores the interface; second, when the vehicle is in a stopped state, read and store information through the upper body [31, 32]. Most of the storage methods are to pass the output through the USB interface or to store the information when the SD card is pulled out.


### 3.3.1. Program Design of Data Acquisition Module

(1) Vehicle Speed Detection. The speed of the vehicle is detected by a pulse signal that is more discrete than the ordinary signal in the speed sensor. Because the pulse signal has a unique periodicity, the speed of the vehicle can be measured and calculated based on it. Therefore, for vehicle speed measurement, two variables need to be measured. One is the pulse signal measured by the vehicle’s own measurement system; the second is the systematic indispensable characteristic parameter obtained by the speed sensor for the speed of the vehicle for each kilometer traveled.During a certain period of time, two variables are measured according to the above-mentioned measurement method. Assuming that the recording system detects the pulse signalt at time x, the calculation equations for distance and speed can be expressed as follows:(10)S=tH×n,U=Sx=tx×H×n,where S is the cumulative total mileage, H is the characteristic coefficient of the vehicle, n is the number of revolutions of the characteristic sensor, and U is the average speed.The design of the human-computer interaction part: all the various data collected by the module part need to be processed to a certain extent through the STM32 system main control module, and the processed data are transferred to the LCD. When programming the LCD, first reset and initialize the system and then set the busy detection function and write command function, data erasing function, and display position adjustment function. Finally, call the write function to input the displayed characters. Busy detection must be performed when reading and writing the LCD. The LCD is under the action of the controller, and when the refresh operation is performed by it, the rest of the various operations cannot be performed in time, and a certain amount of cache time is required to complete. The external controller that cannot send commands to the LCD under any circumstances can only work when the LCD is in the sleep state. Reading the actual status of the LCD cyclically is a busy detection to see if it is in sleep mode.


## 3.3.1. Program Design of Data Acquisition Module

(1) Vehicle Speed Detection. The speed of the vehicle is detected by a pulse signal that is more discrete than the ordinary signal in the speed sensor. Because the pulse signal has a unique periodicity, the speed of the vehicle can be measured and calculated based on it. Therefore, for vehicle speed measurement, two variables need to be measured. One is the pulse signal measured by the vehicle’s own measurement system; the second is the systematic indispensable characteristic parameter obtained by the speed sensor for the speed of the vehicle for each kilometer traveled.During a certain period of time, two variables are measured according to the above-mentioned measurement method. Assuming that the recording system detects the pulse signalt at time x, the calculation equations for distance and speed can be expressed as follows:(10)S=tH×n,U=Sx=tx×H×n,where S is the cumulative total mileage, H is the characteristic coefficient of the vehicle, n is the number of revolutions of the characteristic sensor, and U is the average speed.The design of the human-computer interaction part: all the various data collected by the module part need to be processed to a certain extent through the STM32 system main control module, and the processed data are transferred to the LCD. When programming the LCD, first reset and initialize the system and then set the busy detection function and write command function, data erasing function, and display position adjustment function. Finally, call the write function to input the displayed characters. Busy detection must be performed when reading and writing the LCD. The LCD is under the action of the controller, and when the refresh operation is performed by it, the rest of the various operations cannot be performed in time, and a certain amount of cache time is required to complete. The external controller that cannot send commands to the LCD under any circumstances can only work when the LCD is in the sleep state. Reading the actual status of the LCD cyclically is a busy detection to see if it is in sleep mode.


## 3.4. Memory Module Programming

### 3.4.1. Ferroelectric Memory-SD Card Data Transmission Subroutine

As shown in Figure7, the running process of the internal storage module, in order to better and more completely obtain the driving information of the tracked vehicle, needs to be operated by the computer system of the upper machine, and the collected data is transferred to the current vehicle. Compared with the commonly used RS232 serial port for data transmission, the SD chip card has more advantages. Although both can complete the data transfer between the computer and the host computer, the data transmission speed of the RS232 serial port is slower, and the transmission distance is short and much faster when transferring on an SD chip card [33]. Based on the above description, the system in this study uses an SD chip card with faster data transmission.Figure 7
Memory module program diagram.Figure 8
SD card initialization process.Figure 9
SD card operation process.Table 1
Mean and variance of GPS data.
SpeedLatitudeLongitudeMean0.059883511.154911315.3469Variance0.001520.004430.00298


### 3.4.2. SD Card Operation

(1)
Initializing the SD chip card: When saving data and information content on the SD chip card in the system, the SD chip card must be initialized first. In the hardware circuit of this study, in order to ensure the synchronization of time, in the SPI working mode, the first event of connecting to the power supply is to reset, activate, and use other commands after the delay. The operation process of the initialization of the SD card is shown in Figure8.(2)
SD card writing process: The SD card writing process is used to save the information collected by the system. The write operation uses a “write once” command with a limited number of bytes and writes one sector at a time. The recording process uses send and response commands to confirm the receipt of data. The specific process is shown in Figure9.


## 3.4.1. Ferroelectric Memory-SD Card Data Transmission Subroutine

As shown in Figure7, the running process of the internal storage module, in order to better and more completely obtain the driving information of the tracked vehicle, needs to be operated by the computer system of the upper machine, and the collected data is transferred to the current vehicle. Compared with the commonly used RS232 serial port for data transmission, the SD chip card has more advantages. Although both can complete the data transfer between the computer and the host computer, the data transmission speed of the RS232 serial port is slower, and the transmission distance is short and much faster when transferring on an SD chip card [33]. Based on the above description, the system in this study uses an SD chip card with faster data transmission.Figure 7
Memory module program diagram.Figure 8
SD card initialization process.Figure 9
SD card operation process.Table 1
Mean and variance of GPS data.
SpeedLatitudeLongitudeMean0.059883511.154911315.3469Variance0.001520.004430.00298


## 3.4.2. SD Card Operation

(1)
Initializing the SD chip card: When saving data and information content on the SD chip card in the system, the SD chip card must be initialized first. In the hardware circuit of this study, in order to ensure the synchronization of time, in the SPI working mode, the first event of connecting to the power supply is to reset, activate, and use other commands after the delay. The operation process of the initialization of the SD card is shown in Figure8.(2)
SD card writing process: The SD card writing process is used to save the information collected by the system. The write operation uses a “write once” command with a limited number of bytes and writes one sector at a time. The recording process uses send and response commands to confirm the receipt of data. The specific process is shown in Figure9.


## 4. Driving Recorder System Based on Ferroelectric Memory and SD Chip

### 4.1. Basic Test

(1)
Human-computer interaction test: After the system is connected to the power supply, the screen displays the login interface, and the microcontroller receives information from the clock module and displays the time on the LCD interface.(2)
Vehicle speed test: In the process of testing, the temperature signal in the system is used to simulate switch information and vehicle speed information to detect the speed. The experiment of the test results shows that the data information transmission between the microprocessor and the upper computer is normal and data exchange can be carried out: when the collected data information changes to a certain extent, the data information received by the upper computer can also be updated in real time.(3)
GPS positioning test: Before the test, it is necessary to determine whether the module is normal in the reception of data information. If the standard is found, it means normal. Use MATLAB to simulate and extract the time, speed, latitude, and longitude of a specific static point. The corresponding mean and variance are shown in Table1. The approximate location has not changed, but it can be seen that the latitude, longitude, and speed are all affected by GPS static drift, and the location data has undergone slight changes.


### 4.2. Processing of Filtering Algorithm and Analysis of Experimental Results

Receive data through the u-blox-NEO-6M GPS receiver and practice elliptical movement by collecting 1,510 data points. All data are processed. The processed data are shown in Table2.Table 2
GPS data after processing.
TimeLatitudeLongitudeSpeedDeflection angle10221.29701.50.0128689.511221.31701.550.1265587.4512221.15701.640.3889294.2413220.93701.80.6121995.7514220.66701.90.6085996.115220.437020.4768980.9516220.2702.060.5535476.6917220702.180.3920182.7818219.70702.250.5494394.719219.48702.780.4804998.920219.35703.10.5339997.9821219.14703.90.4851294.1922219.02703.590.6538695.7As shown in Figure10, when the latitude moves westward, the floating charge of the latitude value is relatively gentle; when the latitude moves north of the longitude, the latitude increases rapidly and finally moves eastward on the latitude, forming a loop back to the original location. Corresponding to the actual situation, it is found that the shorter the distance traveled, the smoother the latitude value change range, and the smoother the trajectory, which means that the value obtained by filtering, in this case, is more accurate.Figure 10
Latitude and filter value.As shown in Figure11, when the latitude moves to the east, the longitude increases rapidly with its movement; when the latitude moves to the south, the longitude hardly changes; when the latitude moves to the west, the longitude shows a decreasing trend; when moving north, the latitude did not change, and finally the latitude moved eastward, forming a loop back to the initial point, and the longitude range is now rapidly increasing, which shows that the processed value is closer to the real location.Figure 11
Longitude and filtered value.According to the actual test results of the Kalman filter mathematical model and data established for the GPS positioning system, the algorithm is feasible and has a good filtering effect. The filtering algorithm can reduce the random interference in the GPS signal and improve the positioning accuracy of the system.


### 4.3. System Test Results

The test process is as follows: put the system into the car and connect each detection module with the corresponding sensor’s power supply voltage cable, and the system will power on when it is connected to the power supply. Observe the information data of the vehicle’s position in a stationary state and make a graph of the relationship between latitude and longitude and time according to the data information obtained by transmission, as shown in Figures12 and 13. The data information is calculated to get the mean point F. Its coordinates are (35.1115495, 113.1534695). The distance from each observation point to point F is less than 0.45, and the parameter of the horizontal component accuracy under its influence is also less than 0.45, which can meet the accuracy requirements of the system.Figure 12
Changes in the relationship between latitude and time.Figure 13
The relationship between longitude and time.


## 4.1. Basic Test

(1)
Human-computer interaction test: After the system is connected to the power supply, the screen displays the login interface, and the microcontroller receives information from the clock module and displays the time on the LCD interface.(2)
Vehicle speed test: In the process of testing, the temperature signal in the system is used to simulate switch information and vehicle speed information to detect the speed. The experiment of the test results shows that the data information transmission between the microprocessor and the upper computer is normal and data exchange can be carried out: when the collected data information changes to a certain extent, the data information received by the upper computer can also be updated in real time.(3)
GPS positioning test: Before the test, it is necessary to determine whether the module is normal in the reception of data information. If the standard is found, it means normal. Use MATLAB to simulate and extract the time, speed, latitude, and longitude of a specific static point. The corresponding mean and variance are shown in Table1. The approximate location has not changed, but it can be seen that the latitude, longitude, and speed are all affected by GPS static drift, and the location data has undergone slight changes.


## 4.2. Processing of Filtering Algorithm and Analysis of Experimental Results

Receive data through the u-blox-NEO-6M GPS receiver and practice elliptical movement by collecting 1,510 data points. All data are processed. The processed data are shown in Table2.Table 2
GPS data after processing.
TimeLatitudeLongitudeSpeedDeflection angle10221.29701.50.0128689.511221.31701.550.1265587.4512221.15701.640.3889294.2413220.93701.80.6121995.7514220.66701.90.6085996.115220.437020.4768980.9516220.2702.060.5535476.6917220702.180.3920182.7818219.70702.250.5494394.719219.48702.780.4804998.920219.35703.10.5339997.9821219.14703.90.4851294.1922219.02703.590.6538695.7As shown in Figure10, when the latitude moves westward, the floating charge of the latitude value is relatively gentle; when the latitude moves north of the longitude, the latitude increases rapidly and finally moves eastward on the latitude, forming a loop back to the original location. Corresponding to the actual situation, it is found that the shorter the distance traveled, the smoother the latitude value change range, and the smoother the trajectory, which means that the value obtained by filtering, in this case, is more accurate.Figure 10
Latitude and filter value.As shown in Figure11, when the latitude moves to the east, the longitude increases rapidly with its movement; when the latitude moves to the south, the longitude hardly changes; when the latitude moves to the west, the longitude shows a decreasing trend; when moving north, the latitude did not change, and finally the latitude moved eastward, forming a loop back to the initial point, and the longitude range is now rapidly increasing, which shows that the processed value is closer to the real location.Figure 11
Longitude and filtered value.According to the actual test results of the Kalman filter mathematical model and data established for the GPS positioning system, the algorithm is feasible and has a good filtering effect. The filtering algorithm can reduce the random interference in the GPS signal and improve the positioning accuracy of the system.


## 4.3. System Test Results

The test process is as follows: put the system into the car and connect each detection module with the corresponding sensor’s power supply voltage cable, and the system will power on when it is connected to the power supply. Observe the information data of the vehicle’s position in a stationary state and make a graph of the relationship between latitude and longitude and time according to the data information obtained by transmission, as shown in Figures12 and 13. The data information is calculated to get the mean point F. Its coordinates are (35.1115495, 113.1534695). The distance from each observation point to point F is less than 0.45, and the parameter of the horizontal component accuracy under its influence is also less than 0.45, which can meet the accuracy requirements of the system.Figure 12
Changes in the relationship between latitude and time.Figure 13
The relationship between longitude and time.


## 5. Conclusions

The research content of this article is based on the fact that most of the driving recorders on the market today have the characteristics of slow information transmission. This experiment puts forward the characteristics of reading and writing functions based on ferroelectric memory and the large capacity of SD chip cards and the characteristics of fast information transmission for multiple applications. Based on the combination of the above characteristics, it is used to explore more high-performance driving recorders. In the design of the recording system of the recorder, the structure of the software design system is combined with the required functional parts to complete the program design of the subfunctions, and the human-computer interaction is completed in combination with the corresponding hardware conditions. The subroutine is controlled by the subject program and executes the functions of the system. In this investigation, the designed host computer management system is used to calculate the collected vehicle information data using filter algorithms and MATLAB software, and then the calculated data are compared, and the positioning effect and positioning accuracy are analyzed by the system. The experiment proves that the recording system of the driving recorder designed in this experiment has a certain degree of practicability, and the system runs very stably.



---

*Source: 1059597-2022-07-30.xml*