Mini F1 race track Grid Start Lights using PIC12F627A

(See big LED version here)

My nephews got a Scalextric slot car racing circuit from Santa for Christmas. This was a blast-from-the-past for my brother and me and we were soon showing the kids how to race. However it quickly became apparent that “3-2-1-Go” wasn’t the best way to start a race so I put this together to simulate the gantry lights used for starting F1 motor races.

race track Grid Start Lights

When the circuit is first powered on LED’s D2 and D4 light just to indicate the circuit is operating. 

When the start button (SW2) is pressed all the LED’s turn off. They then illuminate sequentially at one second intervals until all five LED’s are on.  After a random interval between 0 and about 7 seconds the LED’s extinguish, signaling the start of the race.

Once the LED’s have extinguished simply press the start button again to initiate another  race start sequence.  While waiting for the start button to be pressed the PIC is put into a sleep state.  This drops the current consumption to around 10uA


  • The circuit is really quite simple.  I tested it on a breadboard with standard 5mm red LED’s using 220R resistors from a 5Volt supply.  The one on the prototype board operates at 3Volts using  two AA cells.  I dropped the value of the LED current limiting resistors to 150R for this since the LED’s I used weren’t hi-efficiency types.  If you can use hi-efficiency LEDs you could probably use 270R or 330R resistors and operate it from a CR2032 3Volt Lithium coin cell.
  • With all five LEDs on, the prototype circuit was drawing about 25mA from a 3V supply. This drops to a meagre 10uA with all LEDs off which should allow the circuit to operate for many months, or even years depending on use, from a couple of AA cells without the need for a power switch.
  • The code enables weak-pull up on the Port B pins but the unused Port A pins are all configured as inputs and need pulling down to Vss.


For more detail: Mini F1 race track Grid Start Lights using PIC12F627A

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us: