How to Setup your APM Flight Controller - Jiuyu Zhang

How to Setup your APM Flight Controller

Project Publishing and Portfolio

How to Setup your APM Flight Controller

Summary

In this section, you will find information about setting up your drone, but not building it.
You will be using a piece of software named “Mission Planner”, which is the most optimised for APM flight controllers.

Mission Planner


Sample APM Controller Board with Enclosure, Photo Courtesy of IndiaMART

Prerequisites

To setup a drone, you will firstly need to have a drone. In this section, I will go through the necessary parts of a drone and setting up the required software. In this guide, I will not be going through the methodologies of building a drone, only the software.

Parts Required for a Drone

  • 1 x Frame (Retail model F550 in my case)
  • To house all components and provide a rigid backbone for the drone
  • 4/6 x Motors, ½ Clockwise, ½ Counter-Clockwise
    • To provide lift for aircraft
  • 4/6 x Propellers, ½ Clockwise, ½ Counter-Clockwise
    • To attach to the motors
  • Flight Controller (APM)
  • In this guide, we will be using the APM a.k.a. ArduPilot controller
  • ESC (Electronic Speed Controller)
  • To translate the flight controller’s instructions into electric waves, to control the motor’s speed
  • Battery
  • Pay attention to “S” rating, this denotes the number of cells in series, thus the voltage
  • Pay attention to the capacity rating, usually given in mah (milliamp-hours). The rating means that the battery can run at (current in milliamps) for (time in hours). The two values multiplied gives you the capacity.
    • Pay attention to discharge rating, usually given as a multiple of the battery’s capacity in milliamps. E.g. a 25x discharge 5000mah (or 5 amp-hour) can discharge at a maximum 125 amperes. There is usually a continuous and a peak rating. The peak rating is the current that you can draw for x amount of time, before damage can occur.
  • Battery Charger o To charge multi-cell lithium batteries, you will need a “balance charger”. These chargers will equalise the voltage between cells, to avoid damage to the battery.
  • Battery Alarm
  • The battery alarm will give you an indication of the amount of charge that is left in the battery and will sound an audible alarm when the voltage drops below the set threshold. Over-discharging your lithium batteries will cause it to no longer function, and in some extreme cases, combust or explode.
  • Radio Receiver
  • The receiver of a radio controller gives instruction to the flight controller on what to do, through manual controls on the ground
  • Radio Transmitter
  • A radio transmitter + controller is similar to a console controller, with joysticks to control the various movements of a drone.

Safety is of utmost importance, so it is imperative that you abide by the safety rules and use common sense. When charging a battery, NEVER leave it unattended. In the case of fire, unplug the battery and call emergency services if required. 000 in Australia

Optional Accessories

  • GPS
    • The GPS will provide location data for the drone, and can be used for autonomous flying. The GPS is usually bundled with an altimeter, which measures the altitude of the drone through air pressure.
  • FPV System
  • FPV is an acronym for “First Person View”, where a camera can be attached to the drone to provide a live video link from the drone to the grounds, through radio transmitters.
  • Filming + Gimbal
  • A small camera can be added to a drone, for HD/UHD/High-Quality video recording. This is usually not transmitted to the ground, as the video encoding is too data-heavy for consumer-grade hardware
  • A gimbal stabilizes the video, especially when the drone “pitches” forward to move.

Necessary Software

For the APM series boards, we will require a piece of software named “Mission Planner”, which will give us the ability to tune and calibrate our flight controller. This can be done by a simple search on your choice of search engines, and the one that is from “ardupilot.org” should be the correct version. For various reasons, including this document being outdated and the legality of distributing software, a direct download link will not be provided.

First Time Setup and Calibration

After downloading the software and installing it, you should now open the application and be prompted with a screen similar to the one below. Mission Planner Layout and GUI

To setup your drone, connect your computer to the APM controller via a USB A to Micro USB cable, make sure that the cable is a data cable, and not charge-only.

Plug in the controller via the USB port on rear of the controller.

Plug in the controller via the port at the rear of the enclosure

On Mission Planner, locate the “Connect” button and click it. A message box should appear, with the text “Connecting to MAVLink”. 

Press the Connect Button

After connecting the controller to your computer, locate the “Initial Setup” button along the same toolbar as the “Connect” button. In the “Initial Setup” window, click “Wizard”, which should prompt a message box.

This starts the calibration of the drone, so that it can fly smoothly.

Select a suitable category. This is just the configuration that your drone would take shape. In my case, I will select the 6 armed versions, as I have a hexacopter, yours may be different.

Click “Next”

Now you should be prompted with “Please select your frame layout from below”.

In my case, I have an “X” drone, yours may be different. This configuration is called an “X” configuration due to the fact that, if you have the controller facing vertically, you would have an “X” shape. In this case, we omit the two arms on either side of the drone, because we have 6 arms as opposed to 4.

Click “Next”

This step is the calibration of your drone. We need to ensure that the gyroscope in the flight controller is calibrated and balanced, to avoid our drone stuttering when airborne or even to achieve flight at all.

Click “Start”

Follow the instruction on-screen, one finished, the “Continue” button should be greyed out.

Click “Next”

This step is the compass calibration. You will need to calibrate your compass (refer) by rotating your drone at a slow speed along all 3 axes. (Yaw, Pitch, Roll) If you would like a visual example, click on the “YouTube Example” link to the right of the “Live Calibration” button. Or click here for another YouTube video.

Click on the “Live Calibration” button, a prompt with a 3-axis diagram should appear. Once finished, a prompt informing you of such will appear.

Click “Next”

For the first and second box, answer accordingly; The autopilot version should be included with the purchase of the parts, ask the seller if in doubt. If you are using a power module, select the options accordingly, again, ask the seller if in doubt. The third box is the size of the battery that you are currently using, as mentioned earlier, your battery should be labelled with the capacity, ask the seller if you do not know or is unsure about this information.

The next step is if you’re using a sonar, select the version that you’re using. If you’re not using a sonar, ignore this step.

Bind your controller to your receiver, all makes and models are going to be different, but the fundamentals should still be similar. After binding your controller, plug in your battery (although you should have already done this when pairing the controllers).

<span style: “colour:red”>REMOVE ALL PROPELLORS BEFORE MOVING THE CONTROLS

Press the “Calibrate Radio” button, and move all joysticks, sliders, switches and potentiometers to their minimum and maximum extremes. This should be reflected upon the screen, with the green bars moving.

After clicking next, you should now be on a panel with many drop-down boxes. Each word/phrase means different a flight mode, stabilize, RTL, etc. This video should serve as a good explanation for the different flight modes.

After that step, just click “Next” or “Continue” until finished.

The initial config for your drone should now be finished!

jQuery(‘body’).bind(‘copy paste cut drag drop’, function (e) {
e.preventDefault();
});

Leave a Reply