0% found this document useful (0 votes)
29 views14 pages

1.3 Traffic Light

This document describes an Arduino-based traffic light simulator project. It includes an introduction explaining the purpose of traffic light simulators. It then lists the components used, which are an Arduino Uno board, LEDs to represent the traffic lights, a breadboard, resistors, and jumper wires. The methodology section explains the steps to build the simulator, which are connecting the LEDs to the Arduino pins with resistors on a breadboard, writing the code, and uploading it to test the traffic light sequence. Code snippets and diagrams show more details of the implementation. The conclusion states that the low-cost Arduino simulator is a good educational and research tool for understanding traffic flows.

Uploaded by

Sayan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views14 pages

1.3 Traffic Light

This document describes an Arduino-based traffic light simulator project. It includes an introduction explaining the purpose of traffic light simulators. It then lists the components used, which are an Arduino Uno board, LEDs to represent the traffic lights, a breadboard, resistors, and jumper wires. The methodology section explains the steps to build the simulator, which are connecting the LEDs to the Arduino pins with resistors on a breadboard, writing the code, and uploading it to test the traffic light sequence. Code snippets and diagrams show more details of the implementation. The conclusion states that the low-cost Arduino simulator is a good educational and research tool for understanding traffic flows.

Uploaded by

Sayan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Course Code: MC1030

Course Name: Arduino, IoT FAB Lab.

ARDUINO BASED TRAFFIC LIGHT

SIMULATOR USING ARDUINO

Department of Mechatronics | SAMM


Faculty of Engineering | Manipal University Jaipur
Contents

• Introduction

• Components

• Methodology

• Code

• Conclusion

• References
Introduction

• Traffic light simulators are an essential tool for understanding and analyzing traffic flow

in different scenarios.

• These simulators are commonly used in the transportation industry, urban planning, and

traffic engineering.

• In the presentation, I will show an Arduino-based traffic light simulator and its

implementation.

3
Components

• Arduino Uno Board - used as the main controller of the traffic light simulator.

• LEDs - used as the traffic lights (red, yellow, and green).

• Breadboard - used for prototyping and connecting the components.

• Resistors – are used to limit the current flow in the LEDs.

• Jumper wires – for connections


Methodology

The methodology used for building the Arduino-based traffic light simulator is
as follows:
• Connect the three LEDs to the digital pins of the Arduino board using the breadboard.

• Write the program code for the traffic light sequence using the Arduino IDE.

• Upload the program to the Arduino board using a USB cable.

• Test the traffic light sequence and adjust the duration of each signal as needed.

4
II Methodology
2. CODE USED
22. // Turn on the red light for 10 seconds
1. // Define the traffic light pins
23. digitalWrite(GREEN_PIN, LOW);
2. #define RED_PIN 2 24. digitalWrite(YELLOW_PIN, LOW);
11. void loop() {
3. #define YELLOW_PIN 3 12. // Turn on the green light for 10 25. digitalWrite(RED_PIN, HIGH);
seconds 26. delay(10000);
4. #define GREEN_PIN 4
13. digitalWrite(GREEN_PIN,
HIGH); 27. // Turn on the yellow light for 3 seconds
5. void setup() { 14. digitalWrite(YELLOW_PIN, 28. digitalWrite(GREEN_PIN, LOW);
LOW); 29. digitalWrite(YELLOW_PIN, HIGH);
6. // Set the traffic light pins to output mode 15. digitalWrite(RED_PIN, LOW); 30. digitalWrite(RED_PIN, LOW);
7. pinMode(RED_PIN, OUTPUT); 16. delay(10000);
31. delay(3000);
8. pinMode(YELLOW_PIN, OUTPUT); 17. // Turn on the yellow light for 3 32. }
9. pinMode(GREEN_PIN, OUTPUT); seconds
18. digitalWrite(GREEN_PIN,
10. } LOW);
19. digitalWrite(YELLOW_PIN,
HIGH);
20. digitalWrite(RED_PIN, LOW);
21. delay(3000);

7
II Methodology
3. Steps Involved

Fig 1-Connecting the LEDs to the breadboard.


6
II Methodology

Fig 2-Connecting a 220-ohm resistor in series with each LED.

6
II Methodology

Fig 3-Connecting the cathode (short leg) of the red LED to pin 2 of the
Arduino, the cathode of the yellow LED to pin 3, and the cathode of the green
LED to pin 4.
6
II Methodology

Fig 4-Upload the sketch to the Arduino board and observe the simulated
traffic light sequence.

6
II Methodology

Fig 5-Demonstration of ARDUINO BASED TREAFFIC LIGHT SIMULATOR USING


ARDUINO

6
IV Conclusion

• In conclusion, the Arduino-based traffic light simulator is an excellent tool for

understanding and analyzing traffic flow in different scenarios.

• The simulator is easy to build and customize, making it an ideal tool for educational and

research purposes.

• Furthermore, the simulator's low cost and simplicity make it an attractive alternative to

traditional traffic simulators, which can be expensive and complex.

7
V References

[1] https://www.arduino.cc/

[2] https://en.wikipedia.org/wiki/Arduino

[3] https://learn.sparkfun.com/tutorials/what-is-an-arduino/all

[4] "Arduino Based Traffic Light Controller System." International Journal of Scientific Research in Computer Science, Engineering and
Information Technology. Volume 3, Issue 2, 2018.

8
V

Thank You!

You might also like