Weird symbols at the end of files written on SD card

When I tested the function of writing OpenBCI data to the SD card, I met some following issues

1. The .txt files I received always have weird symbols like "up-side down hat" added to their end
2. There is no footer written at their end as shown in the documentation

Has anyone had these issues so far?

3. When I increased the sampling rate of the board to 1000Hz, I expected that the data should be written to the SD card faster than transferred via bluetooth connection and written to the PC. However, when I compared these two files (one written to the SD card and one written on the PC), they have the same number of samples recorded. It meant that the writing speed cannot be fast even though the data was written to the SD card.

Is it possible to increase the writing speed of the board to the SD card (in case of 1000Hz sampling rate) if it runs the modified firmware of writing to the SD card only provided on Github?

Has anyone tried it?

In my test, I used the SanDisk Ultra 64Gb microSDXC class 10 formatted in FAT32.

Comments

  • yjyj France , Bordeaux
    hello Ntlanh,

    @ntland,

    1) the files that you receive by bluetooth or from the SD card ?

    2) On the SD card the Footer is written in the last  block of 512 octes,  which is filled with zeros.

    3) When you choose a "record duration" in fact the soft chooses a number of block, not a duration... So the files that tou receive has always the same size independently of the sample rate...  At least on the SD card...

       Yannick.
  • Hi Yannick @yj,

    1. The files were from the SD card (in form of hex value)

    3. When mentioning the sampling rate, I actually concern on the writing speed because it has very slow writing speed (need approximately 1 minutes to write some seconds of data at 16kHz).

    Would you have tried to check how long it took you to write one-second data at 2kHz to the SD card? Because I also wonder how we could know if the amount of the data we need is written sufficiently to the SD card so that we can stop its writing process. So far I haven't seen any signal to recognize it.

    Thanks.
  • yjyj France , Bordeaux
    @ntlanh,

    To write one-second data , at 250Hz or 2kHz ,   it takes one second. (Joke).

    When you choose to record at 250Hz for 5 minutes you record 11000 blocks...
    at 2k of coarse it will take about 5'/8  or 300 secondes / 8 ... to get these 11000 blocks

    Find this define in the soft :
    #define BLOCK_5MIN    11000

      Yannick.
  • Hi Yannick @yj,

    Does you mean that ... it always takes approximately 5 minutes to write 11.000 blocks without any concern on the sampling rate of @250Hz or @2kHz?

    How is a "BLOCK" defined here?

    Thanks.
  • yjyj France , Bordeaux
    @ntlanh,

    no, no.

    5 minutes corresponds to 11.000 blocks at 250 Hz.
    That should do   37.5"   at 2k Hz.

    at 2k Hz it is 8 time faster and shorter. to acquire these 11.000 blocks

    A block = 512 octe,

    in the 5mn_file you should find about :

    5x60x250 lines of 75 chars  (if you uses accel and auxilary data, else less),

    5x60x250x75 == 11000x512

      Yannick.

  • Hi Yannick @yj,

    Based on your calculation, I understand that "8 times faster and shorter @ 2kHz" is related to the speed of having available data but not the speed of writing the data from the Board to the SD card. Please correct me if I still misunderstand.

    In one of your discussion of sample rate, biomurph said that "The 32bit board runs it's internal clock at 50MHz. It writes to the SD card at 20MHz." If possible, could you explain how we could calculate the max. sampling rate of the board as well as the speed of write raw data (I guess ... binary) to the SD card using the specific given values?

    Thanks.
  • yjyj France , Bordeaux
    @ntlanh

    Do not worry Anh,   8 times faster and shorter @ 2kHz,      is well related to "the speed of writing the data from the Board to the SD card."

      Yannick.

  • @yj

    Thanks so much, Yannick, for your promising conclusion :) I am excited to upload your firmware to my board, that I hope I will receive soon!
Sign In or Register to comment.