I have been trying to solve this issue for a while now and have finally caved in to ask for some help. Can someone give me some advice on how to do the following?*Note: The only forces acting on the accelerometer will be gravity (so, in a static context)1) Will the accelerometer, when placed on an incline, respond in a way that allows me to detect rotation about that incline (so rotation about an axis defined by the incline)?It is easy to determine the rotation about the X & Y provided that the accelerometer is vertical or horizontal. But, I am having trouble picturing the forces on the accelerometer when it is on an incline.2) If the accelerometer is not limited by question 1, can someone give me advice on how to calculate the rotation about the incline?As of now, I am using arctan(AZ/AX). However, if the accelerometer is tilted in the X direction, it will affect the rotation (even though it is what I want!)3) What other devices should I look into to achieve what I am looking for?
You need to be a member of diydrones to add comments!
Forgot to post this. I figured out a solution that works for me...although it is not 100% accurate. But, it worked for my purposes.
Anyways...at a given incline, you would, you can calculate the nominal AX, and AZ. Then, do (1-CurAZ/NomAZ) and multiply AX with it. So, tilting it (bottom picture) will not change AZ, so we can sort of differentiate whether the AX is being generated by a tilt or a rotation.
Of course...just by looking at the method, we can see that AX caused by rotation is never 100% accurate, but it worked for my purposes and works surprisingly well. My main objective was to separate the bottom picture and top pictures.
@Howard
Based on your response, it seems like it would be possible. I am thinking that my problem may be determining how to mathematically calculate the rotation. In the picture above, if the accelerometer is tilted on the incline, then A_X & A_Y changes, and Arctan(AZ/AX) doesn't measure what I want.
@bGatti
You are correct. I am looking at a static context.
2) Could you elaborate what you mean by "rotation of body"? I don't see how knowing the highest and lowest accels can help determine the rotation.
3) Arctan(AZ/AX) does not give me what I am looking for if the sensor is tilted on the incline. Please look at the image I reference above to see what I mean.
@Both
So, from the response of the accelerometer, is it still possible to calculate the rotation, even if the accelerometer is tilted on the axis like the bottom picture (of the link I posted)?
David,
So, if your rotation is fast enough to create detectable g-forces, that is a discussion for gyros; however, I presume your question to have its most rational meaning - and that would be the detection of a static position with respect to gravity.
1. If you are on an incline, than yes, can measure the incline with a 3 axis accel.
2. You can also determine which part of the accel is the highest, and which is the lowest. So to the extent that knowing which edge is highest can tell you "the rotation" of the body, than the answer is yes.
I think it also possible to prove the answer by proving that the "only" static axis which a 3dAccell cannot determine is that axis which is fully vertical to the earth. Since an "inclined plane" is not vertical and has no vertical axii either perpendicular or parallel thereto, then the answer to your question - whatever axis you mean to imply - must be in the affirmative.
(3) As you increase the inclined plane from 0 degrees, the sum of AZ and AX will subside by the sine of the incline; however, the term arctan(AZ/AX) will continue to perform as both AZ and AX will be diminished proportionately. I can't think of any reason why the AX and AZ sensors would not experience the incline in the same way. The term will continue to relate to the rotation around the inclined axis, it should be noted that accuracy will fall off by the sine of the angle.
After reading your answer, I feel that maybe I miscommunicated what I meant to say. I meant to say, rotation ALONG an axis. For example, if you positioned a motor at a 45 degree incline, and applied power to the motor, would you be be able to determine the degree of rotation of the rotor?
I hope that makes sense! Right now, all I have is a triaxial accelerometer, and would like to use that if possible.
I am looking into gyroscopes right now. Hopefully something will click and I can start experimenting!
1. only to the extent that rotation around an axis generates centripetal acceleration. based on your description, the answer is probably "no"
3. a gyro measures speed of rotation about an axis.
Unless your sensor is moving a lot and is subject to changes in velocity along any axis, you need to think of a 3-axis accelerometer essentially as a tilt sensor. It measures tilt along 3 different axis. Assuming the sensor is mounted flat and oriented along the front-to-back (x), left-to-right (y), and up-to-down (z) axis, the flat sensor shouldn't detect any component of gravitational acceleration in the x or y direction, but it will sense 100% of gravity (1 g) in the z direction. If the sensor starts to tilt one way or the other in the x direction, a component of gravity will start to come into play (1g * cosine(tilt angle)). At the same time, the component of gravity operating on the z axis will be diminished (1g * cosine(tilt angle)).
Replies
Anyways...at a given incline, you would, you can calculate the nominal AX, and AZ. Then, do (1-CurAZ/NomAZ) and multiply AX with it. So, tilting it (bottom picture) will not change AZ, so we can sort of differentiate whether the AX is being generated by a tilt or a rotation.
Of course...just by looking at the method, we can see that AX caused by rotation is never 100% accurate, but it worked for my purposes and works surprisingly well. My main objective was to separate the bottom picture and top pictures.
Thanks for everyone's help!
Picture of what I mean
@Howard
Based on your response, it seems like it would be possible. I am thinking that my problem may be determining how to mathematically calculate the rotation. In the picture above, if the accelerometer is tilted on the incline, then A_X & A_Y changes, and Arctan(AZ/AX) doesn't measure what I want.
@bGatti
You are correct. I am looking at a static context.
2) Could you elaborate what you mean by "rotation of body"? I don't see how knowing the highest and lowest accels can help determine the rotation.
3) Arctan(AZ/AX) does not give me what I am looking for if the sensor is tilted on the incline. Please look at the image I reference above to see what I mean.
@Both
So, from the response of the accelerometer, is it still possible to calculate the rotation, even if the accelerometer is tilted on the axis like the bottom picture (of the link I posted)?
So, if your rotation is fast enough to create detectable g-forces, that is a discussion for gyros; however, I presume your question to have its most rational meaning - and that would be the detection of a static position with respect to gravity.
1. If you are on an incline, than yes, can measure the incline with a 3 axis accel.
2. You can also determine which part of the accel is the highest, and which is the lowest. So to the extent that knowing which edge is highest can tell you "the rotation" of the body, than the answer is yes.
I think it also possible to prove the answer by proving that the "only" static axis which a 3dAccell cannot determine is that axis which is fully vertical to the earth. Since an "inclined plane" is not vertical and has no vertical axii either perpendicular or parallel thereto, then the answer to your question - whatever axis you mean to imply - must be in the affirmative.
(3) As you increase the inclined plane from 0 degrees, the sum of AZ and AX will subside by the sine of the incline; however, the term arctan(AZ/AX) will continue to perform as both AZ and AX will be diminished proportionately. I can't think of any reason why the AX and AZ sensors would not experience the incline in the same way. The term will continue to relate to the rotation around the inclined axis, it should be noted that accuracy will fall off by the sine of the angle.
otherwise you can try this math:
http://www.freescale.com/files/sensors/doc/app_note/AN3461.pdf
After reading your answer, I feel that maybe I miscommunicated what I meant to say. I meant to say, rotation ALONG an axis. For example, if you positioned a motor at a 45 degree incline, and applied power to the motor, would you be be able to determine the degree of rotation of the rotor?
I hope that makes sense! Right now, all I have is a triaxial accelerometer, and would like to use that if possible.
I am looking into gyroscopes right now. Hopefully something will click and I can start experimenting!
3. a gyro measures speed of rotation about an axis.
Unless your sensor is moving a lot and is subject to changes in velocity along any axis, you need to think of a 3-axis accelerometer essentially as a tilt sensor. It measures tilt along 3 different axis. Assuming the sensor is mounted flat and oriented along the front-to-back (x), left-to-right (y), and up-to-down (z) axis, the flat sensor shouldn't detect any component of gravitational acceleration in the x or y direction, but it will sense 100% of gravity (1 g) in the z direction. If the sensor starts to tilt one way or the other in the x direction, a component of gravity will start to come into play (1g * cosine(tilt angle)). At the same time, the component of gravity operating on the z axis will be diminished (1g * cosine(tilt angle)).