Arduino: Making a set of traffic lights

Arduino: Making a set of traffic lights
THIS PROJECT IS STILL A WORK IN PROGRESS FEEDBACK APPRECIATED!!!

This tutorial will step you through the process of creating a set of controlable 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.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Parts

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.
« Previous StepDownload PDFView All StepsNext Step »
37 comments
May 8, 2010. 8:31 AMarduinolover says:
 HI!
Great Project! ..but i cant see the code. The file is .tmp not .pde, please help us with this :)
Feb 5, 2011. 11:32 AMcocoliso says:
It happens the same, you can send the sketch to my email?
albert_1960@hotmail.es

Best regards
Nov 15, 2008. 11:00 AMget to da parakeet says:
why a beeper?
Jun 25, 2010. 11:04 PMcdousley says:
Why would you be driving if your blind?
Sep 27, 2010. 10:41 AMjamie50 says:
he means if you are walking and you are blind, then you would know when to cross and when not to cross
Sep 27, 2010. 6:09 PMcdousley says:
ohh thanks I dont cross many streets so i didnt even think of it.
Mar 9, 2009. 4:19 PMget to da parakeet says:
where do i get a Arduino Board for less than 30$ , i need one :(
May 22, 2009. 7:03 AMDerin says:
Adafruit has about 900 in stock for 22$ minus shipping.I will buy one tomorrow.
Apr 10, 2009. 11:24 PMBlackHatCracker says:
I am sure if you search it out that you can find one somewhere close... or just blow the money, and then etch more boards from the design of that one... Its easy...
Sep 27, 2010. 6:09 PMcdousley says:
ebay!
Jul 7, 2009. 5:21 PMchrisapalo says:
Wow.. that's like the best instructable ever. Good work on making step by step for beginners. So I have a suggestion. I have no clue how to get this to work though... Get the light synced up with local ones, like maybe some that are down the street, or see if they have the actual timings somewhere, and set them up. Nice use of serial printing! And any arduino is well worth paying $30 for! Thanks and Good Job!
Apr 11, 2009. 10:31 AMPyrotechnic-Robot says:
Do you know how to run the arduino in VB so you can press a button in VB and then it lights a light? Thanks!
Apr 12, 2009. 7:17 PMPyrotechnic-Robot says:
Yhankyou. So i have to open the seral in the arduino and have it look for "F" and then have Vb write "F" in the seral when the arduino it will then exciute a program Seet! Bummer you can't us VB :(
Apr 10, 2009. 11:44 PMBlackHatCracker says:
Ok so editing the sequence for the R,Y,G for the U.S. is easy... The question I have is, do you really need the buzzer in there? Is it at all possible to remove the buzzer and add a resistor that is the same value as the buzzer in place of that? I guess I am going to have to build this... Although I am thinking of making it on a larger scale. and doing 4 sides to it. and having 4 cross walk signs too... Thanks for the basic idea...
Feb 7, 2009. 5:02 AMamando96 says:
thets pretty cool
Dec 31, 2008. 1:06 PMPyrotechnic-Robot says:
HOw did you bet the black display box?
Oct 25, 2008. 5:23 AMdinky says:
how you program the button ?
Nov 15, 2008. 10:36 AMdinky says:
how you program the button in the software because it is possible to pragram it in the arduino program.
Jan 11, 2009. 2:22 AMuberdum05 says:
I bought myself a freeduino off eBay, but in the software I don't know what board to set it to.Please help me =)
Aug 11, 2008. 8:18 AMDavidRobertson says:
Cool. I just built it
Aug 13, 2008. 1:54 PMDavidRobertson says:
It's a great instructable with clear steps. I have been into electronics for a while but am new to the arduino. But how about a schematic drawing? (i know its quite a simple circuit but it would make it clearer. I learned a lot when i took a look at the code. A+

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
7
Followers
2
Author:unknowndomain