Go Down

### Topic: Storage Space on a device (Read 1 time)previous topic - next topic

#### trustnoone

##### Mar 30, 2014, 08:11 am
Hi guys, so I have two devices here one is an arduino mini pro, and the other is an arduIMU http://code.google.com/p/ardu-imu/. So the thing is I want to create a <big number> x 2 column INT array if possible but I will be adding integer values in there for about a whole week. What I was wondering is how I would go about calculating whether I would have the space to do that in both of my devices?

My thought process so far is that I need to find out somewhere how much memory is in the device? And I'm not too sure where to find that exactly for both of them?

Then I would see that an INT holds 4 bytes, so two INTs is 8 bytes for one row.

Then I want to save data in the array once every minute for 7 days which makes 60 mins x 24 hours x 7 days x 8 bytes = 80,640 bytes or 80 kbytes right? And then I just check to see whether my device can hold 80 kbytes worth of data or not and that will tell me whether it would be fine?

Will I also need to include space for programming and other libraries I may be using for my project?

Thanks!

#### Caltoa

#1
##### Mar 30, 2014, 10:29 am
Storing data is one thing, but how will you get that data to the computer ?

If you have an Arduino Pro Mini with a ATmega328p, that has only 1k of EEPROM memory.
You can add a EEPROM, they are cheap.

An integer in most Arduino boards are two bytes, so a week storage would require 40kbytes.

The ArduIMU V4 has a microSD slot.

#### pito

#2
##### Mar 30, 2014, 10:37 amLast Edit: Mar 30, 2014, 11:06 am by pito Reason: 1
For storing 80kB or similar small amounts you may use external serial SPI EEPROM/FLASH (slow writing speeds, not critical for your application), or fast devices - SPI SRAM (ie. 23LCV1024 128kBytes, 8pin, needs backup battery) or serial SPI FRAM (ie. FM25V10, 256kBytes per chip, 8pin) or serial SPI MRAM (ie. MR25H40, 512kBytes per chip, 8pin) where FRAM and MRAM are nonvolatile.
See for example the newest from fat16lib http://forum.arduino.cc/index.php?topic=229485.0 - you can even have the filesystem on the device today and it works.

#### trustnoone

#3
##### Mar 30, 2014, 11:11 amLast Edit: Mar 30, 2014, 12:22 pm by trustnoone Reason: 1
So is my idea for storing data kind of right but since for example the ATmega328p only has a 1k eeprom then it wouldn't be able to hold 60 mins x 24 hours x 7 days x 4 bytes = 40,320 bytes or 40 kbytes so I would have to add either extra eeprom, an sd card or memory through SPI?

----------------------edit,
So I read up a bit about the differences in terms of memory, from what I understand eeprom is used for changing values and flash is used for stored and SRAM would place the data being used so I'm guessing my major array goes in SRAM, so I'm hoping to have 40 byes of changing INT and 40 kbytes of stored INT so from what I can guess, the ATmega only has 2 kbytes of SRAM so definitely won't store it .
---------------- end edit

I see what you guys mean though about how I will use the data, currently I'm thinking either I will send it via IR just so I can test it out, but I'm not sure if placing an SD card might just be the easiest option as then I can use it on the computer just by plugging it in although the other problem is I'm hoping to keep it as light weight and small as possible which is sort of why I was hoping to not have the card. Another thought is that I may also be sending data by say UART Bluetooth instead.  Which may also mean I would need it to be large enough to hold my data.

Oh yeah I checked out the arduIMU v4 as well, honestly its exactly what I'm looking for, but from what I understand its not for sale yet, sort of.

#### Caltoa

#4
##### Mar 30, 2014, 03:14 pm
As pito and me wrote: external EEPROM. They are small, can store many data and are cheap. But you have to use a function to store data and retrieve data. They are not in an array in SRAM.

If your project is like my projects, you keep on adding things. So you need to store more and more data.
For example a AT24C64, 8kbyte EEPROM costs 3 dollars on Ebay.
A 24C512, 64kbyte EEPROM costs 3.50 dollars. You can use 4 of these on the same I2C bus.
A 24CM01, 128kbyte EEPROM costs 15 dollars on Ebay. That is weird, two 24C512 are cheaper, and the manufacturer price is less than 2 dollars.

#### trustnoone

#5
##### Mar 30, 2014, 04:02 pm

As pito and me wrote: external EEPROM. They are small, can store many data and are cheap. But you have to use a function to store data and retrieve data. They are not in an array in SRAM.

If your project is like my projects, you keep on adding things. So you need to store more and more data.
For example a AT24C64, 8kbyte EEPROM costs 3 dollars on Ebay.
A 24C512, 64kbyte EEPROM costs 3.50 dollars. You can use 4 of these on the same I2C bus.
A 24CM01, 128kbyte EEPROM costs 15 dollars on Ebay. That is weird, two 24C512 are cheaper, and the manufacturer price is less than 2 dollars.

whoa, whoa, I didn't know EEPROM were that cheap or that small, thanks heaps for that, very much appreciated both of you. The way I'm seeing it now is either I have the micro SD if I want to be able to store it on the computer or the the EEPROM if I want to keep it stored on the arduino, or Bluetooth across. Thanks so much guys, helped me out a lot.

Go Up

Please enter a valid email to subscribe