3D Robotics

Surprise! ArduPilot can do stabilization, too

We've been describing ArduPilot as a navigation-only autopilot and saying that it needs the FMA Co-Pilot to provide stabilization. But that's actually not true--we just hadn't written the stabilization code yet. ArduPilot is powerful enough to handle both functions, something that Jordi proved this week with his ArduPilot-powered FunJet. The above picture shows all the elements (click for a larger version): A FMA X-Y sensor is connected to two of ArduPilot's analog inputs. The four wires in the FMA sensor cable are, in order, roll, pitch, 5v, gnd. Connect roll to ArduPilot's analog 0 port and pitch to analog 1. This is an example of how flexible the basic ArduPilot hardware is. It's the exact same board, but with different code and sensors added on the analog ports. We're going to add an airspeed sensor, too, and other goodies over time. You can do a lot with this little board! Here is the alpha code, which is just so you can see the basics of how he did it. It's got the GPS stuff stripped out, but Jordi also has a working version with a 5Hz UBlox GPS. For the public beta, we'll use a 3-channel EasyStar, rather than the FunJet, and the standard 1Hz EM406 GPS. The FunJet is, well, fun, but hard to fly (Jordi crashed it three times this week alone!) and not for everyone, and we want to stick with the simplest, easiest to use equipment for our main releases. Stay tuned.
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • @Jordi, Chris - is there an alpha of the aispeed sensor implementation? I am 3 caps(in the mail) away from having the finished sensor done with pitot and static using MPXV7002DP :-).
  • Ah, forgot to connect the ESC and motor for the pic :P

  • Here is my soon to fly setup - GPS is still in the mail :-( but as soon as it comes I will start testing
  • Developer
    Noth666:

    The mixing is done by software =) ....


    Jordi
  • 3D Robotics
    Using the registers is much more efficient than using the built-in servo library. We'll be releasing new code this week, so stay tuned for that.
  • Hello

    In the stabilisation code the servo.pde file shows servo control being done with configuration of the ATMega168 registers. Why was this done instead of using the servo library in arduino? Also I copied a bit of your code and tried to run some basic code with it to control a couple servos. For some reason I cannot get any travel from my servos. Could someone tell me what I have done wrong or left out? The first of the 3 sketches tries to use the servo library while the other 2 attempt to follow the stabilisation code but nothing works. Also what is the difference between the servotimer and normal servo library?



    sketch_servotest.zip

    I apologise if my questions seem silly, I have only now started to work with arduino and ardupilot and do not have much experience.

    Regards
    Sirk
  • @Jordi: I will be using a deltawing for this, but is the mixing done in software or should I use an external mixer?
    So the rudder is not used but up elevator and bank right/left for turns? If so it would save me time since I was expecting to have to do this bit myself :)
  • Developer
    The servo outputs depends in how to connect your IRs, but i use analog0 as roll, analog1 as pitch. Then the servos outputs should be in the same order; output one is roll, output two is pitch, but this code will not work with a normal aircraft, because is configured for V-tail mode or flying wing mode..

    I right now i'm working in a version for EM406 and normal aircraft's..
  • I just got my ArduPilot last night and my FMA is coming the next days... I was going to test some with this but with EM406 instead, but I am not entirely clear on how this will work with switching to and from autopilot... Will switching to manual stop the stabilization or is this handled in the backgroun by ArduPilot stil?
    Also which of the out ports should go to elevator in the alpha code?
    I am making a lightweight MAV so removing the weight of the copilot is a big plus.
  • FMA has its IR heads for sales for $42 and as I recall free shipping. Digikey has the devices listed for $22 in small qties. Buying the FMA head and modifying, cannabalizing or using as-is is the logical way to go.
This reply was deleted.