Making a set of traffic lights Using Arduino

This tutorial will step you through the process of creating a set of controllable and configurable traffic lights whilst also teaching you the basics of Arduino. Some knowledge is needed and I highly recommend reading and following through on most if not all of the pages of the following document, created by the wonderful Arduino.cc people!
Arduino – Getting started guide
This document will explain in simple terms about the basic electronic components we will be using and how to use them, it also describes digital, analogue and serial inputs and outputs and how they are used.
You may have read my previous tutorial on traffic lights, this will be a similar concept however will be easier to build and more feature rich, because of the simplicity of the Arduino development environment.
After this project, you might like to extend it by…
+ Making the lights work for cross roads (expanding the complexity of the sequence).
+ Making the settings programmable by using the EEPROM and Serial port.
+ Making the lights communicate with another Arduino running the same code.

Step 1: Parts

You will need a few parts, if you already did my previous project on AVR microprocessors, then you don’t need to buy the same things again, You should only need the Arduino and USB lead which you can get from Tinker.it and some form of 5v piezo sounder.These are minimum requirements you could order more for backup or expansion of this project.
1x Breadboard (34-0655)
1x Jumper Links (34-0495)
2x Red LEDs (55-0155)
1x Orange (not amber) LED (55-0124)
2x Green LEDs (55-0120)
1x White LED (55-1640)
1x Piezo Sounder (35-0282)
1x Push to make button (78-0630)
1x 10K Resistors (62-0394)
1x 220ohm Resistors (62-0354)
OPTIONAL – 1x 3m USB Cable (19-8662)
Rapid Online – £20.70
1x Arduino Diecimila
Tinker.it– £20.35
The total was £41.05 which is higher than the AVR tutorial but its worth it and that includes delivery.
The delivery charges are quite high at rapid so why not shop about while your there and at Tinker.it and see if you can find some parts which you can play with at a later date. More LEDs and other bits which you think you can play with.
Good news is you won’t need any tools or soldering for this project, its just pushing bits together! Once you have all the parts you are ready to assemble your project, however if you are planning to make this project more permanent you will want to get some form of strip board to solder your work down once its working.

 Step 2: Getting started

Getting started is easy, simply layout and check all the components are there, its best to have the Arduino to the left of the breadboard, and disconnected, then simply follow the next few steps to add each component to the breadboard, wire the board to the Arduino, and finally programme the Arduino, after you will be able to test it works and read through the code with comments to see what is happening.

Step 3: LEDs

LED
Before we begin ensure all LEDs are connected the right way around. The short lead goes on the right and the longer on the left.
We will be adding the resistors later so be sure not to plug in any power yet as it could damage the LEDs
The image below shows the long and short leads, and then the second image shows how they should be wired, third showing the order.
TIP! Ensure that yu have the LEDs spread across from the 5 column bit to the two column bit or else they will not work and you will have a short circuit.
For more details, click: Making a set of traffic lights Using Arduino


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top