Simple Sports Timer v1 – ElectroSchematics.com

In this post, I’m going to share the design for a simple sports timer. It is useful for measuring and/or verifying close finishes to track events or road races. This sport timer offers several advantages over a manual stopwatch and it employs a near-similar trick to the fully automatic time (FAT) system.

Fully Automatic Time (FAT) – WiKi Talk

Wikipedia says, fully automatic time (FAT) is a form of race timing in which the clock is automatically activated by the starting device, and the finish time is either automatically recorded, or timed by analysis of a photo finish. The system is commonly used in track and field as well as athletic performance testing, horse racing, dog racing, bicycle racing, rowing and auto racing (in these fields a photo finish is used). It is also used in competitive swimming, for which the swimmers themselves record a finish time by touching a touchpad at the end of a race… https://en.wikipedia.org/wiki/Fully_automatic_time

Simple Sports Timer – Hardware

Here’s the project details of my really compact and possibly useful simple sports timer centered on an Arduino Uno. Let’s start with its schematic diagram!

As you can see now, the key things you’ll need for this project are:

  • Arduino Uno R3 x1
  • OLED Display 128×64 I2C x 1

Of course, there are a few more essential parts, the role of which will be explained later.

Simple Sports Timer – Software

This is the Arduino Sketch for the simple sports timer v1.

[code]

#include

#include

#include

#include

Adafruit_SSD1306
display;

unsigned
long time;

unsigned
long timeStop;

unsigned
long startMs;

unsigned
long timeEnd;

float
seconds;

float
secondsStop;

int
buttonState = 0;

int
finishSensor = 0;

int
finishSensorStart = 0;

int
finishSensorStop = 0;

int start
= 0;

void
displayTime(float currentTime) {

display.clearDisplay();

display.setTextSize(2);

display.setTextColor(WHITE);

display.setCursor(0, 0);

display.print(currentTime); display.print(“
sec”);

display.display();

return;

}

void
setup() {

display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //OLED
I2C address 0x3C

display.clearDisplay();

pinMode(8, INPUT_PULLUP);

delay(1000);

displayTime(0.00);

}

void
loop() {

finishSensor = analogRead(0);

buttonState = digitalRead(8);

if (buttonState == LOW and start == 0) {

finishSensorStart = analogRead(0);

finishSensorStop = finishSensorStart *
0.5;// see note

start = 1;

startMs = millis();

}

if (start == 1 and timeEnd == 0) {

time = millis() – startMs;

seconds = (float) time / 1000;

displayTime(seconds);

}

if (finishSensor < finishSensorStop and
timeEnd == 0) {

while ( finishSensor < finishSensorStop )
{

finishSensor = analogRead(0);

time = millis() – startMs;

seconds = (float) time / 1000;

displayTime(seconds);

}

timeStop = millis() – startMs;

secondsStop = (float) time / 1000;

displayTime(secondsStop);

timeEnd = 1;

}

if (timeEnd == 1) {

displayTime(secondsStop);

}

}

[/code]

Simple Sports Timer – Start to Finish

So, we’re going to take a look at the full details of this simple sports timer project.

The pushbutton switch S1 (START/TRIGGER) in the schematic is actually a test button. In the real world, you need to connect the trigger switch contacts of a homemade/hacked starting pistol/starter gun in parallel to this normally-open momentary pushbutton switch.

Similarly, the photoresistor (LDR) is the finish line sensor. This photosensor must be constantly illuminated by a red laser beam (use any standard red laser diode/laser pointer as the light source). Here, the light sender (laser diode) and the receiver (photoresistor) are creating a light fence together. Don’t forget to install it right so that when someone crosses the finish line it breaks instantly. Note, the laser beam is used to make a virtual finish line. If anybody crosses the finish line, the beam can’t reach to the photosensor for a while. That’s it.

At this point, keep note that the 100KΩ multiturn trimpot (TM1) sets the light detection threshold of the photosensor. You can choose a 10KΩ fixed resistor instead, but the trimpot option is more useful than a fixed resistor, as it allows you to fine-tune your simple sports timer for various indoor and outdoor events. Also, remember to put the photosensor inside a narrow black tube so that only light from laser source would fall on it, thus making the system more authentic.

You must employ an appropriate battery pack to run your simple sports timer. The Arduino setup runs on external 9VDC, but something between 7.4 to 12V should be fine. I’ve used both a 2S LiPo battery pack and a 6F22 9V battery. It is best to use a separate power source for the laser beam transmitter part, but it is up to you.

When it comes to the code part, let me first admit that the maths behind this code is derived from another code snippet that’s once found on the web. Sorry, I don’t remember the link to the original source at this time, thanks to that unknown seasoned coder anyway!

In the code, millis() function is used for timing which returns the number of milliseconds since the setup began running the program. When the start button is triggered, it saves value of millis in a variable and also current value of the photosensor. The program then displays current time and constantly checks the value of the photosensor. If it drops below half of the value at the beginning, it registers that the finishing line is broken. Note that, the program waits for the photosensor to receive the laser beam again to stop the timer.

To put it simply, the trigger switch starts the sports timer, and the program begins to run, waiting for someone to break the virtual finish line, and the timer stops after the finish line got reversed.

I went for the bare minimum experimental setup, so, below you can only see my crude prototype realized with the help of an Arduino Prototyping Shield lying around. For keeping the laser beam directed, I used the laser beam on my infrared thermometer which I attached on an articulating arm. A quick-and-dirty one is far better than none at all, yeh?

Walking around with all the delicate components hanging loose is of course not a viable option, so some kind of electronics project enclosure is needed. There’re literally numberless prototype boxes available so you should be able to find one that fits. Needless to say, you’ve to drill holes for the switches and connectors, and make a window for the display panel. If you want to add an extra reset button, here’s a link for you https://www.programmingelectronics.com/how-to-use-an-external-reset-button-with-arduino/

Get Ahead…

That’s it, you now have a working sports timer! However, this is a hobby-level project realized with the help of an utterly simple hardware setup and a pretty luculent software. To make it like a commercial one, you will need to modify the basic concept extensively and it might need so many extensions. You can add a dedicated wireless starting gun that can be used with your enhanced sports timer. You may also want to add some kind of blinkers and beepers, etc. When you think about it, you’re probably inspired!

Leave a Comment