Sports Timing System in a Lunch Box

The 2012 London Olympics are over. And I had my own special sports event last weekend. Although not part of the Olympics, it is part of the Switzerland Central Mountain Race Championship. This is a series of mountain running challenges. And no, I did not run the race. I love the mountains, and I love hiking in the mountains, but this is definitely for the greatest athletes. Instead to run the race, I have chosen to implement and run the timing system :-).

Athletes approaching the finish line

Athletes approaching the finish line

The International Rigi Mountain Race Event

The Rigi Berglauf starts in Arth at the lake level and ends on top of the Rigi mountain. This link shows the profile: a distance of 11.3 km with an elevation of 1380 meter :!::

View from the top of the mountain to the start area in Arth

View from the top of the mountain to the start area in Arth

The winner Markus Jenne finished that run in just 1:06:32,5 :!:. Yes, below 67 minutes ❗!

Markus Jenne, Winner of the 29. Rigi Berglauf

Markus Jenne, Winner of the 29. Rigi Berglauf

The race event is in honor of the time before the year 1871: up until then there was no mountain cogwheel railway (which exists today). Because lot of tourists wanted to get on top of mountain back that time anyway, the solution was that two strong men carried a single person to the top of the mountain:

Rigi Carrier

Rigi Carrier

Remember: Today, the athletes have to run, the do not get that service. :mrgreen:

Part of the event is as well traditional singing and dancing:

Rigi Trachten Singing

Rigi Trachten Singing

Rigi Traditional Trachten Children Dancing Formation

Rigi Traditional Trachten Children Dancing Formation

Timing System

Back to technology :-). The timing system uses the TWR-MCF52259, TWR-SER, TWR-LCD and a custom PCB shown on top here:

Timing System in a Lunch Box

Timing System in a Lunch Box

The whole system fits into a transparent lunch box. An SD Card with the FatFS file system is used for storage (see as well FatFs with Kinetis). For precise timing a DS3232 realtime clock with super-cap is integrated. The PCB it provides a wireless link using the MC13201 2.4 GHz transceiver.

The 2.4 GHz subsystem probably would be worth another post. It allows the system to communicate with other systems, both to ‘see’ runners well before they arrive the finish line. It can as well inform the speaker so he knows who is approaching the finish line, plus it will provide all the runner details to the speaker person too.

Power is provided through USB, so either a notebook, a battery pack or a USB wall power supply can be used. The main CPU runs a Processor Expert based USB stack: it reads in data from a USB Laser Bar-code scanner. The Bar-code scanner is used to register the runner number after they have passed the finish line. To trigger the finish line time, several options can be used: push button switches or multiple laser light barriers.

The firmware for the Timing System is implemented with Processor Expert components using the Eclipse based CodeWarrior for MCU 10.3, in two projects: one for the main CPU and one for the LCD subsystem. Both subsystems and all remote systems are running with FreeRTOS.

FreeRTOS running the Timing System

FreeRTOS running the Timing System

Tower LCD Subsystem Components with FreeRTOS

Tower LCD Subsystem Components with FreeRTOS

Using the FSShell gives access to all commands plus reports that status of the operating system with all the tasks:

Shell Output with FreeRTOS Tasks and Performance

Shell Output with FreeRTOS Tasks and Performance

With the transparency of the lunchbox I can read easily the LCD output. The TWR-LCD display is used to show the list of finishers with index, running time, running number and the name of the athlete plus overall status:

TWR-LCD for Timing System

TWR-LCD for Timing System

The same information (and more) is shown on a terminal window if a notebook is attached. The serial link or the wireless link synchronizes with an Microsoft Access data base. That database can be local or remote and is used to print ranking lists:

Timing System in a Box

Timing System in a Box

Additionally the serial link provides a command line interface to configure or inspect the system. It is possible just to use that lunch box alone: no PC needed, as the firmware is able to handle rankings automatically. All what I need is Power (5V DC), the lunchbox with the system and the laser bar-code scanner.

Mass Start And Timing System

The a race is using a mass start, this means the clock starts at a given time.

Mass Start at the Wildspitzlauf, another Mountain Race in the region

Mass Start at the Wildspitzlauf, another Mountain Race in the region

The mass start makes things a bit simpler: no need to register the start time: all what the timing system needs to know is the time of the mass start. For this radio controlled DCF77 clocks are used.

Running Number with Bar-code

The race numbers have a bar-code printed on it. Compared to RFID, this is cheap and environment friendly. I use a special laser-printable paper, both skin friendly and resistive to wet conditions: it is very hard to tear it apart. As dirt or damaged runner numbers is always a concern, each sheet has multiple bar-codes printed on it:

Running Number with Four Bar-Codes

Running Number with Four Bar-Codes

After passing the finish line and the running time has been taken, the numbers are scanned with a laser barcode sanner attached to the timing system over USB:

Scanning the Bar-code

Scanning the Bar-code

The bar-code information is matched and merged with the timing information when the runner has passed the finish line.

Sprinters

To make things for the Timing System a bit more challenging, therein parallel a Sprint challenge: a shorter course (1.6 km, 200 m steep) for kids, on the same track. The timing system needs to deal with this, accept runner registration while the race is ongoing and calculate the correct timing and ranking.

Sprinters on last meters

Sprinters on last meters

Presentation Ceremony

The timing system automatically matches the scanned numbers with the finish time and transmits the information to the speaker system and the data base for the ranking table. That way immediately after the last runner passes the finish line, after a quick consistency check, the presentation ceremony can be started:

Presentation Ceremony Live Musik

Presentation Ceremony

And here is a very special ‘Winner Picture’ in the class Women III:

Women III Category with Erika Kälin

Women III Category with Erika Kälin

Ranked as number 1 is Yvona Jenc, and ranked as number 3 is Andrea Rüttimann. But with the second rank is Erika Kälin who is nearly blind ❗ She is an incredible athlete. With her standing on the winners’ podium is her guide: She follows the guide on the race track, and has to have 100% confidence and trust in him. Very well done!

And finally: here are the Sprint Kids:

Sprinters at the Presentation Ceremony

Happy Sprinters at the Presentation Ceremony

And I’m happy too: The Timing System with the Tower modules has been developed with the new CodeWarrior for MCU10.3, and it was working perfectly. Time to prepare for the next running event in September…

Happy running 🙂

3 thoughts on “Sports Timing System in a Lunch Box

  1. Pingback: SMAC with Processor Expert | MCU on Eclipse

  2. Pingback: Tutorial: Thermal Printer, Part 1: Hardware Setup with FRDM Board | MCU on Eclipse

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.