KATHMANDU UNIVERSITY SCHOOL OF ENGINEERING DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING PROJECT REPORT 4-WAY TRAFFIC LIGHT SYSTEM A First year project report submitted in partial fulfilment of the requirements for the degree of Bachelor of Engineering By: Nirajan Diyali (12060) Bibek Baraili (12027) Subrat Kumar Karna (12032) Senish Khadka (12035) Sanjay Rizal (12047) December 2022 CERTIFICATION FIRST YEAR PROJECT REPORT ON 4-WAY TRAFFIC LIGHT SYSTEM By: Nirajan Diyali (12060) Bibek Baraili (12027) Subrat Kumar Karna (12032) Senish Khadka (12035) Sanjay Rizal (12047) Approved by: 1. Project Supervisor ___________________ (Signature) ____________________________ (Name) _______ (Date) ____________________________ (Name) _______ (Date) 2. Head of the Department ___________________ (Signature) ABSTRACT A Four Way Traffic Light Controller is an electronic device that creates a four way traffic light system through the concept of digital logic design. In this project we have used basic electronic principles to build a simple Four Way Traffic Light Controller using 555 timer IC which is an important part of this project as from this timer we set the time of each traffic light to glow on different intervals of time. iii ACKNOWLEDGMENT We would like to express our sincere gratitude to the Department of Electrical and Electronics Engineering for providing us with the opportunity to be a part of the project entitled “ 4 Traffic Light Controller”. Our special thanks to our supervisor Pramish Shrestha Sir for his continuous guidance and support provided to us throughout this project work. We are grateful to our coordinator and all the teachers. Likewise, we would like to thank Dr. Ram Kaji Budhathoki, Head of the Department, and the lab assistants. Last but not the least, we would also like to thank all the faculty members, seniors and friends who helped us directly or indirectly to complete our project. iv SYMBOLS AND ABBREVIATIONS A. Symbols Ω = Ohm μF= Micro Farad B. Abbreviations IC=Integrated circuit LED=Light Emitting Diode VCC=Voltage Common Collector CD= CMOS Decade Counter List of Figures Figure 1: CD4017 IC ........................................................................................................... 7 Figure 2: NE555 Timer ........................................................................................................ 8 Figure 3: Capacitors ............................................................................................................. 9 Figure 4: Resistor ............................................................................................................... 10 Figure 5: LEDs ................................................................................................................... 10 Figure 6: Circuit Diagram .................................................................................................. 17 Figure 7: PCB Circuit ........................................................................................................ 18 Figure 8: CD4017 Data sheet[4] ........................................................................................ 20 Figure 9: NE555 Timer IC Data Sheet[5] .......................................................................... 21 v TABLE OF CONTENTS ABSTRACT ....................................................................................................................... iii ACKNOWLEDGMENT..................................................................................................... iv SYMBOLS AND ABBREVIATIONS ................................................................................ v List of Figures ...................................................................................................................... v TABLE OF CONTENTS .................................................................................................... vi CHAPTER I : INTRODUCTION ........................................................................................ 1 1.1 Background ........................................................................................................... 1 1.2 Motivation ............................................................................................................. 1 1.3 Problem Description .............................................................................................. 2 1.4 Objectives .............................................................................................................. 2 1.5 1.6 1.7 Methodology ....................................................... Error! Bookmark not defined. Limitations ............................................................................................................ 2 Organisation of Report .......................................................................................... 2 1.8 Summary ............................................................................................................... 3 CHAPTER II: TECHNOLOGY AND LITERATURE SURVEY ...................................... 4 2.1 Literature Survey ................................................................................................... 4 2.2 Components required ............................................................................................ 7 CHAPTER III: METHODOLOGY ................................................................................... 11 3.1 System overview ................................................................................................. 11 3.2 System flow ......................................................................................................... 11 CHAPTER IV: SYSTEM ANALYSIS ............................................................................. 13 4.1 Circuit Analysis ................................................................................................... 13 4.2 Problems Encountered......................................................................................... 13 CHAPTER V: CONCLUSION AND FUTURE WORK .................................................. 14 REFERENCES .................................................................................................................. 16 A. APPENDIX ................................................................................................................ 17 vi CHAPTER I : INTRODUCTION 1.1 Background Traffic Light System is a very essential part when it comes to the matter of management of traffic. Not only being bound to vehicles but it also helps the pedestrians while crossing the road keeping them safe. It also reduces human effort as it is used as an alternative to the traffic police. We can consider traffic light systems a great achievement in the field of science and technology. This project emphasizes on the progress whilst making a four way traffic controller with the use of 555 timer IC and CD 4017 IC. This is a simple engineering project developed to gain knowledge about the electronic components and learning to work together as a team. This project includes the use of 555 timer IC, 4017 IC, capacitors, LED (red, yellow and green). 1.2 Motivation Technology has been a blessing for human beings as it has given us a new outlook of life, the things which seemed impossible a few years back are quite normal now. Four way traffic light controller though a simple electronic device has great applications. It has helped the traffic police to easily manage the traffic without being directly involved on the roads. It has also prevented many accidents and unnecessary traffic. This project gives us a clear understanding of the four way traffic light system and immensely benefited both students and the user. It also provides a distinct understanding of various electrical components. 1 1.3 Problem Description The improper management of the traffic can cause many problems in the traffic as it causes unnecessary traffic jams and accidents, the waste of time due to the improper management of the vehicles running around the junction of the road, difficulties for the pedestrians while walking on the road. As four way traffic controllers usually seen are a bit expensive, we have designed this circuit which causes very low cost and that is easily affordable. This report and project is made in such a way that even a normal person can understand its drawbacks and can easily understand the use of the four way traffic light system. 1.4 Objectives To design and develop a simple model of a four way traffic light controller. 1.5 Limitations Works only for a fixed time interval. Needs regular maintenance. Are subject to vandalism. Traffic density is not recognized by this system and it may cause heavy traffic on one side of the road while the other roads are free. 1.6 Organisation of Report The report has been divided into five different chapters where Chapter 1 provides the brief description of the project. This chapter includes basic introduction, the factors considered as motivation, problems to be addressed after completion of the project, main objective of the project with some limitations of the project & surface methodology. Similarly, Chapter 2 includes the technology & literature survey which includes the description of every component required in this project. Chapter 3 includes the experimental setup & 2 methodology of this project in brief which provides detailed information of our project including the circuit diagram. Likewise, Chapter 4 includes the case study carried out i.e., it includes the quantitative analysis of our working model along with its output in various conditions. Lastly, Chapter 5 includes the conclusion & future scope of our project. It also involves some problems encountered till date. 1.7 Summary This device is used to control a four way traffic system. It is useful in controlling the traffic without the direct need of the traffic police and also prevents many accidents on the road. We have used two main components for this project. They are: 555 timer IC and CD 4017 IC. Through the use of this 555 timer IC we set up the time for the circuit i.e the traffic light device according to our use. 3 CHAPTER II: TECHNOLOGY AND LITERATURE SURVEY 2.1 Literature Survey Traffic signals are vital for traffic management. It is essential to increase the efficiency of the traffic controller to alleviate traffic congestion.The basic idea is that the project we have chosen is a traffic light controller is to create a 4 way traffic controller through the concept of digital logic design. Idea behind the design is to avoid accidents of vehicles by providing appropriate signals to different directions for a limited time slot, thus providing safety against collisions of vehicles. After which the next waiting drivers will be given the same treatment. 2.1.1 History The evolution of traffic light can be traced back to 200 years, but before becoming a reliable system we know today it has recovered from a number of design flaws and revolutionary dead-ends and as well as all out explosions. In 1920, a Detroit policeman, William Potts invented the first three colour lights. His four way signal head used signal lamps and was designed to be suspended over the centre of a junction to control the traffic light from four approaches. It was the first signal to resemble the operation we know today. During the 1930’s, experiments were carried out in the use of vehicle actuation to make the traffic signals responsive to vehicles using a junction. An early attempt used a microphone placed at the side of the road which would make the traffic light responsive to the horns of the vehicles but it was not used as it disturbed the people living nearby due to the noise of the horns. 4 2.1.1 Literature Survey Continued Sandeep Mehan in his paper “Introduction of Traffic Light Controller with Fuzzy Control System '' proposes a system where he prepares a Design For Fuzzy Logic Traffic Light Controller. The real time parameters such as traffic density and queue length are obtained by using image processing techniques. So the on and off timings for the green, red and yellow lights are adjusted as per the actual road conditions. Fuzzy logic has been widely used to develop a traffic signal controller because it allows qualitative modelling of complex systems. Therefore, his paper discusses the traffic control strategy, which dictates the design criteria for the fuzzy logic controller. The components of the fuzzy logic controller-the fuzzies, the fuzzy rule base formulated by human experts, the fuzzy inference engine and the defuzzifier. [1] Furthermore, Faizan Mansuri and Viraj Panchal in their paper “Four-Way Traffic Light Controller Designing with VHDL(very high-speed integrated circuit) '' includes the intense use of programming and machine learning algorithms for their design. It requires them to develop a state machine based controller for traffic signals at a four way intersection. This intersection has two travel lanes in each direction; east, west, north and south. In addition, each direction has a dedicated left turn lane. Each street i.e. NS (North-South) and EW (East-West) have a sensor to indicate the presence of cars at the intersection or if cars are approaching the intersection. This project stresses the difference of writing VHDL for modelling and synthesis and that VHDL should not be thought of as a programming language. Hence focusing on VHDL, they give proper design of combinational and sequential circuits. It requires proper definition of pin constraints for interfacing peripherals external. [2] 5 Similarly, a different approach was taken by T.E Somefun, C.O.A. Awosope, A. Abdulkareem, E. Okpon, A.S. Alayande, and C.T. Somefun in their paper “Design and Implementation of Density-Based Traffic Management System”. In their paper, they use infrared sensors as counters to measure the traffic density in each lane. The infrared sensors are also for speed detection with a Bluetooth module and Bluetooth serial monitor. These sensors are interfaced with the traffic light through a microcontroller. The microcontroller which was used to implement this is the Arduino Mega with the Atmega 2560 chip. The system was developed to alleviate traffic congestion and over-speeding offenders using a case study of an intersection in Uyo, Akwa Ibom State, Nigeria which usually has severe traffic congestion. Their system was tested and all objectives were accomplished. Results obtained from the implementation of the prototype design showed that traffic control and speed detection using infrared sensors and Arduino Atmega 2560 give a better performance and the time taken to clear traffic at an intersection reduced significantly with 60% time saved. [3] 6 2.2 Components required We have two main components. The first one is a 555 timer IC and another one is a CD4017 IC. There are also other basic components which we have used in our circuit as described as follows 2.2.1 CD4017 IC This IC is commonly known as the 4017 decade counter or 5 –stage Johnson counter. It’s called 5 stage Johnson counter because it has five D flip flops which control the outputs on this IC. It has 16 pins in which pin eight and 16 are Vin and Ground, respectively. There are 10 outputs form Q0- Q9 which are distributed from pin 1-11. These pins go from low to high one by one on each clock cycle which is provided on pin 14. Pin 15 represents the master reset while pin 13 represents Enable. The 12th pin gives a complemented Q5-9 output. Now the reset and enable pin will be grounded to show the inputs are low. When the reset is turned high the Q0 out but will become high irrespective of which output was high. If high input is given on the enable pin that will pause output on whichever pin it is high on. This clock is a low to high edge trigger, which means that whenever high is given on pin 14 the output will change and shift to the next output pin. Figure 1: CD4017 IC 7 2.2.2 NE555 Timer IC This IC is well known for timing the devices according to the desired need of the circuit. The timer IC has a SR flip flop, resisters, transistor and comparators. The IC is known as 555 timer because it contains three 5 kilo ohms resistors in series. The main function of this IC in our circuit is to provide us with a high and low clock, which is why the 555 timer IC is working in astable mode (means that output at pin 3 is not stable). Basically, it is creating a plus which is required for the decade IC ahead in the circuit. On pin 2 there is a trigger which activates a transistor due to which the capacitor at pin 6 starts to be discharged through a resistor between pin 6 and 7. The discharging time depends on R*C due to which the interval of high and low is also decided. Pin 4 and pin 8 will be shorted with the voltage supply. Control voltage will be untouched as it has no use in these circuits. Figure 2: NE555 Timer 8 2.2.3 Capacitors It is a storage element which stores charge and the voltage it holds is the same as the supplied voltage. Here, in the circuit the 100μF capacitors are connected with Pin 2 and Pin 8 of the NE55 Timer IC having common ground. Figure 3: Capacitors 2.2.4 Resistors It is a device which supplies resistance to the current so that the circuit is safe from degeneration due to high voltage. In our circuit we have used resistors ranging from 220Ω to 10kΩ. The 10 kΩ resistor and 1kΩ resistor is connected in series with Pin 6 of the IC. The 220Ω resistor is connected with Pin 3 of NE55 Timer and with Pin 14 of CD4017 IC. The 500Ω resistor is connected with the LEDs in the circuit. 9 Figure 4: Resistor 2.2.5 LED A light emitting diode (LED) is a semiconductor light source that emits light when current flows through it. Electrons in the semiconductor recombine with electron holes, releasing electrons in the form of photons. The color of light is determined by the energy required for electrons to cross the band gap of the semiconductor. LEDs have many advantages over incandescent light sources, including lower power consumption, longer lifetime, improved physical robustness, smaller size, and faster switching. In this project we have used 5-volt LEDs of different colors. Figure 5: LEDs 10 CHAPTER III: METHODOLOGY 3.1 System overview This circuit consists of NE555 Timer IC which works on astable mode with frequecy dependent on values of resistance and capacitance and the output is observed to be the square wave which is then fed to the Clock pin (PIN 14) of CD4017 which works as decade timer. The output of decade counter IC is connected to the diodes in parallel which then is connected to the LEDs which make Red and Green LEDs work with time period of equivalent to 6 seconds and yellow LED with time period of 2 seconds. 3.2 System flow 1) When constant DC supply of 9V-25V is supplied between the shorted point of PIN 4(Reset) and PIN 8(VCC), the NE555 timer becomes functioning. 2) The charging an discharging cycle of Capacitor shorted between PIN 2 with PIN 6 and connected to Ground produces astable output. 3) PIN 3 of NE555 Timer IC gives the astable output to CD4017 IC. The output is connected to PIN 14 and PIN 13 and PIN 15 is grounded which enables the clock of CD4017. 4) The output from PIN 1,2,3,4,5,6,7,9,10,11 of CD4017 is fed to diodes connected in parallel which then lights up for different time intervals. 11 . 12 CHAPTER IV: SYSTEM ANALYSIS 4.1 Circuit Analysis The 4 way traffic circuit consists mainly of these components: CD4017 IC, NE555 Timer IC and different coloured LEDs. The four-way traffic light circuit consists of two stages. The first one is the timing and counting stages. The other one is an indication of the light stage. The indication of the light stage should be properly placed on four lanes. The values of the capacitor and the resistor set the timing of the 555 IC. It then delivers them at the output pin. These pulses decide the timing interval of traffic light signals. The decade counter IC has ten outputs. Q0 to Q3 will drive a green signal for the north and south lanes, and a red signal for the east and west lanes. The output Q4 drives a yellow signal for the north and south lanes. Then the output from Q5 to Q8 will drive a green signal for the east and west lanes, Red signal for the north and south lanes. An output Q9 drives a yellow signal for an east and west lane. 4.2 Problems Encountered When 9V DC supply was given to the circuit, the power on the total load of 12 LEDs were not enough to light up all the LEDs with higher intensity. As the capacitance and resistance are not variable in our circuit, it works with a constant frequency which determines the time period of each LED. Since, the ICs work on low voltage, any high voltage passing through the IC might damage the circuit. 13 CHAPTER V: CONCLUSION AND FUTURE WORK As we are trying to make a four way traffic controller which can help control the irregular flow of traffic in urban areas and it helps us to have a unique and systematic way of road traffic. However, we can’t achieve our complete objectives due to complexities in ICs which can only drive low voltages. Likewise, we have prepared our circuit in PCB which can help to control traffic in four lanes. The core use of CD4017 and NE555 timer in “astable” mode with the use of capacitor helps the circuit to be stable and different colours of lights(red, yellow, green) are shown. This project uses a simple procedure for the four way traffic light system so we can even use it in different cities of our country too. The future work that can be carried out to modify this project are: 1) Extension of the system that works on 4 lanes to 8 lanes. 2) Detection of the traffic density on each road and making the system work accordingly. 14 GANTT CHART 15 References [1] Mehan & Sharma - Proceedings of the International Conference on Advances in Computing and Artificial Intelligence - ACAI '11, 2011. [2] Mansuri, Faizan, and Viraj Panchal. "Four-Way Traffic Light Controller Designing with VHDL." Department of Electronics and Communication, Institute of Technology, Nirma University Ahmedabad, Gujarat, India, 2016. [3] T. E. Somefun, C. O. A. Awosope, A. Abdulkareem, E. Okpon, A. S. Alayande, and C. T. Somefun, “Design and implementation of density-based Traffic Management System,” International Journal of Engineering Research and Technology, vol. 13, no. 9, p. 2157, 2020. [4]https://www.ti.com/lit/ds/symlink/cd4017b.pdf?ts=1670808028506&ref_url=https%253 A%252F%252Fwww.google.com.hk%252F [5] https://www.ti.com/lit/ds/symlink/ne555.pdf 16 A. APPENDIX Figure 6: Circuit Diagram 17 Figure 7: PCB Circuit Figure 8: Bread board testing 18 Figur 9: PCB Assembly 19 Figure 10: CD4017 Data sheet[4] 20 Figure 11: NE555 Timer IC Data Sheet[5] 21