Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Electronics Basics

Traffic Light Controller by Using Arduino

Traffic Light Controller by Using Arduino

November 2, 2021 /Posted byshreyans001 / 2

Introduction:

Traffic light controller helps to manage the traffic and to maintain proper traffic management. These systems are placed at the intersections of the road or at the crossings to avoid congestions and accidents. The systems indicate to the driver by using different colors of light. Therefore, it is simple to avoid congestion at the intersections.

Component Required:

  • Arduino Uno
  • Uno Cable
  • Small Breadboard
  • LEDs(Red*3,Yellow*3,Green*3)
  • Resistor(220ohm*3)
  • Jumper Wires
  • 9V battery
  • Battery snapper connector

Circuit Diagram:

image 1
Traffic Light Controller by Using Arduino 2

Connections:

Connect all LED’s GND pin to GND through 220ohm resistors

Connect 1st Red LED +ve pin to Arduino pin 8

Connect 2nd Red LED +ve pin to Arduino pin 5

Connect 3rd Red LED +ve pin to Arduino pin 2

Connect 1st yellow LED +ve pin to Arduino pin 9

Connect 2nd yellow LED +ve pin to Arduino pin 6

Connect 3rd yellow LED +ve pin to Arduino pin 3

Connect 1st Green LED +ve pin to Arduino pin 10

Connect 2nd Green LED +ve pin to Arduino pin 7

Connect 3rd Green LED +ve pin to Arduino pin 4

Code for Traffic Light Controller by Using Arduino

void setup() {

  // configure the output pins

  pinMode(2,OUTPUT);

  pinMode(3,OUTPUT);

  pinMode(4,OUTPUT);

  pinMode(5,OUTPUT);

  pinMode(6,OUTPUT);

  pinMode(7,OUTPUT);

  pinMode(8,OUTPUT);

  pinMode(9,OUTPUT);

  pinMode(10,OUTPUT);

}

void loop()

{

  digitalWrite(2,1); //enables the 1st set of signals

  digitalWrite(7,1);

  digitalWrite(10,1);

  digitalWrite(4,0);

  digitalWrite(3,0); 

  digitalWrite(6,0);

  digitalWrite(8,0);

  digitalWrite(9,0);

  digitalWrite(5,0);

  delay(5000);

  digitalWrite(3,1); //enables the yellow lights

  digitalWrite(6,1);

  digitalWrite(2,0);

  digitalWrite(7,0);

  delay(1000);

  digitalWrite(4,1); //enables the 2nd set of signals

  digitalWrite(5,1);

  digitalWrite(10,1);

  digitalWrite(2,0);

  digitalWrite(3,0); 

  digitalWrite(6,0);

  digitalWrite(8,0);

  digitalWrite(9,0);

  digitalWrite(7,0);

  delay(5000);

  digitalWrite(9,1); //enables the yellow lights

  digitalWrite(6,1);

  digitalWrite(10,0);

  digitalWrite(5,0); 

  digitalWrite(4,0);

  delay(1000);

  digitalWrite(8,1); //enables the 3rd set of signals

  digitalWrite(4,1);

  digitalWrite(7,1);

  digitalWrite(2,0);

  digitalWrite(3,0); 

  digitalWrite(5,0);

  digitalWrite(6,0);

  digitalWrite(9,0);

  digitalWrite(10,0);

  delay(5000);

  digitalWrite(9,1); //enables the yellow lights

  digitalWrite(3,1);

  digitalWrite(7,0);

  digitalWrite(8,0);

  digitalWrite(4,0);

  delay(1000);  

}

Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Automatic Hand Sanitizer Dispe...
DIY0009.2
diy0005.1
Smoke Detection using MQ-2 Gas...

Related posts

Svg%3E
Read more

Coffee Roaster: Temperature Profile Controller Build

April 1, 2026 0
Table of Contents Why Build a Coffee Roaster? Roasting Temperature Profiles Components for the Build Thermocouple Placement PID Profile Controller... Continue reading
Svg%3E
Read more

Sous Vide Cooker: Precision Temperature Water Bath

April 1, 2026 0
Table of Contents What Is Sous Vide Cooking? Precision Temperature Requirements Components for the Build PID Temperature Controller Water Circulation... Continue reading
Svg%3E
Read more

Kiln Controller: High-Temperature Pottery Automation

April 1, 2026 0
Table of Contents What Is a Kiln Controller? Temperature Requirements for Ceramics Components for High-Temperature Control K-Type Thermocouple and MAX6675... Continue reading
Svg%3E
Read more

Heat Gun Controller: Temperature and Airflow Regulation

April 1, 2026 0
Table of Contents What Is a Heat Gun Controller? Temperature and Airflow Regulation Components for the Build PID Temperature Control... Continue reading
Svg%3E
Read more

Soldering Iron Station: PID Temperature Controller Build

April 1, 2026 0
Table of Contents Why Build a Soldering Station? PID Temperature Control for Soldering Components Required Thermocouple Sensing at the Tip... Continue reading

2 comments

  • Avatar of Aditya Patil

    Aditya Patil

    September 15, 2022 - 12:42 am

    Best

    Reply
  • Avatar of Aditya Patil

    Aditya Patil

    September 15, 2022 - 12:42 am

    Best for students to learn

    Reply

Add comment Cancel reply

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

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now