Arduino Traffic Light Controller W/Remote Control
by Auger Duval in Circuits > Arduino
35353 Views, 29 Favorites, 0 Comments
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.
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
Features:
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.
This project is defined as:
Control 3 outputs
Read 4 inputs
Read 1 interupt
Features:
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.
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.
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.
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.
Downloads
TEST TEST TEST TEST
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.
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.
Electronic Schematic Design
Use a design program to model the electronic schematic
Create each component and connect their pins together
Create each component and connect their pins together
Downloads
PCB Layout
Use the design software to layout the PCB (Printed Circuit Board). Make a cardboard cut out of the final layout and TEST FIT IT. I got lucky and had enough play if I left the screws loose in the Light Housing, to correctly close and latch the light doors.
Downloads
Cut the PCB

Use an engraver, CNC, Laser, or etching to make the circuit board.
Special thanks to Steve over at The Award Gallery. Check with your local trophy shop or sign engraver. They may not know they have this ability.
My board was cut on a 10 year old trophy/plaque engraver. I used NOVARM's DipTrace to make my schematic and PCB.
Special thanks to Steve over at The Award Gallery. Check with your local trophy shop or sign engraver. They may not know they have this ability.
My board was cut on a 10 year old trophy/plaque engraver. I used NOVARM's DipTrace to make my schematic and PCB.
Assemble the Project

Place the components on the PCB.
Solder the pins and leads.
Solder the pins and leads.
Install the PCB

Install the PCB into the Traffic Light.
Wire all the components
Wire all the components
Finish
Ada Boy! Sit back and enjoy the fruits of your labor.
BTW the light bulbs are handmade high efficiency LED's. This whole traffic light draws less than 10W at 5V with all three lights on.
BTW the light bulbs are handmade high efficiency LED's. This whole traffic light draws less than 10W at 5V with all three lights on.