# Smart Roads for Autonomous Accident Detection and Warnings
## 5 Experiments
### Validation of AALS  
Each module is tested for proper working order and was found to operate as expected. All modules of the AALS system were integrated to build a complete working system. It works as a single unit where at least two nodes must be present at a distance of 50 m apart. Therefore, two nodes were built in a lab for testing and validation. By default, each node was in the listening position with all its sensing capabilities. Each node is able to detect accidents through the mic, IR sensor, and smoke sensor modules. Whenever an accident occurs in the area of a node, only that node responds and sends messages to another node. In this experimental setup, if a node has only one HC-12 communication module (i.e., to both receive and send a message), then it might suffer from the message loopback problem due to the echo of the same message. To overcome this problem, two HC-12 modules were used, tuned to different channels: one module for transforming and another for receiving. Each pair of nodes communicated with each other in an unidirectional manner. The transmitting module channel was the same as the receiving channel of the other module. The final AALS system node has two HC-12 wireless communication modules: one for receiving and the other for transmitting. After the experiments were completed, we made the following observations.  
When there are 20 nodes along a 1 km stretch of road:  
Minimum transmission time = 80 ms = 0.08 s;  
Maximum transmission time = 1600 ms = 1.6 s.  
When there are 2000 nodes on a 100 km stretch of road:  
Minimum transmission time = 8000 ms = 8 s;  
Maximum transmission time = 160,000 ms = 160 s.  
The HC-12\({}^{\prime}\)s signal transmission time from one node to another node ranged between 4 ms and 80 ms.  
1. When there was an accident, the time to detect it with sound was 100 ms.
2. The time to detect an accident using IR was 100 ms + Threshold (e.g., \(100+5000=5100\) ms).
3. The time required to detect smoke was 30 to 60 s.  
The salient features of the AALS system node are as follows.  
1. It can sense the sound produced by an accident/crash.
2. It can sense smoke from a fire.
3. It can sense an obstacle on the road for a period longer than the set threshold, e.g., 10 s.
4. When an accident was detected by sound or obstacle detection, the alert comprising light and sound was generated on the node.
5. A message with the location, traffic direction, and fire detection information was sent to the immediately adjacent node.
6. When a message about an accident was received by a node, it retransmitted the message to its adjacent node. This process then continued from node to node until the message was received by the EOC.
7. Each node that entered the retransmission phase also generated an alert using light and sound to warn oncoming vehicles.
8. All oncoming vehicles' drivers and passengers were able to see the blinking lights and can hear the siren. An oncoming vehicle's driver ensured their safety by taking precautionary measures.
9. When a rescue team reached the accident location and completed their tasks, the node was reset. All nodes were reset when they received the RESET message from the node that started the communication.