Shop OBEX P1 Docs P2 Docs Learn Events
accelerometer and Basic Stamp2 , RC Autopilot ? — Parallax Forums

accelerometer and Basic Stamp2 , RC Autopilot ?

TomvnTomvn Posts: 103
edited 2008-04-30 21:24 in BASIC Stamp
i am new with this , i need some help, can sombody tell me how to make· rc autopilot with accelerometer and Bs2.

Post Edited (Tomvn) : 4/23/2008 3:44:43 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-23 15:43
    What do you mean by an "rc autopilot". What does it control? What do you want the autopilot to do? Accelerometers that you can afford have limited accuracy. What do you think you might do to compensate for errors? Accelerometers can't tell the difference between the acceleration due to gravity and that due to manuvers (turns, the effect of wind, etc.) What do you think you might do about that?

    I suggest you do some web searching. Start with the Wikipedia and do a search for "wiki autopilot". Here's one example of a thesis on the design of an autopilot: www2.foi.se/rapp/foir2224.pdf. Search for and look at the manuals for commercial R/C autopilots. Here's one example: www.futaba-rc.com/radioaccys/futm0999.html.
  • TomvnTomvn Posts: 103
    edited 2008-04-23 16:21
    i am too new with this , i read the manuel it say accelerometers can make an autopilot , my need to control my rc helicopter , to make it balance by itself without my tx controller when it fly up , the accelerometers to control the elevator and aileron
    anyway thanks for suggestion.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-23 17:16
    That's like saying that spark plugs are used to make a car's ignition system. It may be true, but it doesn't help much in building a car.

    Since you are new to all this, learning is where you need to start. Things like autopilots are not something you can just get a copy from someone else, try to duplicate, and expect to work. Unless you buy a commercial unit, you will have to significantly modify anything that someone else has used (unless you have the identical aircraft, remote control, and autopilot parts). To do that, you have to understand what you are doing. You'll need to read up on autopilots, check the R/C magazines for systems that others have built, and learn how to program the Stamp in this case. You'll have to figure out how to get an accelerometer to work, how to build and test a horizon sensor, how to interface with an R/C receiver, etc.

    Other people here have worked on helicopter autopilots. Use the forum search (search.parallax.com) to look for other messages or just go through the Stamp, Sandbox, and Completed Projects forums for previous messages. Lately, most have used the Propeller since that is faster and has multiple processors with more memory ... handy for something as complex as an autopilot for a fast moving vehicle.
  • TomvnTomvn Posts: 103
    edited 2008-04-23 17:23
    thanks Mike
    I appreciate that .
  • APAP Posts: 24
    edited 2008-04-26 21:18
    Don't know if you have seen this... my thread on RCGroups. I have a Prop-based autopilot that is well beyond the toy or tinkering stage. Sorry, it is not open source at all, but·I'm showing you this to give evidence of what is possible with the propeller IC.

    http://www.rcgroups.com/forums/showthread.php?t=734456&page=43

    This is page 43, it is up to·47 now. If you go to page 1 you see how primitive it started out.

    Every code object is custom written by me. For example I am not using the Servo32 method at all, nor am I using any sort of pulsin·object to read the RC receiver channels. I started out this way, but eventually they didn't suit my needs. Several other routines are centered around statistical analysis and filtering of raw real world data to provide something more useful, such as the barometer data, and even post-processing of raw GPS nmea data. My point is yes, you can DEFINATELY make an autopilot with a Prop chip. It is far from trivial. It REALLY helps if you have extensive RC flight experience. The key is to develop a passion for it!

    AP
  • APAP Posts: 24
    edited 2008-04-27 00:17
    Ooops, sorry, I thought I was replying on the Propeller forum!
  • gncguygncguy Posts: 35
    edited 2008-04-30 21:24
    It is possible to build an autopilot with an Inertial Measurement Unit with the MEMS instruments units.· To make up for the random noise and the random biases (a constant that presists in the signal but is of unknown value) present in such instruments requires a great deal of floating point math.· So I would say you are going to at least need a math co-processor.· The easiest method is to use three acceleromenters (one for each dimension) and three MEMS gyros (on the three dimensions).· It is possible to do it with six accelerometers (each with two axes of measurement).· See the following reference:



    "Design of an integrated strapdown guidance and control system for a tactical missile"

    WILLIAMS, D. E.RICHMAN, J.FRIEDLAND, B. (Singer Co., Kearfott Div., Little Falls, NJ)
    AIAA-1983-2169
    IN: Guidance and Control Conference, Gatlinburg, TN, August 15-17, 1983, Collection of Technical Papers (A83-41659 19-63). New York, American Institute of Aeronautics and Astronautics, 1983, p. 57-66.

    You need the gyros to compute the angular motion of the vehicle.· This allows you to know the orientation of the vehicle with respect to the local gravity acceleration.· Then you add the 32.2 fps into the computed acceleratioin from the IMU.·This corrects for the gravity issue.

    You have to send signals to the control surfaces based on the errors in the commanded body orientation and measured acceleration.· For level flight, the acceleration should be zero.· If it is greater than that you need decrease the angle of attack and vice versa.

    You have to create some type of controller.· A PID controller would be a good choice.· there are many PID controller articles on the Web.

    There is a good article on Wikipedia about accelerometers and PID controllers.
Sign In or Register to comment.