1. Introduction
In the last two decades, there have been increases in the population around the world, consequently generating an increase in vehicle users over the world [1]. This has resulted in an increase in the number of accidents on land roads [2]. It should be noted that sometimes it is difficult to retain the position of vehicles after an accident. This is problematic because some authorities and institutions need this information to make decisions. Also, if there is no information about the speed of the vehicle, videos, or GPS signals, it is difficult to reach the best decision for both drivers regarding the accident. A solution to determine the causes of an accident is to collect an accurate record of the actions carried out by the drivers, which are reflected by different parameters of the vehicle. Some parameters could be collected by means of a car’s black box system located in the unit [3,4]. In general, a car’s black box is different from an aircraft’s black box [5,6,7]. In a commercial aircraft, the black box is comprised of two separate devices—a flight data recorder (FDR) and a cockpit voice recorder (CVR)—which are often combined to form a single unit [8,9,10]. The FDR monitors a minimum of 88 parameters, including time, altitude, airspeed, heading, pilot input, pitch, roll and yaw angles, etc. The CVR is required to record four channels of cockpit audio data for a minimum duration of two hours. The aircraft’s black box does not perform any safety functions; it is simply there to record flight data and serve as a crash-survival memory unit. In the same way, a car′s black box or event data recorder (EDR) stores data to a flash memory, typically in the vehicle′s airbag control module (ACM) [11,12,13,14]. The primary function of the ACM is to sense a developing collision, determine if any safety devices need to be deployed, and deploy any necessary devices accordingly. Crash data recording is a secondary function of the ACM. The crash data recording of a car is similar to an aircraft’s FDR in that it records valuable information about the vehicle in the moments before a collision; however, the amount of data that are recorded is not as extensive [15]. Furthermore, a car′s black box does not record any audio as in the case of an aircraft′s CVR [5]. While the automotive black box does not record as much data as an aircraft’s black box, it is still capable of recording an abundance of data. In 2006, regulations were introduced in the Part 563 rule which specified 15 minimum parameters that must be recorded, should a manufacturer decide to install an EDR in a vehicle. These parameters include latitudinal and longitudinal delta-v (speed change), vehicle indicated speed, engine throttle percentage, brake status (on/off), ignition cycle–crash, ignition cycle–download, and safety belt status–driver [16]. In addition to the required data, the Part 563 rule also set standards for 30 other types of data if manufacturers voluntarily configured their EDRs to record them. For example, if a manufacturer configured their EDR to record steering input or anti-lock braking system (ABS) activity, it would have to record 5 s of data sampled twice per second. Other optional parameters include latitudinal and longitudinal acceleration, engine RPM, and vehicle roll angle, among others. The research on developing a car’s black box system continues, and some efforts have been carried out. For example, the authors of [4,11,17,18,19] proposed systems using GSM modules that focused on notifying the authorities about accidents. The authors of [13,14] proposed systems that collected data about the vehicle as well as the position of the brake, intensity of lights, and speed of the car. This information was stored in an EEPROM memory. A black box system was proposed in [20], which obtained visual information on the route, the vehicle speed, the location, the brake status, and the current time. This system used a processor that manipulated the information after it was acquired. The authors of [21] presented a black box system that was an advanced in-vehicle data recorder on a massively-sensorized vehicle for car driver behavior experimentation. In [17,22], an intelligent vehicle black box using the IoT was presented that received information from various sensors, such as a breath analyzer, as well as information about acceleration, the distance of surrounding vehicles, and push and panic buttons. However, these systems had no communication with the ECU.
In this research, the design and implementation of a car’s black box system using a Raspberry Pi microcomputer and a 4G module to connect the system to the Internet was carried out. This black box system was based on an embedded system and a graphical user interface (GUI) for the analysis of the acquired data. The system acquired video and audio signals using a camera and a microphone, respectively, connected to the Raspberry Pi microcomputer. This system also detected the alcohol concentrations inside the vehicle using an MQ3 module. The car’s black box uses a plug-and-play method, meaning that it can detect the addition of a new input or output device and automatically activate the appropriate control software.
2. Materials and Methods
The main function of a car’s black box system is to acquire, process, and store information during the vehicle’s journey. It is used frequently in airplanes; however, this system can also be useful in cars. Figure 1 shows the proposed embedded system with the input signals. The system utilized sensors placed in different parts of the vehicle to collect information such as audio, video, alcohol concentration, velocity, GPS, and all variables from the electronic central unit. The audio signals were collected with a voice recorder, which allowed the creation of an audio recording directly from a browser by using a microphone. For video, we connected the Raspberry Pi camera module to the microcomputer. For the alcohol concentration detection inside the vehicle, we used an MQ3 module. This module is a low-cost semiconductor sensor which can detect the presence of alcohol gases at concentrations from 0.05 mg/L to 10 mg/L. The material used for this sensor was SnO2, which has a lower conductivity in clean air. Its conductivity increases as the concentration of alcohol gases increases. It has high sensitivity to alcohol and a good resistance to disturbances due to smoke, vapor, and gasoline. This alcohol sensor provides both digital and analog outputs and is suitable for detecting the alcohol concentration on your breath, similarly to a common breathalyzer. It has a high sensitivity and a fast response time. We also used a GPS for localization. Finally, this microcomputer was also connected with the central electronic unit to obtain other signals from the vehicle. Figure 2 shows a scheme of the proposed system, where it can be observed that a microcomputer is used as the main component to govern the system and interface with the other devices that comprise it through different communication protocols. The connection between the Raspberry Pi and the ECU can also be seen.
Figure 3 shows the processing and analyzing of the data from the stored files. The information can be viewed graphically and through video and audio files.
This system was designed in a modular way, meaning that different hardware elements were incorporated to reduce costs and obtain a high-performance system. Also, this architecture allows faults to be found more quickly, is efficient, and allows for the interchange of parts easily. This system continues its operation if any hardware element breaks down or is disconnected, since when such a situation occurs the system tries to reincorporate the device iteratively to resume the connection. If the connection is not established again definitively, an error code is stored in a log file that mentions which element failed and the time it lost the connection. With this, it is easier to take action and repair the car’s black box system.
The methodology used to carry out this system is shown in in Figure 4. In the first step, the initialization process is performed where the communication protocols corresponding to each hardware element are configured and thus make the links correctly. Then, certain initial parameters are provided to each device before the device starts its task. Subsequently, the connection with the car’s ECU is established through the CAN communication protocol. Once the above is ready, the system uses the “threading” method to carry out the data acquisition stage. This method allows the execution of different processes simultaneously, allowing all devices to work at the same time without the task of one element interfering with that of another. The data are stored continuously within a dynamic buffer. After 10 min, the data in the buffer are updated by eliminating the oldest information and adding the new data in a new buffer space. This algorithm is shown in Figure 5. Finally, the information acquisition and storage stages are carried out iteratively. At each stage, a review is made of the connection state of the microcomputer with the sensors in order to detect possible failures and errors in the system. In case of any problems, the system automatically generates a record that provides information about which element is failing.
The GUI was developed through the Python programming language and some packages that allowed the creation of interfaces, the handling of different file formats, and the building of an executable that can be used on different computers without the need to install external programs for its operation. This GUI allowed us to load the information and display it graphically and numerically in the case of text files. Audio and video files can be seen through players corresponding to each format, which are integrated into the GUI as shown in Figure 6. The purpose of the GUI is to facilitate the analysis of the collected information to deduce the causes of accidents and consequently to know if they happened due to human error or due to problems with the vehicle’s condition. In this research, the GUI was carried out in Spanish.
3. Results
The designed car’s black box system can be seen in Figure 7. It was tested in a Kia Soul 2018 vehicle, where the components were adapted and the connection with the ECU was made to extract information about the vehicle. The tests were carried out with the car’s black box consisting of the acquisition of data from the sensors and the vehicle’s ECU. The system recognized when one or more components were connected or disconnected and, at the same time, checked that the information was being stored in the corresponding formats. The tests carried out in the GUI relied on the correct reading of the different file formats, the visual display of information through graphs, the numerical values and video, and a reproduction of the audio. Table 1 shows the number of files and data for each parameter measured over a 10 min journey.
Table 2 shows the results of some of the tests carried out for the connection and disconnection of the devices with the microcomputer. None of the processes were affected at all if any of the sensors did not work correctly. In addition, when the device was connected again, it was successfully reincorporated into its task without generating interruptions to the execution of the system.
Figure 8 shows some of the records made when a sensor was connected and disconnected. When the sensor was available, the storage of information was observed; otherwise, a warning message was saved. This makes it possible to collect accurate and reliable information in addition to knowing if there are faults in the system, so that corrective maintenance can be carried out to eliminate said faults.
In this research, we also developed a GUI as shown in Figure 6; however, these files can be read with any commercial software. Figure 9a shows the distance traveled by car. Figure 9b shows the RPM of the vehicle’s motor.
Figure 10a shows the vehicle’s velocity and Figure 10b shows a screenshot of the audio player. These results are very important because they give us the information from the last 10 min of the journey.
In this research, we can record the journey of the vehicle using the Raspberry Pi camera module. Figure 11 shows the video player, and you can see the video.
These results are very important because they allow us to review the last 10 min of the vehicle’s journey. If there is an accident, the authorities can review the data and files, and determine the causes.
4. Discussion
A crucial factor in traffic safety is driver behavior. Therefore, a better understanding of driver actions will help in determining the most common reasons for car accidents. In the last decade, there have been many efforts by groups over the world to report research in this field in order to help reduce accidents due to driver distraction. This paper presents a car’s black box system using a simple Raspberry Pi microcomputer, which is a powerful computer that can help researchers study car driver behavior. When comparing this embedded system with others, for example with the Argos system [21], our system is an improved in-vehicle data recorder that allows the recording of many kinds of alphanumerical data, such as the speed, the point of gaze, and the current distance to lateral road marks. Our system is simple and can interact with the ECU, and it also incorporates additional sensors such as an alcohol concentration sensor and an audio recorder. Also, our system is connected to the cloud using the ThingSpeak platform, where we can use MATLAB to read data from a particular time range.
5. Conclusions
The design and implementation of a car’s black box system using a Raspberry Pi microcomputer and an Internet of things module was presented in this research. This system was built using a microcomputer Raspberry Pi and different sensors, such as a GPS, camera module, audio module, alcohol sensor module, and signals from the electronic control unit. The data were stored in both a secure digital card, and in the cloud using the Waveshare SIM7600G-H 4G module and the ThingSpeak platform. The results show that this embedded system can acquire and process video, audio, GPS, alcohol concentration, speed, temperature, etc. This system can be useful when any type of accident occurs due to any reason, as the car’s black box would provide the necessary information and data to generate a report of the accident and its causes.
Conceptualization, A.G.-B. and D.T.-U.; methodology, F.R.C.-S. and P.O.-O.; software, J.A.H.-M. and O.P.-C.; validation, U.P.-R. and A.G.-B.; formal analysis, D.T.-U. and P.O.-O.; investigation, A.G.-B.; resources, D.T.-U.; writing—original draft preparation, A.G.-B.; writing—review and editing, D.T.-U., O.P.-C. and P.O.-O.; visualization, F.R.C.-S.; supervision, A.G.-B.; project administration, D.T.-U. All authors have read and agreed to the published version of the manuscript.
Not applicable.
Not applicable.
Details about the used data and where they can be found are given in
The authors would like to warmly thank the reviewers for their relevant comments that helped in clarifying and improving the content of the paper.
The authors declare no conflict of interest.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Figure 7. The car’s black box system testbench: 1 is the audio module; 2 is the module for communicating with the ECU; 3 is the GPS module; 4 is the MQ3 module; 5 is the camera module; 6 is the microphone; and 7 is the dc power.
Figure 9. Data in the GUI: (a) is the distance traveled by the car and (b) is the RPM of the vehicle’s motor.
Figure 10. Data in the GUI: (a) is the vehicle’s velocity during the journey and (b) is the screenshot of the audio player.
The number of files and data for each parameter measured over a 10 min journey.
Parameters | Files | Format | Data | Enabled |
---|---|---|---|---|
Video | 60 | .mp4 | * | Yes |
Audio | 60 | .wav | * | Yes |
Alcohol | 1 | .txt | 732 | Yes |
GPS | 1 | .txt | 203 | Yes |
Accelerometer | 1 | .txt | 259 | Yes |
Distance | 1 | .txt | 259 | Yes |
Time | 1 | .txt | 259 | Yes |
RPM | 1 | .txt | 259 | Yes |
Speed | 1 | .txt | 259 | Yes |
% Combustible | 1 | .txt | 259 | Yes |
* No data.
Results of some of the tests carried out; E is enabled and D is disabled.
Parameters | Test 1 | Test 2 | Test 3 | Test 4 |
---|---|---|---|---|
Video | E | D | E | E |
Audio | E | E | E | D |
Alcohol | E | E | D | E |
GPS | E | E | E | D |
Accelerometer | E | E | E | E |
Distance | E | E | E | E |
Time | E | E | E | E |
RPM | E | E | E | E |
Speed | E | E | E | E |
% Combustible | E | E | E | E |
References
1. Van Bavel, J. The world population explosion: Causes, backgrounds and -projections for the future. Facts Views Vis. ObGyn; 2013; 5, pp. 281-291. [PubMed: https://www.ncbi.nlm.nih.gov/pubmed/24753956]
2. Rolison, J.J.; Regev, S.; Moutari, S.; Feeney, A. What are the factors that contribute to road accidents? An assessment of law enforcement views, ordinary drivers’ opinions, and road accident records. Accid. Anal. Prev.; 2018; 115, pp. 11-24. [DOI: https://dx.doi.org/10.1016/j.aap.2018.02.025] [PubMed: https://www.ncbi.nlm.nih.gov/pubmed/29529397]
3. Leyva, J.A.L.; Terriquez, V.D.A. Car Black Box System (CBBS) Using FPGA for Determine the Car orientation: Preliminary Results. Proceedings of the International Conference on Mechatronics, Electronics and Automotive Engineering; Cuernavaca, Mexico, 18–21 November 2014; pp. 125-128.
4. Tasneem, K.F.; Singh, G.; Ahmed, P.; Halder, S.; Ganguly, S.; Soni, S.P.; Rakhra, M. Affordable black box: A Smart Accident Detection System for cars. Proceedings of the 9th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions) (ICRITO); Noida, India, 3–4 September 2021; pp. 1-5.
5. Kang, C.; Heo, S.W. Intelligent Safety Information Gathering System Using a Smart Black Box. Proceedings of the IEEE International Conference on Consumer Electronics (ICCE); Las Vegas, NV, USA, 8–10 January 2017.
6. Prasad, M.J.; Arundathi, S.; Anil, N.; Kariyappa, B.S. Automobile black box system for accident analysis. Proceedings of the 2014 International Conference on Advances in Electronics Computers and Communications; Bangalore, India, 10–11 October 2014; pp. 1-5.
7. Kassem, A.; Jabr, R.; Salamouni, G.; Maalouf, Z.K. Vehicle Black Box System. Proceedings of the 2nd Annual IEEE System Conference; Montreal, QC, Canada, 7–10 April 2008; pp. 1-6.
8. Le Nguyen, D.; Lee, M.E.; Lensky, A. The Design and Implementation of New Vehicle Black Box Using the OBD Information. Proceedings of the 7th IEEE International Conference on Computing and Convergence Technology (ICCCT); Seoul, Korea, 3–5 December 2012; pp. 1281-1284.
9. Kim, M.; Jeong, C.Y. An Efficient Data Integrity Scheme for Preventing Falsification of Car Black Box. Proceedings of the International Conference on ICT Convergence (ICTC); Jeju, Korea, 14–16 October 2013; pp. 1020-1021.
10. Hui, X.; Jing-zhao, L.; Zhi-xiang, Y.; Xia, S. Design of Vehicle Black Box based on Dual-core System and C/OS-II. Proceedings of the International Conference on Industrial Control and Electronics Engineering; Xi’an, China, 23–25 August 2012; pp. 763-766.
11. Watthanawisuth, N.; Lomas, T.; Tuantranont, A. Wireless Black Box Using MEMS Accelerometer and GPS Tracking for Accidental Monitoring of Vehicles. Proceedings of the IEEE-EMBS International Conference on Biomedical and Health Informatics (BHI); Hong Kong, China, 5–7 January 2012; pp. 847-850.
12. Jiang, L.; Yu, C. Design and Implementation of Car Black Box Based on Embedded System. Proceedings of the International Conference on Electrical and Control Engineering; Wuhan, China, 25–27 June 2010; pp. 3537-3539.
13. Rahman, M.M.; Kabir, A.Z.M.T.; Khan, S.Z.; Akhtar, N.; Al Mamun, A.; Hossain, S.M.M. Smart Vehicle Management System for Accident Reduction by Using Sensors and An IoT Based Black Box. Proceedings of the 8th International Conference on Electrical Engineering, Computer Science and Informatics (EECSI); 2021; pp. 277-282.
14. Kim, J.H.; Kim, S.K.; Lee, S.H.; Lee, T.M.; Lim, J. License plate detection and recognition algorithm for vehicle black box. Proceedings of the International Automatic Control Conference (CACS); Pingtung, Taiwan, 12–15 November 2017; pp. 1-6.
15. Jung, S.M.; Lim, M.S. System on Chip Design of Embedded Controller for Car Black Box. Proceedings of the International Symposium on Information Technology Convergence (ISITC 2007); Joenju, Korea, 23–24 November 2007; pp. 217-221.
16. Federal Motor Vehicle Safety Standards; Event Data Recorders. Available online: https://www.govinfo.gov/content/pkg/FR-2019-02-08/pdf/2019-01651.pdf (accessed on 1 May 2022).
17. Sethuraman, S.; Santhanalakshmi, S. Implementing Vehicle Black Box System by IoT based approach. Proceedings of the 4th International Conference on Trends in Electronics and Informatics (ICOEI); Tirunelveli, India, 15–17 June 2020; pp. 390-395.
18. Das, A.; Ray, A.; Ghosh, A.; Bhattacharyya, S.; Mukherjee, D.; Rana, T.K. Vehicle accident prevent cum location monitoring system. Proceedings of the 8th Annual Industrial Automation and Electromechanical Engineering Conference (IEMECON); Bangkok, Thailand, 16–18 August 2017; pp. 101-105.
19. Dimple, R.; Nanda, B.S. Design and implementation of smart black box system for gathering the safety information in vehicles. Int. J. Adv. Res. Ideas Innov. Technol.; 2018; 4, pp. 1230-1233.
20. Takeda, K.; Miyajima, C.; Suzuki, T.; Angkititrakul, P.; Kurumida, K.; Kuroyanagi, Y.; Ishikawa, H.; Terashima, R.; Wakita, T.; Oikawa, M. et al. Self-Coaching System Based on Recorded Driving Data: Learning from One’s Experiences. IEEE Trans. Intell. Transp. Syst.; 2012; 13, pp. 1821-1831. [DOI: https://dx.doi.org/10.1109/TITS.2012.2205917]
21. Pérez, A.; García, M.I.; Nieto, M.; Pedraza, J.L.; Rodríguez, S.; Zamorano, J. Argos: An Advanced In-Vehicle Data Recorder on a Massively Sensorized Vehicle for Car Driver Behavior Experimentation. IEEE Trans. Intell. Transp. Syst.; 2010; 11, pp. 463-473. [DOI: https://dx.doi.org/10.1109/TITS.2010.2046323]
22. Kumar, M.A.; Suman, M.V.; Misra, Y.; Pratyusha, M.G. Intelligent vehicle black box using IoT. Int. J. Eng. Technol.; 2018; 7, pp. 215-218. [DOI: https://dx.doi.org/10.14419/ijet.v7i2.7.10296]
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Abstract
The design and implementation of a car’s black box system using a Raspberry Pi microcomputer and an Internet of things module is presented in this research. This system was built using a Raspberry Pi microcomputer and different sensors, including a GPS, camera module, audio module, alcohol sensor module, and signals from the electronic control unit. The data were stored in both a secure digital card and in the cloud using the Waveshare SIM7600G-H 4G module. The results show that this embedded system can acquire and process video, audio, GPS data, alcohol concentration, speed, temperature, etc. Finally, a graphics user interface was developed to process the stored files. This system is similar to a black box in airplanes, which records all flight information into the black box using a specific algorithm. This makes the recorded flight data accessible to authorities when needed.
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
Details


1 Faculty of Science, Universidad Autonoma de San Luis Potosi, San Lui Potosi 78217, Mexico;
2 Electronics Department, Instituto Tecnologico de Hermosillo, Hermosillo 83170, Mexico;
3 Electronics Department, Universidad Autonoma del Estado de Hidalgo, Pachuca 42039, Mexico;