I am designing the next PCB of a device which connects and sends data to a mobile application over BLE.
I want to add a feature which saves data onto the device when the device is not connected to the app.
Would you recommend saving data into the internal flash of the processor (I am using the SAM D21 w/ Arduino) or saving it to an onboard SPI flash chip such as the W25Q80DV. What is more efficient, saves battery, and is better practice in industry?
how much data and how often?
I have seen EEPROMs or flash burned out after a few months when a specification was changed from saving data every few months to every few minutes
if I am storing system configuration information which may updated every few months I use EEPROM or simulated EEPROM in flash
otheewise FRAM or for large volumes of data SD cards or USB drive
it seems that the raspberry pi burns out SD cards after some months in operation.
wear leveling is needed to prolong SD card life.
this underscores the first line of post #1 how much and how often ?
horace:
. . .
otherwise FRAM or for large volumes of data SD cards or USB drive
Do you mean here a USB drive connected directly to the Arduino, or do you mean more generally as a storage medium ? If direct, I'm curious to know how it is done.
dave-in-nj:
it seems that the raspberry pi burns out SD cards after some months in operation.
wear leveling is needed to prolong SD card life.
this underscores the first line of post #1 how much and how often ?
That's from people using SD like HD or as HD.
A different set of practices needs to be used like don't sort data files but instead write a file of sorted links into the data. Don't edit the original, save the changes or the whole edited file as a revision file instead. And last, get a USB HD.
As already stated by allanhursdt, IMO a circular buffer and wear levelling to emulate EEPROM in Flash is by far the best option. There is an application note from Atmel for wear levelling:
EEPROMs are under-rated in my view. It takes some time to learn, but is nice to be in control of the data flow. And EEPROMs are very very cheap.
By contrast I found SDs as really mysterious pieces of a devilish character. Not to mention that SD are really hard to find. Perhaps there is SDHC or even better SDXC readers for Arduino, but I could not find one.
On the other hand, more complex tasks or high volume of date looks to me as a tasks for Raspberry Pi or similar, rather than one for Arduino.