Arduino Traffic Light Controller w/Remote Control

Picture of Arduino Traffic Light Controller w/Remote Control
I had a traffic light that I was refinishing.  The only thing left to do was to build the controller for the light's signal patterns.  To give it a twist I incorporated a remote control.  This was also the perfect opportunity for me to try out an Arduino.  I wanted to use the Arduino becuase it was easy to use on both MAC and Windows.

Remove these adsRemove these ads by Signing Up

Step 1: Define the Project

To start an electronics design project first define the parameters of it functionality.
This project is defined as:

Control 3 outputs
Read 4 inputs
Read 1 interupt

3 outputs are sequenced in multiple modes
-Standard Traffic Light pattern
-Reversed Pattern
-Steady on each output
-Blink each output
-Turn off
Increment and decrement sequence speed
Modify saved timing parameters using remote control

and most important; Execute in a realtime manor.

Step 2: Prototype the circuit

Use prototype methods to test the circuit.

I used the Arduino Duemilanov.  I attached 3 LED's , 4 switches and began to write the code.  The Arduino IDE (which is FREE!!) uses a syntax that is very similar to good old fashioned ANSI C.  I started with the modes of signal patterns.  I used a case statement to modularize my code.  I the added the code for the buttons.  The buttons control mode UP/DN and speed UP/DN. 

Step 3: Write the code

Once I got the basics down I moved on to the add-ons.  I wired the remote control receiver to the Arduino making sure to connect the signal received line to my interrupt pin.   I also buffered my Arduino's output pins using switching transistors that drive 5 volt relays.


Test your circuit and code thoroughly.
The Arduino allows for field program ability, but that is no excuse for not testing.
After adding the remote control I had alot of code changes in order to operate the code.
This version has usable code for the remote's receiver but it breaks the ability to reprogram the timing and default flash pattern and speed at power up.

Step 5: Electronic Schematic Design

Use a design program to model the electronic schematic

Create each component and connect their pins together

TrafficLightSch.pdf(612x792) 28 KB
tinker2344 years ago
hey could i get one from where exactly the traffic light just wondering
lee_schnitz4 years ago
Love this project. About 5 years ago, I got a full size traffic light on eBay, but had no way of controlling it, other than manually with a three way switch I installed.

Fav'd this, and will give it a try. Been looking for an Arduino project, and I think this is it.

FLCandyMan5 years ago
That's great, thanks. How bout you share with us your plans for the building of your Traffic Light Stand? That's what I really need more is a stand for my existing light. Thanks, H in FL
Auger Duval (author)  FLCandyMan5 years ago
The stand is nothing more than steel pipe and fittings from the home store and an old tire mounted on a donor rim filled with 100lbs of sand
 Great idea! I don't know if it's just me, but all the pictures are grey and say 'This area will preview all your images'. Just FYI