Data corrupted

Hi Support Team,

I have a question on data collection. We are using Openlog Artemis (DEV-16832) with firmware 1.9 to collect the data and write the data to micro SD cards.

When we have collected the data for about 10 days, we observe the following files existing in the SD card files, and it occurs on 4 boards we are using (shown in the screenshots):

The size of the file is exactly 4 GB, but we are using a SanDisk Ultra 16GB SD card to collect data. So why is this happening? How to avoid it from happening again? Thanks for your time and help!

Best,

Yao

Is it always 4gb?

Maybe try setting a lower max size by setting option 10 in ‘Configure Terminal Output’

Hello Yao (@wqrydqk ),

This is a strange issue. I wrote and tested a lot of the code for OpenLog Artemis. I do not remember seeing this issue before. I do not remember any other customers reporting this same issue.

To help us diagnose the issue:

  • Please tell us how the OLA is powered
  • Please tell us which sensor(s) you have connected
  • Please tell us about the logging settings: is the OLA logging continuously, or are you using a ‘trigger’ for each measurement
  • What is the logging interval? Is the OLA going into deep sleep between measurements?
  • Please post a photo of one of your OLAs - when connected to power and sensors
  • If possible, please upload the two settings (configuration) files from the SD card

Thank you,
Paul

Hi Paul,

I checked the OLA, and here is the additional info I can provide:

  1. The OLA is powered by a 500mAh 3.7V Lithium Polymer ion Battery, and here is the image showing how the battery is connected to the board:

  2. We do not connect any other sensors to the board, just using the IMU to collect the data in SD card.

  3. I think we do not trigger anything, just let IMU log data continuously, but one thing we did is we use RTC to control fast-slow logging. What we did is we use fast logging from 7 AM to 10 PM and use slow logging for the rest of the time. The interval for slow logging is set to be 1800s. We set it because we are more interested in the daytime data, thus avoiding data files from nighttime accumulating on the SD card.

  4. The logging interval for IMU fast logging is set to be 20ms.

  5. See the attached image.

  6. The setting files are also attached. Note that the OLA_deviceSettings.txt is 0KB, so we do not upload it.

OLA_settings.txt (1.3 KB)

These are the additional pieces of information we can provide. Please let me know if anything else is needed. Thank you for your time.

Best regards,

Yao

Hi Yao (@wqrydqk ),

Thank you for the reply. That is very helpful.

It looks like the 4GB files are all being created during the night? During slow logging?

The Artemis processor will be going into deep sleep, waking every 30 minutes to log data. Perhaps something goes wrong during the wake process? The firmware will wake, read the IMU, write the data to SD card, and go back to sleep. It looks like the write never completes, and the firmware keeps writing data until it hits a 4GB file size limit. That 4GB limit is probably set by SdFat, the library we use to write data to the SD Card.

I am not sure what to suggest. I have not seen this issue before. I am really not sure how to prevent or correct it.

It may be possible to modify the firmware to detect when the write is taking too long and stop it. Something is going wrong during this part of the code, probably during the SD write. It may help to increase the delays while the SD card powers up. The first thing I would try would be to replace this line of code with:

for (int i = 0; i < 250; i++) // Always wait 250ms

Do you have the time and skills to modify and compile the firmware and upload it to the OLA?

Thank you,
Paul