Road Safety and Energy Saving Proposed System: A ZigBee WSN Approach

—The problem of long bended routes in Kingdom of Saudi Arabia (KSA) is one of the annoying problems that harvest a big number of vitalities annually. The problem relays under the fact that these long bended route are in shortage for lighting because of its extremely high cost. Therefore, in this paper, a system will be proposed as a smart alerting system based on ZigBee sensor network. The proposed system targets the roads with weak lights at night time in order to reduce the number of accidents which may occur on such dangerous roads. A number of real experiments were conducted using ZigBee sensor nodes in order to test the efficiency and reliability of the proposed system. Through real experiments, it was demonstrated that the proposed system offers reasonable response time, and achieves low power consumption.


INTRODUCTION I.
In any country, it is crucial to maintain an excellent road infrastructure. A kingdom such as Saudi Arabia, has a vary routes infrastructure which connects 104 cities together. Some of these routes have a long length that could reach over 2500Km. The main issue that could cause traffic accidents is that these routes lack sufficient lightening system because of their massive lengths [1].
Based on a study conducted by the Arabian smart transport system company; it was found that roads in the KSA are ranked as the deadliest and most dangerous in the world. This statement is confirmed by the high fatality ratio of 19 deaths per day. In addition, KSA spends around 6 billion US dollars annually on traffic accidents management, in addition, it spends an additional 250 million Dollars as medical treatment expanses for accident injuries. As briefly declared, these horrifying results came as an absolute conclusion of the irresponsible and lack of discipline in driving through KSA [1].
One of the main reasons accidents happens in KSA are the poor lightening on bended routes especially on outside city routes. The majority of these accidents happens at night where no sufficient or even no lightening at all is available on such routes. As explained previously, these routes are difficult to be lightened because of their long lengths. Lack of lightening in some routes could result in fatal accidents among different routes [2]. A number of solutions have targeted this problem, however; most of the existing solutions targeted the energy-saving and lighting system.
In this paper, as part of the solution, we proposed a prototype smart lighting system, which will decrease the numbers we are observing, and illuminate as much as possible of traffic accidents by providing smart lightening in order to provide an alerting mechanism, so that driver on such routes could observe such bends and lower their speed in order to manage the vehicle properly so that they will avoid losing control and causing accidents on such routes.
The rest of the paper is organized as follows: Section 2 presents the related works. In Section 3, the proposed system is presented and discussed. Section 4 discusses the implementation and test-bed environment. The proposed system is experimented and evaluated in Section 5. And finally, Section 6 concludes the work presented in this paper and discusses the future works.

RELATED WORKS II.
Recently, a number of smart lighting systems have been proposed. In this section, most significant ones will be reviewed. The work presented in [3] includes the design and development of a smart lighting system which targets the energy saving and autonomous operation. It was deployed according to the needs of the routs where the traffic is low and the route lighting is not required all day long. In [4], the authors presented an efficient LED lamp that illuminates the street with high quality, with no attention on the lighting management problem.
A design methodology of LED systems which is used mainly for weakly regulated renewable power grids has been presented and experimentally verified in [5]. A new routs lighting energy management system is proposed in [6] which aims to reduce energy consumption, based on the energy on demand concept and a novel modeling approach based on artificial neural networks was implemented. In [7], authors presented technical details of a preliminary test-bed for intelligent road lighting. This test-bed was deployed to investigate the relationship between the brightness levels of road lamps and the feelings of safety at night.
As seen above, most of the existing works focused on the energy saving methods with less attention on safety roads. Therefore, in this paper, we propose a safety lighting system which is capable of lighting roads using an energy saving method. Our proposed system differs from the existing ones as follows: our system targets the drivers' safety at night time; in addition, it achieves low power consumption as it works only when the brightness is low, and light on demand concept is applied. Our main target of this paper is to design, develop, and implement a smart lighting system to be installed at sharp bended angle roads to avoid accidents on such roads at night time. The proposed system is divided into two parts: the detection-side and lighting-side as presented in Figure  1. The detection side first checks the level of light at a specific route, if the level of light is low, the motion sensor will start detecting the presence of any vehicle approaching. As soon as the motion sensor detects the presence of any vehicle, it will send a "light" packet to the lighting-side.

Detection-side
Lighting-side The lighting-side on the other hand, listens for "light" packets from detection-side. As soon as a "light" packet is received at the lighting-side, the lighting-side will expect a vehicle approaching to the lighting-side after ! ! period of time, and hence starts the lights for ! ! period of time. ! ! and ! ! periods are estimated based on the number of vehicles and the allowance speed at that route, and represented in Equations 1 and 2 respectively.
where ! ! is the time required to the "light" packet to reach the lighting-side, ! ! is the distance between detection-side and lighting-side, and ! is the allowance speed at that traffic road.
where ! ! is the distance between the first light-pole and last light-pole as depicted in Figure 1.
An energy saving function is adopted to reduce the power consumption for both sides (detection and lighting). Both sides enter a sleep mode in a day time period (i.e. when an enough light available). Moreover, the detectionside may enter a sleep mode when there are no vehicles approaching the detection sensor. As soon as any vehicle approaches the detection-side, the detection sensor will detect the presence of that vehicle, then awake the transmitter module, and a "light" packet will be transmitted to the light-side.

SYSTEM IMPLEMENTATION IV.
In order to evaluate the proposed system, several experiments were conducted on real nodes. In this section, both communication protocol and the experiment test-bed will be discussed thoroughly.

Communication Protocol A.
ZigBee network standard has been adopted as a communication protocol. ZigBee is a low cost, low power consumption, and low data rate network protocol aims to be used in home automation, monitoring, and remote control applications. ZigBee performs three main roles: coordinator, router, and end-device. A single coordinator is required for each ZigBee network, it has a unique Personal Area Network Identification (PAN ID), and a channel number, where its responsibilities include initiating the network formation, and may act as a router once a network is formed. ZigBee router associates in multi-hop routing of messages, whereas ZigBee enddevice is an optional network component which is utilized for low power operation and it's not allowed to participate in routing of messages [8].
In our experiment test-bed, we used a ZigBee coordinator placed at the lighting-side and a ZigBee enddevice placed at the detection-side. ZigBee router did not take place in our experiments, since there is no routing requirement for multi-hop of messages. In addition, enddevice nodes are utilized for low power operation [9,10,11].
Experiment Test-bed B.
The proposed system was tested on the Tabuk-Haql route in order to test its performance and reliability. The reason behind choosing such route is that it has plenty of driving obstacles such as sharp bended angle and insufficient lightening as explained in Figure 2. The experiment lasted for the period of 7 days. Table 1 presents the experiment test-bed parameters.  As aforementioned, the proposed system consists of two parts: detection and lighting sides. Figure 3 presents the designed detection-side module which consists of a light and detection sensors, in addition to Arduino Pro Mini Atmega328 module for controlling, and XBee series 2 for communications. On the other hand, Figure 4 shows the lighting-side module, which includes Arduino Pro Mini Atmega328 module, and XBee series 2.  In this section, the proposed system will be evaluated in terms of: communication cost, power consumption, and response time.

Communication Cost A.
Sensor nodes are designed to work for periods varies between several months up to few years, one of our main targets is to design a low cost, and low power consumption module while achieving reasonable response time. In this section, the total number of packets exchanged between the detection-side and lighting-side is evaluated. Figure 5 presents the number of messages transmitted from end-device node (detection-side) to the coordinator node (lighting-side) through the experiment which lasted for the period of 7 days time.
The total number of messages required to be transmitted from end-device node (detection-side) to the coordinator node (lighting-side) is represented in Equation 3.
where ! !"#$ is the total number of cars passed road ! in a period time !. In most cases, the coordinator node received packets from end-device nodes, and in a few situations, the coordinator node transmits packets to the end-device node. Therefore, the total number of packets received by the coordinator node is represented in Equation 4.
The previous section displayed the total number of packets transmitted by the detection-side and lightingside. Each transmitted and received packet requires a particular amount of energy. In this section, we evaluate the power consumption for both the end-device and coordinator nodes.
The end-device node will save power by switching off the transmitter, whereas coordinator node is configured to be switched off only when there is enough light (day-time) at that route, and must be switched on all the night-time. The power consumption for both end-device and coordinator nodes are represented in Equations 6 and 7 respectively.
where ! ! is the total energy required to transmit a number of packets!!, ! !" is the power required to transmit a single packet, ! !" is the power required to receive a single packet, ! !"# is the energy required during the active time ! ! , ! !"# is the energy required during the sleep time ! ! , and ! !"#$%&' is the energy required during short sleeps time ! ! . Figure 6 depicts the power consumption through 168 hours, for both coordinator and end-device nodes. As presented end-device node requires less energy than coordinator node, because end-device node enters the sleep mode for short periods when there are no cars approaching the detection-side. Through experiments, it was shown that the end-device node will last for about 5 months using 2 AAA battery source, whereas the coordinator node at the other side will last for about 3 months and a half using the same battery source. This is because, end-device node may enter a sleep iJOE -Volume 11, Issue 2, 2015 PAPER ROAD SAFETY AND ENERGY SAVING PROPOSED SYSTEM: A ZIGBEE WSN APPROACH mode when there are no vehicles available at that road, while the coordinator node has to be awaken in order to receive "light" packets from detection side.

Response Time C.
As mentioned above, end-device node may switch to sleep mode whenever there are no vehicles approaching the detection-side in order to save power. This might slow down the "light" packet to reach the lighting-side and consequently raise the response time (the time required to transmit a "light" packet from detection-side, and starts the light at the lighting-side). In this section, we evaluate the response time for the detection side to be awaken and transmit a "light" packet as soon as any vehicle approaches the detection sensor. The response time was measured in a different number of experiments, in particular when the transmitter at the detection-side enters a sleep mode. The response time formula ! is represented in Equation 8.
where ! !"# is the time required to awake the end-device node, and ! !"#$ is the time required to transmit a "light" packet from end-device to coordinator node. Figure 7 presents the response time for a number of experiments, when a vehicle approaches and detected by a motion sensor mounted on the detection-side, then a "light" packet will be transmitted to the lighting-side. In some cases, when there are no vehicles approaches the dangerous road, then the XBee transceiver at the detection-side will enter a sleep mode to save power, however, the detection sensor stays awake in order to detect the presence of any vehicle approaches the risky road and wakes up the transceiver. Through experiments, the average time required to wake up the transceiver was about 13.2 ms, and hence will delay the response time for a short period which is in most cases unnoticeable. A design methodology of smart lighting system for used in weakly regulated renewable power has been presented and experimentally verified. The proposed system has been implemented using real ZigBee sensor nodes and the system was tested in Tabuk-Haql route, which is considered as one of the dangerous routes in KSA. The designed module achieves reasonable response time in most experiments, and obtains low power consumption for both modules (detection-side and lighting-side). For future work, we aim to expand the experiment test-bed and install the proposed system on several routes.