If you want to have a go at the MP32 from www.virtualrobotix.com, 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.
What you need to start
To start with the new Hardware set-up you need the follwing:
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.
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
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:
|MP32||Cable Wire # / Pin||GPS Adapter Circuit Board|
|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:
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.
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:
#define A_LED_PIN 69 //37
#define C_LED_PIN 71 //35
# define MAGNETOMETER DISABLED
# define MAG_ORIENTATION AP_COMPASS_COMPONENTS_UP_PINS_BACK
# define MAG_PROTOCOL MAG_PROTOCOL_5843 // Default Setting
// Developer Items
# define IMUOILPAN
Ok, so now the code is ready to be uploaded.
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.
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.
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.
The ERASE function is not necessary.
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:
Features actually not supported by the code:
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.