datalogging sampling frequency bottleneck

Discussion in 'Embedded Systems and Microcontrollers' started by Skyland, Nov 25, 2014.

  1. Skyland

    Thread Starter New Member

    Jul 1, 2014
    My datalogging system which consits of the Flora, RTC, SD card breakout board, LSM9DS0 sensor is shown in the picture below; 12.26.56.jpg?dl=0

    The sampling rate/s is capped at 30 when writing into the sd card. If I disable the sensor and only save the time it goes up to 65. Writing into the serial interface rather than the sd card makes the rate goes up even higher at 127. for my application I need at least 100 samples/s. I am thinking the sd card is the problem after making the tests mentioned. The flora clock at 16Mhz is surely able to provide a higher sampling frequency. After checking the sensor datasheet and library I haven't found any limitation either. any input on this issue?
  2. Papabravo


    Feb 24, 2006
    There is missing information. Your requirement is in samples per second; that is one dimension. Now we need to know how much data is in each sample; that is the other dimension. The problem of what to do with the data hast two parts. Part 1 is the size of the 'store', and part 2 is the throughput of the 'pipe'.

    16 MHz is not an especially fast clock frequency theses days, and 100 samples per second seems like a reasonable figure. If you want maximum performance you'll have to give up the convenience of application construction for bare metal assembly language programming.
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Some thoughts:

    Can you save a full seconds worth of data and write it in less time then saving 100 different times?

    Can you walk and chew gum at the same time, meaning can you sample on an interrupt event while saving data on your main thread?

    If both are true you can thank me. <grin>