Pages: [1]   Go Down
Author Topic: Storage Space on a device  (Read 547 times)
0 Members and 1 Guest are viewing this topic.
Sydney, NSW
Offline Offline
Jr. Member
**
Karma: 1
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Edison Member
*
Karma: 36
Posts: 1219
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
You could also add a add-on board with a microSD slot.

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

The ArduIMU V4 has a microSD slot.
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2086
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: March 30, 2014, 04:06:40 am by pito » Logged

Sydney, NSW
Offline Offline
Jr. Member
**
Karma: 1
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-sad.
---------------- 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.
« Last Edit: March 30, 2014, 05:22:04 am by trustnoone » Logged

Offline Offline
Edison Member
*
Karma: 36
Posts: 1219
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Sydney, NSW
Offline Offline
Jr. Member
**
Karma: 1
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: