7

I would like to constantly save data coming from sensors (for an activity tracker) while consuming as less battery as possible (I'd like to have a 4/5 days autonomy on a 3000 mAh battery) but I can't find the best way to save about 2 kBytes/s on a memory large enough to contain several days of data.

Sensors would be read at a rate of 20 times per second and produce about 100 bytes each time.

What options do I have in order to:

  • store such an amount of data (hardware)?
  • ensure the system can work properly with required autonomy?
jfpoilpret
  • 9,162
  • 7
  • 38
  • 54
Pop Flamingo
  • 335
  • 1
  • 2
  • 8

2 Answers2

4

There are two constraints here, and I think it might back you into a corner. Size and then power.

2Kbyte/s is 2*60*60*24/1024 = 168.75Mbyte/day. This is a lot. The only readily available technology that can be used with a small microprocessor that can store this volume of data is an SD card. There are no serial EEPROM or flash chips this large, and the Arduino, as far as I know, can't deal with the NAND flash used in USB sticks and SD cards.

However, SD cards can be relatively power hungry. They draw between 5mA and 100mA when writing, typically around 30-50mA. The SD spec says the maximum is 200mA. Writing is also quite lengthy as they operate on blocks of data rather than individual cells. I've never done a full analysis of how much power they use, but it is not insignificant and much, much more than serial EEPROM or flash.

So your only choice, if you have to store that much, is to go with SD cards.

I would investigate compressing the data. Even very basic schemes can make a huge difference.

Cybergibbons
  • 5,420
  • 7
  • 34
  • 51
1

This would be possible with a standard SD card.

Capacity

Using some simple calculations, I was able to find that writing at 2kB/s for 5 days would only consume 0.8GB. You could probably get by with a 1 or 2 GB card.

Speed

I found this benchmark, which says it is possible to write SD card data from an Arduino at 192 kB/s, which should be more than enough for your needs.

There are a lot of great tutorials and examples out there for using an SD card with an Arduino. The official documentation is always a good place to start.

TheDoctor
  • 3,509
  • 1
  • 22
  • 39