Go Down

Topic: EEPROM to storage data (Read 1 time) previous topic - next topic

Yaro

I need to add an eeprom to storage data that i retrive from arduino, without a connection to a pc. I need a good space, like 1024kb or more. Can you advise me a good eeprom with a low price and easy to connect? I don't know where to begin to connect it, so an eeprom with a tutorial and arduino library.

Ty,
Yaro.

Nick Gammon

Here I connected a 512 Kb EEPROM:

http://www.gammon.com.au/forum/?id=10990

For more than that you could hook up an SD card.

robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Nick Gammon

Good point. I also wrote up I2C eeprom here:

http://www.gammon.com.au/i2c

Yaro

Nice guides, but can that space be enough for me? I need to save time and value for each data that i retrive from a pressure sensor. I need to have 200-250 samples each second for 4-5 sec., but better will be for 10-12 sec.
Each data have time and a data value of 5 numbers(es. 200,00 kg).
How i can solve that? there is a microsd adapter that have a very low cost and a guide to connect it to arduino and libraries?

robtillaart

microSD is available offers far more storage.

check the work of fat16Lib - http://arduino.cc/forum/index.php/topic,100366.msg753404.html#msg753404 -
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

doughboy

I initially got the ethernet shield, and the sd storage is nice and all, but between the ethernet and sd libraries, the overhead is just too much. And yes, even the sdfatlib overhead is too much. I am now considering using eeprom and just periodically upload the data to a server.

I just want to confirm that the AT24C1024B will work with 100khz I2C clock speed arduino uses. The datasheet only specifies a maximum clock of 1mhz and did not specify a minimum.

and to replace ethernet, I am considering using wifly. I take it the overhead will be lower than the ethernet library.

thanks.

Nick Gammon


I need to have 200-250 samples each second for 4-5 sec., but better will be for 10-12 sec.
Each data have time and a data value of 5 numbers(es. 200,00 kg).


Well, 20000 can be stored into an unsigned int (0 to 65535) ... I presume the weight isn't negative.

So that's 2 bytes. 4 lots of 250 samples is 1000 samples, so that's 2000 bytes.

What you could do is add an SRAM chip to extend the memory. Take all the samples, and then slowly (ish) write them to an SD card. Or send them via serial.

The Atmega328 is about a $5 chip. There's a limit to how much you can do with that if you are trying to do professional-style measurements. For example you could get a Mega which has more RAM.

Yaro

In this circuit is not provided serial connection so i need a static memory where storage data and in a second time transfer collected data to a pc. If i right understood what you said an eeprom of 512kb or 1024kb will be enought to storage data. The speed of writing on a eeprom should be enought to avoid the use of more SRAM, right? How much space will take timestamp?
With no negative values ((512*1024)/2)/250 i can storage data for 1048sec.? I want to avoid the use of an SDcard if possible, becouse it's more complicate and will require more time.

Nick Gammon

You don't need a timestamp if you sample at a constant rate. Say you sample 250 times a second, you hardly need to timestamp it. Each sample will be 1/250 later than the previous one.

Yaro

Oh yes, right, i didn't thought about it. The rest of what i wrote is right? I can really store for so many time without a use of a SRAM?

Nick Gammon

Do you mean "avoid the use of a SD card"? You have 2048 bytes of RAM. At 250 samples per second, storing 2 bytes each, you could store around 4 seconds.

Yaro

Ok, good, but i prefer to have more sec. I've seen your guide about the connection of an 512kb eeprom, but i can't find that chip SN54AHC125 on ebay, there're similar that i can use?

If no, i think i will try an I2CEEPROM with this guide:
http://arduino.cc/playground/Code/I2CEEPROM
Is good too?

Nick Gammon


Go Up