PDA

View Full Version : Discussion Designing AutoPilot


medomodo
Dec 02, 2008, 03:52 PM
Hi there,
Iam a media engineer, my knowledge about embeded systems is not that good, but iam interested to do an "Autopilot" from scratch for my r/c plane .. Simply all what i want is to make my plane fly on given circles as a show without using my remote :).
I have a background on designing r/c planes and manufacturing and controlling, i have a back ground also on C language, java.
I'd like to know how to start and what hardware need to buy and software to learn and start programming the hardware..

Joan Carles
Dec 13, 2008, 09:17 AM
Hi,
I also plan to develop a medium-high quality autopilot. An autopilot is not (from the electronics hardware point of view) very dificult: a microcontroller and sensors of speed (a pressure sensor plus a pitot), position and height (a GPS module, not expensive an easy to use) and... the attitude sensor, also called IMU (Inertial Measurement Unit).
that's the biggest problem. A full 6 degrees of freedom IMU has three gyroscopes and three accelerometers. If you can afford to buy the whole module it's about 400 USD. If you want to build it with ICs, each gyro is about 30-40 USD plus 7-10 for each accelerometer, PLUS the AD converters you will need. Cheaper but not much cheaper. In addition to that, these ICs come in BGA and LGA packages not very easy to home solder. A bit risky.
More problems IMU have: accelerometers measure linear acceleration and gyros angular speeds. You filter (digitally = YOUR software) these signals and integrate them. No sensor is perfect (even the most expensive) and these have temperature variations plus DRIFT... This means your integrated measure can be wrong with time. Imagine your IMU telling your micro the plane is horizontal, no bank, no pitch, but it's actually banked to the left 5 degrees and pitching up other 6 degrees... what to do? IMUs to work well need a good calibration, temperature compensation and drift minimization. This is hardware, money and work, plus the risk of being wrong...

The worst is that attitude measure is a must. You (your microcontroller) needs to know this to balance the plane. Alternatives to non-gyro-attitude sensors are 2 (as far as I know):

- Using 2 or three accelerometers (at the wing tips, tail, etc) to sense the linear acceleration if there is an angular acceleration. (This idea is in a thread here). Pitfalls: accelerometers are noisy, using a pair to obtain a signal increases noise, AND, angular acceleration has to be integrated TWICE to obtain rotation angle. Idea is good but I don't trust it very much in practice (just my personal opinion - everybody can be wrong)

- Using IR sensors to detect the horizon, based on the temperature difference (when seen in infrared) between the sky and the ground. This is the system used by FMA CoPilot (not an autopilot, but a plane stabilizer). Pitfall: direct sunlight (only if sun is about the horizon) can produce wrong results.

I find this system very interesting. The IR sensors used are similar to those used in PIR presence detectors for house alarms. I plan to use it 'improved' with a two axis accelerometer sensing the gravity vector and/or gyros (in this case, the true horizon measure will be used to reset the gyros).

So, at least to me, the biggest problem is to find a reliable (and as cheap as possible) way to know the plane's attitude.

Good flights (as a pilot or spectator)

medomodo
Dec 13, 2008, 06:32 PM
Thank you joan and good luck on your development.
Iam trying to do the programming part as a project in my university.

thank you for yuor reply.