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

nRF51 - time of flight / distance

I'm interested in creating a time of flight algorithm and am trying to calculate what to expect for accuracy.

Is it possible to get an IRQ from when the sync arrives at the RX modem? If so, how deterministic is the timing of the RX modem? Can this IRQ trigger a timer? Can this timer save information using DMA?

Thanks!

Parents
  • As far as I can see from the reference manual the earliest EVENT you could set up would be for an address match (in BLE address format). And afaik you should be able to capture the timing of that with the PPI and the TIMER peripherals. However, consider that even if you were able to resolve down to a single on-air symbol (unlikely) at 2MHz (500ns), your distance resolution at the speed of light would be ~150m, best case!

    (Note that radio TOF distance measurement for small distances is only really done with "spread spectrum" transceivers which use individual pulses which can be timed to sub-symbol resolution, with considerable in-silicon effort)

  • That's an interesting question (and might be best to just try it out, I'd be curious to know what you find!). However since the clocks on both devices are 16MHz it would not surprise me if you ended up with the same measured end-to-end delay each time (or needed to wait a long time for the clocks to desynchronise). In other words, in order to be able to measure the distance with higher resolution by averaging, you need the timing jitter to be >= 1 clock cycle, with a known distribution.

Reply
  • That's an interesting question (and might be best to just try it out, I'd be curious to know what you find!). However since the clocks on both devices are 16MHz it would not surprise me if you ended up with the same measured end-to-end delay each time (or needed to wait a long time for the clocks to desynchronise). In other words, in order to be able to measure the distance with higher resolution by averaging, you need the timing jitter to be >= 1 clock cycle, with a known distribution.

Children
No Data
Related