Note: We have developed the below system into a commercial product. For more information on the hire or purchase of this system please go to https://www.realtimeracing.co.uk/.
We all love completing in events and we all love looking over the race results after. When we decided to start organising some races in Narberth we didn’t ever think it would prove as popular as it has. This growth in entry numbers has given us a problem with race timing. Manually entering 500 race numbers into an excel sheet from a hand written list of results is no fun and it takes bloody ages.
These days runners expect for the results to be available the same day, if not in real time on the web.
We had to up our game.
There are a number of paid-for services you can hire in or purchase. These are all pretty expensive. Purchasing an off the shelf radio timing system costs about £5,000. Hiring in a service cost around £1 per athlete (£500 per event). Neither of these options appealed to us as we wanted to maximise the amount we could give to local charities. We had to think outside of the box so we bought a little box and put something techy in it.
As a web developer I know my way around a database and the programming scripts needed to manipulate the data, the problem was how did we capture the data in the first place? After snooping around the web I discovered RFID (Radio-frequency identification). RFID is essentially a little chip that can be scanned from an RFID reader. All RFID chips have unique codes so we can give each athlete and RFID chip and then record their finishing time against it. You can buy wristbands with RFID chips in them so each entrant could be given one at registration. Once scanned we can monkey around with the data to product some finisher times. Theory in place we needed to build an RFID scanner…
I knew that a little computer known as a Raspberry Pi could do the scanning for us and store content to a MySQL database. I got the soldering iron out and had a play. After frying a few Pi’s I had a working scanning system. The system runs off a USB phone charging battery and the Raspberry Pi Zero W can run off it for 52 hours. The scanner can record a RFID chip against a time every 0.3 seconds. We found that 0.3 seconds was about right to scan a chip just once but be speedy enough to let the next person scan quickly. In trials I left the chip on the scanner and it recorded 165,000+ entries without failing before the battery died.
For the nerds out there, the Pi runs a Python script which is constantly looking for RFID chips near the scanner. When it detects one it writes the RFID chip ID to the database against a time.
The next step was how to create a live results system. I connected the Pi to a hotspot on my mobile phone. I set up a smart database synchronising tool which then POSTed new database entries on the Pi to a remote database on the WWW. The WWW version of the database is then read by a PHP script, does some calculations and shows the results in a list, split off into the different races (10km, Half and Full marathon).
This timing system will be used in our event in August. We have 500 wrist bands ready to hand out to our runners at registration.
The total cost of the timing system is £32 with infinitely reusable Nobbler customised wristbands coming it at 60 pence each.
Update November 2018
Since I wrote the above, the timing system has had some software and hardware updates. We have now included live SMS updates to runners as they scan at the finish. They receive their finishing time and their position instantly if there is mobile signal, if not it stores the race info until there is signal then does a bulk send of them.
I have also added in real time posting to a Google Firebase database. We have a page hosted with them that pushes real time results, so there is no need to refresh the page. This links in with a results screen at the finish line of our events, showing runners their finish time and position there and then.
Update March 2019
The system has been updated again! This time we ran an orienteering challenge with the timing system. It was a slightly different challenge as we had a rolling start and the results system had to allow us to verify how many of the 8 stamps the runners had found in the 2 hours they had to complete the challenge. We devised a system that scanned runners (who ran in pairs) at the start of the race, then scanned again once they’d finished, to calculate their total running time. We then created a little ‘admin’ page to allow us to assign the number of stamps collected against their record in the database.
It worked well. We had a live results screen at the finish, run from a Pi B+3 using MySQL pushing out JSON data and the client side scripts used Vue.JS for updating the screen in real time (well, every 15 seconds). The results website can be seen here https://results.narberthnobbler.co.uk/.