I have a question concerning MPU6050. I use two MPU6050 on the same board and they are fixed to each other. So there is no relative motion. I am using MPU6050_DMP.ino. and uncommented #define OUTPUT_READABLE_YAWPITCHROLL line.
But the problem is that when I move the board or change the angle, I do not have similar result from both sensors. I replaced one of them and I have the same result of pitch and roll but still problem with yaw. It means when I move the board, the difference between yaw angle of two sensors changes up to 40 degrees.
couka:
If the angle is calculated from the acceleration sensors only, it will always be extremely inaccurate when moving.
A complementary filter that uses the gyros and accs together works really well with the MPU6050s.
lg, couka
I do not compare the results when moving. I am comparing in stable situation.Also I am using DMP output. I think DMP combines acceleration sensors and gyros.
BTW, when the results are different in stable situation, could a filter be helpful?
Power_Broker:
You keep referring to complementary filters. What do you mean by that and can you give an example?
In this case, it's a way to combine the measurements from different sensors to get more accurate and/or more reliable data.
Measuring angles with gyros only gives a high resolution and is insensitive to linear acceleration, but drifts away from the real value over time. That drift can be compensated with the data from the accs.
couka:
In this case, it's a way to combine the measurements from different sensors to get more accurate and/or more reliable data.
Measuring angles with gyros only gives a high resolution and is insensitive to linear acceleration, but drifts away from the real value over time. That drift can be compensated with the data from the accs.
But the problem is not movement. I have always the same result in different angles for each sensor. The problem is that I have different results for different sensors in static situation.
toghi:
But the problem is not movement. I have always the same result in different angles for each sensor. The problem is that I have different results for different sensors in static situation.
If the difference is that big, you are either reading the sensors incorrectly, they are not mounted in the same direction or faulty.
couka:
If the difference is that big, you are either reading the sensors incorrectly, they are not mounted in the same direction or faulty.
lg couka
I read DMP output without considering interrupts.
Even if the difference is big, I expect the difference not to change while they are fixed to each other. The sensors are fixed and I move both together.
Wait, I think we (or at least I) missed an important detail. Are we talking about the yaw-axis only?
Since rotation around the yaw axis can't be corrected by accs, it is absolutely normal, that they drift away. You would need an electronic compass to compensate for that.
couka:
Wait, I think we (or at least I) missed an important detail. Are we talking about the yaw-axis only?
Since rotation around the yaw axis can't be corrected by accs, it is absolutely normal, that they drift away. You would need an electronic compass to compensate for that.
All sensors are different. For IMUs, each axis has a slightly different scale factor and zero offset, so no two will read the same values even if they are in identical orientations or subjected to identical movements.
You can compensate for the different readings by calibrating the sensor. Subtraction removes the zero offset, but on gyros, the zero offset is temperature sensitive.
couka:
Yes, but maybe you should post some actual code and test data.
lg, couka
I attached my code
jremington:
All sensors are different. For IMUs, each axis has a slightly different scale factor and zero offset, so no two will read the same values even if they are in identical orientations or subjected to identical movements.
You can compensate for the different readings by calibrating the sensor. Subtraction removes the zero offset, but on gyros, the zero offset is temperature sensitive.
The problem is not offset. They behave differently in different angles. The problem is that the subtraction is not constant.