3D Robotics

Using ArduPilot 2.x in the field

Instructions for using ArduPilot 2.x in the field:

ArduPilot 2.1 and above (with Z sensor). This version of the software auto-calibrates the IR sensors. The only thing you need to do at the field is to record the "home" GPS position in EEPROM memory, which will not be erased when you reset or power down the board. To do so, follow these instructions:
  1. Ensure that the autopilot is in manual mode (channel five toggle off) and GPS is connected
  2. Place a jumper cap on pins D6 and D7 (you can also connect a regular RC power switch to those pins if you want to control the autopilot from outside of the aircraft). Ensure that your aileron and elevator sticks are in the center position, and power on the board.
  3. The yellow status LED will blink for a few seconds as the autopilot programs the GPS for binary mode. Then the blue lock GPS will blink rapidly, which means the autopilot is waiting for GPS lock. You can now remove the jumper (or return the switch to the normal position)
  4. When the autopilot has established a GPS lock it will move the rudder. Note that ArduPilot puts the EM406 into binary mode, which disables the red LED on that module, so it will not blink.
  5. You’re now ready to fly! Press the reset button on the ArduPilot board to restart it (your calibration settings are saved in permanent memory and will not be erased).
  6. ArduPilot 2.0 supports two autonomous modes: waypoint and return-to-launch (RTL). If you have a three-position toggle switch or a proportional dial on your RC transmitter, the middle position is Waypoint Mode and the up (or full clockwise) position is RTL Mode. These can be changed in the software if desired. The Mode LED on the ArduPilot board will light up with it is in Waypoint Mode.
  7. To use fly-by-wire mode (just stabilization, like the FMA Co-Pilot), simply disconnect the GPS. ArduPilot also automatically switches into stabilazation mode if it ever loses GPS lock.
ArduPilot 2.0 (no Z sensor): This version requires that the IR sensor be calibrated in the field, on arriving and if the weather conditions change significantly:
  1. Ensure that the autopilot is in manual mode (channel five toggle off) and GPS is connected
  2. Place a jumper cap on pins D6 and D7 (you can also connect a regular RC power switch to those pins if you want to control the autopilot from outside of the aircraft). Ensure that your aileron and elevator sticks are in the center position, and power on the board.
  3. The yellow status LED will blink for a few seconds as the autopilot programs the GPS for binary mode. Then the blue lock GPS will blink rapidly, which means the autopilot is waiting for GPS lock. You can now remove the jumper (or return the switch to the normal position)
  4. When the autopilot has established a GPS lock it will move the rudder. Note that ArduPilot puts the EM406 into binary mode, which disables the red LED on that module, so it will not blink.
  5. Holding the aircraft without obscuring the thermopile sensor, point the nose at the ground. Switch the autopilot on with your RC toggle switch. The elevator will move, signaling that the sensor has been calibrated.
  6. You’re now ready to fly! Switch the aircraft back into manual mode for launch, and press the reset button on the ArduPilot board to restart it (your calibration settings are saved in permanent memory and will not be erased).
  7. ArduPilot 2.0 supports two autonomous modes: waypoint and return-to-launch (RTL). If you have a three-position toggle switch or a proportional dial on your RC transmitter, the middle position is Waypoint Mode and the up (or full clockwise) position is RTL Mode. These can be changed in the software if desired. The Mode LED on the ArduPilot board will light up with it is in Waypoint Mode.
  8. To use fly-by-wire mode (just stabilization, like the FMA Co-Pilot), simply disconnect the GPS. ArduPilot also automatically switches into stabilazation mode if it ever loses GPS lock.
E-mail me when people leave their comments –

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

Join diydrones

Comments

  • The aerodynamics and mechanics of each type of model will be different. What I would do before the first flight is a ground test. After performing the field setup, walk away from "home" and switch to RTL. Do the ailerons guide you back to home? Does the elevator deflect up to reach your altitude setting? Do the IR sensors try to correct your attitude in roll and pitch when you tilt the plane? Once you have the throws correct and fly RTL as recommended by Chris, does she dive, oscillate, go into a death roll? The best way that I've found to begin handling these issues in the code is with the roll min/max, pitch min/max, roll_P, pitch_P and trim settings.
    Let us know how the first flights go and good luck!
  • 3D Robotics
    Matt,

    You've got a lot of work ahead of you in tweaking ArduPilot before you're ready for waypoints. I'd just tune it for your plane in RTL mode, and only once it's working use waypoints. I don't know of anyone who has flown it on a predator, so you're in uncharted territory. But you can look at Byran''s work in tuning it for an Easy Glider and that should give you some tips. (Look at the yellow highlights in the latest spreadsheet)
  • I'm looking at doing my first Ardupilot flight with a 74inch predator, with Ailerons.

    What parameters are most likely going to have to be changed to get the best stability performance?

    And if I change some settings in the source, then upload again to the board, I'll have to set my waypoints again right? So is there any way to save a flight plan in the utility? If not, can we expect this feature?

    Matt
  • 3D Robotics
    Rasit,

    You need to download and install the serial drivers, too. (This is all described in the instruction post)
  • You should be able to assign GoogleEarth to open .kml files Rasit.
    Vista Instructions Here.
  • Chris,

    I've installed the latest software (2.1.1) to the arduPilot, but I cannot get ground station and the config tool working as yet. The ground station does not list the I/O ports. When I click the GoogleEarth button, it complains about the file extension (i.e., it does not know how to open the NetworkLink.kml file). The config tool says it cannot write (but why is not clear;-( I get some output when I use the arduino, though)

    Any help is appreciated!

    --Rasit

    P.S. I'm just trying things offline, i.e., nothing is on board yet...
  • @Graham - I hope this helps - Chris has been helping me out so I feel like I oughtta "give back". It appears that the wp_number is the number of waypoints *not including* the launch, or initial waypoint, making the answer in your example = 2. For ArduPilot 1.0, see MissionSetup.pde , setup_waypoints() and in ArduPilot.pde, see the declarations and main loop. For ArduPilot 2.0 (the latest I've seen), see the Waypoints.pde code, setup_waypoints(), the Navigation.pde code (saves the initial launch location into the 0th waypoint), and the ArduPilot_EasyStar_WP.pde code where the declarations for wp_number, storage arrays, and calculations are made in the main loop. Again, hope his helps more than it hurt.
  • 3D Robotics
    Byran,

    Those are some legacy comments that Jordi forgot to delete from the code. Ignore them and I'll remind him to remove them.
  • Chris,
    In the Ardupilot 2.1 field setup you don’t mention pointing the plane down to calibrate the IR sensor but in the 2.1 code, under the sensors tab, Jordi has instructions that state:
    “When you are ready pitch down the aircraft and now move the switch up (auto). Ready the IR's are calibrated.”
    I’m not getting the ailerons to respond with the IR sensors and it might be due to the wrong calibration procedure. Which is correct?
    Thanks
  • Moderator
    Chris, when putting in the waypoints, they are listed like this:
    wp_alt[0]=15; //Start position altitude
    //wp_lat[0]=0; Do not change unless you want to override home position...
    //wp_lon[0]=0; Do not change unless you want to override home position...

    wp_lat[1]= -xx.xxx;
    wp_lon[1]= xx.xxx;
    wp_alt[1]= xx; //meters

    wp_lat[2]= -xx.xxx;
    wp_lon[2]= xx.xxx;
    wp_alt[2]= xx; //meters
    etc

    and numbered 0, 1, 2, 3, 4 however as far as the "#define wp_number" is concerned would the above be considered 2 waypoints or 3?
This reply was deleted.