hi all, i'm about to start a project building an autopilot like device for an rc airplane and need a pitch/roll/yaw sensor that will work reliably in 3D mode, ie: full 360 degree rotation in all axis and maintain calibration for about 20 minutes.
what do you all recommend? MPU-6050 or MMA7361 or something else?
as far as i can tell, all of these sensors measure acceleration and you have to do some software based on an initial calibration to get absolute inclination angles relative to the earth's surface.
is there anything that gives you absolute values out of the box?
thanks?
Bosch BNO055 and BN0080 do what you want (absolute orientation), but I doubt they can reliably maintain calibration for 20 minutes of crazy flying. Only the north vector can be reliably measured, but to get orientation you also need the gravity vector (and then east/west can be calculated by the cross product of those two). The BNO sensors do an amazingly good job of sorting out gravity from other acceleration, but for prolonged periods of high G force and changing directions, there's really no way to maintain high accuracy with the data available from accelerometer and gyro sensors.
thanks for the info but that's a 10x price increase over the MPU-6050 and my project is price sensitive, so i'll try get creative and figure out a way to recalibrate the MPU-6050 in flight.
good info however if i make a pro version, thanks
phones don't need calibrating to know which way is up, i wonder how they do it?
for my project, i was thinking get a tiny circular bubble level like this https://www.ebay.com/itm/Tiny-Disc-Bubble-Spirit-Level-Round-Circle-Circular-Green-Tripod-10-6-MM/263597702144
drill 2 tiny holes in the top, close to the center and put copper wires in into the holes, then measure the resistance between the wires. when level, it should go open circuit. easy and cheap if it works.
An accelerometer can always tell you which way is down, as long as it is not being accelerated by other forces. But that is unlikely in an RC plane.
For yaw, a magnetometer or other external reference is absolutely required and the MPU6050 doesn't have one.
The BNO055 works fairly well, but you can get somewhat better performance at a slightly lower price by using open source RTIMUlib and one of Pololu's IMUs, as described in this post.
The main problem with the BNO055 is the dismal performance of the calibration procedures they use.
Name brand BNO055 boards are indeed expensive, but cheap Chinese ones can be had for $11 on ebay.
A bubble level can't tell the difference between gravity and high-G maneuvers either. If you're going to be flying smoothly enough for that to provide useful information, then BNO055 will have no trouble at all maintaining calibration.
thanks but $11 is still too high for my project, currently i'm, looking at about $4 inc nano, MPU6050 and GY-BMP280-3.3 barometric thing.
"A bubble level can't tell the difference between gravity and high-G maneuvers either." true, but in combination with MPU6050 and GY-BMP280-3.3 i hope to detect when in straightish and levelish flight with no change in altitude then use the bubble level as a final check
i honestly don't know how well it will work in real life but only a few bucks to test
i found this post, Help! MPU6050 to read from 0 - 360 degrees - Programming Questions - Arduino Forum answer by zhomeslice looks very interesting. when i get my hardware from china (long time as ever) i'll see how well it does with the MPU6050 library, maybe ok.
thanks
FYI, it turns out spirit level fluid is pretty much a perfect insulator so i replaced it with eye wash solution and now its pretty easy to detect the air bubble.
so my idea now is 4 pairs of wires at 90 degree apart, just inside the circle of the circular bubble level
if all 4 are open circuit, it's perfectly level, if only one is open circuit, its tilted away from that one etc. so i have a primitive 2D level detector for less than a buck using 4 analog inputs
dekutree64:
A bubble level can't tell the difference between gravity and high-G maneuvers either.
It can't tell the difference between gravity and a low-G turn, either.
DaveEvans:
It can't tell the difference between gravity and a low-G turn, either.
again, coupled with the 6 axis gyro, the arduino can. if there is any horizontal acceleration or the vertical acceleration is not 1G, i know the bubble is irrelevant.
again, coupled with the 6 axis gyro, the arduino can.
To some extent. Try it out. I believe you will find it to be an educational experience.
Until you lose calibration...
You have to find a way to reliably tell whether there's any non-gravity source of acceleration. The total being 1G is likely not enough (even when disregarding the vibrations from a flying plane).
wvmarle:
Until you lose calibration...
the loss of calibration should only be a factor in the calculation of the absolute level, as far as i understand the MPU6050, the accelerometer needs no calibration, has no drift, its always an absolute value.
the whole point of my bubble level thing is to periodically recalibrate absolute level when it sees a chance.
i realize vibration will be a huge problem, i'm looking for a semi viscous liquid to use in the spirit level that also is a good conductor, haven't found one yet.