Register to reply 
Accelerometer angles 
Share this thread: 
#1
Mar708, 04:33 PM

P: 2

Hi, I'm new to the forum.
I have a 3 axis accelerometer that I am trying to obtain roll and pitch from. Besides the accelerometer itself, I was provided the raw data values of what each axis will report when it has 0g being applied to it and when it has 1g being applied to it. Using this I am able to find and normalize how many gravity forces are currently being applied to each axis. In the rest of this post assume x, y, and z are normalized; so if x=1 then 1g is applied to the xaxis in the positive direction. I'm using the following equations: [tex]roll = atan(\frac{z}{x})[/tex] [tex]pitch = atan(\frac{z}{y})[/tex] If the accelerometer is lying flat, with the zaxis facing up, and I rotate it over the yaxis (roll), then I can use the above equation to obtain the roll from 0 to 360 degrees. Same with pitch. However I run into two problems:
Is there a special way to calculate angles based on this type of data, or am I just going about this wrong? It's been a while since I've done any 3d geometric math and I don't remember a whole lot. Thanks. 


#2
Mar708, 06:38 PM

P: 1,127

How is the accelerometer constructed?



#3
Mar708, 07:39 PM

P: 2

The chip itself is an ADXL330.
I think the problem may be that when I roll the chip 90 degrees, the zaxis becomes perpendicular to gravity. The zaxis is used in the calculation for pitch when roll is near 0. The solution to this is probably somehow incorporating the xaxis into the calculation in order to compensate for the transition from x to z moving towards gravity during roll, however I'm unsure of how to go about doing that. Does that make any sense? I'm a little surprised I wasn't able to find more about this on Google seeing as how accelerometers have been around forever. 


#4
Mar911, 04:05 PM

P: 3

Accelerometer angles
Roll= Asin(Xaxis) in radian * 180/Pi in degree
Pitch= Asin (Y/axis) in radian * 180/Pi in degree Try these equations may be this will work for you. I am Using LIS302DL, both equation are working fine for me.. in order to find the pitch and roll angle from raw acceleration data 


Register to reply 
Related Discussions  
3 axis accelerometer forces as angles/vectors  General Math  10  
Accelerometer calibration  Linear & Abstract Algebra  5  
Regarding an accelerometer..  Classical Physics  7  
Accelerometer design  Engineering Systems & Design  2  
Refrence Angles & Positive/Negative Angles(Coterminals) HOW?  Introductory Physics Homework  1 