Intelligent Traffic Light Design Proposal
Work belongs to Dan Qutaishat, this work can be referenced by using any of the established referencing methods such as Harvard.
Introduction:
In the evolving modern world, signaling devices are one of the significant pillars that are needed in order to aid in organising traffic and relieving vehicle congestion. Traffic congestion is a serious issue in the UK, where in London alone the average person lost 149 hours in traffic jams in 2019 – this caused the city to lose £4.9 billion, based on the INRIX Global Traffic Scorecard. Therefore, it is essential that there is automation in traffic light systems; this is possible by the use of smart technology that makes up a traffic light’s infrastructure. This smart technology is predominately composed of infrared sensors, inductive loop sensors, microwave sensors and video sensors (Spears, 2019).
These sensors work in juxtaposition with each other to cause the traffic light colour to change. This occurs in one of two ways: the vehicle crossing a wire embedded in the road connected to the traffic light controller, this leads to a change in the electromagnetic field due to metallic induction between the vehicle and the wire which initiates a countdown timer to change the light to green (TranBC, 2014). Thus conveying how traffic lights are an example of embedded systems in real-life situations. Alternatively, infrared sensors release infrared energy which can be interrupted by a vehicle, if this occurs then the sensor sends a signal to the traffic light to change its light to green (Spears, 2019).
The main objective of this project is to create a traffic light system using the Arduino UNO R3 microcontroller, a light-dependent resistor, LEDs, the HC-SR04 ultrasonic sensor and a buzzer. The traffic light will switch between three different modes: regular mode, pedestrian mode and night mode. The regular mode and the pedestrian mode will follow the same colour pattern (red, yellow, green, yellow), with the main difference being that if a pedestrian is in the area, then the buzzer will go off when the colour loop returns to yellow (causing the yellow LED to blink) – this will be controlled by the ultrasonic sensor based on distance. Alternatively, the night mode will be reliant on the light-dependent resistor, if the light threshold drops below a set amount then that will cause the red light to stay on until the vehicle moves closer and then the light will turn green when the vehicle is a set distance from the traffic light.
This change between regular and pedestrian mode in this project will be a somewhat drastic change to traffic light systems that are widely available today. This is because most traffic lights work by the pedestrian needing to click a button which activates a countdown which causes the traffic light to change colour regardless of whether there are vehicles or not, but this project introduces a more flexible alternative to this as it allows the pedestrian mode to activate based upon whether there are vehicles in close proximity to the traffic light – if there is a pedestrian detected within 10 cm of the ultrasonic sensor, the yellow LED will blink and the buzzer will start, thus making it more dynamic.
It is necessary that traffic lights work differently in night mode is as there is usually a lower demand during the night-time on average and thus traffic lights are not as beneficial during the night – this change is usually due to budgetary purposes and to reduce electrical pollution.
This project would be beneficial to be implemented in developing countries such as Colombia which had a 53% congestion level in 2020 in its capital (Bogota) alone – based on the TomTom Traffic Index. Due to the project not being very pricey, on a large scale it would be a much more affordable alternative to smart traffic light technologies that are used in most developed nations and thus would be useful in the least developed nations. As recently noted, the UK is an example of a most developed nation and as London illustrated that there were 149h/per person lost in congestion - this only equates to 78% of the time lost per person by someone in Bogota (191 hours total) – according to the INREX 2019 Global Traffic Scorecard. As a result, not only is the project beneficial for budgetary purposes but it also is useful in the protection of the public’s wellbeing.
Relevant Background information:
The aim of this project is for it to be applied in developing nations such as Colombia which lacks the financial backing to improve its outdated traffic light system. Colombia’s capital, Bogota, only has the three traffic light plants which handle over 1,350 crossings daily; these traffic light plants have existed since the 1980s and face over 3,000 failures every month. In 2019, the “Colombian government funded the installation of 800 traffic lights in Bogota” (Torres, 2019) which are more assistive to those visually impaired as it emits a noise when the colour changes and has sensors to allow the system to adapt to traffic changes. However, this plan did not come into fruition completely and this can be attributed to budgetary limitations.
In 2019 alone, Colombia experienced “6,892 fatalities due to road traffic accidents” (Salas, 2020). This can be attributed the outdated system of traffic lights which still operate on timers and thus cannot anticipate road congestion changes and ill-paved streets. Though 2020 showed a decrease in the number of hours wasted in traffic and number of traffic incidents – this is likely due to the rise in COVID-19 cases. Nevertheless, it is important to acknowledge that traffic congestion and outdated traffic light systems are still a problem in modern-day Colombia and thus a new system needs to be used in order to tackle these crucial issues.
In 2021, the current traffic congestion levels in Bogota show a steady increase with the peak being 46% congestion so far – further illustrating the importance of implementing this project in Colombia – specifically Bogota- based on TomTom Bogota traffic report.
This project is small-scale, where there is a large reliance on sensors i.e. LDRs and ultrasonic sensors. For the project to be successful on a large scale it has to be reproducible thus can be copied in mass scale production; it also has to be easily adaptable to be used on a larger scale – this is whilst ensuring that it is budget friendly so that it can be a viable option for countries with low GDPs such as Colombia. The entirety of the project was completed via Tinkercad, this program is useful as it simplifies the programming and eases the display of the prototype of the controller; however due to it being an interactive program which can be compiled via blocks so it lacks of the sophistication of having all potential components.
There are multiple variations of the project that is being proposed. The first model suggested by Shubham Sahu, Dipanjan Paul and S.Senthiilmurugan in 2018 differs from this project due to it using IR (infrared) sensors which can measure the heat released by a vehicle/object and detect its motion, this is beneficial as it can detect more vehicle/object in certain range whereas this project only deals with one vehicle. However, there are limitations to this model as the IR sensors may absorb normal light causing the traffic light system to malfunction, IR sensors are limited to a specific distance, IR sensors need to be organised in an accurate way or else traffic density could not be detected.
An alternative model proposed by Abdul Hadi M. Alaidi and Ibtisam A. Aljazaery in 2020 implements a camera, IR sensors and magnetometer into their design and uses 4 different circuits connected to one Arduino causing it to be synchronized. One of the key features in this model is the use of the magnetometer used by the model helps measure the number of vehicles/objects in the set area e.g. if there were 30 cars stacked behind each other then the green light will turn on. Another significant feature is the use of the camera which helps record how the system works and if there has to be modifications done on it, this is extremely beneficial in real-life situations and is a practical addition. The project that it is being proposed in this report can be improved by the addition of the IR sensor and the camera, but an upside of this project is that it would be a more affordable alternative with a simpler circuit.
Methodology:
As this project is divided into three modes (regular mode, pedestrian mode and night mode) – each mode has different specific requirements to allow them to function properly. In order for the system to successfully navigate between all three modes, , due to its light-dependent nature, the LDR is used, it is set to a threshold of 300 Ω, if the LDR is set to a resistance that is greater than 300 Ω then will it start running the regular mode and pedestrian mode as this mimics the day time but if the threshold drops under 300 Ω then the night mode begins and the regular and pedestrian modes stop.
If the LDR reading is greater than 300 Ω then the regular mode automatically starts. The regular mode functions based on distance, traffic light colours change on a timer where the LCD displays the words “Regular mode” and red LED lights up for 2 seconds, yellow LED lights up for 1 second, green LED lights up for 2 seconds and then yellow LED lights up for 1 second, this loops as long as the system identified the vehicle/object to be further than 10 cm from the ultrasonic sensor used.
Alternatively, if the pedestrian via the ultrasonic sensor is identified to be closer than 10 cm then the system will go into pedestrian mode where when the circuit loops to the yellow LED the second time, it will cause the LED to blink and the buzzer to start ringing, this is important to make it more accessible to those visually impaired and to alert nearby pedestrians to cross quickly. This displays “Pedestrian Mode” on the LCD.
If the LDR reading drops below 300 Ω then the night mode automatically starts running. However, the night mode is split into two parts; in the first part the red LED will remain on until a vehicle/object is closer than 50 cm from the ultrasonic sensor, this is due for energy saving purposes – in this scenario the LCD would display “Car Approaching”.
In the second part, the red LED turns off as soon the vehicle/object is closer than 50 cm from the ultrasonic sensor, this would then cause the green LED to turn on and stay on until the vehicle/object moves away. In this scenario the LDD would display “Car Nearby”.
Final Design Solution:
Throughout the assembly of this project, there were a few adjustments that had to be carried out in order to ensure it working. Till the final model was created, the prior models made were evaluated and their advantageous features were adapted to the final model whilst their un-advantageous features were removed. Initially, the circuit board created only had the LEDs and resistors, this was the first layout for the circuit, and it was used in the final model. This circuit wiring allowed the initial regular mode to work. This was later adapted in order to accommodate for the pedestrian mode, thus the buzzer and ultrasonic sensor was added, though as seen, the initial wiring used in the first model of the project for the LEDs was still used. At this point, the code used was working; however, there were issues being encountered by the timing between the buzzer and the blinking of the yellow LED and this was resolved by adding more digitalWrite() statements where both the green and red LEDs had to be turned off whilst the yellow was on. The code that was being used for model 2 of the project has differences to the one used now in the final design of the model. The main differences are the repetition of the code for the serial monitor that prints the distance and the repetition of the code for the blinking effect 10 times. Though this is effective, the repetition of the blinking effect could make it more legible, but it is time consuming and unnecessary. Additionally, the use of the serial monitor is a necessity as it can display the distance repeatedly even if the ultrasonic sensor is not in the field of view. In the final model, there was an addition of recording and displaying LDR values in the serial monitor.
Although initially this seemed like a sufficient place to stop with the wiring of the circuit, the introduction of the night mode in the mode led to the malfunctioning of the pedestrian mode; that led to the recomplete redesign of the code in which it was all placed in an if statement which included a while loop and other if statements. Nesting these statements, enabled the order of the operations of the mode to be corrected. It can be seen in the improvements that rather than repeating the code for causing the yellow LED to blink 10 times, the code was reformatted in order to repeat the blink code 10 times automatically.
The final addition to the model, was the addition of the potentiometer and the LCD in which occurred due to the need to add assistive elements to the design in order to make its usability in society more likely thus the addition of the LCD not only allowed the user to understand which code is being used i.e. what mode the circuit was running but also make it visible to be read by those who might be colour blind and thus ensures security of the public’s wellbeing. The final design/model’s code was thus also adjusted in order to accommodate for the addition of the LCD and potentiometer.
Though the model is a practical solution for an intelligent traffic light controller, it has at its limitations. Mainly, the lack of IR sensors, magnetometers and cameras makes the system less reliable and adaptable on a large scale to be used practically in the streets. However, these elements are sacrificed for budgetary purposes as the project model is cheaper without the addition of the extensive apparatus e.g. cameras, IR sensors…
The ultrasonic sensor could be replaced by the IR sensor as they both preform similar procedures. Nowadays, traffic lights opt to using IR sensors and though it is a realistic addition to the model, there are negatives of the IR sensor other than what was previously stated in this report, the IR sensors can only detect whether there are objects present by the use of infrared light, it fails to give the user the distance away that the object is. The final model design used is not only budget friendly but due to its small size and its simplicity enables it to be easily replicable on a large scale. Additionally, the use of components such as the LCD makes the system more energy saving thus further reducing costs whilst ensuring there is minimal light pollution. Consequently, achieving the aims initially set. In the future, this project could be developed to include a WIFI shield which would allow the Arduino uno to act similar to an Ethernet network, this is would benefit the system and allow it to be more efficient, if it were to become implemented in traffic lights as it would allow the data from the traffic lights e.g. traffic congestion trends to be transferred via a private network/ ethernet to urban traffic management systems. This is a viable option as it is already implemented in countries such as the United States of America. However, this is a costly addition to the system which is estimated to “cost $20,000 for each traffic light to be connected to the internet” (McEachran, 2017). Therefore, could end up costing millions in large cities and thus may not be a suitable addition to this project as it is aimed to be used in a developing nation such as Colombia. On the other hand, this could be combatted by the use of the ESP8266 WIFI Module, which is a much affordable alternative.
Conclusion:
The final model of the project satisfies the initial aims that were hypothesized to be achieved. The system is not only affordable and easily reproducible and thus can be implemented by the Colombian government on a large scale, thus beneficial to the original objectives. Additionally, the project was adapted to assist public well-being as the system is much more responsive and adaptive to the current traffic light systems implemented; it is also more accessible to those visually and auditory impaired. The final benefit of the final model is that it aids in the reduction of the light pollution especially during the night-time and thus it is energy saving – due to it being set on adaptability (based on distance) rather than being on a timer. On the other hand, there are a few threats in implementing this model as a controller in traffic light; these include but are not limited to: the possibility of a fault occurring whilst the traffic lights are running and it not be reported for a long duration of time due to the final model of the project devised not being connected to the internet and thus would need to rely on physical complaints about the traffic lights being faulty rather than getting an automatic alert which may cause longer waiting times in traffic and thus more disapproval regarding the new traffic light system – this may lead to the project being more costly due to the repairs needed. Another potential issue with the implementation of this model in traffic lights is due to the lack of IR sensors and cameras it would be hard to recognise the extent of congestion and thus the final model though has an ultrasonic sensor can only cover the distance of one vehicle/object rather than how busy the roads (the number of vehicles waiting in line) are - which is a limitation of the system. Consequently, though the model has some limitations which may reduce its efficiency – they are sacrificed to suffice the original aims set of being budget-friendly, energy-saving, adaptive and assistive.
Bibliography:
Text references:
Automotive World (2020). “INRIX Global Traffic Scorecard: Congestion cost UK economy £6.9 billion in 2019”. Automotive World. Viewed on 2nd March 2021. <https://www.automotiveworld.com/news-releases/inrix-global-traffic-scorecard-congestion-cost-uk-economy-6-9-billion-in-2019/>
Spears, A. (2019). “Are There Sensors At Traffic Lights?”. ELTEC. Viewed on 2nd March 2021. <https://elteccorp.com/news/other/are-there-sensors-at-traffic-lights/>
TranBC (2014). “5 Things That Make Traffic Light Signals Change”. TranBC. Viewed 2nd March 2021. <https://www.tranbc.ca/2014/01/30/5-things-that-make-traffic-signals-change/>
TomTom (2020). “Traffic Index 2020”. TomTom. Viewed on 3rd March 2021. <https://www.tomtom.com/en_gb/traffic-index/ranking/>
INRIX (2019). “INRIX 2019 Global Traffic Scorecard”. INRIX. Viewed on 3rd March 2021. <https://inrix.com/scorecard/>
Torres, S. (2019). “Bogota’s new traffic lights: unpopular but smart”. Impactotic. Viewed on 3rd March 2021 <https://impactotic.co/en/smart-unpopular-traffic-lights/>
Salas, E. (2020). “Colombia: number of road traffic fatalities in 2019, by vehicle type”. Statista. Viewed on 3rd March 2021. <https://www.statista.com/statistics/916374/number-road-traffic-fatalities-colombia-vehicle-type/>
TomTom, (2021)."Bogota Traffic". TomTom. Viewed on 3rd March 2021. <https://www.tomtom.com/en_gb/traffic-index/bogota-traffic/>
Shubham, S., Dipanjan, P., S, S. (2018) "Density based traffic signal control using Arduino and IR sensors". IJNRD. Viewed on 3rd March 2021. <http://www.ijnrd.org/papers/IJNRD1804012.pdf>
Alaidi et al. (2018) "Design and Implementation of a Smart Traffic Light Management System Controlled Wirelessly by Arduino". International Journal of Interactive Mobile Technology. Viewed on 3rd March 2021. <https://online-journals.org/index.php/i-jim/article/view/12823>
McEachran, R. (2017) “Traffic unjammed: How smart, connected traffic lights are helping journeys flow. Institution of Mechanical Engineers. Viewed on 5th March 2021. <https://www.imeche.org/news/news-article/traffic-unjammed-how-smart-connected-traffic-lights-are-helping-journeys-flow#:~:text=Traffic%20lights%20are%20now%20typically,would%20be%20fitted%20with%20DSRC.>
Design/code references:
Stempro (n.d.). “Traffic Lights”. Stempro. Viewed on 15th February 2021. <http://stempro.gr/Traffic-Lights.html>
Coburn, J. (2019). “Arduino Programming for Beginners: Traffic Light Controller Project Tutorial”. MUO. Viewed on 16th February 2021. <https://www.makeuseof.com/tag/arduino-traffic-light-controller/>
Bekathwia (2018). “LCD display”. Tinkercad. Viewed on 16th February 2021. <https://www.tinkercad.com/things/ascn1ro2gFR-lcd-display>