Pages: [1]   Go Down
Author Topic: Can We Read Yaw Axis Without Compass?  (Read 749 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 72
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, i want to read yaw axis for my project. So far, i do this by using compass (3 Axis magnetometer). But, it has a problem when i tilt it. I have tried many tilt compensation compass algorithm but still didn't solve the problem.

My Question is can we read yaw axis without compass? For example, use accelerometer or gyro?
Is there another method to read yaw axis?

thank you..
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5145
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can measure the change with a gyrometer but if you need an absolute value the magnetometer is the way to go.

What problem do you have if you tilt it? What output do you expect? If you have a 3 axis magnetometer, you can calculate the facing direction even if the device is tilted. Post the code you used so far.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 72
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is my code:

https://github.com/mamette/CompassCompensate/blob/master/main.ino

Quote
What problem do you have if you tilt it? What output do you expect? If you have a 3 axis magnetometer, you can calculate the facing direction even if the device is tilted

I want to make 3 axis gimbal, and the problem is on the yaw axis. SO far, i can calculate the heading degree, but when i tilt it, the value is change. I have tried tilt compensation compass algorithm from many reference, but still not works well. Are we must calibrate the magnetometer Max and Min value for each axis first? For Example like this:
Code:
#define M_X_MIN -421
#define M_Y_MIN -639
#define M_Z_MIN -238
#define M_X_MAX 424
#define M_Y_MAX 295
#define M_Z_MAX 472
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5145
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Which sensor module are you using? The way the different values are transformed depends on the placement of the components on the PCB, so this fact is relevant.

What values do you get and what would have been the expected values?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 72
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Which sensor module are you using? The way the different values are transformed depends on the placement of the components on the PCB, so this fact is relevant.

What values do you get and what would have been the expected values?

i use this Board:
https://www.hobbyking.com/hobbyking/store/__27033__MultiWii_328P_Flight_Controller_w_FTDI_DSM2_Port.html

the value that i expected is when i tilt the board, the compass heading degree is not change, i have use tilt compensation algorithm for magnetometer, but still not works, the heading degree still change when i tilt the board..
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5145
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the value that i expected is when i tilt the board, the compass heading degree is not change, i have use tilt compensation algorithm for magnetometer, but still not works, the heading degree still change when i tilt the board..

How much does it change if you tilt it? a few degrees or more than 90 degrees? Can you give example output of such a session?

The components used are not placed all in the middle of the board so one must expect some drifting if your calculations are used.
Logged

Pages: [1]   Go Up
Jump to: