timestamp vs sample id vs sampling rate

Hi! I use GUI to write down raw data. This data has timestamp, so i aggregate it in seconds and count number of samples in each second. 
It looks like that:
image
so 80% of seconds contain 240/241 samples, and others are narrow distributed, up to 370 samples per second.
So, 
1. How sample rate 250Hz corresponds with 240 samples per real second, according to raw data?
2. What are these seconds with 370 samples?
3. What is sample ID (which varies from 0 to 255)? i though that it is number of sample within second, but it isn't

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Poddubny, hi.

    Interesting graph. I notice that if you draw an imaginary horizontal line at the Y = 300 location, that there appears to be a reflected dot pattern above and below that horizontal line. Any ideas what could cause something like that?

    The sample rate is a constant 250 hz, or close to that. The Cyton sample clock is not crystal controlled, so sample rate can drift very slightly above or below 250 hz.

    So the sample rate is very close to constant, whereas the arrival time of the data packets at the laptop operating system can vary considerably, based on load, IO delays, buffering, serial port delays, etc.

    I assume you have done the OS settings to ensure your Cyton serial port is responding with minimal latency.

    So in summary, you can ignore the arrival times, just assume your samples are spaced at 250 hz, 4 ms per sample.

    Regards,

    William

  • edited August 2018
    thanks for answer! It's really strange symmetry you mentioned, absolutely no idea why! 
    I changed batteries in headset (as it stopped sending data at some point) AND changed notebook device at same time 
    and real sampling rate became just ok, about 250 hz.. so i think my issue was about OS settings, as you mentioned
    Btw, what is the nature of ID values? It varies from 0-255, but it's about 250 in each second, with some numbers missing
  • I have same problem also. I have changed batteries, changed notebooks and updated newely firmware of board and radios but problem is present. Does anybody now root of problem?
  • wjcroftwjcroft Mount Shasta, CA
    Hi grimdragon, you say, "I have the same problem also", but give no specifics. What are you referring to? Have you adjusted your OS latency settings for the FTDI serial port?

    Regards,

    William

  • Hi wjcroft , thanks. My problem was like in poddubny message : 80% of seconds contain 240/241 samples, and others are narrow distributed, up to 370 samples per second.  I have changed OS latency settings for the FTDI serial port from 16 to 1:
    "HKLM\SYSTEM\CurrentControlSet\Enum\FTDIBUS\VID_0403+PID_6015+DB009NA3A\0000\Device Parameters" "LatencyTimer".
    After that real sampling rate became ok, about 250 hz.


Sign In or Register to comment.