Electronic Projects

Formula One Grid Lights


Description
To start a Formula One Grand Prix there are five red lights. These lights are turned on one at a time with a one second interval. When all five lights are on there is a delay of between 1 and 5 seconds before the lights go out and the race starts.
This is an old favourite project of mine starting me on a journey programming PIC micro-controllers. The original project used the 16F84 micro controller but this updated project uses a newer, smaller micro-controller.
Design
The main design is based around a multipurpose PIC circuit. I created this circuit and PCB design to use in many projects to keep cost down by reusing a single PCB. The circuit diagrams are below. The first is the general purpose circuit and the second is the one specific to the F1 Lights project.
Stacks Image 50
Stacks Image 74
The 8 pin PIC micro-controller is supported by a 5v regulator so the project can be run from a 9v battery and resistors to limit the current from the outputs to drive LED's. The outputs and input are all routed to a single edge connector where they can be easily connected to the external components, in this case a switch and five LED's. The PCB Layout is below:
Stacks Image 70
Stacks Image 45
The design is based on the 12F609 micro-controller as it is the most basic and cheapest (?) of the range. The program is the same for that family of micro-controllers so changing to a different one is only a change to the project details in the IDE.
The micro-controller has only five inputs and outputs so we need another inout for the button. Fortunately the reset pin can be set as an input
Program
I exclusively use MikroC for my projects. There is a free version for projects up to 2K words in size. It is easy to use once you get the hang of it and there are many libraries to help create you project quickly.

The program for the F1 Lights is relatively simple and is broken down into the following parts:
1. Initialisation
2. Wait for button press
3. Illuminate LED's one at a time until they are all one
4. After a random pause, turn the lights off

Construction and Testing
Parts List
Construction notes
Files
Use the links below to download the project files.

All content I publish is my own work and I own the copyright. If you enjoy the content provided please show your appreciation by donating using the link below.