Mini F1 race track Grid Start Lights using PIC12F627A

Summary of Mini F1 race track Grid Start Lights using PIC12F627A


This article describes a DIY project creating an F1-style grid start light system for a Scalextric slot car racing circuit. The device uses a PIC microcontroller to sequence five LEDs, illuminating them one by one before extinguishing them after a random delay to signal the race start. Designed for low power consumption (10uA in sleep), it runs on two AA batteries or a CR2032 coin cell and includes source code and schematics for replication.

Parts used in the Mini F1 Race Track Grid Start Lights:

  • PIC16F627A microcontroller
  • PIC16F628A microcontroller (compatible alternative)
  • Five 5mm red LED's
  • Start button (SW2)
  • Two AA cells (or CR2032 Lithium coin cell)
  • Current limiting resistors (150R for standard LEDs, 270R or 330R for hi-efficiency types)

(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

Notes:

  • 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

Quick Solutions to Questions related to Mini F1 Race Track Grid Start Lights:

  • How does the circuit indicate it is powered on?
    LED's D2 and D4 light up when the circuit is first powered on.
  • What happens when the start button is pressed?
    All LED's turn off and then illuminate sequentially at one-second intervals until all five are on.
  • How long is the delay before the race starts?
    The LED's extinguish after a random interval between 0 and about 7 seconds.
  • Can I use a different microcontroller than the 16F627A?
    Yes, the provided code will run unmodified on a 16F628A.
  • What is the current consumption when the lights are off?
    The circuit drops to around 10uA because the PIC enters a sleep state.
  • How can I operate the circuit from a CR2032 battery?
    You should use high-efficiency LEDs with 270R or 330R resistors.
  • Why are unused Port A pins configured as inputs?
    They need to be pulled down to Vss since weak-pull-ups are enabled on Port B.

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:
LinkedinTwitter