Mini F1 race track Grid Start Lights using PIC12F627A
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.
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
- Source Code (zipped)
- Hex for 16F627A ready to program. (right-click Save As)
(This code will also run, unmodified, on a 16F628A)
- Images of the prototype. At power on. During a start. In a small case
- 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
For All Your PCB Need, One-stop PCB Solution Services Appear:
EasyEDA: free PCB design tool, 200,000+ engineers are using
PCBs: 10pcs 2-layer 10x10cm only $8.21, on-time global shipping
Components: save 50% on cost, save on freight if shipped with ordered PCBs