jaska120
Posts: 6
Joined: Tue Jun 24, 2014 3:36 pm

Timing system with RPi

Tue Jun 24, 2014 4:18 pm

Hello!

I am new to this forum but since I half a year ago bought Raspberry Pi, I have been into making nice projects with it.

I am an alpine skier and what I would next like to try out is a timing system. Basically when you are starting your round you are going trough a start gate. That time time starts to run and when you are at the end going through a finish line - time stops.

What I want to do is add some split times to help developing skiing. With split times you can calculate your avg. speed between gates and that helps you to show how much you are losing speed and slowing down for example when you are making a mistake during your round.

Idea is pretty simple:

1. Opening start gate should send start signal to RPi and time starts to run.

2. When you are hitting a gate which has shock sensor in it a transmitter will send a split signal to RPi to show split time. (For example from start to 5. gate)

3. There can be many splits (up to 60) which are then showing your time for example between gates 2-3 or 5-8.

4. When going through a finish line (IR-ray or some alternative laser), the finish component should send a stop signal to RPi.

5. RPi will then show skier's time and split times. More developed in the future you could transfer all the data from RPi to computer and build some paragraphs to combine results from all the skiers and probably synchronize those paragraphs with taken video.

Image

1) I would like to know which transmitters and receivers should I use because the range should be up to 2KMs.

2) I will need some help with coding because I am amateur with that. Right now it is more important to make all hardwares to work together and then after start to think about coding.

Thanks,
Jaska

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Timing system with RPi

Tue Jun 24, 2014 5:30 pm

Hi Jaska,
jaska120 wrote:I would like to know which transmitters and receivers should I use because the range should be up to 2KMs.
Longer range requires (also) more power... in each gate. Reconsider taking another approach, two of them could be better:

a) you implement communication between gates (eg. when gate #3 is "hit", it passes ID & timestamp to gate #4, which then passes this data to gate #5, ... and the last gate passes this data to RasPi. (Of course, the communication could be optimized to collect more timestamps in one data packet...). This one could be selected when you need "real time" data.

b) skier carries a receiver (collector of data), so when he/she passes gate #3, this gate transmits ID signal to this receiver... etc. Therefore, the skier collects the data along the path... This one is very power efficient, because the range required is minimal, since the event always happens where the skier is. ;-)
jaska120 wrote:I will need some help with coding because I am amateur with that.
We're used to this... On a daily basis, you can read here messages where people would like to "implement" something, but they're unable even to make a WBS... :roll:


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Timing system with RPi

Tue Jun 24, 2014 6:25 pm

FLYFISH TECHNOLOGIES wrote:b) skier carries a receiver (collector of data), so when he/she passes gate #3, this gate transmits ID signal to this receiver... etc. Therefore, the skier collects the data along the path... This one is very power efficient, because the range required is minimal, since the event always happens where the skier is. ;-)
I guess (if the receiver in the skier's backpack has sufficient sensitivity) you could simply have each 'gate' be a simple RFID tag? I.e. completely passive, no power-supply needed for each gate.

jaska120
Posts: 6
Joined: Tue Jun 24, 2014 3:36 pm

Re: Timing system with RPi

Wed Jun 25, 2014 7:43 pm

FLYFISH TECHNOLOGIES wrote: a) you implement communication between gates (eg. when gate #3 is "hit", it passes ID & timestamp to gate #4, which then passes this data to gate #5, ... and the last gate passes this data to RasPi. (Of course, the communication could be optimized to collect more timestamps in one data packet...). This one could be selected when you need "real time" data.
This sounds good because less range to send data. BUT how can I make it work when skier fails to hit a gate and a gate will not send timestamp and ID to next split time?
FLYFISH TECHNOLOGIES wrote: b) skier carries a receiver (collector of data), so when he/she passes gate #3, this gate transmits ID signal to this receiver... etc. Therefore, the skier collects the data along the path... This one is very power efficient, because the range required is minimal, since the event always happens where the skier is.
I think this second option sounds better if no solution for the problem mentioned above. In this case there is a problem if all (eg. 5 skiers) have their own receiver, how to specify to which receiver gate should send timestamp if there are another skiers nearby eg. in start.
Receiver should also be pretty small for example skier should be able to mount it back to helmet to goggles. Skiing with backpack is not really good thing when in downhill speed can be around 100-140km/h.
FLYFISH TECHNOLOGIES wrote: We're used to this... On a daily basis, you can read here messages where people would like to "implement" something, but they're unable even to make a WBS...
On this stage I am first looking for solutions how this is smartest way to be done and when I find the golden line for this then I will make more accurate WBS.

Sincerely waiting replies,
Jaska

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Timing system with RPi

Wed Jun 25, 2014 8:37 pm

Hi,
jaska120 wrote:
FLYFISH TECHNOLOGIES wrote: a) you implement communication between gates
how can I make it work when skier fails to hit a gate and a gate will not send timestamp and ID to next split time?
If the skier fails to hit gate #7, you'll not have a timestamp from this gate.
To enable the same gate #7 to forward data from previous gates also when they are not hit, you implement timeout counter mechanism.
jaska120 wrote:
FLYFISH TECHNOLOGIES wrote:b) skier carries a receiver (collector of data)
In this case there is a problem if all (eg. 5 skiers) have their own receiver, how to specify to which receiver gate should send timestamp if there are another skiers nearby eg. in start.
Several solutions exist, for example - you enable the receiver just before its holder starts the run.
The simple option is that the receiver has a "start" button. Or, a fancy option for spectators is to have a starter, who triggers next competitor's receiver by selecting this receiver's ID on one another box (or on his/her mobile phone).

My preferred option is to implement the following simple logic in the receiver which solves this easily (pseudo function when ID packet is received):
- if the signal is from start gates then erase all records and enable write
- if write is enabled and the received gate ID record doesn't exist then add it
- if the signal is from the finish gates then disable write

This is just a principle... various cases are not covered... but you haven't asked about them. ;-)
jaska120 wrote:Receiver should also be pretty small for example skier should be able to mount it back to helmet to goggles.
... or at the back side of the leg, just above the ski boot edge (similarly where biathlon athletes have ID tags on top level events).


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

jaska120
Posts: 6
Joined: Tue Jun 24, 2014 3:36 pm

Re: Timing system with RPi

Wed Nov 05, 2014 8:29 am

After thinking a while I changed the way this project should work. I can give more precise information later if needed (right now I am writing with my smartphone).

Now Raspberry Pi should be able to read GPIO pins where signals are coming from VHF-radiophone (since I owned pair of radios already, I decided first to change tactics).

Which components should I use in following examples:

1) when ir beam is "cutted" component should make audio signal to radiophone microphone input

2) when reciever radio gets signal it should convert it from radio's headphone output so GPIO pin should be able to read voltage change

If possible, could somebody provide links for products what could accomplish these things.

Thanks,
Jaska

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Timing system with RPi

Wed Nov 05, 2014 11:41 pm

Hi,
jaska120 wrote:Which components should I use in following examples:
This approach is improper (if you'd like to have a 'serious' system)..
The main problem with it is that you have problems to define a moment when the event has occurred -> your accuracy is poor. Nowadays, dedicated radio transmitters used in such systems have internal reference clock and instead of sending a 'beep' signal, they transmit timestamp data. (Several months ago I played with one and it repeats this timestamp transmission 3 times, to increase the system reliability.)
On the receiver side the received timestamp is used in simple diff algorithm, so you have proper accuracy assured for all events.

I'd like to underline that you could try this approach (you can implement it around MT8880 chip) and this would be a perfect learning experience... just don't expect to get a solution with sufficient semi-profi characteristics...


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

jaska120
Posts: 6
Joined: Tue Jun 24, 2014 3:36 pm

Re: Timing system with RPi

Thu Nov 06, 2014 9:24 pm

Ivan what do you think how precise solution with mt8880 chip is? Is the problem more with if radios fails to send and/or reviece signal or that timelag is too high?

If so, I should propably then aproach with timestamp system. I understand basic circuit with internal clock to save the timestamps, but what kind of radios should I then use for sending timestamp packages?

Thanks, Jaakko

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Timing system with RPi

Fri Nov 07, 2014 12:44 am

Hi,
jaska120 wrote:Ivan what do you think how precise solution with mt8880 chip is?
Depends also on your VHF radio (how "quickly" their receiver "settles up", what is the treshold/squelch setting, etc.).

I'm quite sure that you cannot promote such a system having a 1/100s precision, maybe 1/10s is something what could be achieved & expected...
jaska120 wrote:If so, I should propably then aproach with timestamp system. I understand basic circuit with internal clock to save the timestamps, but what kind of radios should I then use for sending timestamp packages?
What is expected range ?
For a commercial product (at least check its specification) you should visit MicroGate page (company from Italy). Their solution works well, used in all kind of environments over the last few years...


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

User avatar
aTao
Posts: 1089
Joined: Wed Dec 12, 2012 10:41 am
Location: Howlin Eigg

Re: Timing system with RPi

Fri Nov 07, 2014 1:05 am

There are 2 distinct stages to this project, first is measurement, the second communication.

Measurement consists of time and identity. Gates with realtime clock and RFID to id the skier will do this. The gates should report everything: triggers and RFID proximity.
Communication over 2km is best done with directional aerials, not suitable for positioning on a ski course, so the gates will need to transmit the data to a track-side repeater. It may be possible to have several gates connecting to 1 repeater (think WiFi with 1 local omni aerial and 1 highly directional)
All communication should be TCP/IP, and there is no reason not to do this since bandwidth is very low., and every reason to do this since lost packets will be re-requested.
All data analysis should be performed at one place (probably the finish area).
Possible errors will be false or failed triggering of the gate and missing id (RFID not managing to connect), however there is plenty of time to decide what to do with this before the skier reaches the finish (the system could predict a sensible expected time and decide which of the error cases is most likely)
>)))'><'(((<

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Timing system with RPi

Fri Nov 07, 2014 6:09 pm

Hi,
aTao wrote:Gates with realtime clock and RFID to id the skier will do this.
I don't think gates with generic RFID are feasible (ok, you could make them, but they would be useless). If you think about RFID gates, the RFID system would need to have active tags...
aTao wrote:(think WiFi with 1 local omni aerial and 1 highly directional)
I'd not go into this direction where TCP/IP is involved on the RF side....


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

jaska120
Posts: 6
Joined: Tue Jun 24, 2014 3:36 pm

Re: Timing system with RPi

Fri Nov 07, 2014 7:19 pm

What is expected range ?
For a commercial product (at least check its specification) you should visit MicroGate page (company from Italy). Their solution works well, used in all kind of environments over the last few years...
I have tried MicroGate and Brower timing systems but their reliably is not too good in most cases. If it is, for example, very foggy weather, timing system fails many time to send signals. Probably I shouldn't go with normal DTMF-tones from signal since timing accuracy should be 1/100s...

My goal is to build pretty cheap and almost 100% working timing system. After thinking again while, to achieve this the best solution is to use internal clocks and timestamps.

Thinking about an option that there are only start, one or two splits (ir-beams) and a finish line and all the components connects with a timing monitor with range up to 1-2kms are there any cheap radios to send timestamp datas?

Considering about an option where there can be plenty split times built in to different gates and skier receives (with a correct component) timestamp datas live after hitting gates, which kind of radios (as small as possible) should I be able to use on this situation? Anyway the range to send the timestamps in this kind of situation is less than 50m. What is the reliability to this kind of system?

Jaska

Return to “Other projects”