An automated approach for traffic light control at pedestrian crossings

Although technology has evolved explosively in past years in all aspects of our lives and should make our work easier, it still seems like we don’t have enough time and we are in a constant rush. We hurry when we go to work or shopping, when we drive, when we cross the street. Nevertheless, we have clear traffic rules that aim to protect us from possible road accidents, has the thought ever occurred that we could cross the street if no one is crossing, even if the traffic light is red? In this idea, we thought of a different approach to control the alternation of the traffic light, other than through the timer, so as to reduce the waiting times at the traffic light crossing. This traffic light automation solution is detailed in the present paper in which we describe the structural components and operating principles of an improved traffic light model. The main objective for implementing this improved model is to eliminate the waiting dead times at the traffic light crossing.


Traffic lights nowadays
Most of us understand the traffic rules from the point of view of the laws we are obliged to obey, when in fact they are intended for our safety.From the invention of the first traffic light, this system has been developed and it has evolved in various directions and under different aspects.The classical traffic light is a device provided with three lights, red, yellow and green, which change according to an established time period.Manny of pedestrian traffic lights have two human shaped lights, green and red, and some have sound option for blind people, or are provided with a button to facilitate light switching.Nowadays, we often find timer displays.
For the power supply issue seems to be two proper solutions: adding solar panels or/and adding micro wind power connected to traffic light system [1], [2].
From the aspect of the laws, for instance, in Portugal, in 2015, there were already functioning traffic lights for speed controlling, so that the light would turn red if the legal speed was to be exceeded [2].In some countries "green wave" systems can be found which aim to control traffic congestion and speed, by synchronizing a line of traffic lights across a long road [3].This solution, thus very simple, is useful for synchronizing public transportation time graphic.In this idea, in 2016, in Atlanta there was a major need to redesign the traffic light systems, the new model having cameras and metal detectors [3].
A more complex approach on the topic of traffic light systems is the traffic management system that uses past traffic data for programming dynamic rules, which are applied by means of a control signal sent to an adaptive controller.Parameters for speed limit, weather conditions or road traffic conditions can be adjusted.This type of platform is designed for smoothening the traffic flow and preventing breaking the traffic rules [4].
The modern approach involves artificial intelligence and machine learning, obtaining a so called smart traffic light system which have the most efficiency in controlling large-scale transportation networks and coping with fluctuations in traffic flow [5].Usually, this type of systems can be used in case of traffic congestion that occur in large cities with highways and arterial roads and are based on predictions taken by processing historical congestion maps [6], records of vehicle presence and trajectory passing through intersections, color light ratio in terms of time [7], [8], or other significant parameters values.
All of the above mentioned models have, in one form or another, two major purposes: solving traffic congestion and preventing breaking the traffic rules which aims our safety in traffic.However, these models come in solving the effect and not the cause.Most of the times we bend the rules because we are in lack of time, though we have technology which was supposed to ease our day to day tasks.Pedestrian or driver, either way, we are in a constant hurry in solving different issues.Thus, we assume this to be one of the main root cause and we considered developing an automated model for traffic light control at pedestrian crossings meant to contribute to decreasing waiting times, solution that can be implemented to existing traffic light systems and has a low cost advantage.

Proposed solution for traffic light system
In order to implement and test the proposed solution we built up a pedestrian crossing with traffic light model at a 1:100 scale according to design from figure 1.We considered a classic traffic light model for vehicles as well as for pedestrians.For controlling the pedestrian traffic light, we used a pressure sensor.In order to control the vehicle traffic light, we used an ultrasound sensor.The main hardware component is, as previously mentioned, Arduino Uno R3 board that is provided with an ATmega328p microcontroller.For the ultrasound sensor we used HC -SR04 module shown in figure 3, which assures a high precision measuring and offers contactless measuring function between 2 and 400 cm.The module consists of an ultrasound transmitter, a receiver and a control circuit [10].For pedestrian size we used FSR402 pressure module from figure 4, consisting of a force sensing resistor of small dimensions, with a detection area of 0.5-inch radius and a force sensitivity range between 100 g and 10 kg [11].In addition, we used a 1088AS -8x8 LED dot matrix module to simulate the traffic light timer.In figure 5 can be noticed the traffic light system model with the proposed solution implemented.

Functioning of proposed solution
In order to show the functioning of the proposed solution for traffic light control at pedestrian crossings we have considered two cases for each situation:  pedestrian side:  case 1: there are too few pedestrians at crossing and no vehicle  case 2: there are enough pedestrians at crossing and no vehicle  driver side:  case 1: there is a vehicle at crossing having a proper speed and no pedestrian  case 2: there is a vehicle at crossing having a high speed and no pedestrian In the programming code we have set up parameters limit values for pedestrian weight at 150 g and for vehicle speed at 5 m/s.The timer was set to 10 seconds.For testing pedestrian side, first case we used a load of 50 g, below the imposed limit of 150 g.When placing the load, the traffic light for pedestrian side (white pillar) was on red light, consequently the traffic light for vehicle side (black pillar) was on green light and the timer showed 9 seconds, as it can be seen in figure 6.After placing the 50 g load on the pressure sensor, we notice in figure 7 that the traffic light for pedestrian side remains on red light, the traffic light for vehicle side remains on green light and the timer continues its countdown reaching 2 seconds.
Consider the case when there are enough pedestrians at crossing.We used a 200 g load for this situation, thus, exceeding 150 g imposed load limit.When placing the load, the traffic light for pedestrian side (white pillar) was on red light, consequently the traffic light for vehicle side (black pillar) was on green light and the timer showed 3 seconds, as it can be seen in figure 8.After placing the 200 g load on the pressure sensor, we notice in figure 9 that the traffic light for pedestrian side turns on green light, the traffic light for vehicle side turns on red light and the timer resets to 9 seconds.For the vehicle traffic light functioning simulation, the results are presented in figures 10 to 13.In figure 10 and 11 it can be noticed that when the vehicle having a speed below preset speed limit passes by the traffic light, the system maintains the green color active for vehicles and red color for pedestrians, though the timer continues its countdown (value 6 in figure 10 and value 5 in figure 11).It is important to mention that if other vehicles are following and there are no pedestrians at crossing, the timer resets and the traffic light remains on green light.We have included in program code the case in which the vehicle exceeds the imposed speed limit and, as it is observed in figures 12 and 13, vehicle traffic light turns from green to red light, pedestrian traffic light turns from red to green light and the timer resets from value 8 in figure 12 to value 9 in figure 13.In this situation, if there are other vehicles following, they will have to wait at red light.

Conclusions
The automated approach for traffic light control at pedestrian crossings described in this paper comes as solution that can be implemented at the existing traffic light system, thus being cost effective.The cases included in the paper don't take into consideration law aspects which may vary from country to country, nor high peak traffic periods.From this point of view, the decisions regarding these issues can be implemented by proper parameter settings.Also, for implementing a 1:1 scale system, hardware components must be chosen accordingly and one must evaluate other parametric influences, such as weather conditions exposure, that weren't included in this paper.

Figure 1 .
Figure 1.Pedestrian crossing with traffic light design [9] The electrical diagram is shown in figure 2. The controlling of light switching is made by means of Arduino Uno R3 ATmega328p microcontroller which receives and processes signals from pressure and ultrasound sensors and sends command signals to the traffic light.The traffic light consists of LEDs, green, red and yellow colour.We have used a 5V power supply which provides a continuous voltage.

Figure 2 .
Figure 2. Electrical diagram of traffic light system

Figure 6 .
Figure 6.Case 1 pedestrian side functioning -placing the 50 g load

Figure 8 .
Figure 8. Case 2 pedestrian side functioning -placing the 200 g load