3D Robotics

ArduPilot (Legacy) main page

 

3689315381?profile=original

 

[This original ArduPilot board, now called the "Legacy ArduPilot" is no longer produced or officially supported by the DIY Drones dev team, and this page is maintained just for historic reasons. However, there are still many users of it out there and it still works fine. The user group for Legacy ArduPilot users, for both thermopile and IMU use, is here.]

 

ArduPilot is a full-featured autopilot based on the Arduino open-source hardware platform. It uses infrared (thermopile) sensors or an IMU for stabilization and GPS for navigation. It is the autopilot used to win the 2009 Sparkfun Autonomous Vehicle Competition.

The hardware is available from Sparkfun for $24.95. An expansion board ("Shield") kits that includes an airspeed sensor, a 3.3v power regulator for 3.3v GPS modules and other sensors and cables and connectors for easy attachment of the XY and Z sensors, is available from our own store for $57.20.

 

User f

ArduPilot features include:

  • Can be used for an autonomous aircraft, car or boat.
  • Built-in hardware failsafe that uses a separate circuit (multiplexer chip and ATTiny processor) to transfer control from the RC system to the autopilot and back again. Includes ability to reboot the main processor in mid-flight.
  • Multiple 3D waypoints (limited only by memory)
  • Altitude controlled with the elevator and throttle
  • Comes with a 6-pin GPS connector for the 4Hz uBlox5 or 1hz EM406 GPS modules.
  • Has six spare analog inputs (with ADC on each) and six spare digital input/outputs to add additional sensors
  • Supports addition of wireless modules for real-time telemetry
  • Based on a 16MhZ Atmega328 processor. Total onboard processing power aprox 24 MIPS.
  • Very small: 30mm x 47mm
  • Can be powered by either the RC receiver or a separate battery
  • Four RC-in channels (plus the autopilot on/off channel) can be processed by the autopilot. Autopilot can also control four channels out.
  • LEDs for power, failsafe (on/off), status and GPS (satellite lock).


Resources:

ArduPilot requires the free Arduino IDE to edit and upload the code to the ArduPilot board.



The code is currently optimized for the Mutiplex EasyStar three-channel powered glider and FMA sensors, but can be modified for other aircraft and sensors. It uses the rudder/ailerons and elevator to maintain level flight and navigate to GPS waypoints. It supports a desktop setup utility and ground station software. It also includes a "fly-by-wire" mode that simply stabilizes RC flight. The main code is ArduPilot2.x.zip in the download section of our Google Code repository, where x is the latest version.

What you need to make a fully-functional autopilot:


Open source extras:

  • If you want to build your own board from scratch, the necessary files and component lists are here.
  • [Note: you shouldn't need this, since this code is loaded on the ArduPilot board at the factory] Latest multiplexer code (for the board's second processor, an Attiny, which runs the failsafe system) is here.
    Instructions for loading this code are here.



Recommended UAV setup:

3689303688?profile=original


Airframe option one: Hobbico SuperStar (49" wingspan, $95, shown above). This is an inexpensive, good flying high-wing trainer with ailerons. It can be hand launched in a park or take off from a runway, and replacement parts are readily available in case of a crash. If you want much better performance with this aircraft, you can upgrade it to a brushless motor, speed controller and a LiPo battery. [If you don't already have one, you'll also need a balancing charger and power supply.] Note: any stable aircraft with both ailerons (for stabilization) and rudder (for navigation) can work, so feel free to experiment with what you've got.

3689313666?profile=original


Airframe option two (recommended for ArduPilot 2.x): EasyStar (shown above). Performance can be improved with the modifications described in this post.

You'll also need:

  • A six or seven channel RC transmitter and receiver, with at least one toggle switch (ideally three-position but two-position will work, too, although you will have to mix channels to have access to both autopilot modes in the air), such as the Futaba 7C.
  • Some servos (at least three for ArduPilot 1.0; at least two for ArduPilot 2.x) and at least three female-to-female servo cables to connect the RC receiver to ArduPilot.


Cool optional extras for your UAV:

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Doug,
    Are you unplugging the GPS? I'm still having to do that to upload.
  • Developer
    Help!

    I tried my first code upload tonight and can't get it to work

    I have the new red board. I tried to upload the code both with the shield on and off - same results.

    I am powering the board with a NiMH 4.8 volt pack thru my RC receiver.

    I have the DIYDrones FTDI cable. I hook it up with the black wire on the pin closest the gps connector.

    I am using Arduino 0016. I have the comm port set to comm 5. I set the board to a duemilanovoe w/ ATmega328.

    When I first power on the board I get the power light on and the Stat and Lock lights flash continually in a sequence (2 slow flashes in sequence, then 2 fast flashes in sequence, then on together for a second, then repeat).

    When I plug in the FTDI cable I get occasional flashes on the Mux and Mode lights.

    I checked the Set RTS on close box on the comm port properties. I have tried 9600 baud and 19,200.

    The drivers I have on the comm 5 port are ftser2k.sys, serenum.sys, and ftserui.dll

    When I try to upload code I get:

    stk500_getsync(): not in sync: resp=0x00
    avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
  • Developer
    Jordi,

    I see you looking at implementing the integrator. I think you might want to consider implementing a cross track error proportional component instead (or in addition). I suspect that it may be more effective and wouldn't be much harder to implement. If I were to the point of being ready to fool around with the code that is the direction I'd go. Unfortunately work has me so busy....

    Seems like you could compute cross track error easily if you hold on to the original desired heading right after switching waypoints. With the current desired heading, original desired heading and distance to waypoint it should just be one cosine operation.
  • @Jordi

    thank's for the explain , i understand now why we have to reset the integrator for every wp

    and sorry about the:
    byte wp_number=3;

    i don't want any of us to be confuse but i wasn't sure about it...

    @Peter
    looks like you've got a huge experience in long path flying,
    i wish i could meet you and see your setup...but looks like we live in differnt country , a bit far away from each others.

    thanks for all the tips in here
  • Thanks for the info Peter. Great information and very interesting.
  • Yes, that was exciting. Thanks
    Far out question?
    I’ve seen some videos of these guys sending their UAV out on a run that’s like two miles out and back. Our radios don’t have that kind of range do they? I’ve always gone by the rule that if you can see it, you have control, but I’ve never had the guts to push it that far.
    Peter, I think it was you, talked about going for a long run with a spotter in the middle. Have you set a launch date yet?
  • Just got here so to let you know, changing the radius from 20 to 40 was the fix, boys.
    Had a gorgeous flight this morning. Hit all waypoints and got home so quickly that I went around for another pass.
    40 is not a bad number to start out with in my case. It seemed very close to my desired location and with a very decent strait line course, headed for the next. Had no wind to speak of, but now that I’ve seen it happen, I’m up for the challenge.
    Thanks guys,
    Brent
  • Developer
    To everybody,

    dont worry about:
    byte wp_number=3;
    Is updated every time the system boots with the eeprom.
  • Developer
    @Fefenin
    Integrator of roll and pitch will increase slowly the output (that goes directly to the servos) over time.. This eliminated the fact of never reach the desired point that normally happends when you only use proportional control.

    Integrator= integrator+ ( (Error*dt)*integrator_gain);

    You can see in the formula that the integrator increase, and the increase or decrease rate is proportional to the integrator gain (Ki) and the error amount. IF the error is zero will stay there. If the error is negative will start subtracting. The problem with integrator is that if you don't limit it or you put a gain very high the system will overshoot once or two times.

    Check what happens when you play with the integrator gain (Ki) in system:

    (from wikipedia).

    We can add that to the navigation part (for heading) to lock the waypoints better and reset the integrator every time we switch waypoints to void overshoots or long term turns.
  • right,
    i'm not talking for me , my settup works great now...

    i thaught i saw with earlier version this behavior that make the plane go to the right waypoint and after one or two going any whereelse , but it could have been the setup , you are right

    was just asking,
    sorry for the question


    so we can go up to 20 waypoint right now!!!!!!!!! so cool


    regards
    jeremy
This reply was deleted.