Accelerometer help contest. €50 reward guarantee

HARDWARE: Arduino UNO. TinkerKit Shield. Tinkerkit Accelerometer.

AIM: I need to install an accelerometer into a CPR (cardio-pulmonary resuscitation) dummy to monitor the performance of the user during the time.

INTRODUCTION: The use of an accelerometer was already described in this way. Positioning the accelerometer inside the chest of the dummy and integrating the accelaration you will find the speed and integrating the speed you will find the lenght (or depth), that, in this case, is the movement of the chest toward the spinal cord (that is the data I need).

To have an idea you can take a look at this paper: The use of dual accelerometers improves measurement of chest compression depth - PubMed (I can send you privately the copy, I can not make it public).

And to have a deep idea of what I want to do, you can have a look here: http://cache.freescale.com/files/sensors/doc/app_note/AN3397.pdf?fpsp=1

In the Freescale pdf you will find also an example of a program. What I want to do is exactly the same with my accelerometer but I have no skill, talent and time to do so. So I'm offering you €50 to do it for me.

WHAT I DID: To get an acceleration data from the sensor is easy, also for me. What is not easy is the integration beacause even if I'm ok with the math, the computation will get some errors at every calculation and these errors will accumulate giving me a rising integral even if the accelerometer is not moving. I tried all the logic stuff (semplification, casting, etc...), nothing worked, so I'm here to ask your help.

WHAT I NEED:

  1. A program that measures the acceleration on one axis (z), integrate this value twice to give me the depth of compression (movement).

  2. To integrate also one other (x) axis to get the "lateral movement" and so the efficacy of the compression.

  3. To plot these results (use processing, is quite easy, I did it but I need a better one).

  4. To store the resulting data in a txt-csv file (again, with processing it's gonna be easy) to track the performance (usually 5 minutes) over the time.

  5. Eventual graphic and/or code improvements needed.

So the programs will be two: one for Arduino and one for Processing (or others if you think it's better).

WHAT YOU WIN:
The first or best fitting code will be rewarded with €50 (PayPal ONLY). The final decision on the winner is only mine but your colloboration for the judgement is appreciated. If the winner decides that another member of the community contributed substantially to the final result, the second winner will get additional €20.

Thank you for your attention and time

Luca

When your homework due in?

Mark

Hi Mark,
I passed the time when I had to do homework, and I miss it! :slight_smile:

No more specific time than "soon"

To use the freescale code on Arduino, start by changing:

void main (void)
{
  init();
  get_threshold();
  do
  {
  position();
  }while(1);
}

to

void setup() {
  init();
  get_threshold();
}

void loop() {
  position();
}

What is not easy is the integration beacause even if I'm ok with the math, the computation will get some errors at every calculation and these errors will accumulate giving me a rising integral even if the accelerometer is not moving. I tried all the logic stuff (semplification, casting, etc...), nothing worked, so I'm here to ask your help.

No it's so easy by Numerical computations method

Rectangle Rule
Trapezoidal Rule
Simpson's Rule
Newton's 3/8 Rule

first apply those in matlab then port them in arduino :wink:

as you can see from the freescale pdf I did rectangle and trapezoidal method but with no results. It seems that I have to "inform" arduino in which way (up or down), the sensor is moving.