Timing Cage and Software

This page is to show the technology that the timing system is built on. If you want some more info you can contact me at pkerney@nswpylon.org. I am happy to share any information that you want.

We need 6 people to run a race and the lap counting and timing is all automatic. 4 people in the cage, 1 starter, 1 scorekeeper. We have run the scorekeeper as one of the people in the cage which drops it to 5.


Outside the Cage

We have had the actual cage for quite a while and it has proved to be the ideal thing for running the races. It was purpose built a long time ago and the exact details of who built it and how much it cost have faded into oblivion.

It is based on a bare frame trailer chassis and has the cage built on top of it. There are four coloured shutters on the top that are actuated by pull ropes inside, these indicate a lap. There are 4 buttons inside the cage which are used to signal a cut. There is a one minute countdown clock which is a black/white disc that is operated by a gear driven electric motor. There are four lights (in the black box) which are used to start the race, to indicate a cut on pylon 1 and the end of your/the race. There are another four lights which can be used instead mounted on the front of the cage in little white tubes. The lights are all 12V 50W domestic down lights which can be purchased for $4 anywhere.

Originally we had a custom built computer built with a microcontroller and LCD display. This was quite successful for a number of years, but due to a couple of little bugs and the difficulty of making changes to this, I started building the timing system from scratch. The objective was to make it plug compatible with the original controller in case of a failure.

It is completely run by a 12V deep cycle truck battery and we have had no problems with running out of power. We have run 2 laptops off it at one event as well. I have built a log of the light usage into the timing system so we can get an idea of the total power consumption. At Queanbeyan 2006 we had a light usage of 27.0, 24.4, 21.4, 21.0 minutes on the 4 lights and the clock motor was running for 39.4 minutes. We did some tests on power consumption of the laptops and the clock motor but I cannot remember the results. The lights are the main offender anyway.


Inside the Cage

As you can see, there is a shelf that is used to hold the electronics. Here you can see the laptop which is a standard laptop. And next to it in the beige box is the Input/Output (IO) interface. More on this in a minute.

There is enough room to have 4 people inside the cage in reasonable comfort. Assuming they all get on and no one smells.


The IO Interface Boxes

In order to interface the shutters, buttons, lights and clock to the laptop, you need some form of IO interface. We needed a total of 5 outputs and 10 inputs. The 10 inputs are 4 shutters, 4 cut buttons, 1 clock feedback switch and a GO button on the top of the interface box. The GO button is used so as there is no real need to touch the laptop. Due to the way the race runs, I have doubled up on 2 of the inputs and can get away with 8 inputs assuming the operators don't press the cut buttons when they are not supposed to. I have had 2 goes at this and both were successful but you will see why I have had 2 goes.

The connectors on the back of the boxes are (not in any particular order) laptop interface, shutters, cut buttons, lights, clock and 12V power.

IO Interface v1.0

This interface is based on the Silicon Chip Parallel Port IO Interface. Cost was about A$70 + A$20 for the voltage regulator (this board needs 12V and 5V) + about A$40 for connectors and box.

This interface uses the direct access parallel port and some interesting timing in order to make them work. This kit is only supposed to work with DOS/Win95/Win98 as you need to use direct port access to tickle it. In order to make it work with XP, you can use some kernel DLL's from the net to make XP do this. It appears that some laptops treat the parallel port differently and I have had mixed success in getting this box to work on various laptops. Some will not work at all, some only with DOS/95/98 and some will work with XP as well. This makes me a little uncomfortable so I started to look for alternatives.

IO Interface v2.0

This interface is based on the Elexol USB I/O 24 Mk 2 (top left) (http://www.elexol.com/IO_Modules/) and has 1 relay output board (bottom) and 1 opto-input board (top right). Cost was about A$320 for the Elexol bits and for connectors and box.

This thing is fantastic. In fact it is so easy to program, I ordered the interface and just using the documentation, I wrote the interface code into the software without the device and when it arrived, I didn't even have to touch the code I wrote again. It just worked !!!

The driver makes it look like a serial port and using some simple commands, you can set the outputs and get the inputs. Not only that, it works with 95/98/XP on all the laptops I have tried. I made it compatible with the v1.0 interface so we can just swap between them. Wiring looks a bit messy and I will tidy it up at some stage.

I was initially a bit worried that I may not be able to poll the inputs fast enough and may miss the buttons or shutters. I was completely wrong and I can get timing down to thousands of a second which is not required as it is people pulling the shutters and pressing the buttons based on their eyes. We only time to 10th's of a second (the software can handle hundredths) anyway.


Pylon Cage Timing Software Components

Now the hard part, the software. I wrote this from scratch in C++ and MFC.

The objective is to time the racers for 10.5 laps and then to give the scores.

Here is a pretty complete list of the features of the "pylonCage" software :-

  • Identify the racers. The operator pulls the shutter to identify the racer and this tells the software that there is someone in that lane.
  • Press the GO button to start the clock. The clock motor is then started and it takes approximately 60 seconds to go around. Once it is around, there is a micro switch that is activated and the software picks this up and stops the clock.
  • The lights are started at 1 second intervals (programmable from 0 upwards) to start each racer. The lights stay on for 2 seconds and then turn off.
  • When the plane gets past the pylon, the operator pulls the shutter to indicate a good lap or presses the button to indicate a cut. If there is a cut, the corresponding light is lit for that lap.
  • After 10.5 laps, the light for that lane will flash (programmable) to tell the pilot that they have finished. Once all pilots have finished, all the lights flash.
  • When all the pilots have seen that they are out, press the GO button and you can read off the scores to the scorekeeper (more on this soon) The screenshot is at this state.
  • There is a programmable de-bounce in the software to stop the switches registering multiple times as most importantly and why I did this in the first place is ...... You cannot register a lap and a cut within a period of 2 seconds (programmable). This means that if the operator mistakenly pulls the shutter and presses the cut button, only the first event will register. This was the main source of all protests with our old system.
  • Press the GO button and you are back to the start.
  • There are some other keystrokes on the laptop to help things along. "F" will finish the race and is used if someone doesn't finish/start and saves you pulling the shutter through. "R" will reset to the start and is useful when things get a bit mixed up. "H" to toggle between tenths and hundredths if we want it. "F1-4" are used to manually turn on/off the lights and are used if you think you have a blown globe or the lights are playing up.
  • At the end of the race, a log file showing lap times, total times and cuts is written with a timestamp. This is useful for protests or for finding mistakes in the scoring.
  • The software can read a parameter file to understand the round/heat/pilot information but this is not required. If it is there, the logfile is stamped with this information as well.
  • You can have normal Windows colours or the white on black in the screenshot.

Pylon Remote

Now the really cool bit....... I also have a "remote" interface that uses another laptop and can talk to the timing laptop and the remote will mirror everything that the main interface does. The idea is that the score keeper can just read the times off the remote rather than radioing to the cage. This works over a normal network connection. I have also done a PocketPC version just for fun. Imagine, your caller telling you your lap times during the race......

We have had some success with wireless networks but the distance is limited with internal antennas in laptops. The next thing to do here is to make this more reliable and improve the distance. I have looked into wireless PC cards with external antennas which should work, but it is a matter of funds.


Pylon Cage Scoring Software Components

We use an A3 paper scoresheet taped to a board as the primary scoring system. This is in case all the technology fails. A brain and a calculator can do the work.

I have played with a few things here over time. Initially I write a scoring system for a PalmPilot. This worked but was a little fiddly due to lack of keyboard. I then ported this to a PocketPC. Same again.

Then, I built an Excel spreadsheet that did the scoring. It has parameters that are number of round, cut penalty, number of cuts, DNF penalty, number of rounds to drop etc. These parameters allow you to have the multiple classes. This works fine and was used for the 2005 season. You can see the outputs on the results pages.

Now we have the new version developed by John Little. It is based on an Access database and keeps track of competitors, frequency clashes, running of the event, reruns and much more than I know about. It does multiple classes as well. We are now using this and you can see the output in the 2006 results. We have used this for Q500, F400, F3D, AT6 and Rare Bear events.

The next modification for this part if to create an input file at the beginning of the race that the timing system will read to populate the round/heat/pilot information before the race.

The scoring laptop is run off a car in the usual manner.