OILPAN_for_MP32.JPG
This is a quick start guide to setup your OILPAN IMU with the new MP32 board. The actual firmware is a port of the 2.0.39 Arducopter firmware so once installed you will be able to use the planner as you do normally.

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

 

  • 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)

Jumper.JPG

 

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

 

990004_300.jpg

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:
telemetry_pins.JPG

 

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

708430.jpg

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

magnetometer.jpg

 

GPS_cable2.JPG

 

  • 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.

bind_plug.jpg

First download and install software and drivers

Download the latest VRIDE Framework. At the moment it is the 0.0.4.5.7 link here VRIDE.0.0.4.5.7 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:

GPS_cable.JPG

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:

MP32 Cable Wire # / Pin GPS 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:

GPS_connectors_2.jpg

A picture shows were you can find the connectors:

GPS_Connectors_1.JPG

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)

VRIDE_prefernces.jpg

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

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 difficoult.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:
                   //////////////////////////////////////////////////////////////////////////////
        // MAGNETOMETER
        #ifndef MAGNETOMETER
        # define MAGNETOMETER DISABLED
        #endif
        #ifndef MAG_ORIENTATION
        # define MAG_ORIENTATION AP_COMPASS_COMPONENTS_UP_PINS_BACK
        #endif
        #ifndef MAG_PROTOCOL
        # define MAG_PROTOCOL MAG_PROTOCOL_5843 // Default Setting
        #endif
      2. locate the "Developer Items" section and modify as follow:
                   //////////////////////////////////////////////////////////////////////////////
        // Developer Items
        #ifdef MP32
        //#define VRIMU
        # define IMUOILPAN
        //#define VRMIMUIDG5000
        #endif

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).

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:http://www.megaupload.com/?d=J31857IQ. 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.

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 of the Arducopter Wiki.

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.

 

HAVE FUN!!

E-mail me when people leave their comments –

You need to be a member of FOXTEAM UAV CLAN to add comments!

Join FOXTEAM UAV CLAN

Comments

  • I do not have skype but I'll create an account and install it later this afternoon, thank you for all your help.

  • Rui you can catch up with me and Roberto on Skype. We will be happy to help out.

    my skype id manlio

  • Hello.

     I've acquired a MultiPilot32 and I'm trying to upload the code. First, I don't know wich board to choose on the IDE. "Multipilot32 to JTAG" or "Multipilot32 to FLASH" ???? To upload the code I just use the USB cable or use the USB to Serial adapter. Should I use only 1 cable or use them together ? Also I'm getting a lot of compilation errors with both the firmware available "Acopter32_2_0_39_QuadX-Hexa" and "Acopter32_2_0_39_01_QuadX-Hexa". Can you please let me know what to do ?

This reply was deleted.

Blog Topics by Tags

Monthly Archives