» S
h
o
w
 
M
e
n
u

M4 – Installation and Setup

M4 v1 (Beta Boards r4&r5) Layout

M4_TOP_900px_callout_leds   M4_BTM_900px_push-button

M4 v2 (Production Boards r6) Layout Differences

Red_Top_callout1920   Red_Btm_callout1920

Switching the Board on/off

After connecting the M4 to a 1s lipo you can switch the board on/off via the small push button, located between arm 2 and the GPS module:

M4_BTM_900px_push-button

Windows Driver Install

  1. Download and unzip the AQ USB driver for Windows XP, 7 and later: M4 *.inf file 
  2. Connect the M4 to your computer with a Micro USB cable.
  3. The M4 should now start up and the computer should find the new USB device.  At first, the new device will not be recognized.  Go to the Windows Device Manager, and you will see something like this:
    M4_driver_install_1
  4. Windows Vista/7:
    1. Right-click on the AutoQuad VCP+MSC in FS Mode device in Device Manager, and select Update Driver.
    2. Choose to manually find the driver on your computer, and navigate to the folder where you unzipped the aq.inf file and select it.
    3. Windows should start installing the driver. When prompted about the missing driver signature, answer Yes. Once driver installs, you are all set.
  5. Windows 8:  Unfortunately, Windows 8 will not install unsigned drivers by default.  Signing drivers is complicated and expensive.  But there is a workaround. The following steps require restarting your computer. (Win 8.1 described below, Win 8.0 steps might be a little different.)  Also, you need a physical keyboard connected to the PC.
    You can also check a Disable Driver Signature Enforcement How-To or a Video describing the process

    1. M4_driver_install_win81_2Open Settings (the gear icon) ->  Change PC Settings -> Update and recovery -> Recovery -> Restart now button.
    2. In the “Choose an option” menu, select Troubleshoot -> Advanced options -> Startup Settings -> Restart button (computer will restart now).
    3. After reboot, you should see the following menu (image at right).  Press “7” or “F7” on your keyboard to disable driver signature check.  There is no way to get past this step w/out a keyboard attached.
    4. Now finally you can install the driver.  The final steps are the same as for Windows Vista & 7 — please see above.  When prompted about the missing driver signature, you should have an option to continue anyway.  If you don’t, then something went wrong with the previous steps described here.
  6. Once the driver is installed, you should be able to select the new device as a COM (serial) port on your system.  See the next step below, Connecting to QGC, to verify your connection.  You should also hear the usual “chime” sound when connecting the M4 to the computer, and no errors should be reported by Windows.

Connecting to QGC

  1. Open up QGC
  2. In top bar menu: Go to “Communication” > “Add link”
  3. Select the “AQ-MSC-CDC COM port” in the serial ports list
    :M4_qgcs
  4. Set baud rate at anything over 600 – QGC will default connection to Mavlink and use the fastest possible data transfer based on the direct USB to main CPU interface.

Firmware Update

Please take a look at the general AutoQuad Firmware page for some important notes on firmware versions.

To update firmware via USB port requires some extra software and possibly drivers for your operating system.  See below for instructions specific to your OS. Firmware for PID and QUATOS driven v8.4 and v8.5 boards can be downloaded here: M4 firmware

 

Or simply use our new Firmware Download Wizard

 

Starting AQ M4 in bootloader mode

  1. Make sure the M4 is off, with a fresh 1-cell LiPo battery connected (or suitable power supply, under 4.5 volts!).
  2. Depress the BOOT button, and hold it down while turning on the M4 using the POWER button. The BOOT button is located on the corner between the #2 and #3 arms.
  3. The M4 should turn on with the red LEDs bright and solid, and the yellow and blue LEDs dim and solid (not blinking). This signals that the M4 is in bootloader mode.
Note: in some known cases with M4v2s, sold before Dec. 22, 2014 the board might not stay in boot mode even if you´ve connected a lipo. There´s a fix for this problem, described in this forum thread.

 

Installing bootloader USB driver

For some Windows systems, the USB drivers have to be updated to allow the system to recognize the STM32 bootloader.
Note: for some PCs with Intel USB 3.0 ports you might need to download a different dfu-util version. You can download it here and replace the existing dfu-util.exe in the QGC\aq\bin\ folder.

Windows vista and 7

  1. Download Zadig tool: http://zadig.akeo.ie/
  2. Start up M4 in bootloader mode (see above), and connect to your computer (you should hear the usual chime, etc).  If the device is not recognized, that is OK.
  3. Run Zadig (it doesn’t need installation).  It should look something like this (but the button will probably read “Install Driver” if you haven’t done this before). Note: If the STM32 BOOTLOADER isn´t listed, go to “Options” and select “List all devices”:
    zadig-tool-windows
  4. Select the WinUSB driver (the other choices might work, needs testing), and hit the Install button.  The process should only take a second and result in a success message.  In Windows Device Manager, the M4 should show up like this:
    AQM4-bootloader-win-device-manager

Mac OS X and Linux (get dfu-util)

Please install the dfu-util software.  Mac users can get it from MacPorts.  This is used to flash the STM32 chip on board the M4.  Make sure to install it somewhere in your system path, meaning you should be able to run dfu-util at a command prompt from within any directory.   The Windows version of dfu-util is already included with the AutoQuad version of QGroundControl (v1.5 and later), or you can get a copy from the dfu-util project link.

Mac OS X step-by-step:

  1. Follow the package (.pkg) installation instruction for your OS version at MacPorts.
  2. Open a terminal window and enter sudo port -v selfupdate
  3. After that finishes, enter sudo port install dfu-util
  4. Done.

Flashing firmware

First you will need a compiled version of the firmware.  See the AQ download page or our FTP site, or compile your own from the source code.  Unlike previous methods used to flash firmware, flashing via dfu-util using direct USB requires a .bin file (as opposed to a .hex plain-text file).  This is very important, since a .hex file may appear to flash OK, but will not actually work (AQ will not boot).

From here, the steps are basically the same as for the other AutoQuads (via serial connection). They are described briefly below. Please refer to the full AutoQuad Software Setup documentation for details on installing and using the Autoquad version of QGC

m4-qgc-flashOnce you have the .bin file, and have followed the OS-specific prerequisites described above, start up the AQ in bootloader mode and connect to your computer via USB. Then simply use QGroundControl for AQ (v 1.5 and later), go to the Firmware Update tab, select the .bin file, and hit the flash button.  Make sure AutoQuad (native USB) is selected for FW Type (this should be set automatically for you when you choose a .bin file).  You cannot set the port and speed when using native USB, so those fields are disabled.

To flash firmware without QGC, directly from a command line, use the following command:

dfu-util -a 0 -d 0483:df11 -s 0x08000000 -D autoquad.bin

Where autoquad.bin is the name of the firmware file you want to upload.

 

Note: In some cases, e.g. when using a modern Intel USB 3.0 chipset you might not be able to flash the board.
Using a different dfu-util might solve the problem. Read more about it in this forum thread
Download the alternative dfu-util here and replace the one that comes with QGC. Use at your own risk!

Uploading and adjusting initial parameters

You will need QGroundControl v1.5x or later from the Download section and a sample Parameter File for your setup.
Here`s another reference Parameter File for a Ladybird sized setup.

Warning!
Make sure that these parameters match yours – or the motors might go to full throttle. Always remove props when testing the motors!
MOT_START 0
MOT_ARM 0
MOT_MIN 0
MOT_MAX 1050

Start QGC, connect the M4 to it and go to the tab “Config -> Onboard Parameters”.

General operations are “Load File” to load parameters from a *.txt file, “Transmit”, and “Write Flash” to save changes.

radio-screenshot1

The above image shows the Parameter list, Radio section.

Selecting your radio type

Using the on-board Deltang DSM2 radio

All M4´s supplied in the beta run (rev5 boards) come with the on-board Deltang DSM2 receiver enabled by default. To prevent radio glitches a wire jumper is run between J8 (external radio connector) and J17 (Deltang radio supply jumper) to supply it with 3.3v.

Using external radio

To use external RC radios, the wire jumper of J7 (if connected) has to be removed and the external radio connected at the external radio pads at arm1: 

ext-radio-pads

Refer to the Radio section for more details about possible radios to use with M4 and other AutoQuad controllers: M4 Radio Options and General Radio Setup.

Voltage Alarm

The voltage alarm level is adjusted in the Misc. Settings section of QGC. Suitable settings for 1S is around 3.3 and 3.15 volts for stages 1 and 2. Adjust according to the battery you are using – if you battery drops fast, you may need to raise stage2 voltage alarm

When stage 2 kicks in, the debug (yellow) and status (green) LEDs will blink fast. Its time to land!

lipo-alarm

Adjust the 2 stages of battery alarm like shown above, depending on the lipo in use.

Tip: Getting rid of wrong battery warnings in QGC when using 1S batteries

QGC is set to report general battery warnings way above 1s. To change this you have to edit your QGroundControl.ini file to match the correct low battery warnings for a M4 on 1S.

battery-adjustmentFirst, find the “Unmanned Systems” Tool Widget. You may need to enable it from the Tool Widgets menu.

Right click on the widget and select “Set Battery Options”. Change the values to your needs, e.g. “3.3V,3.5V,4.2V”. Don´t go lower than 3.3V for alarm stage 2!
You can also specify the warning level as a percentage of remaining charge, eg. 15%. The AQ remaining charge estimate is based on your battery warning stage settings.

 
QGC and Voltage Alarms: also read this forum post

system-opts

batt-opts


Quatos License Key

M4 comes equipped with a license key for the quatos adaptive control addon for hobby use in crafts up to 1kg. You need a valid Quatos license key to make the M4 work with a Quatos firmware. If a wrong or no key is submitted, the M4 will not arm!

Enter your quatos license key into the LIC_KEY1 section of the onboard parameters tree:

license-key

Note: remember to always Transmit AND Write your changes before you can use them! Also Restart the M4 to make sure the values were stored correctly. Otherwise they might be gone on next restart/reboot.

In QGC 1.6 you can also submit the license key in the “Misc. Settings” tab in the “Config” menu:

lic-key-input

IMU calibration

Before you can expect a decent flight with your M4, you will need to perform basic sensor calibration for a DIMU. This process is described on the quick on-board calibration page.

The basic procedure can be done in about 5 minutes and does not require the use of log files or external processing. You can also do more elaborated calibration procedures with and without temperature compensation for higher degrees of IMU accuracy , but the Tare and on-board mag calibration will give a flyable result in very short time.

Read more about AQ calibration methods in the calibration section.


 

This page was created on 26-May-14 by MaxP. Last modified on 6-Nov-15 by kinderkram.