0

i have a little project i am working on in which i need to measure the time difference between several raspberry pi modules in the matter of nano seconds. my question is what timing mechanism can provide me this type of difference measurement ability, other than GPS clocking system (which i am trying to avoid). among the options i am familiar with:

  1. PTP sync
  2. Linux time from epoch, in nano-Seconds
  3. GPS- trying to avoid if possible

other suggestions are welcome

Maor Agai
  • 9
  • 1
  • 2
    Since your code run in an operating system, you will probably not need that accuracy, you have to take in consideration the time you mark your packet to send to network is not really the exact time the packet was sent (it just means that it was queud that moment) same thing for recieving packets, in my opinion peer to peer sync is enough if your are in same network – phoenixstudio Nov 10 '20 at 15:14
  • the sensor's task is to grab a sample and send it to a server packed with an acuurate timestamp (ns) of the sample, the question is if the timestemp provided by the linux system from epoch (in nano) is sufficient or should i use the PTP (precision time protocol) in my system – Maor Agai Nov 10 '20 at 15:21
  • 2
    where the time is generated ? and did you write the code that caputre the data from the sensor ...., I am not pointing to what you should use, but I asking you did you consider these facts (delay caused by os, capturing ...) - delay is random, and it has jitter. – phoenixstudio Nov 10 '20 at 15:26
  • currently the sampling code is written in python (which is terrible for precise measurements so i mght be switching to cython or C in the future) but im in a realy experimental level so im assuming the timestamp-sample delay to be deterministic in all sensors. the time im counting on is the raspbery pi's clock, unless i misunderstood your question. im pretty new to embedded systems and really used to FPGA enviorment so this whole thing is new to me – Maor Agai Nov 10 '20 at 15:33
  • 1
    *"measure the time difference between several raspberry pi modules in the matter of nano seconds"* -- There is no cheap method to acquire and maintain time synchronization between two or more RPis at that resolution. *"im assuming the timestamp-sample delay to be deterministic in all sensors"* -- Faulty assumption, unless you're using a RTOS, the delay will be variable and unpredictable. – sawdust Nov 10 '20 at 19:40
  • first of all, the whole purpose of the system is to be able to calculate the time difference of arraivale of a signal to two and more sensors. "There is no cheap method to acquire and maintain time synchronization between two or more RPis at that resolution." what about syncronizing them in a less frequent mannerand by that i mean creating a syncronization procedure once an hour/two hours etc. currently the system contains more software which depends on the linux system so i will have to deal with that constraint and figure out a way to maintain "the best" syncronization mecanism i can get – Maor Agai Nov 10 '20 at 22:58
  • It's impossible in GPOS (General Purpose OS). – 0andriy Nov 12 '20 at 11:17

0 Answers0