Arduino programming accelerometer and storing data in sd car

I am working on a project that involves getting data from the accelerometer (10,000 data) and storing it in sd card . The Arduino reads the data file from the sd card and performs certain calculation and compare the result with the and the last glow a led if the calculated result is within the limit . I am having problem with the memory here because performing calculation for 10,000 int takes lot of memory .So, any idea on how to do it. Please help me out

One data value at a time and then a flag set if any value out of bounds.

Maybe your algorithm can be optimized somewhat, or simplified so it doesn’t need the entire 10000 values in one go. You will have to spill the beans on what it actually does if someone is to suggest any solution though. SD-cards do not give the entire file immediately anyway. Large files are accessed in chunks.

Otherwise go for a more capable Arduino board, or perhaps raspberry pi or beagle bone. Those last ones have megabytes of memory. But comes at a price ofcourse.

i am trying to calculate the rms value , kurtosis and mahalanobis distance from the 10000 values .Any idea how to proceed

Project


Head

sk22:
i am trying to calculate the rms value , kurtosis and mahalanobis distance from the 10000 values .Any idea how to proceed

Statistical concepts are black magic to me. I can’t seem to grasp them beyond mere averaging and rms. Sorry.

But i was under the impression that you already had some code. As otherwise there would not be a problem yet. Accessing individual values one at a time should not be a problem. But don’t expect this to be calculated in real time.

sk22:
i am trying to calculate the rms value , kurtosis and mahalanobis distance from the 10000 values .Any idea how to proceed

I'm not familiar w/the last one above but the others can be done by reading in N (200, 400, 1000 ?) samples at a time and first computing the average. With the average you can now re-read the samples, again N at a time, and keep a running tally of the difference, difference^2 and difference^4. After the last N have been tallied, you can compute the final values from the running tallies, though perhaps you'll need to store some values and do a 3'rd reading to get the denominator for the kurtosis. I see a large (potential) problem in that you may have pre-scaling to do to keep truncation/underflow errors in check.

Is there some reason this must be done on the Arduino ?