Go Down

Topic: Guide to gyro and accelerometer with Arduino including Kalman filtering (Read 313 times) previous topic - next topic

onidaito

Hi chaps. I've been playing around with this board and the code and I must say, thanks for this. Its definitely been a big help.

Im porting this to C++ and Cinder for use in an experiment. I need to get all 3 axes represented though. Is there any particular reason that the Z Axis is not represented?

I notice that altering the Y rotation also alters the Z rotation on the Gyros but not on the Accelerometers. I believe I need to compute the Z somehow but I'm really not too sure on the math.

Lauszus

It is not possible to calculate the z-axis with the accelerometer. Remember that it measures earth gravitational force, and it does not change when you rotate the IMU horizontal. You need something like a magnetometer to calculate the last angle :)
If you only need to see if it changes you can just use the gyro and then compensate for drift in the code.
- Lauszus

onidaito

Ok that can't be right surely? I get that its not a compass but its billed as 6 Degrees of Freedom which suggests Z. Indeed, its even marked on the board so surely, if can measure the other 2, this 3rd is nothing special. I mean, I own a pair of these vuzix glasses things and they only have a set of gyros and accelerometers. Im not after a direct heading, thats not a problem and I know we cant get that but we most definitely should be able to get the 3rd.

Lauszus

Not as far as I know. You can easily get the z-axis from the gyro, but it will drift. It is not possible to get the z-axis using the accelerometer.
- Lauszus

onidaito

Interesting. I need to look over this compensation for drift then. However, Im still not sure why one cant get acceleration on the Z axis (Im British though, so Z axis means depth to me but in this case, I believe we mean yaw). There is a yaw gyro indeed but it is claimed there is a yaw accelerometer as well. Why is it there if it can't be used? It seems confusing. Clearly I must be missing something.

Go Up