How-To: Crius AIO Pro V2.x with external MAG

Post Reply
User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

How-To: Crius AIO Pro V2.x with external MAG

Post by Leo »

Here is a how-to on setting up a Crius AIO Pro V2.x flight controller board with an external magnetometer.

This is how my setup looks like:
Image

The first thing that needs to be done is to deactivate the on-board MAG.
This is done by carefully cutting the bridge between the pads as seen in the picture below (red arrows):
Image

The next step is to modify the MultiWii firmware.

To tell MultiWii what board we have we need to activate this line in config.h:

Code: Select all

#define CRIUS_AIO_PRO


Next we need to look in config.h and search for MAG type entries. Here we need to active the appropriate device. In my case the HMC5883.
For example (config.h):

Code: Select all

      /* I2C magnetometer */
      //#define HMC5843
#define HMC5883
      //#define AK8975
      //#define MAG3110


Then we need to tell the MultiWii firmware that the on-board MAG is no longer active.
Go to the def.h and look for "CRIUS_AIO_PRO" and then for "MPU6050_I2C_AUX_MASTER".
This needs to be deactivated like so (def.h):

Code: Select all

// #define MPU6050_I2C_AUX_MASTER // MAG connected to the AUX I2C bus of MPU6050


Be aware that you might also have to correct the 3 axis for your MAG in this line (def.h):

Code: Select all

#define MAG_ORIENTATION(X, Y, Z)  {imu.magADC[ROLL]  = X; imu.magADC[PITCH]  = -Y; imu.magADC[YAW]  = Z;}


You are now all set to use the external magnetometer.

Leo

pihlerm
Posts: 23
Joined: Tue Dec 09, 2014 6:40 pm

Re: How-To: Crius AIO Pro V2.x with external MAG

Post by pihlerm »

Hello,

I am looking for some info on AIOP v1 board .. what to cut to disable internal HMC5883L?

And since I have GPS+MAG board made for APM 2.5 which uses 3.3v I2C port .. what happens when I connect it to AIOP that uses 5V I2C?
Are there some simple tricks, do I need bidirectional TTL voltage adapter?

I connected GPS part to 5V on serial port already. It works.
I can't bring myself to connecting I2C.
http://www.banggood.com/Ublox-NEO-6M-GP ... 28633.html

Thanks.

User avatar
Leo
Posts: 372
Joined: Wed Sep 17, 2014 7:01 am
Location: Germany
Contact:

Re: How-To: Crius AIO Pro V2.x with external MAG

Post by Leo »

I don't have a version 1.0 board so I can't answer that. It should be possible to find the appropriate SDA and SCL lines that need to be cut or remove the chip altogether.

The GPS/MAG module I have (pictured above) takes 5V input and coverts on-board to 3.3V. With your GPS module (you linked) I am not sure except that on the GPS side it also takes 5V because I can see a voltage converter mounted on the board which presumably brings it down to 3.3V.

My advice on the MAG side is to NOT connect Plus (red) and Minus (outer black) cable to your board but ONLY connect SDA and SCL (2 inner black cables) and see if the MAG gets recognized.

Leo

pihlerm
Posts: 23
Joined: Tue Dec 09, 2014 6:40 pm

Re: How-To: Crius AIO Pro V2.x with external MAG

Post by pihlerm »

I am reporting here the procedure I've done on a
CRIUS AIO V1 board clone : HK Multiwii AIO V2 http://www.hobbyking.com/hobbyking/store/__31138__Multiwii_and_Megapirate_AIO_Flight_Controller_w_FTDI_ATmega_2560_V2_0.html

I removed the HMC5843 chip from the board using razor blade (ruins in red circle:). It comes off pretty easily, but some cleanup may be needed afterwards.
Be careful! It is very easy to cut leads on PCB as they are tiny.


I did the same code modifications as Leo above.

I have a GPS/MAG combo from Banggood (http://www.banggood.com/Ublox-NEO-6M-GPS-HMC5883L-ARDUPILOT-APM-26-Compass-Module-FPV-p-928633.html).
This sensor board is for APM 2.5 and it runs on 3.3V.
Since Crius MWII is 5V,
i used a logic converter (http://www.banggood.com/3_3V-5V-TTL-Bi-directional-Logic-Level-Converter-For-Arduino-p-949438.html) using the two bidirectional channels on it (the outermost pins marked as TXI and TXO) for SCL and SDA signals.
I also built an LM317 based voltage regulator circuit (http://www.simple-electronics.com/2011/09/33v-power-supply.html) that is used to get 3.3V to power the sensor board.
GND is only connected via a single wire, but i2c and serial ports on the board must be both connected separately to 3.3V from regulator, as well as the low voltage end of logic converter.
As for serial, I connected tx from sensor directly to rx on AIO, but tx from AIO through one of the middle channels of level converter to RX on sensor board.

If somebody needs it, I can make a connection diagram.

Tested it and it works.

Thanks to Leo for all the info.
Attachments
HMC5883_removed.jpg

Post Reply