Skip to content
Arthur Benemann edited this page Mar 15, 2013 · 1 revision

The main way you setup and test APM is via a Command Line Interpreter (CLI), which is a bit like the old DOS prompt. You MUST setup APM using this CLI process before you can use the board to fly.

Note that after you change the slider position you must reboot the board so it can be recognized and boot into the correct mode. (This means that after you use the CLI and move the switch back to the flying position, you must power the board off and on again before launch).

To use it, follow these three steps:

  1. Ensure that the IMU Shield slider switch is in the position closest to the servo connectors as shown. (You will later move it back to the DIP switches side of the board when you're ready to fly). Press the reset button to restart the board (you must do this every time you change the slider position)

http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/slider.jpg

http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/reset.png

  1. Ensure that the USB cable is connected to your PC
  2. Open up the Terminal in the Mission Planner by selecting this Terminal tab (ensure that the serial baud rate is set for 115200 in the Options menu).

This will bring up the Terminal window, and if your APM slider switch is in the right position (towards the RC connectors), you should see the APM CLI menu:

http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/mpterminalAPM.PNG

You can now enter commands by typing them at the command prompt. You can always type "exit" to leave any mode.

In the following examples, I'll be using another serial terminal (in this case the Arduino Serial Monitor). You can use any terminal you want, but the Mission Planner terminal is the most straightforward.

Here I'm typing "help" to see a list of available commands:

http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/help.png

Initial commands are:

  • "logs": Log readback/setup mode. Used after flying)
  • "setup": Initial setup mode)
  • "test": Test mode)

Setup

The Setup process configures APM for your particular RC radio settings and desired flight modes. Type "setup" and hit return to enter this mode.

You MUST setup both radio and modes before you can fly. You should also test that you're getting GPS lock (using the gps command in the test mode), which usually means testing outside where the GPS module has a clear view of the sky.

Allowed setup commands are:

  • "reset": Resets APM to default settings
  • "radio": Sets up RC settings (see below)
  • "modes": Sets up flight control modes for each RC toggle switch position (see below)
  • "compass": Enables compass. Commands are "compass on" or "compass off"
  • "declination": Sets local magnetic declination for compass. You can find your local declination at this web page. Although it is given in minutes and seconds, enter it as a decimal. So {{{14° 10' E}}} would be entered as 14.10.
  • "battery": Enables battery monitoring. Enter options 0-4 (repeat to enter additional options): 0 = Batt monitoring disabled 1 = Monitoring 3 cell battery 2 = Monitoring 4 cell battery 3 = Monitoring batt volts 4 = Monitoring both volts and current
  • "show": Shows all current settings in EEPROM
  • "erase": Erases EEPROM

Radio Setup

Note: APM does not power the RC receiver or servos (although the RC equipment can power APM). If you have APM powered by USB, you must also connect an ESC/Lipo or receiver battery to the RC APM pins (typically, the ESC would be plugged into Out 3, while a receiver battery would typically be plugged into your receiver, which would send power to APM via the RC cables). If you do not separately power the RC system, APM will be unable to read any signals on its RC inputs.

In this mode you must move both sticks to all of their extremes, as follows:

Move the right stick to the top right, then bottom right, then top left, then bottom left. Then repeat for the left stick. The order doesn't matter, but what's important is that you hit all four corners for each stick. Hold the stick in each corner for a second.

Here's a screenshot of a typical Radio setup process:

http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/setup2.png

Note: As shown above, the RC readings for the channels you have hooked up should be around 1,000-1,300 at the low end and around 1,900-2,000 at the high end. (Readings of exactly 1,000 and 2,000 mean that channel's not connected at all). If you are getting readings that are all around 1,500, there are three likely causes:

  1. You didn't move both sticks to all four corners of their range during the test, or did it too quickly.
  2. Your RC connections are plugged in wrong, either upside down, on the wrong pins, or otherwise not making a connection
  3. You have one of the early APM boards that may need to have its PPM firmware updated (this should not be a problem for any board shipped after mid-2010). Instructions for doing that are here.

Flight Control Modes

Here's how to set your flight control modes:

In the CLI, enter setup mode. Type "modes" and press return. You can now see the flight modes displayed as you move your control switch to each position. If you want to change your mode, use the rudder/aileron control stick on your radio. Just move the stick to the right or left and the mode will increment. Hitting Enter will exit the mode and save your changes.

See this example:

http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/modes.png

Here's a video tutorial:

<wiki:video url="http://www.youtube.com/watch?v=E7RE1B0lhk4&feature=player_embedded/">

Checking for reversed servos

Now is a good time to go back and see if any of the DIP switches need to be flip to reverse a servo. Instructions are here. And remember that if you're flying an elevon plane (flying wing or delta), you should set the mixing with the DIP switch, too. And if you're flying a regular plane and find that channel 1 and 2 are accidentally combined, that means you've accidentally got it in the elevon mode. Push the last DIP switch down to return to normal.

Logs

This mode allows you to read and manage flight log files in the onboard 16MB dataflash memory.

NOTE: You must use erase before trying to use the logging function. Failure to do an erase first will cause problems and show false results.

  • "dump (n)": Dump log "n"
  • "erase": Erase all logs
  • "enable (name) or all": Enable logging "name" or everything
  • "disable (name) or all": Disable logging "name" or everything

Tests

You can also test your hardware and settings with interactive test modes. They're all described here.

Clone this wiki locally