Thread Tools
This thread is privately moderated by mike_kelly, who may elect to delete unwanted replies.
Mar 18, 2017, 01:09 PM
Wisconsin
Thread OP
Discussion

Pixhawk Advanced Features for beginners: Learning Pixhawk & Mission Planner - Part1


Ardupilot and Pixhawk, hands down, have the best features per dollar than any other flight controller. That is, if you are doing work and not racing. But with that extensive set of features comes complexity. The key is learning only what you need to get started in order to not get overwhelmed at first. Then, add new features as you need them.

Let's take a look at the system and what it entails.



First, you have your flight controller. It will be a Pixhawk or one of the derivations of the original Pixhawk designed by Lorenz Meier of the Swiss Federal Technical Institute of Technology as a graduate student project (www.pixhawk.org). This board is basically a computer chip with memory to store values and sensors to figure out where it is located and how it is moving. The flight controller computer requires software to teach it how to do its job. This program is called Arducopter, or Arduplane etc., and it is firmware that you load onto the flight controller. There are two different versions of firmware for the Pixhawk. It is a little confusing. The hardware previous to the Pixhawk was called the PX4. This board was in two pieces with the i/o on a separate board but newer versions integrated both boards into one like the Pixhawk did. When the Pixhawk, an improved version of the PX4, was released and funding support provided by 3DR the progress of features and improvements moved rapidly with the Pixhawk and the PX4 was left behind. The license for using the Pixhawk design requires that all vendors that use the open source design make open source any improvements they add to the design. The license for the original PX4 was not so restrictive. There has been a resurgence of interest in the PX4 lately because some new companies want to make flight controllers, based on the PX4, and not share any changes they make. So now there are two branches that started at a similar point but diverged. The PX4 firmware does not have the exact same feature set as the Ardupilot firmware. Both generally run on both Pixhawk and PX4 based hardware. Unfortunately because of the history the words Pixhawk and PX4 are loosely used and confused making it hard to sometimes determine which is which.

I should say something here about clones. There is no such thing as a Pixhawk clone. The project has always been "Open Source" which means anyone can use the design, modify it and sell their version. But there is a difference in vendors. There are differences in quality control, connectors used, sensors etc. from one vendor to the next. Some pay money to the development team, a small group of highly skilled programmers, to help them make a living so they don't have to have "day jobs." Flight controllers are very complicated and to get new features requires a huge amount of work. In a typical open source project many folks work as volunteers to help build the project. But in the more complicated projects a core team is paid by someone to help get things done much faster than volunteers only can accomplish. Many times companies pay people to work because they think the results might be something they could use someday. In the beginning of Ardupilot, 3DRobotics and Intel paid developers to work on Ardupilot. But times change and now Ardupilot gets most of its funding from Partners and Users like you. So consider going to the Ardupilot.org website and donating to help keep the new features coming and problems debugged. Ardupilot is being used by many thousands of people worldwide so even a small donation by a lot of people makes a difference.


Second, there is a multi-purpose software program for your laptop or desktop called Mission Planner. This application does a number of tasks for you:

1. Easily loads the firmware the flight controller needs onto the flight controller.
2. Gives you a way to communicate with the flight controller and see and change all the options to control the Pixhawk.
3. Helps you calibrate all the sensors on your flight controller.
4. Acts as a terminal to receive the status of the flight controller, called telemetry, and displays it on a HUD, a Heads Up Display.
5. Receives logs from the flight controller and stores them to help troubleshoot problems.
6. Can analyse logs and graph the changes of sensors data during the flight.
7. Allows you to use maps to plan an autonomous mission that can tell the flight controller where to fly a route automatically with no user input.
8. Allows you to use a scripting language to put commands in the mission that can control cameras, gimbals, grippers etc. during the flight.
9. Allows you to test your motors and other components.
10. Has a simulator that can connect with an external flight simulator.
11. Communicate with and monitor the flight controller during flight.

Mission Planner, for Microsoft Windows, is called a "Ground station" and there are others available in the Ardupilot world including QGroundControl, APM Planner for Linux and Tower for Android.

So let's install Mission Planner. You get it on the internet from Ardupilot.org where all the documentation for Ardupilot is located.
Latest version of Mission Planner

You will need to have Microsoft Dotnet installed first, available from Microsoft downloads. Each flight controller uses a USB interface to connect to your desktop or laptop and during the Mission Planner install it will install drivers Windows needs to talk to the Pixhawk. There can be problems with different versions of Windows getting those drivers installed and not having anything else like Bluetooth interfering with the install. For particular versions of Windows and for certain people, expect to do some troubleshooting on RCGroups to overcome unique problems with the install. This really has nothing to do with Mission Planner.

This is the start-up screen for Mission Planner:



In the upper right is the area used to set the baudrate and serial port to connect to your Pixhawk via USB. There are a couple of issues here. First, Pixhawk is exteremely picky about the quality of the USB cable.



Many of the USB cables that come bundled with flight controllers are defective right out of the box.
Second, the USB standard is spec'ed for 500ma of available power but laptops and desktops share that power between all their USB ports. So it is possible that your desktop or laptop usb port may not be able to supply enough power to properly operate the Pixhawk. You can get an external POWERED USB hub to help solve this problem.

When you plug in your usb cable to your flight controller and Windows successfully recognizes it you will see something like "COM9 PIX4 FMU" in the dialog box near the Connect button. The com port number will change with particular versions of Pixhawk. So it may read "COM32" etc. Next to the Comp port dialog box is the baudrate. All Pixhawks come out of the box set to communicate at 115,200 baud over USB. This baudrate is different for radio modems and other ways of communicating with the Pixhawk. If you are not sure just plug in your Pixhawk, look at the list of comports and note what is shown then unplug the Pixhawk and the com port that disappears is the Pixhawk. If no com port diappears then your computer is not recognizing the USB connection and you may have to try re-installing Mission Planner which loads USB drivers for Pixhawk during the install.



Once connected, the box below the connect button gives the status of the link.

The next icon (button) from the right is the DONATE button. This software is totally free and it is a real asset to the Ardupilot world. If you find you depend on it to operate your aircraft please consider donating to the developer, Michael Oborne, who is very dedicated to debugging, adding features and making Mission Planner even better.

I'm next going to skip to the "Initial Setup" button. This is where you choose your firmware and configure your craft. The Ardupilot world includes Arduplane, Arducopter, Ardurover, Arduboat, Ardutracker and now Ardusub. The same Pixhawk hardware can be used with any of these platforms. In order to choose which platform you want to use you go to the "Initial Setup" button. BUT FIRST YOU MUST NOT BE CONNECTED TO YOUR PIXHAWK. When you install new firmware, Mission Planner must connect to a low-level bootloader rather than the higher-level firmware that is already on the Pixhawk. So choose the right com port and set the baudrate to 115,200 but DO NOT hit connect.

On the "Intial Setup" page we see Install Firmware which is our choice for this task.



This page shows us the vehicles that Ardupilot is available for and the latest version of the firmware for those vehicles. You must be connected to the internet so Mission Planner can go look for the latest firmware. There are advanced options in the lower right that allow you to load Beta versions being worked on but not released yet (because they may not be completely debugged), options to load firmware from a file on your computer, and other options. If you are using the older APM flight controller, that has 3.2.1 as the last version that will run on it, Mission Planner will still show the latest version BUT will install 3.2.1 not the lastest version.



Simply connect your Pixhawk via USB and pick the vehicle and, in the case of multirotor, which frame type. Mission Planner will then connect with the Pixhawk, download the firmware from the internet, erase the old firmware and upload the firmware you chose to your Pixhawk. After it finishes you will be admonished to not reboot or try to connect until all the musical tones are finished. (Which you will not hear if you have no speaker connected to your Pixhawk.) Just wait a few minutes until the Pixhawk has a chance to reboot.

In part two we will configure the flight controller and calibrate the sensors.
Last edited by mike_kelly; Nov 10, 2017 at 11:40 PM.
Sign up now
to remove ads between posts
Mar 24, 2017, 02:26 PM
Waste Nothing
RickC_RCAV8R's Avatar
Mike :

I have been keeping a keen eye on this series you are posting as I have a couple of new quad remodelled as cam platforms now . Still have the APM2.6 as my FC as that is all I have on hand . As it worx , I will use that until I smash it in a crash .

Snow pack is nearly gone ! Yay . Muddy ground around the shop to deal with for awhile in the monsoons but the daytime temps allow for flying without having the fingers freezing . Kudos on the work mate .
Latest blog entry: Filament Fridge ?
Mar 24, 2017, 04:19 PM
Wisconsin
Thread OP
The good old APM 2.6 will still work fine for most folks. Snow is mostly gone but still cold. I have a VTOL I want to try, I built during the winter, but too wet out from the snow melting. I am such an "FPV challenged" individual I built a crawler to practice FPV with no chance of crashing!

How is your vtol flying?
Latest blog entry: UC4H: Gimbal flight test
Jun 23, 2017, 05:35 PM
Registered User
Great post. Please note that the "Load Previous Firmware" option is no longer available, at least not as per your screenshot.

I had to download an older version of Mission Planner to be able to load firmware and then install the current MP.


Quick Reply
Message:
Thread Tools