Flash Vs EEPROM
I am working on a data logging project which potentially needs to accumulate and store the data for an extended period of time. As such I'm looking for non-volatile storage media in the roughly 512k BYTES range. I'm new to this sort of stuff (I'm a software kind of guy.) so maybe I've overlooked something that others would take for granted. But it appears that my choices are EEPROM or Flash. What are the trade-offs between the two. Write cycles shouldn't be a problem as I'm looking to store a years worth of data. The target chip for prototyping is a BS2 and probably an SX for the end results.
Thanks for any insights that you can provide.
Jim
Thanks for any insights that you can provide.
Jim
Comments
There is another option: non-volatile sram, but at the denisity your looking at it is cost prohibitive (the one 512x8 currently stocked by digikey is just over $100) but if data retention of a decade, fast (comparatively) operation, or many overwrites (>10K) is very important, the steep price may look more attractive. (mouser has 128K's for $15)
Or you can take a normal SRAM and add a non-volatile controller chip (DS1210 is $4.85 and the industrial temp version is $5.70) these chips provide enough power to an SRAM to preserve data retention from a battery, with a consumption of less than 100nA you can keep the data preserved for many years from a single lithium battery (actually thats just for the chip itself, they quote ram backup current of 10uA (for a total of 10.1uA) but it also allows you connect a backup battery as well (funny a backup battery for a backup battery (but who backs-up the backup's backup?, sorry I couldn't resist)).
Post Edited (Paul Baker) : 1/10/2005 11:52:45 PM GMT
Thanks for the EEPROM Vs Flash info. EEPROM sounds like a better choice for what I'm trying to do.
Basically I want to periodically sample and store an averaged value on a 5 minute to 15 minute basis. I haven't really decided yet, memory size will most likely dictate the frequency. I'd like the data to be viewable through a small LCD screen in either an averaged crude graph or stepping through detail or individual averaged data. (Kind of like every 5 minutes, or hourly averages & totals, or daily averages and totals.) I'd like to be able to accumulate a years worth of data before wrapping. This would allow download and detailed examination at some future date if desired. What I've figured is that the data will range from 210K bytes for 5 minute averaging to 70K bytes for 15 minute averaging, for a years worth of data, per device monitored. I'd like to monitor 4 devices. If I can find lots of memory pretty cheap, I'd add min and max for each sample period as well. But that would require 230% more memory for a given averaging period.
Anyway, overwriting certainly won't be any issue unless the device is in use for 100.000 years.
Thanks for the help.
Jim
I have experience designing and building data-loggers that were sunk to 10m depth, and we always used eeproms, which saved us a couple time when the bouy fabricators didn't do their jobs right (the bouy tether snapped forcing divers to recover a logger that explosively compressed when it sunk to 25m and we still recovered all but the last data sample)
Post Edited (Paul Baker) : 1/11/2005 12:16:18 AM GMT
If the system gets dowsed with salt water I suspect that whether it retains it data or not will be the least of the worries.
1. You might be able to reduce the size of the information you're storing. For instance, if you're storing a single number ranging from 0 to 15 (or less), then you can atleast reduce the required storage size by a factor of two. Just take two samples and record one as a highnib and the other as a lownib for the same byte.... just an example.
2. There's many 8-pin eeproms out there that can store 64kbytes (for SPI eeproms) and 128kbytes (for I2C eeproms). The I2C eeproms are a little harder to integrate (my opinion), but you can use several on the same lines. You can use the SPI eeproms similarly (clockpins and datapins all tied together), and have the chipset pins separate. So for 8 eeproms (512kB), you'd need 10 pins (1 clock, 1 data, and 8 chipsets). Everytime your address got to 65535. you'd move to the next chipset/eeprom and reset the address to 0. Personally, I prefer SPI, just because they're easy to use and I'm familiar with them. Just a suggestion...
Dave
It's also possible to use ordinary EEPROMs by setting up one or more counters for the address pins.
When the system starts, reset the counters to Zero, then pulse the clock every time you write to it.
It's not the fastest for retrieval, but as you probably want to read the data sequentially, that shouldn't be a problem.
If you try something like this, you should probably have at least two, possibly more separate counters as clocking halfway through a 128KB address range takes some time. (Better to pulse the high-address a few times)
The old Psion Organiser I & II series PDA's used this strategy to store user data on EPROMs (It also had a charge-pump for the write-pulse, but many EEPROMs doesn't need that)
The only drawback was that you needed a UV Eraser to clear the chips periodically.
(Psion had a free eraser service)
The data will range from -40 to +200 or there abouts. But I think I can cheat and store only the absolute value because no individual device can be negative and positive. So my config can tell me whether a reading should be + or -.
I've also been following the thread over on the SX forum about this issue http://forums.parallax.com/showthread.php?p=522150 and Paul has offered some nice advice there.
Of course the more I start adding up the various things that have to be done, and the capability of the different stamps, it's beginning to look like I may have to chalk up the BS2 as just a learning and experimenting tool and start my prototype on the SX instead.
Jim
Great idea! That's the really good part about talking out ideas. Somebody always has a different, and frequently better, approach to the problem.
Thanks.
Jim