• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Arduino Based Smart Traffic Light Circuit for Beginners

Arduino Based Smart Traffic Light Circuit for Beginners

Last updated on 29 June 2026 by Admin-Lavi Leave a Comment

Traffic light is one of the best beginner Arduino projects, which shows how to control LEDs using Arduino; also this project works like a real traffic signal like red for stop, yellow for wait and green for go.

In addition, Arduino Based Smart Traffic Light Circuit for Beginners is easy to build and fun to learn.

Arduino Code:

int red = 8;
int yellow = 9;
int green = 10;

void setup() {
pinMode(red, OUTPUT);
pinMode(yellow, OUTPUT);
pinMode(green, OUTPUT);
}

void loop() {
digitalWrite(green, HIGH);
delay(5000);
digitalWrite(green, LOW);

digitalWrite(yellow, HIGH);
delay(2000);
digitalWrite(yellow, LOW);

digitalWrite(red, HIGH);
delay(5000);
digitalWrite(red, LOW);
}

Coding Explanation:

  • Three LEDs connect to pins 8, 9 and 10.
  • In setup part we set them as output.
  • In loop part green LED is on for 5 seconds and then goes OFF.
  • Yellow LED is ON for 2 seconds and then goes OFF.
  • Red LED is ON for 5 seconds and then is OFF.
  • The loop repeats again by making a traffic light sequence.

Circuit Working:

Arduino Based Smart Traffic Light Circuit Diagram for Beginners

Parts List:

ComponentsQuantity
Resistors
220Ω 1/4 watt3
Semiconductors
Arduino UNO1
LEDs Red, Yellow and Green1 each

When Arduino starts, green LED turns ON for few seconds, which means vehicles can go; after that yellow LED turns ON to show warning or wait and then red LED turns ON to stop vehicles.

Hence, the cycle repeats again and again and finally, the circuit uses 220 Ω resistors to protect the LEDs.

Formula with Calculations:

Below is the formula for Smart Traffic Light Circuit and to limit current for LEDs we have used resistor.

Formula: R = (Vsource – Vled) / Iled

Example: R = (5V – 2V) / 0.015A = 200 ohms (approx)

So we have used 220Ω resistor for safety.

How to Build:

To build a Arduino Based Smart Traffic Light Circuit for Beginners below is the connection steps for connection.

  • First, collect all parts same as circuit diagram.
  • Next, join red LED long leg to pin 8 of Arduino, join yellow LED long leg to pin 9 and then join green LED long leg to pin 10.
  • Lastly, short leg of all LEDs go to GND of Arduino with 220Ω resistors.

Conclusion:

To conclude, this simple Arduino Based Smart Traffic Light Circuit for Beginners helps understand basic LED control and we can learn how to use digital pins, timing and loops.

Moreover, this project suits beginners and allows them to add sensors later for smart traffic systems.

Filed Under: Arduino Projects, Automation Circuits, Indicator Circuits, LED and Lamps, Mini Projects

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Solar Tracker Circuit using LDR and Op-Amp
Next Post: Push Button LED Circuit using Arduino »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • 555 Timer Projects (137)
  • Alarm Circuits (81)
  • Amplifier Circuits (94)
  • Arduino Projects (103)
  • Audio Circuits (189)
  • Automation Circuits (150)
  • Automobile Circuits (40)
  • Battery Charger Circuits (88)
  • DIY Projects (435)
  • Free Energy (12)
  • Heater and Temperature Controllers (32)
  • High Voltage (24)
  • Hobby Circuits (241)
  • Indicator Circuits (63)
  • Inverter Circuits (17)
  • IoT projects (12)
  • LDR Circuits (47)
  • LED and Lamps (201)
  • Meters and Testers (44)
  • Mini Projects (390)
  • Motor Controllers (26)
  • Oscillator Circuits (70)
  • Power Supply Circuits (244)
  • Radio Frequency (8)
  • Remote Control Circuits (12)
  • Renewable energy (20)
  • Security and Protection (128)
  • Sensors and Detectors (236)
  • Solar Circuits (31)
  • Timer Circuits (63)
  • Transistor Circuits (178)
  • Transmitter Circuit (19)
  • Tutorials (33)
  • Voltage Regulator (55)
  • Water Level Controller (10)

Recent Posts

  • Low Current Controlled Battery Charger Circuit using LM723 IC
  • 741 Op-Amp Treble Booster Circuit
  • Simple Diode and Transistor Based Audio Limiter Circuit
  • Simple 500mW Speaker Driver Circuit
  • Easy DIY LM386 Audio Amplifier Circuit

Recent Comments

  1. Admin-Lavi on High Voltage Fence Charger Circuit
  2. etere on High Voltage Fence Charger Circuit
  3. Admin-Lavi on High Voltage Fence Charger Circuit
  4. egidio grzinic on High Voltage Fence Charger Circuit
  5. Logic OR Gate Circuit using Transistors - Circuit Ideas for You on Automatic Street Light Circuit using LDR

Copyright © 2026 | New Circuit Ideas