The Quadrino GPS

Before we begin

Gather these details now before you begin:

  1. Write down what other modules are attached to the flight controller (FC), and if possible find out how much power (current/mA) each module requires. We have a combined limit on the power the FC is capable of sourcing.
  2. If other modules are attached to the Quadrino beside the receiver module, then read up on Powering External Modules before you begin this tutorial.

The advantage of buying the Quadrino GPS over alternative GPS units is that you do not need to be concerned with most of the details of wiring up the GPS unit. The device is matched to the Quadrino Flight Controller so you do not need to be concerned with voltages, polarity and wiring diagrams. There is only one way to fit the GPS to the Quadrino board, so doesn’t get any easier than this!

OVERVIEW

We will perform the following steps to complete the setup of the GPS module:

  1. Initial verification of the flight control board.
  2. Mount the GPS module to the Quadrino Flight Controller board.
  3. Test the operation and satellite lock of the GPS unit.
  4. Update the firmware (software code) on the flight control board.
  5. Configure settings in the MultiWii Config tool for optimized Position Hold and Return to Home

[notice class="notice"]Please submit your feedback on this tutorial so that I can make it better![/notice]

PRE-INSTALLATION STEPS

First of all, DO NOT update the firmware on your Quadrino until after you have installed the GPS module, or DO verify the basic operation of the Quadrino before mounting the GPS. We want to be sure that if the basic operation fails after installation of the GPS module then it was something in the GPS installation and not a preexisting condition.

Once the GPS is installed, verify the basic operation again before updating the Quadrino firmware with a GPS-enabled version. Take the installation process one step at a time verifying after each step. A firmware with GPS features disabled will simply ignore the GPS but if the GPS is installed incorrectly it can affect the operation of the flight sensors such as the gyro, accelerometer, magnetometer and barometer. Also, failed sensors after a firmware update can simply be the result of misconfigured firmware. If we verify basic operation after each step then we will narrow down any mistakes to the exact cause and not have to start over. In any case, have no fear, these issues are usually easily fixed, permanent damage is very rare, and if the unthinkable does happen we do have the best warranty in the biz!

MOUNTING

The first step is to mount the GPS module to the flight controller board. This involves attaching the standoff to the flight controller in the proper mounting hole (North-West hole), and then inserting the GPS board’s 4 bottom pins into the matching holes on the flight controller. The mounting hole of the GPS module should then line up perfectly with the standoff you just mounted.

Once mounted it is recommended to add a little solder to the pins that were inserted into the flight controller to semi-permanently affix the GPS unit to the flight controller and provide a solid electrical connection at all times. Flip the flight controller board over and solder the pins from the bottom.

If you decide not to solder the pins an alternative is to bend the 4 pins of the GPS device so that when inserted the pins are pressure fit into the mating holes of the flight controller. However, be forewarned, if the electrical connection is not perfect it can cause noise on the sensor bus interrupting the communication of the gyro & accelerometer and causing the copter to possibly crash. Solder the connections!

 TESTING

Now you are ready to power the units on and test the software and communication. If you haven’t reflashed the Quadrino with a GPS-enabled version of MultiWii then I would suggest testing as is first to make sure that the board still works and all sensors communicate without I2C errors. You wont have GPS yet, but you can verify you did nothing wrong so far. Once you've verified basic operation of the Quadrino then move on to uploading a GPS-enabled version of MultiWii. By default, the MultiWii code on the Quadrino controller does not recognize a GPS module.

 CONFIGURING THE FLIGHT CONTROLLER

Once the GPS module is mounted and you’ve confirmed it can lock onto more than 5 satellites it’s time to configure the flight controller firmware to read the GPS device and lock in the optimal settings.

 MAGNETIC DECLINATION

The most important setting you need to change is the MAG declination, which is dependent on where you live. The magnetic lines of the earth are not perfectly aligned with the longitude lines and thus what the magnetometer reads as north may not be the true north. We can use the website http://magnetic-declination.com/ to lookup the angle difference between magnetic north and true north for our region.  This site will give us a degree offset plus a fraction of a degree, called a minute or indicated by the single quote (‘), but we need this converted to a single decimal number.

If you use the Quadrino Firmware Tool this is explained on the GPS settings page and the decimal conversion is done for you.

       decimal degrees = degrees + minutes / 60

If the web site gives us -17° 30' as degrees and minutes we get:

       Decimal Degrees = -17 + -30/60 = -17.5

Notice the sign of the 30’ matches the sign of the angle, both being negative. Think of it like converting hours:minutes to decimal form and this will make sense.Now hold onto this number, we will use it later. 

 

 PROGRAMMING the flight controller

We are now ready to reprogram the firmware on the Quadrino Flight Controller board. I recommend you use the Quadrino Firmware Config Tool to do the programming, this is the easiest way to reprogram your board and enable the GPS features. The Firmware Tool is available through the FIRMWARE UPGRADES link on the top menu. Download and install the tool then proceed through the wizard until you come to the Options page where the GPS page tab is available.

The firmware tool allows you to configure many of the GPS options. You will need to enter on this page your magnetic declination you determined in the above step. You can enter the degrees and minutes here directly and the program will calculate the fractional degrees for you.

There are some advanced options (listed below in OPTIMAL SETTINGS) that are already tuned for you and are hidden from the page. These will be available soon under an ADVANCED button in a future version of the tool.

 

 OPTIMAL SETTINGS

The following are the optimal settings for the typical multirotor. We will continue to tweak and update these settings. The following settings are found within the config.h firmware code file near line 580. Reprogramming your board with the Firmware Tool will always use these updated values.

GPS_FILTERING disabled Not required, filters noise but reduces the response.
GPS_LOW_SPEED_D_FILTER  enabled Below speeds of 0.5m/s ignore the D term for POSHOLD_RATE. The D term can induce errors while the copter is moving at low speeds.
 GPS_WP_RADIUS 50  The copter considers the waypoint reached when it is within this distance (in cm) from the waypoint location.
 NAV_SLEW_RATE 15  Prevent large sudden changes in roll/pitch. Set between 8 and 20.

 

 Mounting the Antenna

 

Now we can choose the ideal spot to mount the GPS patch antenna. The patch antenna must lay flat on the copter so that the top part of the patch antenna is facing the sky. It doesnt matter what part of the antenna faces north, it can be rotated in any way as long as the top part faces up. It's also not important to get the antenna high over the copter, it can be placed close to the flight controller or copter base section without loss of signal quality. If possible do not place the antenna out on an arm of the copter where it would an ESC. The electrical noise of the ESC may couple into the GPS signal from the bottom of the patch antenna. These patch antennas are great at blocking out electrical noise from the sides but noise coming through the bottom of the antenna are still largely coupled into the antenna signal. Placing a dome or other cover over the flight controller and GPS module and sticking the GPS antenna on top of that is just fine.

 ready for multiwii config gui

We are now ready to open the MultiWiiConf GUI and see that the flight controller will talk to the GPS module. You may need to do some manuevering or grab a laptop to get the GPS module out into the clear sky to pick up a GPS signal. Many people can get more than 5 satellites just placing it near a window. In clear sky situations the GPS module can lock on a few satellites within a minute. In tough low signal conditions it could take up to 12 minutes. This is typical of any GPS receiver since in some conditions the receiver must download a full GPS almanac from any of the satellites and this takes 12 minutes to get a full almanac. However, this would be very rare in most field conditions, the Venus GPS receiver inside the Quadrino GPS module is capable of searching 56 gps channels at once so it can lock onto GPS satellites within a minute. Once locked, the internal super-cap is capable of holding the gps location for a hot start (2 seconds) for up to 7 hours without a battery connected.

 

 final steps...more documentation to come....

 

Next steps...

  1. Configure AUX switches to enable Position Hold. Test Position Hold first before moving on to Return To Home. 
  2. Ensure the magnetometer is properly calibrated. If unsure, repeat the calibration step.
  3. Tune the copter using flight tests...you must go through tuning your copter from the beginning. It is possible to have an untuned transmitter that is being corrected by improper auto-level tuning. In other words, two wrongs can make a right here but you will fail badly when trying to use GPS features since your untuned transmitter will be overriding the GPS.
    1. Tune your transmitter for neutral stick while in gyro/acc mode.
    2. Tune auto-level only after the above step, ensure any drift during neutral stick is corrected in the auto-level mode.
    3. A perfectly tuned transmitter and auto-level will practically hold it's own position without wind such as in a garage.
  4. Tune the GPS control loop. Change POS & POS-R value beginning with 0.01 increments until desired position hold is established.
  5. Once Position Hold works properly you can test Return To Home.