k12adminguy
Posts: 2
Joined: Mon Apr 29, 2019 7:10 pm

Sprint Timer

Mon Apr 29, 2019 7:12 pm

I am looking to build a timer for the 40yrd dash for my high school. What would be the best sensors to use for that and what do you think would be the best way to connect the two sensors.

Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: Sprint Timer

Tue Apr 30, 2019 8:55 am

Hello K12adminguy

You can use ultrasonic eg: if a person passes near the ultrasonic the distance reading changes so you can say that a person passed.
and optionally you can use a 7 segment display to display the time, or even better a computer monitor.

scotty101
Posts: 3649
Joined: Fri Jun 08, 2012 6:03 pm

Re: Sprint Timer

Tue Apr 30, 2019 9:16 am

Icosagon wrote:
Tue Apr 30, 2019 8:55 am
You can use ultrasonic eg: if a person passes near the ultrasonic the distance reading changes so you can say that a person passed.
and optionally you can use a 7 segment display to display the time, or even better a computer monitor.
I doubt that an ultrasonic sensor would have the accuracy or speed for this task. I'd consider a low power laser and a light sensor instead, when the laser beams path is broken on its route to the light sensor, a person has crossed the line.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Andyroo
Posts: 3776
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Sprint Timer

Tue Apr 30, 2019 10:19 am

Ultrasonic will spread and has a few problems outdoors due to wind of all things. You can actually measure wind speed / direction with them :o

I would also go laser / light sensor but add a small camera as well for that ‘photo finish’ effect.

You could try https://projects.raspberrypi.org/en/pro ... r-tripwire as a starting point?
Need Pi spray - these things are breeding in my house...

hippy
Posts: 5593
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Sprint Timer

Tue Apr 30, 2019 1:04 pm

scotty101 wrote:
Tue Apr 30, 2019 9:16 am
I'd consider a low power laser and a light sensor instead, when the laser beams path is broken on its route to the light sensor, a person has crossed the line.
A break-beam would seem the best option. Or perhaps something which creates multiple break-beams, a wall of beams if one will.

If there's only a single break-beam the winner may pass or dive under it and not trigger it. On the other hand, single or wall, the beam may be broken before the line has been crossed.

The problem comes in how one defines 'crossing the line'. If it's the point an athlete's torso crosses the line as opposed to head, hand, foot, arm or leg, then how does one distinguish one from the other ?

For amateur and fun competition it probably really doesn't matter, but in more professional situations it can and will.

That we have 'photo finishes' is probably a good hint as to how it's best done.
Andyroo wrote:
Tue Apr 30, 2019 10:19 am
You could try https://projects.raspberrypi.org/en/pro ... r-tripwire as a starting point?
I would suggest a photo-transistor rather than an LDR as it will have a faster response. Again, probably not so much a requirement when it's just for fun.

User avatar
HermannSW
Posts: 1312
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Sprint Timer

Tue Apr 30, 2019 8:48 pm

hippy wrote:
Tue Apr 30, 2019 1:04 pm
The problem comes in how one defines 'crossing the line'. If it's the point an athlete's torso crosses the line as opposed to head, hand, foot, arm or leg, then how does one distinguish one from the other ?
I would say that regardless what first passes the line (foot, head, ...) that needs to be measured.

That is the reason why a single laser cannot be the solution.
You would need a dense net of laser beams as shown in bank or museum robbery movies.

I would use v2 camera placed on one side of the finish line with center of FoV direted along the finish line.
Then take a video with raspivid/raspiraw and high framerate.
It depends on the measurement resolution on what you can take.
If measuring resolution 1/100th second is needed, use raspivid with mode 7 and "--fps 100".
If measuring resolution 1/1000th second is needed, use raspivid 640x75 tool that captures at 1007fps
(v2 folder of code drop):
viewtopic.php?f=43&t=213482&p=1320044#p1320044
I would turn the camera so that 75 is horizontal and 640 is vertical.
640x75@1007fps can be stored and analyzed later, or during capturing as described in this posting:
"Re: raspiraw raw bayer data: how to use in callbacks for feature extraction and robot control"
viewtopic.php?t=189661#p1231151


P.S:
I am working on making v1 camera take global shutter videos by global reset and cutting very bright light after few microseconds. Alternatively I have an Arducam ov7251 global shutter camera.
I did take videos with very sharp propeller blade moving at blade tip with 125m/s rotational speed.
Later I will take sharp videos of a flying bullet, this posting explains how a first Pi with camera will monitor on when bullet leaves rifle, and trigger a second Pi with camera to capture bullet frame exactly at the right time (bullet flies with eg. 375m/s, that is 0.375mm/µs):
viewtopic.php?t=234416#p1436830


P.P.S:
640x75 tool creates a microsecond precision timestamp for each and every frame captured, no assumptions needed wrt at which time a frame was captured.


P.P.P.S:
This is a sample 640x75 tool generated animated .gif, the mouse trap closes in 0.01s, which results in seeing the mouse trap bar in closing phase on 10 frames of the video captured at 1007fps:
Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

blimpyway
Posts: 120
Joined: Mon Mar 19, 2018 1:18 pm

Re: Sprint Timer

Thu May 02, 2019 10:49 am

A human can't radically change its speed in 33ms, specially if it is close to its maximum.
Even at 30fps, by analysing a couple frames before and after finish line, one (program or human) can accurately compute average acceleration, speed and moment of passing past the line of a moving object.

Yet even then, the result could be controversial https://qz.com/759267/this-is-a-totally ... -in-track/

-------------

Camera placed high above, looking down the finish line, covering all lanes in the width of the frame.

hippy
Posts: 5593
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Sprint Timer

Thu May 02, 2019 11:06 am

HermannSW wrote:
Tue Apr 30, 2019 8:48 pm
I would say that regardless what first passes the line (foot, head, ...) that needs to be measured.
It actually comes down to the rules of the sport and the context in which that sport is occurring.

In professional competition it's extremely important to get it right. Less so in other cases.

Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: Sprint Timer

Fri May 03, 2019 5:42 am

Hello

As Scotty said, Laser is good . Place laser on one side and ldr on the other.

k12adminguy
Posts: 2
Joined: Mon Apr 29, 2019 7:10 pm

Re: Sprint Timer

Fri May 17, 2019 5:21 pm

If I use a photo resistor, to detect the beam break on the finish end, what is the best way to attach to the gpio. The distant would be at least 120 feet.

I would have a start laser and resistor and a finish laser and resistor.

User avatar
HermannSW
Posts: 1312
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Sprint Timer

Tue May 21, 2019 10:11 am

Instead of using a photo resistor and doing the necessary processing I use cheap laser sensor, which gives 0/1 signal. That can be connected to any GPIO pin:
https://www.aliexpress.com/item/32732351824.html

40m cables should not be a problem for such a GND/OUT/VCC sensor.
If you don't like long cables, use a Pi0W on one and and another Pi with wireless on the other side, each connecting one led laser and one laser sensor. Time synchronization via NTP should be good enough.

P.S:
I once used laser against 7m distant mirror refecting back to laser sensor besides the laser led and it works fine. That way you don't need cables across the running course for the laser led. You can of course power laser led from battery/lipo and don't need a connection to Pi in that case.
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Return to “Automation, sensing and robotics”