non volatile data

I need to save the position of a stepper motor in non volatile memory.

I know that on the Arduino I have only 2 options for that kind of space and that are the EEPROM and Flash Memory as already nicely described at http://www.arduino.cc/playground/Learning/Memory.

The EEPROM has the problem of the write delay and the lifetime as I can easily have 1000+ steps per second and have to save the resulting motor position as often as possible, if possible with every executed step. That would easily exceed the EEPROM lifetime after a few hours of operation so it's not an option.

The Flash Memory with the PROGMEM interface appears to be read only. Is that correct?

What other options could you suggest?

Why do you need to store the position so often? If it's because you're concerned about the system losing power, maybe you can store the data somewhere volatile, but with a reserve of power (e.g. capacitor) and a way to detect a power loss and save the data to non-volatile memory before your reserve runs out.

That would easily exceed the EEPROM lifetime after a few hours of operation so it's not an option.

The Flash Memory with the PROGMEM interface appears to be read only. Is that correct?

Note that Flash has a significantly shorter lifetime than EEPROM, so would be even less suitable for your task (ignoring all the other reasons why it would be problematic).

--Phil.

Could you not use a battery-backed SRAM chip or something as opposed to EEPROM?

The other thing you may consider is only saving the position after a more substantial delay, say once a minute, and that would easily lengthen the expected life of your EEPROM chip.

Could you not use a battery-backed SRAM chip or something as opposed to EEPROM?

I've got this on my "to play with one day" list: 32Kx8 Nonvolatile SRAM, 3.3-V Input

I would imagine you'd want to use an I/O expander with it.

--Phil.

I think it would be problematic to write to a serially controlled EEPROM IC 1000 times a second and still keep the stepper motors timing correct.

The key question here is why save the position so frequently, is' it really required, or could a less demanding workaround be found ?

Thanks for all the great suggestions and feedback.

The non volatile SRAM chip looks really interesting.

Although after ReReReconsidering the goal I had in mind I think I will go for the most suggested way: Not to save the position that often :P

In the planned setup the arduino will be connected to a laptop at all times so the chance of a power cut is extremely unlikely. To make absolutely sure I will write the Stepper positions to the EEPROM every time the steppers stop.