International Journal of Interactive Mobile Technologies (iJIM) – eISSN: 1865-7923 – Vol. 14, No. 7, 2020 Paper—Design and Implementation of a Smart Traffic Light Management System Controlled… Design and Implementation of a Smart Traffic Light Management System Controlled Wirelessly by Arduino https://doi.org/10.3991/ijim.v14i07.12823 Abdul Hadi M. Alaidi Wasit University, Wasit, Iraq Ibtisam A. Aljazaery Babylon University, Babil, Iraq Haider Th. Salim AlRikabi () Wasit University, Wasit, Iraq hdhiyab@uowasit.edu.iq Ibrahim Nasir Mahmood Basra University for Oil and Gas, Basra, Iraq Faisal Theyab Abed Wasit University, Wasit, Iraq Abstract—In Iraq, the number of people who own vehicles has grown up sig- nificantly. However, this increment in vehicles number doesn’t accomplished by a study of roads and intersections expansion. As a result, traffic jams became a big problem that led to long waiting time at each intersection, increased car acci- dents, pollution, and economic problems. To solve this problem a Smart Traffic Light System (STLS) has been implemented using Arduino, camera, IR sensor to overcome traffic jams problems in Kut city – Iraq. Keywords—Significantly, increased car accidents, pollution, economic prob- lems, STLS, IR sensor 1 Introduction Nowadays and due to the significant amount of time spent waiting at each street intersection in Iraq, the need for a smart traffic light system has been raised. The current traffic light system in Iraq still implemented using the old traditional approach which is a timer-based system, and sometimes the traffic is controlled manually through hu- man intervention (Traffic Police Officers direct the traffic). In addition, the increased number of vehicles that imported to Iraq especially after 2003 led to huge traffic jams as the existing road grid never got upgraded or enhanced to handle the increased number of vehicles passing through Iraq roads [1-4]. All of this caused the issue of uncontrolled congested street intersections which in return resulted in very high waiting time at street 32 http://www.i-jim.org https://doi.org/10.3991/ijim.v14i07.12823 mailto:hdhiyab@uowasit.edu.iq Paper—Design and Implementation of a Smart Traffic Light Management System Controlled… intersections as well as increased number of motor vehicles accidents. So, in order to decrease the waiting time at each intersection and to avoid any accidents, we thought about controlling the traffic through a smart traffic light system[5-9]. It is by far known that there are different approaches and methodologies used to implement smart traffic light systems around the world, and each approach resolves specific issue or matter. There are traffic systems that are implemented based on the observation of objects using digital cameras, others based on the observing of a specific weight threshold on each street side, or systems based on fuzzy logic[10-16]. Our system implementation is de- signed based on an idea sensing the current number of vehicles at each side of an inter- section and allocate the green light when a specific vehicles count is reached. 2 System Implementation (Methodology) Using a IR sensor[17-19], our smart traffic light system will be implemented by in- stalling magnetometer sensor at 30-meter distance from the intersection at each side. The 30-meter distance will be used to calculate the number of cars once it reaches to the specified number threshold. Considering that each street will handle 3 cars width- wise therefore the 30-meter distance will allow up to 30 cars approximately to be stacked in each section in order for the Green Light to be triggered. Each sensor is connected to microcontroller which control the various signals received from the sen- sors and to allocate the green light according to the received feedbacks from the in- stalled sensors[20-22]. Our smart traffic light control system process is applied by fol- lowing below pattern: 1. The process starts by clearing all the values of the queue and the sensor readings for each side of the intersection (S1, S2, S3, S4). And the Red Light is set ON for all the sides (S1, S2, S3, S4) initially. 2. Once a signal is received from any of the sensors indicating that the specified thresh- old at one of the sides is reached (in this case approx. 30 cars stacked in that side of the intersection). Then the Green Light will be triggered and allocated for that side to allow the cars on that side to pass through. 3. Once another signal is received from another sensor, then a Red light will be assigned to the current open side, and the Green light will be allocated to the new 30 cars stacked side. 4. In case, two or more signals indicating that 30 cars are already stacked on specific side, then the side ID will be stored in a queue and the Green light will be assigned to each side according to the queue priority scheme which is First In First Out (FIFO) with 3 minutes passing time assigned to each side to allow the stacked cars to pass through. 5. The OV7670/OV7171 fig 1 is a camera that has been used in this work to get vehicle image, CAMERACHIPTM, which has low voltage CMOS image sensor and pro- vides full functionality of single-chip VGA camera and image processor. The role of the camera is to monitor the overall functionality of the system and to record any accidents / violations in order to apply further enhancement or modification to the system as needed. iJIM ‒ Vol. 14, No. 7, 2020 33 Paper—Design and Implementation of a Smart Traffic Light Management System Controlled… Fig. 1. OV7670/OV7171 Camera Fig. 2. Traffic intersection with four direction and single line. 34 http://www.i-jim.org Paper—Design and Implementation of a Smart Traffic Light Management System Controlled… Fig. 3. Simulation of traffic intersection with four direction and single line Fig. 4. The connection of Arduino to the camera iJIM ‒ Vol. 14, No. 7, 2020 35 Paper—Design and Implementation of a Smart Traffic Light Management System Controlled… Table 1. The Abbreviations meaning of connection Fig. 5. A Brief flowchart of proposed STLMS. 36 http://www.i-jim.org Paper—Design and Implementation of a Smart Traffic Light Management System Controlled… Fig. 6. The Final Arduino Diagram. Table 2. The approximate number of cars at AlKafaat intersection at Kut City during the day. Time T1 T2 T3 T4 Average Waiting Time Morning 7:30-8:30 600 200 100 150 13 min Afternoon 2:00-3:00 100 150 500 100 14 min Evening 8:00-9:30 610 300 200 450 15 min Evening 10:00-11:30 400 550 350 200 11 min 3 Conclusion In conclusion, we successfully designed and implemented a smart traffic manage- ment system using Arduino to solve the jam traffic in Al Kafaat intersection at Kut City, Iraq. The proposed method investigates and manage daily traffic at four-line intersec- tion using Arduino, Magnetometer sensor, and camera. Moreover, the proposed system is also achieved synchronization at four-line intersection and implement balance be- tween number of cars at each line and green light. The average waiting time has en- hanced for all the intersections after applying the proposed system and was reduced to be averaged around 5 – 6 minutes waiting time. 4 Acknowledgement This work was supported by Wasit University in order to reduce traffic congestion in Wasit Governorate. Special thanks for the faculty of electrical engineering depart- ment for supporting me in this paper. Many thanks for To the Directorate of Traffic Wasit for knowing the traffic congestion areas and solve it in this paper. iJIM ‒ Vol. 14, No. 7, 2020 37 Paper—Design and Implementation of a Smart Traffic Light Management System Controlled… 5 References [1] M. N. Tezel, D. Sari, N. Ozkurt, and S. S. J. S. o. T. T. E. Keskin, "Combined NOx and noise pollution from road traffic in Trabzon, Turkey," vol. 696, p. 134044, 2019. https:// doi.org/10.1016/j.scitotenv.2019.134044 [2] T. A. K. Bouzir, N. Zemmouri, and D. Berkouk, "Assessment and analysis of noise pollution in Biskra public gardens (Algeria)," in AIP Conference Proceedings, 2018, vol. 1968, no. 1, p. 030069: AIP Publishing. https://doi.org/10.1063/1.5039256 [3] H. T. S. ALRikabi, A. H. M. Alaidi, and F. T. Abed, "Attendance System Design and Im- plementation Based On Radio Frequency Identification (RFID) And Arduino." [4] L. Hesselgren, I. Andreasson, U. Mueller, M. Prieto Rábade, and S. Janhäll, "NuMo–New Urban Mobility: New urban infrastructure support for autonomous vehicles," ed, 2019. [5] B. Ghazal, K. ElKhatib, K. Chahine, and M. Kherfan, "Smart traffic light control system," in Electrical, Electronics, Computer Engineering and their Applications (EECEA), 2016 Third International Conference on, 2016, pp. 140-145: IEEE. https://doi.org/10.1109/ eecea.2016.7470780 [6] Y. Zhuang et al., "A survey of positioning systems using visible LED lights," vol. 20, no. 3, pp. 1963-1988, 2018. [7] I. Mahjri, S. Faye, and D. Khadraoui, "Impact and Deployment of Dynamic Traffic Light Control Strategies using a City-wide Simulation Scenari," in 2019 IEEE Intelligent Trans- portation Systems Conference (ITSC), 2019, pp. 2213-2219: IEEE. https://doi.org/10. 1109/itsc.2019.8916984 [8] M. Firdous, F. U. D. Iqbal, N. Ghafoor, N. K. Qureshi, and N. Naseer, "Traffic Light Control System for Four-Way Intersection and T-Crossing Using Fuzzy Logic," in 2019 IEEE Inter- national Conference on Artificial Intelligence and Computer Applications (ICAICA), 2019, pp. 178-182: IEEE. https://doi.org/10.1109/icaica.2019.8873518 [9] L. Oliveira, L. Manera, and P. Luz, "Smart Traffic Light Controller System," in 2019 Sixth International Conference on Internet of Things: Systems, Management and Security (IOTSMS), 2019, pp. 155-160: IEEE. https://doi.org/10.1109/iotsms48152.2019.8939239 [10] G. H. Kulkarni and P. G. Waingankar, "Fuzzy logic-based traffic light controller," in Indus- trial and information systems, 2007. ICIIS 2007. International conference on, 2007, pp. 107- 110: IEEE. https://doi.org/10.1109/iciinfs.2007.4579157 [11] S. Kamijo, Y. Matsushita, K. Ikeuchi, and M. Sakauchi, "Traffic monitoring and accident detection at intersections," IEEE transactions on Intelligent transportation systems, vol. 1, no. 2, pp. 108-118, 2000. https://doi.org/10.1109/6979.880968 [12] M. Valera and S. A. Velastin, "Intelligent distributed surveillance systems: a review," IEE Proceedings-Vision, Image and Signal Processing, vol. 152, no. 2, pp. 192-204, 2005. https://doi.org/10.1049/ip-vis:20041147 [13] M. B. Younes and A. Boukerche, "An efficient dynamic traffic light scheduling algorithm considering emergency vehicles for intelligent transportation systems," Wireless Networks, pp. 1-13, 2017. https://doi.org/10.1007/s11276-017-1482-5 [14] A. B. Mabrouk and E. J. E. S. w. A. Zagrouba, "Abnormal behavior recognition for intelli- gent video surveillance systems: A review," vol. 91, pp. 480-491, 2018. https://doi.org/10. 1016/j.eswa.2017.09.029 [15] H. T. Alrikabi, A. H. M. Alaidi, A. S. Abdalrada, and F. T. J. I. J. o. E. T. i. L. Abed, "Anal- ysis the Efficient Energy Prediction for 5G Wireless Communication Technologies," vol. 14, no. 08, pp. 23-37, 2019. https://doi.org/10.3991/ijet.v14i08.10485 38 http://www.i-jim.org https://doi.org/10.1016/j.scitotenv.2019.134044 https://doi.org/10.1016/j.scitotenv.2019.134044 https://doi.org/10.1063/1.5039256 https://doi.org/10.1109/eecea.2016.7470780 https://doi.org/10.1109/eecea.2016.7470780 https://doi.org/10.1109/itsc.2019.8916984 https://doi.org/10.1109/itsc.2019.8916984 https://doi.org/10.1109/icaica.2019.8873518 https://doi.org/10.1109/iotsms48152.2019.8939239 https://doi.org/10.1109/iciinfs.2007.4579157 https://doi.org/10.1109/6979.880968 https://doi.org/10.1049/ip-vis:20041147 https://doi.org/10.1007/s11276-017-1482-5 https://doi.org/10.1016/j.eswa.2017.09.029 https://doi.org/10.1016/j.eswa.2017.09.029 https://doi.org/10.3991/ijet.v14i08.10485 Paper—Design and Implementation of a Smart Traffic Light Management System Controlled… [16] H. Alrikabi, A. H. Alaidi, and K. J. I. J. o. I. M. T. Nasser, "The Application of Wireless Communication in IOT for Saving Electrical Energy," vol. 14, no. 01, pp. 152-160, 2020. https://doi.org/10.3991/ijim.v14i01.11538 [17] S. Coleri, S. Y. Cheung, and P. Varaiya, "Sensor networks for monitoring traffic," in Aller- ton conference on communication, control and computing, 2004, pp. 32-40. [18] S. G. Manikanta, G. M. Selvi, and K. S. N. Raju, "Intelligent automatic traffic control using IoT," 2019. [19] W. J. E. S. w. A. Wen, "An intelligent traffic management expert system with RFID tech- nology," vol. 37, no. 4, pp. 3024-3035, 2010. https://doi.org/10.1016/j.eswa.2009.09.030 [20] G. Shahzad, H. Yang, A. W. Ahmad, and C. J. I. S. J. Lee, "Energy-efficient intelligent street lighting system using traffic-adaptive control," vol. 16, no. 13, pp. 5397-5405, 2016. https://doi.org/10.1109/jsen.2016.2557345 [21] J. F. De Paz, J. Bajo, S. Rodríguez, G. Villarrubia, and J. M. J. I. S. Corchado, "Intelligent system for lighting control in smart cities," vol. 372, pp. 241-255, 2016. https://doi.org/10. 1016/j.ins.2016.08.045 [22] R. N. Dhole, V. S. Undre, C. R. Solanki, and S. R. Pawale, "Smart traffic signal using ultra- sonic sensor," in 2014 International Conference on Green Computing Communication and Electrical Engineering (ICGCCEE), 2014, pp. 1-4: IEEE https://doi.org/10.1109/icgc- cee.2014.6922284 6 Authors Abdul Hadi Alaidi is a lecturer in the Department of Electrical Engineering and Computer science at the Wasit University where he has been a faculty member since 2014. He is a Chair Assistant in the Electrical department. He works as Manager of Computer Information Center in Wasit University before he moved to work as IT Man- ager at College of Engineering. He developing a Student Record Information program with cooperation with Virginia Tech and sponsor by IREX. Abdul Hadi completed his M.S. at Bridgeport University. His thesis explored to introduce a new hybrid method to solve mTSP His research interests lie in the area of algorithm, ranging from theory to design to implementation. He published many papers in algorithms and IoT field. University of Wasit Iraq, Wasit province, Alkut city – Hay ALRabee. alaidi@ uowasit.edu.iq. The number of articles in national databases – 4, The number of articles in international databases – 2. Ibtisam A. Aljazaery Lecturer Department of Electrical Engineering, College of Engineering, University of Babylon. Babylon, Iraq. Email: ibtisamalasady@gmail.com The number of articles in national databases – 6, The number of articles in international databases – 5 Haider Th. Salim ALRikabi, He is presently one of the faculty college of engineer- ing, electrical engineering department, Wasit University in Al Kut, Wasit, Iraq. He re- ceived his B.Sc. degree in Electrical Engineering in 2006 from the Al Mustansiriya University in Baghdad, Iraq. his M.Sc. degree in Electrical Engineering focusing on Communications Systems from California state university/Fullerton, USA in 2014. His current research interests include Communications systems with mobile generation, Control systems, intelligent technologies, smart cities, and Internet of Things (IoT). iJIM ‒ Vol. 14, No. 7, 2020 39 https://doi.org/10.3991/ijim.v14i01.11538 https://doi.org/10.1016/j.eswa.2009.09.030 https://doi.org/10.1109/jsen.2016.2557345 https://doi.org/10.1016/j.ins.2016.08.045 https://doi.org/10.1016/j.ins.2016.08.045 https://doi.org/10.1109/icgccee.2014.6922284 https://doi.org/10.1109/icgccee.2014.6922284 mailto:alaidi@uowasit.edu.iq mailto:alaidi@uowasit.edu.iq ibtisamalasady@gmail.com Paper—Design and Implementation of a Smart Traffic Light Management System Controlled… Al Kut city – Hay ALRabee, Wasit, Iraq, Contact: - +9647732212637, E-mail:- hdhiyab@uowasit.edu.iq, The number of articles in national databases – 10, The num- ber of articles in international databases – 10 Ibrahim Nasir Mahmood, Lecturer, Department of Chemical and Oil Refinery En- gineering, Basra University for Oil and Gas, Master of Computer Science, Iraq, Basra Province, Basra City – Hay AlAsmaee,.Contact tel.:+964 771-785-5037, Email: ibra- him.mahmood@buog.edu.iq, The number of articles in national databases – 0, The number of articles in international databases – 1 Faisal Theyab Abed,. is presently one of the faculty college of engineering, electri- cal engineering department, Wasit University in Al Kut, Wasit, Iraq. He received his B.Sc. degree in Electrical Engineering in 2006 from the Al Mustansiriya University in Baghdad, Iraq. his M.Sc. degree in power engineering Engineering focusing on power station Systems from Russia, His current research interests include power, smart grid, smart machine. Assistant lecture, Department of Electrical Engineering, University of Wasit, Iraq ,Wasit province ,alkut city – Hay ALRabee. Contact: - +9647714374950 E-mail: - engfath84@gmail.com, The number of articles in national databases - 2The number of articles in international databases - 2 Article submitted 2019-12-18. Resubmitted 2020-02-01. Final acceptance 2020-02-03. Final version pub- lished as submitted by the authors. 40 http://www.i-jim.org mailto:hdhiyab@uowasit.edu.iq mailto:ibrahim.mahmood@buog.edu.iq mailto:ibrahim.mahmood@buog.edu.iq mailto:engfath84@gmail.com