Project 001: Street Traffic Light

LevelStars 10

Components Required

Introduction

Dive into the world of embedded projects with a classic: the traffic light system. This project guides you in designing a three-colored traffic light system using a microcontroller paired with a basic circuit setup.

Sequence of Operation
  1. Green Light: 10 seconds
  2. Solid Yellow Light: 3 seconds
  3. Blinking Yellow Light: 2 seconds (Blinks every 500ms)
  4. Red Light: Holds for 15 seconds

Did You Know? Traffic lights, dating back to their first installation in London in 1868, represent one of the foundational robotic systems impacting society. The three-colored pattern we recognize today was first seen in 1920.

TrafficeLights GYR

Circuit

Utilize the following diagrams to set up the LEDs with the microcontroller.

Sch LEDRYG    LED Symbol Polarity
Figure 1: Schematic Diagram for Traffic Light

Sch TrafficeLight 01
Figure 2: Connect the LEDs on the Breadboard

TCrossroad Traffic Light System

For a complete simulation, construct two traffic lights:

  • North-South Direction
  • East-West Direction

Each light will follow the sequence:

  • Green for 10 seconds
  • Solid Yellow for 3 seconds
  • Blinking Yellow for 2 seconds (500ms interval)
  • Both directions turn red for a brief 1-second pause, after which the cycle switches to the other direction.

TrafficeLights 2GYR

Pin configurations

DevicePort.Pin Signal TypeModuleDirectionDrive Mode