Coursework Background

Arduino Code

For the coursework part we were given the brief of:

An ultra-distance cross country running event is normally run over a distance of above 30 miles (50km). Runners navigate a long distance course over many hours. The runners have to record their arrival at multiple checkpoints … record and make timing data retrievable

Electronics Design

Drawing

For this, I knew that I needed to build a way to record when each user was going to reach a checkpoint so I used an RFID reader and some RFID tags to test.

I wired the circuit using the obvious resistors to stop me cooking my Arduino, I also wired up the NeoPixels to external power supply as the current required for them is way higher than what the Arduino can deliver (Arduino out: 0.9A whereas NeoPixels need up to 5.2A).

In the later designs I added a buzzer and a second LED which is triggered when a ‘success’ serial response is sent from the desktop app that the card has been read and recorded to give both visual and audio feedback to the user.

Software Design

Arduino:

Arduino Code In the earlier version of the software, there was no desktop app integration, the C# app was needed for saving through serial. The main roles of the built-in Arduino software are to handle the 7-segment display’s time, allowing the timer to be started, stopped or reset and if a card is present, passing the value of it to the desktop app.

The desktop app will send a message received in terms of a number saying the checkpoint and the Arduino will then flash an LED and play a sound of that frequency to give audio feedback that the card has been read.

C# App:

C# Code I chose C# for the desktop app because of the nice I/O libraries it has, allowing me to build a functional prototype more easily.

The role of the desktop application is information retrieval and persistence, recording when a card has been presented and the hex value it stores, working out what checkpoint the athlete is at and then storing it into an object and returning the current position to serial output for the Arduino to process.

The desktop app allows cards to be mapped to people which is useful for at the start of the race, also allowing the race coordinators to persist data and export it to CSV so it can be processed later on.

Concluding

I really enjoyed this project, being my favourite project this year in my University course because of the freedom to scope out and create a working product with both hardware and software, it’s a really fun and interesting experience.

I’m happy with the product that I created within the limited timeframe, but if I had built this for deployment, I would either use ESP8266 modules to communicate back race positions over MQTT which would scale for more devices better.

Final Product

You can see a video of the finished product below: