This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

synchronized stop watch application

Hello,

I am rather new to BLE and the NRF5x.

I want to build the following application: a swim timing sytem. The system consists of master timer with a high precision RTC. Then there are 19 nodes which register external GPIO (basically a button push). one acts as a starter, the other 18 are act as stop buttons operated by humans.

The basic idea is that each node records the time when the button is pushed, and this can later be read out by a Android phone or tablet. One issue is to keep the clocks in each of the nodes synchronized down to < 5 ms.

Can this be done with 20x 51822 modules?

I assume the readout of the button time can be achieved with GATT, but what protocol would be appropriate for the clock synchonization? Can one of the nodes send out a broadcast every few seconds, and can the other nodes pick up this signal with a reasonably accurate timestamp to generate an offset to the internal RTC?

Any pointers will be appreciated.

  • Hi Martin I was making big progress over the last few days.

    for the Time master broadcast, I tried using the radio notification feature which will give me a callback a few hundred milliseconds before a transmission occurs, and then I modify the advertising data to include a current time stamp. This seemed to work, even though I have not yet measured the latency on this just yet. I just wanted to confirm that this is the correct approach? I also noticed that the radio even seems to occur more often than the advertising interval would suggest. I am not entirely sure what is causing this, maybe the softdevice is responding to some external requests. Maybe you can give me some hints as to how to disable that

    secondly, I got my GATT server with notifications working using MBED, but now I would like to also use the broadcast observer at the same time and I want to port this to Keil and softdevice. However I could not really find a suitable example in the sdk. Which one would you recommend?

    It also seems that the links to the totorials in devzone are broken after the site migration which complicates matters at this moment

    Johannes

  • Hi. Sorry for the late response. I have been out of office for a while.

    Johannes said:
    I just wanted to confirm that this is the correct approach?

    I think this is a reasonable approach.

    Johannes said:
    I am not entirely sure what is causing this, maybe the softdevice is responding to some external requests.

    You might get notifications both before and after radio events. Here is more info about the events and timings: Radio Notification.

    Johannes said:
    However I could not really find a suitable example in the sdk.

    Maybe the Experimental: BLE Relay Example? It is probably a bit more advanced than what you need, but at least it shows you how can scan for device and while acting as a peripheral concurrently. 

    Johannes said:
    links to the totorials in devzone are broken

    I'm not sure where they are located now actually, but you can search for tutorials in the search box. Here is a particularly relevant tutorial: Radio Notification

Related