Here’s how I sample the accelerometer, I set a threshold, let say 15 g’s needed to be reached first, I keep sampling until 15 g’s have been reached, I then sample at set intervals, every 10 microseconds until I reach 0 Gs, saving each sample.
Once 15G’s has been reached I start the loop below:
starttime=micros(); //save start time
startloop:
sample and test to see if <=0 G’s if so break
save sample
delayMicroseconds(10); // pauses for 10 microseconds
loop
endtime=micros()-starttime; //calculate total time
so I have the total time in microseconds and G’s from start to finish.
This is what it actually looks like from start to finish in G’s once I do my math and convert to G’s from one test I ran:
20,34,49,51,44,33,25,17,17,17,15,13,10,9,7,6,5,4,3,3,1,1,1,1
As you can see 51 G’s was the max. I’m pretty sure I understand all this, what I was trying to understand is how should the weight of the hammer be applied if any, and if I can calculate the speed of the blow. I have all the G’s and time so I know I could calculate speed based on acceleration, but what is this the acceleration of?
I may try setting it up as like a Gong would be, where it would be perpendicular to the earth, this might insure the accelerometer is in the correct plane.