Multipilot32 and OILPAN IMU - Quick Start guide

If you want to have a go at the MP32 from, take advantage of the powerful 32bit ST ARM Cortex-M3 processor and would like to use your OILPAN with the great software the DIYDrones developres are developing, this is a small guide to get things started.

It will cover the biggest steps to configure the hardware and firmware.

Roberto has done a very good job, and since he lacks a bit in end user documentation (well that's tipical for almost every developer!!) I decided to give him a little help. 

The code is ported form the 2.0.39 AC2 firmware and is is up-to-date with recent enhancemets. The planner will work just fine (at the time of writing 1.0.54)

The above is a video made by Roberto itself explaining setup for both the VRIMU and the OILPAN.

Below are details on the code to modify.

Have fun!


For more information please refer to and for the project home.


What you need to start

To start with the new Hardware set-up you need the follwing:

  • OILPAN rev H or older revision Foxtrap.



Before you can use the AC32 firmware you MUST solder two pin headers on the connectors shown below. You then need to short them in order to upload new firmware and fly! (you can use an old motherboard jumper plug to short the connector so you would be able to reuse your OILPAN on the old ATMEGA)




This is used to connect your MP32 to the Planner or to the CLI:



If you have an xbee working on your actual setup, you can use that instead of the USB-->serial, just hook it up to the Telemetry port as usual.


  • Telemetry pins soldered on the OILPAN see:



  • 4 cables female female to connect the usb adapter to the OILPAN on the Telemetry Port


  • a Magnetometer(Optional) HMC5843 or HMC5833L soldered on top of the Oilpan





  • You also need a bind plug to put the MP32 in firmware upload mode(see later...). Or you can use one female-female cable like the ones posted above.


First download and install software and drivers

Download the latest VRIDE Framework. At the moment it is the link here VRIDE. unzip it and place it in a folder like C:\MP32

  • You need to install drivers for your USB to serial adapter from here
  • You need to install DFU drivers for your MP32 board. You can find the drivers in the C:\MP32\drivers\mapleDrv\dfu\ folder of the VRIDE just downloaded.


  • Download the specifically modified firmware for the OILPAN from here OILPAN firmware. Unzip and overwrite the libraries folder in your C:\MP32 folder and the ACopter32 folder under the C:\MP32\Firmware\ folder


Installing the Mediatek GPS (DIYDrones)

At the time of writing only the Mediatek GPS from DIYDrones with firmware 1.6 is fully tested. The GPS needs to be attached directly on the MP32 board. To do this there are several ways. What I chose was to get a GPS cable adapter like the ones DIYDrones store sells and cut off one end that I solder directly on the board. You could also solder connector pins on both the MP32 and the GPS board and use a 4 wire cable.

This is a picture to explain what I did:


The 1st and last wire of the cable are not used, so you can cut them off. This is the schema on how to connect them:

MP32Cable Wire # / PinGPS Adapter Circuit Board
JP19-2 (GND)(2)(GND)
JP19-4 (5V)(5)(5V)
JP19-6 (Ser4 Tx)(4)(IN)
JP19-8 (Ser4 Rx)(3)(OUT)


This is where you will find the JPs on the board:


A picture shows were you can find the connectors:


Compiling and uploading the firmware

Configuring the VRIde

VRIDE is the "32bit version of Arduino". Is based on the LeafLabs? Maple IDE and uses a language much similar to the Arduino framework.

Once your hardware i ready and your drivers are finally set up you can start to open the vrobotix-ide.exe and in File-->Preferences choose the folder where you unzipped the VRIDE rar (eg. c:\MP32)



Then choose from the menu File-->sketchbook the Firmware-->Acopter32 sketch like in the Arduino framework. 


This is your new firmware ready to be uploaded. But before we can continue we have to check and modify a few parameters in the code.

Modifying the code before the upload process

To let the compiler know you are using the OILPAN and not the VRIMU we need to make a few changes in the code. Nothing too difficult.Future developements will not require you to make all this modification, so keep up for the news! So follow these steps:

  1. Locate the libraries folder in your C:\MP32 folder and open with a text editor like Notepad++ the following files:
    • AP_ADC\AP_ADC_ADS7844.cpp: be sure to comment out the #define VRIMU so the line would be //#define VRIMU like this:
    •      //#define VRIMU

    • If you have the old compass HMC5843 you have to open the file AP_Compass\AP_Compass_HMC5843.cpp and add a new line at the end of the defines: #define HMC5843 otherwise if you have the most recent mag, leave as it is.
    • Open the file AP_IMU\AP_IMU_Oilpan.cpp and comment out the //#define VRIMU and //#define VRMIMUIDG5000 line and add (if not present the line #define IMUOILPAN:
    •      #define A_LED_PIN   69  //37
      #define C_LED_PIN 71 //35

      //#define VRIMU
      //#define VRMIMUIDG5000
      #define IMUOILPAN

    • Open the file AP_IMU\AP_IMU_Oilpan.h and do the same of before: comment out the //#define VRMIMUIDG5000 and add if not present the line #define IMUOILPAN:
    •      #include "IMU.h"

      //#define VRMIMUIDG5000
      //#define ADC_OBJECT
      #define IMUOILPAN
  2. Locate the folder Acopter32 in the Firmware subfolder (C:\MP32\Firmware...\ACopter32). Then open and modify the following files:
    • In config.h:
      1. locate the //MAGNETOMETER section and modify the #define MAG_ORIENTATION as follow:
        #ifndef MAGNETOMETER
        #ifndef MAG_ORIENTATION
        #ifndef MAG_PROTOCOL
        # define MAG_PROTOCOL MAG_PROTOCOL_5843 // Default Setting
      2. locate the "Developer Items" section and modify as follow:
        // Developer Items
        #ifdef MP32
        //#define VRIMU
        # define IMUOILPAN
        //#define VRMIMUIDG5000

Ok, so now the code is ready to be uploaded.

Uploading the code

  • Now Plug the Bind Plug or one female-female jumper cable into the second input from the left of the MP32 (Called JP4_7, JP6_7 and corresponding to the 7th input of the old ATMega). Pins 1 and 3 must be connected toghether (The signal and ground pins)

This is used tu put your MP32 in firmware upload mode. When in this mode (and board powered) you will see a green led blinking on the MP32 board. This means you can start the upload process.

  • Plug the USB cable directly into the MP32 USB port. This is used as a power source and as a communication port.
Like the Arduino IDE, before uploading the firmware check that the code compiles correctly by clicking the Verify button. If code compiles, you can click on the Upload to board button.

Wait for the completed upload message in the VRIDE message window.


Setting up the firmware for first use

Once the code has been uploaded you will be able to interact with it using the USB-->serial adapter shown above, you have to connect the adapter to the Telemetry port on the OILPAN. To get into the CLI you will not have to switch the slider. This mode is disabled!

You need to use a Hyper Terminal to get to connect to the CLI the first time. This can be found in Windows XP in START-->All Programs-->Accessories-->Communications-->Hyper Terminal. For Windows7 and Vista you need to download the Hyper Terminal program from here: This is the original Windows XP program.

So now that you have the USB-->Serial connected to the telemetry port and Hyper Terminal connected to the COM, power up the MP32 using for example the usb port on it. As soon as you connect you will see a message saying to press S to enter interactive mode. You have five seconds to press S after boot up. This will let you in the CLI mode. Use the the SETUP-->Reset to reset the parameters, configure your radio, level, calibrate ESC as you will do in old ATMEGA chip.

The ERASE function is not necessary.

Using the Planner to finish configuration

Once you have done first configuration, you will be able to connect to the MP32 using the AC2 planner found here

For all the rest you can use the the Arducopter Wiki which will guide you through the rest of the setup.


Frames supported by the code:

  • Quad X mode
  • Quad + mode
  • Hexa X mode
  • Hexa + mode


Features actually not supported by the code:

  • sonar is not implemented
  • camera mount stabilization is not working

All the rest should be working! This is still BETA so use at your own risk, and please report any issues to the Issues list in the Multipilot32 google code project.





E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones


  • I can't wait to get mine and start testing it :D


  • Hey Robero,


    so sorry, then I missunderstood the blog post :P Forget it. Thank you very much for the link, now I have a better vision about the project.

  • Moderator

    Hi Garcia,

    is not true ... :) This is a How to for upgrade a standard Arducopter , is only 4 wire for connect the gps ... if you want a rtf solution check this link :

    You recive only two board and plug it , connect radio esc and fly :)

  • This is a great project but in my opinion there are a lot of work to do for doing this board accesible for the general public.

    Too many solders, too many wires and you can easily shortcut GND and power as the "connectors" are reversibles in JP19 for instance.


  • Moderator

    Great Job Emile :)

  • A big step forward, thank you emile !

  • Guys,

    this is very nicely done! I know that a large part of my hesitation to jump into this project and start playing with the Multipilot32 has been because of the lack of documentation. This should help with that! Thanks!

This reply was deleted.