Traffic Light Summative

In this project students will build a model in groups of a working traffic light system that will be interfaced to a PC using the parallel port and controlled through a software system that they will build. 

  • Model - a working traffic light simulation driven by Processing with control interface
  • Report - group report similar to recent lab reports
  • Presentation - show working demo to teacher, be prepared to answer questions about how the system works

The traffic light summative project is partially described in part in the Blue Book 10.4 Putting Everything Together. Don't read the Turing code in the book version - see this web page.

Some groups will be building the Aruduino version of this project - parallel ports are quickly disappearing.

Project Components


  1. plan the materials
  2. collect materials
The model will require a platform approximately 50 cm by 50 cm. The platform should be raised slightly so that it can accommodate a breadboard with circuitry underneth attached to the bottom. 

The platform can be made from any materials that is strong enough to support the traffic lights - particle board, thin composite or plywood, or even strong cardboard.

The traffic lights poles can be any thin hollow tube and the traffic light assembly can be made with thin carboard. Groups should have some way to decorate the platform so that the road configuration is shown. 


  5 model construction

Interface Circuitry

The interface circuitry will be based on the 74LS245 described in the Blue Book in 10.2.1 The 74LS245 Buffer Chip and the 10.5.1 One Bit - Activity #1. The circuitry will need to be expanded to accomodate the larger number outputs that the traffic lights will require. Note: This chip has TWO +5V and TWO GROUNDS, if you don't connect both properly IT WONT WORK. Also note that you must connect ground from the parallel port to the negative battery connection.

Materials for this will be provided. There is an Arduino version of this on the Arduino project page.

Circuit construction will be evaluated. Have a close look at the exemplar in the classroom and the image below for examples of excellent breadboard circuit construction.

Click for large version. Image from Wikipedia

Further additions to the circuit can be made - see extensions. 

Parallel Port Cable

The parallel port cable will need to be built - see Parallel Port Interfacing


The software which will control the system will be created using Processing. The system should include a simple GUI which will allow functions such as starting and stopping the automatic mode of the stop lights, four way red flashing and all on test. Additional features will increase your mark. 

Much of the Processing Robot concepts can be reused. Use the see the code skeleton on Open Processing - writePin works just like your Arduino projects such as Knight Rider. You must install the parallel port library in your Processing library folder.

Code must contain comments explaining how system is working. The concept of writing binary to the parallel port to control various outputs is covered in the Blue Book in 10.4 Putting Everything Together. 

 Method Description
 writePin(int pin, int value)Sets the state of an output pin to value (0=LOW, 1=HIGH). Valid values for pin are 2-9 (data pins) and 1,14,16,17 (control pins).  


Students who wish to receive a level 4 will need to exceed the project expectations in some way. Students may wish to build a very robust software control system, add additional features such receiving input from their model in some way, having test features, creating system documentation or other ideas. Students who have ideas should consult with their teacher for feedback. See the activities at the back of the Blue Book for more ideas.


Reports should contain the following sections:
  1. System overview and explanation of how the it works, including schematic and photos.
  2. Software overview and explanation of how data is transferred to (and possibly from) model including an explanation of how the parallel port works.
  3. Daily project log of what was worked on each class.
  4. Any additional features students wish to submit.


Students will present their working model to their teacher. They must demonstrate all features working. They should be prepared to answer questions about the hardware and software is working.


 Item Level 1 2 3 4
 Model Functionality   lights controlled by parallel port (or new Arduino version) 
 Model Construction   road markings, 4 free standing traffic lights,  
 Circuit Construction   use of power rails, short jumper wires where possible, no possible shorts, well soldered parallel port with no shorts or bridges 
 Interface Functionality   runs lights in automatic mode, four way stop and all lights on test mode, has light system display on screen 
 Software Comments   variables, calculations  selections, etc. succinctly explained 
 Report System Overview   Scematic diagram and consice, specific explanation of how system works. 
 Report Software Overview   Short explanation of how code works - with possible flowchart. 
 Presentation   Demonstrate to your teacher the working system and all features. 
 Questions   Prepare to answer questions about system. 


Additional features such as left turn greens, walk buttons, interface additions, etc. Any original ideas successfully added to your project will enhance your evaluation.