Categories
TUTORIALS

DIY Mini Traffic Intersection

Introduction

Our group’s project focuses on improving pedestrian crossing safety for the vulnerable populations. A traffic intersection prototype needs to be built for the setting. Therefore, in this tutorial, we will use simple electronic parts to set up a typical traffic intersection including traffic lights and pedestrian crossing signals.

Parts List

In order to accomplish this project, you will need:

 

 

 

 

 

 

 

 

 

 

Setup and Wiring

  • Black wires: GND
  • LCD
    • GND to GND
    • VCC to 5V
    • SDA to Pin A4
    • SCL to Pin A5

4 Digit 7 Segment Display Reference

The 4 Digit part I purchased came with a shield that helps order the pins in alphabetical order, which greatly enhanced the efficiency. You may want to wire the part as the diagram above if you do not have this feature. For the purpose of saving spaces, I used the 7 Digit Display upside down in this project.

Note that not all digits are used in this project. Using the last two digits L1 and L2 can achieve the goal of counting down from 10 to 0.

Table for 4 Digit 7 Segment Display (Modified)

Workflow Diagram

The diagram explains the sequence of lighting pattern.

Run the Code

Setup the code based on how you wire the Arduino board, the INPUT and OUTPUT pins may be different. Be sure to modify the code accordingly before you run it.

Video

Leave a Reply

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