Traffic Lights With Working Pedestrian Button With a 7 Segment Timer and Buzzer!!!
by Simtim23 in Circuits > Arduino
184 Views, 1 Favorites, 0 Comments
Traffic Lights With Working Pedestrian Button With a 7 Segment Timer and Buzzer!!!

This project shows how to make a traffic light with a pedestrian crossing using Arduino. It includes lights for cars and pedestrians, a button for pedestrians to activate the crossing, a 7-segment display to count down crossing time, and a buzzer to give sound signals.
When the button is pressed, the pedestrian crossing starts. The car light turns red, and the pedestrian light turns green while the countdown runs. Once the countdown ends, the car light turns green again, and the pedestrian light turns red.
The buzzer makes the system more useful by providing sound signals for blind pedestrians, making it safer and more realistic for real life applacations.
Supplies

Hardware Components:
- Arduino Uno
- Breadboard
- LEDs - Red, Yellow, Green (for vehicles) - Green, Red (for pedestrians)
- 7-Segment Display
- Push Button (for pedestrians to request crossing)
- Resistors (330 ohm for LEDs, 560 ohm for the 7-segment display)
- Piezo Buzzer (for pedestrian alerts)
- Jumper Wires
- External Power Supply (Battary)
Parts Required

Here are some pictures to show how the wiring should look.
- Arduino Pins: Some analog pins like a0 - a5 are used to connect components like the 7-segment display to save space.
- LEDs: Each LED is connected to a resistor and a digital pin on the Arduino.
- Push Button: It’s wired with a pull-down resistor to detect when the button is pressed.
- 7-Segment Display: A common cathode/anode display is connected through resistors to protect it from too much current.
- Buzzer: Connected to a digital pin to provide sound signals.
Tips for you:
- Use color-coded jumper wires to keep the wiring neat and easy to follow.
- Always double-check your connections to avoid short circuits or mistakes with pin numbers.
Wiring
This project uses 5 LEDs, a push button, a 7-segment display, and a buzzer. The code controls everything and includes these features:
Traffic Light Cycle: The car lights switch between green, yellow, and red.
Pedestrian Crossing: Pressing the button starts the pedestrian crossing.
7-Segment Display Countdown: Shows how much time is left for pedestrians to cross.
Buzzer Alerts: Makes a sound during the crossing to keep it safe.
How It Works:
- The traffic lights follow the usual cycle: green to yellow to red.
- When the pedestrian button is pressed, the car light turns red, and the pedestrian light turns green.
- The 7-segment display counts down (e.g., from 10 seconds).
- The buzzer makes a sound while pedestrians are crossing.
- After the countdown, everything resets to the starting state.
Download the Code:
Click on the file to download the code for this project. It’s written in Arduino.
Video of Traffic Light System Working
)
Here is a video demonstrating the traffic light system in action.
You’ll see the pedestrian crossing activate, the 7-segment countdown, and the traffic lights working
End
I built this project as my final assignment in class, and it was both fun and educational. This traffic light system demonstrates how Arduino can be used to simulate real-world applications effectively
If you have any questions, feel free to ask in the comments below
Hope you like it! Happy Tinkering! by simtim