Race Timing System

I created an end-to-end race registration and timing system for an annual charitable race.

Overview

My employer holds an annual charitable 5k race. One hundred percent of the proceeds from registration fees are donated to local schools. The event is geared towards families in the local community so registration fees are also kept at a minimum ($5 to $10 per participant).

The existing registration process was cumbersome as it required flyers and registration forms to be sent to the participating schools. People who wished to participate had to register in person in a branch office to make their payment. On race day, the timing system was a people funnel with one race official at the start of the funnel marking people’s time in a spreadsheet and someone at the end of the funnel recording bib numbers in another spreadsheet. At the end of the race, the two spreadsheets were combined to attempt to match up times with bib numbers. Race results were not posted for hours after the event was over and were only available at the race location.

There was much room for improvement and so I was asked to create a registration and timing system for the event.

The new registration system is now completely integrated into the organization’s website. It collects participants’ information and takes their payment via credit card. It efficiently creates print outs for the event organizers to gather event packets and get racing bibs to the participants.

The entire system is integrated from end to end so there is no import of data from one system to another on race day. Instead, the RFID system captures the bib numbers as participants run past it at the beginning and end of the race.

After a participant finishes the race, their race results are instantly available on TVs at the event, on the website, and on participant’s phones if they scan a customized QR code on their phone (the QR code is on their race bib). The results not only show the participant their time but also how they placed overall and how they placed in their age group.

Features

Credit Card Payments

The race registration system takes credit cards for payment. I integrated the registration system with a third-party credit card processor.

Online Registration

The entire registration process is completely online. It captures participants’ data including names, ages, packet pick up location, preferred t-shirt size, and the school they would like their donation to be sent to. One registration can have an unlimited number of participants so families can easily sign up each of their children and make one payment.

Additionally, the registration system is a responsive design so it can be used on any device including desktop and mobile devices.

End-To-End System

The race timing system uses the same database and web services as the registration system. There is no data swap between two separate systems on race day.

RFID Tag Programming

The RFID tags were passive – meaning they did not have a power source themselves. They only respond when the tag is passed under an electromagnetic field provided by the tag reader.

The tags are able to be programmed – meaning data can be stored on the tag. That data will then be sent to the reader anytime the tag is activated. The amount of data one tag can store is actually pretty surprising. It is the about 128 characters if I remember correctly. Some newer tags can store more than that.

I created an application that would control an Alien Alr-9900 to program the tags. The application would watch for a tag to become “visible” by the system. When the tag is visible, the Alien device sends a signal to store the participant’s bib number on the tag.

I thought about storing a larger, more unique id on the tag (like a GUID) to prevent people from interfering with the race using their own tag numbers. But I thought that possibility was fairly remote so I simply stored the bib number itself on the tag.

One feature the Alien device had was to set the power level you use to program the tags. One time, as I was starting development of the programming application, I accidentally set the device to full power and told it to program a tag. I had thousands of other tags in the room with me but most of them were on a large roll. Because I used full power to program the tag, I actually ended up programming several of the other tags in the room at the same time.

Luckily, the tags can be erased and a new id can be set. Otherwise, I would have wasted many of them.

After I figured out what had happened, I made sure the power was set to the minimum level and also programmed it so if the Alien device can “view” more than one tag, it will not try to program it.

RFID Tag Capture

To capture runner’s times, I used an Alien Alr-9900 with 4 antennae and passive RFID rags.

The Alien device is typically used in a warehouse environment to capture inventory. It is similar to other devices by Impinj although the former was cheaper at the time so that is what we used.

The device contains some great features that are useful for racing. The system can automatically scan for any tags nearby using all attached antennae. When it finds a tag, it stores it in a list and keeps track of when it first saw the tag and when it last saw the tag.

At the start of the race, the software I wrote would simply put the Alien device in scan mode and then would query the device for its tag list every few seconds. If a tag in the list had not been previously recorded my software would make sure at least 10 seconds had elapsed since the “last seen” date. Then it would record the “last seen” date as the finish time in the race database.

This worked really well and we had over 98% read rate on the tags. As the event typically had between 1,500 and 2,000 runners, this was a significant amount of data to process.

After all of the runners had cleared through the starting gate, my software cleared the tag list and then prepared to capture the end times. As runners ran through the gate again (the race was in a circle), the time was again captured and recorded by my software.

After each runner’s end time was captured, their race times became immediately available on some TVs at the event and on the company’s website.

As I was developing the software, we actually had several employees run through the reader’s field of view to verify the bib numbers would record and to determine how far away the reader could “see” a tag. I was actually very surprised during this test because in some cases we could read a tag at over 100 feet away.

As a side note, the tag read rates often were so good that during the race, I noticed the reader was picking up other unknown tags. The tag ids were many characters in them and were similar to a GUID. I imagine those tags were probably either commuter lane passes from the cars that were driving by or they were the chips embedded in some of the pets that were in the race. I had programmed the system in a way that the system just ignores those third-party tags so they did not interfere with anything. I was just surprised to see those.

Digital Signage

After a runner completed the race, the system would record the finish time in the database. Once the time is recorded, the runner’s results are displayed on 3 large HDTV displays. Because we had so many participants at the race (1,500 – 2,000), I programmed each display to show the results for a range of last names – A through K on one TV, L through S on another, and T through Z the last for example.

Each result listing on the TV displays the runner’s name, their race bib number, their completion time, and how they placed in their age category and in the race overall.

As runners start crossing the finish line, the system simply starts listing results on the screen without needing to do any kind of page refresh. The results are loaded asynchronously from the backend timing system. As the screen starts filling up with runners’ results, the screen will automatically start scrolling left to right with the names listed in vertical columns.

The overall runner results are listed in a separate area at the bottom of the screen. The overall runner results include the top 3 places in the race overall and the top 3 places in each age category in the race.

Customized QR Codes

On the first race with this timing system, we only had acquired one TV to show race results. There were so many people crowded around it that I began to think of other ways we could show more people their results.

In addition to acquiring more TVs, I thought I would add a QR code that was personalized for each runner. The runner would only need to scan the QR code with their phone after the race and they would be shown their results right away.

I had already created labels that were put on the bag of items they receive before the race. So it was easy to create another label that we could put on the race bib itself.

The label would actually serve two purposes. First, it would have the QR code on it which would be great for the runner to scan after the race. Second, I put a simple barcode on the label. This barcode could be scanned by a handheld scanner in case we had problems with the RFID timing system.

Luckily we never had to use the barcode scanner. But the QR codes were scanned many times by runners to view their times.

Race Results on the Company’s Website

The results are also displayed in real time on the company’s website. The website is an ASP.NET MVC application so it is easy to integrate the race timing system’s backend with a controller action and subsequent view that displays all runners in a list by their time. The page also displays each age category and the top placements in each of those.

There is also a feature for runners to type in their race bib numbers and they will be shown their own individual time, their overall placement, and their age category placement.

My Involvement

I was the only developer in this project. I did everything from database design, all front- and back-end programming, creating the RFID reader system, creating reports, integrating the credit card processing system, programming the RFID tags (yes, each and every tag), printing labels, and helping with race setup and production and timing.

I worked with two managers, one of which helped me to acquire all the necessary equipment and worked with me to test the system, set up the mounting structure for the RFID antennae and most of the rest of the process.

I also worked with another employee who assisted with setting up the digital signage on the race day.

Many other employees, of course, were in charge of other responsibilities in production of the race event itself. My responsibilities were only with the registration and timing system.

Process

There are too many steps involved to explain all that I did on this project.

The bib programming system is a WPF application I built with C#. It utilizes a .NET library to communicate with the RFID reader. The library was created by the Alien company that makes the reader.

The timing system is a Windows Forms application. It also uses the same .NET library as the bib programming system. It also uses WCF to communicate with the backend system that handles all the timing and registration.

The registration system is an ASP.NET MVC application. It communicates to the same backend system using WCF as the timing system. It also integrates with the company’s credit card processing system using a REST API which is a C# WebAPI project (which I also wrote).

The digital signage system is an ASP.NET MVC application that uses jQuery and custom Javascript to asynchronously load race result data coming from the backend system.

The website and QR code results are all programmed into the company’s main website. The website is an ASP.NET MVC application.

Results

I had some really positive feedback from this project. People have been amazed that the timing system can report the race results so quickly and in so many different ways.

The registration system was a huge improvement from the old and has made it so much easier for the company to collect payments and register such a large group of people.

I’ve had several people ask me if they could have the system to put on their own events. The executives of the company also wanted to expand the race to have more events held at other locations.

The only issue I’ve noticed is the same that any company probably has with an RFID system. The read rates are very good. However, we don’t read everyone’s bibs. If runners place the bibs with the RFID tags on the back of their bodies instead of the front, if they wear jackets or other articles of clothing over the RFID tags, or if they happen to be too close to another runner when they cross the finish line then the reader won’t see their tag.

We believe we have at least a 98% read rate on the tags. But for the few people it misses, we definitely hear about it from them after the race. That said, it is a race for charity – not for professionals. They only pay $5 to $10 to register so they can’t complain too much.

If I were to improve the system, I would probably get a secondary reader with the same number of antennae and have it also try to read them through a smaller gateway.

Or I would get the type of RFID tags that you can attach to your shoelace and get the type of antenna that people can walk over. I think we could have better read rates with that type of a system.

But, overall, the system has been great and we read the vast majority of runners. This system has definitely been one of the highlights of my career so far.

Technologies Used

C# Alien Technology ASP.NET MVC WCF WPF WebAPI CSS HTML5 JavaScript jQuery Bootstrap Visual Studio SQL Server Entity Framework Git Windows Server