I'm working on a project that includes counting the revolutions of a cylinder connected to an engine. This engine runs at a minimum of 5 revolution per second and a maximum of 9 revolution per second.
A device is fixed and mounted on this cylinder. The device integrates a lis2dh12 accelerometer which is mounted so that the z axis intersects the rotational axis. This video will give you a clearer idea of the situation (the device is the one in red):
For the calculation of the revolutions, my algorithm takes the data of the accelerometer (set to 100hz) of the weight force and calculates the angle of inclination (pitch) as follows: atan2(y,z)
Then, I convert it to degrees and use 4 flags to understand when the device goes from 0-90, then 90-180, then 180-270 and finally 270-360, so the revolution counter is increased.
This worked for the rotations done with the device in hand, but then I bought a motor to perform the tests and the approach no longer worked: not having taken into account the centrifugal force (which exceeds that weight) the calculation of the pitch no longer works.
This is the engine used for the tests:
The engine is blocked by a wooden system that attenuates vibrations as much as possible. With a potentiometer, I adjust the speed of rotation of the motor between 3 rpm and up.
NOTE: In this case the mass of the device is very significant because it is large compared to the complete system, while in the final case (situation of the video) the device has a very small mass compared to the complete system. I do not know if mounting the device on the real roller the calculation of the pitch would be done correctly and at the moment I can not perform the test, but hypothetically I believe that the problem will occur in that case, as the centrifugal force is proportional to the radius (in rotary motion).
Am I saying right?
My question then: is it possible to compensate the centrifugal forces, calculating their intensity for each sample of the accelerometer (every 10 ms) and subtracting this force to z, in order to reuse the old approach of pitch calculation?
The data acquired by the accelerometer while the small engine was running at (about) 5 revolutions per second shows that the value of z had assumed a maximum of -0.828 g and a minimum of -2.484 g.
Increasing the speed, however, also exceeds -5 g.
Unfortunately, the device is not equipped with a gyroscope and no hardware can be added to it, so I would like to find a way to calculate the number of revolution made using only data from the accelerometer.
Thanks in advance