accel-gyro what about Yaw ?

Hi everyone,

I'm using an Arduino board and 6DOF sensor (3-Axis accelerometer and 3-Axis gyroscope)
I already managed to calculate Pitch and Roll using Kalman Filter..

According to some readings, I understood I can't use the AccelZAngle to calculate the Yaw Angle, just like I did for Pitch and Roll (correct me if I'm wrong).

So, my question is:
Is it OK to calculate the Yaw angle just by using the gyroZAngle ? and how ? the problem is that the gyrometer drifts fast !
what can I do to solve this problem ? (without using a magnetometer)

thanks for helping ^^

You can reduce gyro drift by calibrating it, which involves measuring the average rate of change on each axis while the gyro is sitting still, and subtracting that from subsequent measurements.

However, gyros always drift. To correct for the long term drift in yaw, you need a reference value of yaw, which usually comes from a magnetometer (North).

kkny:
what can I do to solve this problem ? (without using a magnetometer)

jremington covered things fine but there could be other ways to correct for yaw drift.

Some sort of IR beacon could be used. A WiiMote can figure out its orientation based on the IR LEDs on top of a TV. Something similar could be done to correct your orientation problem.

You really need some sort of external reference point in order to orient your device. The Earth's magnetic field is a convenient external reference.

Is there a particular reason you don't want to use a magnetometer? Motors will overwhelm a nearby magnetometer but if you put some distance between the magnetometer and the motors it should work well.

thanks for replying,

Actually, I'm trying to track movements using an "independent gadget"...
Exactly, It will be used in an industrial environment, where there could be motors, and where Earth's magnetic field can be easily disturbed, and I can't guarantee any "safe distance"...

I know it may sounds demanding...but any ideas how to do this ? (something like the Wii alternative)

Here is a commercial option for indoor tracking.

kkny:
I know it may sounds demanding...but any ideas how to do this ? (something like the Wii alternative)

Most (really all) of the ways I can think of require external markers. An IR LED bar like those used on a Wii would be one option.

Ultrasound transponders is another option but your environment might be to noisy for this to work well.

I notice Pozyx also uses external modules.

Actually, I'm trying to track movements using an "independent gadget"...

Using just an accelerometer and a gyro, without an external position reference, it is simply impossible to know the absolute orientation.

OK, I got it, it's just not possible.

Thank you all :slight_smile: