Full text
Towards the design and prototyping of next generation Advance Warning Triangle V-16 and V-27 smart and connected devices Santiago Díaz-Romero1[0000-0003-2925-703X] and Alejandro Linares-Barranco1[0000-0002-6056- 740X] 1 Smart Computers Systems Research and Engineering (SCORE). I3US-ETSII. Escuela Politécnica Superior (EPS). Robotics & Computer Technology Lab (RTC); University of Seville [email protected] Abstract. Traditionally, vehicle breakdown signaling devices such as Advance Warning Triangles require the user to get out of the vehicle, which increases the risk of an accident. According to the Spanish Directorate-General for Traffic (DGT), a significant number of accidents occur in Spain while a vehicle is being repaired or waiting for roadside assistance. In order to try to reduce the numbers, the DGT has proposed some connected solutions such as the V-16 light signal and the V-27 virtual triangle. This paper proposes an approach to the software and hardware implementation of these devices. For the hardware design, a modular system based on MCU and the real-time operating system FreeRTOS has been chosen. This would allow power saving and future modifications or upgrades in simpler and remote way. On the other hand, the designed software platform allows to collect and process both the incidents generated by this device and those published by the DGT in order to send them to the V-27 application on an Android system. It has been possible to develop a modular hardware device with a relatively low cost and a potentially scalable functional software platform. Keywords: Road Safety, MCU, IoT, Real-Time Operating System, FreeRTOS, Android, Signaling. 1 Introduction Since the beginning of motor vehicles, the reduction of accidents, injuries and fatalities has been a major concern of governments around the world. To this end, they have taken direct and indirect measures such as more restrictive regulations, reduction of the maximum permitted speed, awareness and prevention campaigns, etc. In addition, over the years, different elements have been created and introduced that have contributed to a great extent to the reduction of the accident rate. Elements such as seat belts, Anti-lock Braking Systems (ABS), Electronic Stability Programs (ESP) or airbags.
2 An event that poses a significant safety risk factor for both vehicle users and other road users is the stopping of a vehicle on the road. This is due not only to the fact of adding an unforeseen obstacle on the road but also to its visibility, its position on the road, the unpredictable behavior of pedestrians, etc. In Spain alone, around 30 accidents occur annually in which the pedestrian was carrying out repairs to the vehicle or waiting for road assistance to arrive. This figure can increase to 45 accidents a year if pedestrians who were assisting in a previous accident are included [1]. For this reason, many countries indicate in their traffic regulations or road safety directives how to proceed in these cases. In many cases, they often include some form of visual signaling that helps other road users to identify this risk in advance, alerting them and helping to reduce the possibility of an accident. There are countries -such as the United Stateswhere this signaling can be simply the turning on of the vehicle's warning lights. But this regulation can be more extensive in order to increase visibility and help to anticipate danger and reduce the accident rate. For example, in most European Union countries (see Fig. 1), including Spain, the use of warning triangles and/or the use of a reflective jacket is mandatory while the pedestrian remains outside the vehicle [2]. Fig. 1. Map of EU warning triangle rules. Image taken from Safety First Aid [3]. Spanish government seeks to increase visibility and minimize accident risks by replacing warning triangles with a new luminous signal called V-16 [4]. This signal must be visible at a distance of 1,000 meters compared to the 100 meters of the current warning triangles and must be connected to the National Access Point (NAC), which will allow DGT to identify incidents and alert other users and institutions. The remainder of the article is organized as follows. Section 2 provides an overview of the state of the art. Section 3 describes the design process and the tests performed. Section 4 presents the results and discussion while conclusions are presented in Section 5.
3 2 State of the art Initially in Spain, in the event of an accident, it was only mandatory to turn on the warning lights to alert other road users that there is a stopped vehicle that could pose a risk. In order to increase visibility and reduce accident rates, in 1999 Spain introduced the requirement to carry two reflective triangles called warning triangles inside the vehicle. These warning triangles must comply with the addendum 26 to United Nations Economic Commission for Europe (UNECE) regulation number 27 in its revision 2 [5]. Although the number of warning triangles that must be carried may vary, normally being 1 or 2 (2 are required in Spain), the mandatory use of these warning triangles is widespread in European Union (EU) countries. Talking about Spanish regulation (regulations vary from country to country in the EU) if the breakdown has occurred on a one-way road, two warning triangles must be placed: one at 50 and the other at 100 meters behind the vehicle so that the front reflective part of the warning triangles is visible to approaching vehicles. If the vehicle is stopped on a two-way road, a warning triangle should be placed 50 meters in front of and behind the vehicle. This placement allows other drivers to detect the danger earlier. In addition, the space between the warning triangle and the vehicle provides a safety margin for the occupants of the stopped vehicle. Even so, the use of warning triangles is not without its drawbacks. The biggest drawback is that they require the user to get out of the vehicle and walk along the road in order to place the warning triangles as required by the regulations. This situation poses a serious risk of accident, so in most countries where the use of the warning triangle is mandatory, it is also mandatory to wear a reflective vest while outside the vehicle. Even in some countries such as France [6], the warning triangle should not be used on highways or freeways because vehicles tend to travel at high speed, increasing the risk of being run over during the warning triangle placement maneuver. Another disadvantage is the danger posed by the fact that although the warning triangle is designed to have a visibility of 100 meters, this is reduced in adverse conditions such as fog, rain, hail, etc. The two previous disadvantages are linked to a third one, which is the risk to other users caused by the warning triangles being left on the road after use. Although they must be removed after use, there is a perception of risk on the part of the pedestrian and they are often abandoned. Another disadvantage is the lack of universality of the warning triangle, as people with reduced mobility who cannot get out of the vehicle and move easily to place the warning triangle see their safety reduced. Seeking to minimize or eliminate the aforementioned inconveniences, in 2018 the possibility of using V-16 luminous beacons as a signaling complement was included in the Spanish General Vehicle Regulations. It was in 2021 when these beacons were considered a legal substitute for the warning triangle, not being necessary to carry them if a V-16 signal was carried. At the end of 2021, in the context of Directive 2010/40/EU of the European Parliament and of the Council of 7 July 2010 on the framework for the deployment of Intelligent Transport Systems in the field of road transport and for interfaces with
4 other modes of transport and in the pursuit of the promotion and implementation of the DGT 3.0 system through the implementation of intelligent transport systems, the requirements for the upgrade of the V-16 light signal to a connected device are defined. The obligation to include a Global Positioning System (GPS) and NarrowBand connectivity is added, as well as the obligation to send such data to the National Access Point (NAP). This interconnection with the NAP is not done directly through the beacon but through the beacon manufacturer servers. The NAP is able to manage and provide in real-time all the information related to traffic, such as accidents, incidents, cameras, digital signage, etc. Currently, it is possible to use both warning triangles and V-16 beacons (connected or not). It will be from January 1st, 2026 when the use of connected V-16 beacons will be mandatory to travel on Spanish roads. At the same time, the V-27 virtual triangle signal was also defined on the same dates. Although the documentation on this is still scarce, it is made clear that it is optional and that the signal will be activated in the vehicle's on-board system to warn of the presence of an approaching danger, when this fact has been reported by a third party to the connected vehicle platform of the General Directorate of Traffic [7] Unlike the V-16 signal, which serves to warn other road users of danger on the road (both visually and through the connection with the NAP), the V-27 signal serves to warn a user of approaching dangers through a connection with the NAP. For this purpose, two frames are defined, one for sending data from the V-16 signal to the manufacturer and the other for sending data from the manufacturer to the NAP [8]. 3 Design process and tests performed This section will show and describe the design decisions made for both the V-16 and V-27 signals and then describe the tests performed. 3.1 Design Signal V-16: Light beacon. Before starting to describe the process, as well as the design considerations, it is important to highlight the regulations in which the V-16 beacon is currently framed: 1. General Vehicle Regulations approved by Royal Decree 2822/1998, of December 23, 1998. [9] 2. Royal Decree 159/2021, of March 16, 21, regulating roadside assistance services on public roads. [7] 3. Resolution of November 30, 2021, of the General Directorate of Traffic, defining the protocol and format for sending data from the V-16 signal to the National Access Point. [10] 4. Mobility Guideline 3/2022: Process for the certification of V16 signals connected to DGT 3.0. [11]
5 Due to the extensive nature of the regulations, only some of the most important characteristics and requirements will be highlighted from among all the information contained therein. Among the physical characteristics are the irradiated light that must cover 360 degrees horizontally and a minimum of ±8 degrees vertically. In addition, it must have an intensity between 40 and 700 effective candelas at degree 0 and between 25 and 600 candelas at ±8 degrees. The turn-off and turn-on time must comply with UNECE/UN 65 regulations and have a flash frequency between 0.8 and 2Hz. Regarding communications, it must use GSMA 4G/5G Low-Power Wide-Area (LPWA) standards, a private Access Point Name (APN), and a non-removable SIM card to avoid tampering and automatic and unattended provisioning to avoid intermediate activation procedures. In [10] two data frame types and a general communication scheme are defined, which can be seen in Fig. 2. Once the V-27 device is turned on, it must send a type A power-on frame to the server of the company that manufactures the device, which in turn must send a type B frame to the DGT servers. This process will be repeated by sending an incident continuation frame every 100 seconds as long as the beacon is turned on. The device must also send a termination frame when the device is turned off. The type A frame is longer and contains more information, while the type B frame is shorter and contains the minimum amount of information necessary to report the incident and is anonymized. Fig. 2. Information path schema for V-16 signal. The proposed hardware for the main board (see Fig. 3) for the V-16 signal consists of an STM32L151C8 microcontroller running at 4 MHz, a Microchip 3.3 Volts linear voltage regulator, the MIC29300 capable of delivering up to 3 amps, a TP4056 Li-Ion battery charger to which load sharing has been added, and a DW01 battery protector. For the battery, a replaceable 18650 battery has been chosen as it has a suitable size and capacity and is easily found by the general public as it has been widely used in vapers. The possibility of recharging it via micro USB was also added since in the case of rechargeable batteries the regulations require that they can be recharged from the vehicle itself, although this would not be necessary since design features easily replaceable batteries. All of the above is connected to 6 light-emitting diodes (LED) of 1 W (each with its own output line), as well as a general limit endstop type switch, a general purpose push button and Red, Green and Blue (RGB) LED.
6 Fig. 3. PCB of the main V-16 signal module. The BT board (Fig. 4a) is based on the JDY-08 module offering BlueTooth 4.0, while the GPS board (Fig. 4b) makes use of UBlox's MAX-M8Q-0-10 as well as a passive ceramic antenna from Molex. Finally, the NB one (Fig. 4c) uses SIMCOM's SIM7020 module. When the development of this device began, the regulations did not require the integration of GPS and NB communication, so it was decided to start by implementing a Bluetooth (BT) connection and integration with a mobile app. This is currently not possible as the regulation expressly prohibits the integration of additional functions to those specified in the regulation. The choice of an STM32 microcontroller has been made taking into account the maxim of adaptability since it allows the use of a realtime operating system such as FreeRTOS1 that would allow the different tasks to be managed more easily and efficiently [12][13]. STM32 also provides other tools such as STM32Cube.AI that would allow exploring the options of adding artificial intelligence capabilities in the future [14]. However, the choice of the STM32L151 is largely due to the fact that it offers the possibility of having 3 universal asynchronous receiver/transmitter (UART) serial ports operating at the same time via hardware. In fact, the device was conceived with the idea of being highly adaptable and modular. Initially, 3 different modules were created: Bluetooth, GPS and NB 4G, all of them ready to be connected via UART with the main board. In the original design, it had only BT connectivity. It had a total of 4 tasks: a oneshot task and three cyclic tasks. The one-shot task is responsible for configuring the BT device in case it has been misconfigured, setting the receiver to the appropriate mode, changing the name of the device and setting the desired serial communication speed. The three cyclic tasks are responsible for handling the connection, communication (sending frames and receiving commands) and beacon flashing. Auxiliary tasks 1 https://github.com/FreeRTOS
7 were also implemented to decode the Global Positioning System Fix Data (GGA) and Recommended Minimum (RMC) commands belonging to the National Marine Electronics Association (NMEA) standard coming from the GPS. These commands are necessary to obtain the information needed to generate the A frame to be sent to the company's servers. Fig. 4. BT, GPS and NB PCBs of V-16 signal module. Signal V-27: Virtual triangle In the case of the V-27 sign, regulation is scarce. As mentioned above, its purpose is to warn of the presence of a nearby danger. In this case, we have chosen to develop an application for the Android operating system (Fig. 5). In this way, the application is easily portable to on-board systems based on Android Auto. This application tracks and shows the current position in real time over a map and alerts the user when approaching an incidence reported by the DGT, this alert is done both visually and acoustically. The application is designed to work in conjunction with the V-16 signal in its BT version so that it acts as a bridge for sending frames from the signal, as well as a provider of position data through the GPS of the mobile phone. In the absence of a V-16 beacon, the app is able to generate its own type A frames and send them to the company's server, although it should be noted that this behavior is not approved by the DGT. At the time the project was initiated, the DGT did not yet provide any method of connection to the NAP. It was not until recently that a mechanism was enabled to request this connection, which is still being processed in order to update the app. Due
8 to this circumstance, it has been decided to make use of a free access file in XML format provided by the DGT itself. This file contains all the incidents existing at any Fig. 5. V-27 Android App. given time, is updated every 120 seconds and is encoded in DATEX II, which was designed and developed by a European working group as a mechanism for traffic data interchange formed to standardize this process between the different traffic information and control centers. The file cannot be processed on the phone itself due to the size of the file and the high number of incidents it contains. For this reason, a server application (see Fig. 7) has been implemented that is in charge of downloading the file and processing all the incidents: adding, updating or deleting as needed. Once the changes are processed, they are uploaded to Firebase, a NoSQL database belonging to Google Services, where they can be consulted by the virtual triangle app. To avoid misuse, a user account is required as the database is protected by Google Identity OAuth 2.0 so an authentication token is required in order to make changes or queries. In addition, this application can be used both as a viewer and as a control panel and is responsible for generating type B frames, as well as sending them to the DGT. Again, this part could not be implemented according to the regulations because at the time of its development, the DGT had not yet published the necessary documentation and since it was published the authorization for access to the NAP is still pending. The information path schema is shown in Fig. 6. 3.2 Tests First of all, each of the V-16 signal modules has been tested separately to verify its correct assembly and operation. For the main module, it was tested the charging system, the power supply system, the flashing lights, the serial ports and the battery life. With a 1.800 mAh battery the
9 signal was able to maintain maximum light intensity for 40 minutes (regulation requires 30 minutes), after which it was reduced but still quite visible at least up to 330 minutes. Not having a light meter it has not been possible to determine exactly when Fig. 6. Information path schema for V-27 signal. Fig. 7. Control panel server application. it ceases to comply with the regulation. For the BT module, it was connected to a computer via a serial port to send data via Bluetooth to a cell phone. To test the GPS module, it has been connected via serial port with a computer, configured by NMEA commands and using the U-Center tool provided by the manufacturer. The time required to make a fix varies between 75 and 300 seconds, depending on conditions, with the typical time being less than 120 seconds. Finally, the NB module has been configured for a service provider, a connection has been made with the APN of the provider and the correct operation of the data connection has been verified.