LibrePilot Forum

General Category => General Discussion => Topic started by: VectorJones on August 28, 2016, 10:50:28 pm

Title: Problem with INS13
Post by: VectorJones on August 28, 2016, 10:50:28 pm
Hello, I have  a problem with the INS13 GPS mode.

I am using this flight controller (http://www.hobbyking.com/hobbyking/store/__105287__OpenPilot_CC3D_Revolution_Revo_32bit_F4_Based_Flight_Controller_w_Integrated_433Mhz_UK_Warehouse_.html?strSearch=revo) with this GPS module (http://www.hobbyking.com/hobbyking/store/__89565__Mini_Ublox_Neo_6M_GPS_for_CC3D_Revolution_Flight_Controller_w_Built_in_Compass.html).

I did all the calibration, several times and very rigorously. But always when I turn on the INS13, the aircraft appears tilted and unstable. It goes crazy if I try to use any of the GPS modes in flight.

I've read a lot of post on this forum, still I have not a clear solution on how to fix it.

This is my first build, and I am regretting starting this hobby.

Any help would be appreciated. Thank you.
Title: Re: Problem with INS13
Post by: f5soh on August 28, 2016, 11:48:43 pm
Hi, welcome.

Looking at your screenshot the Mag alarm is orange, maybe without motor started.
Using only the onboard Mag you cannot fly without mag alarm, all power parts (big wires, esc, motors) are too close and cause strong magnetic fields.
A simple Lipo alarm device can also disturb the mag.

You should use the "next" Gcs version and use a external mag, a Naza GPS is prefered because allows GPS and Mag data using the same wiring/connection.
https://forum.librepilot.org/index.php?topic=449.msg15319#msg15319

https://forum.librepilot.org/index.php?topic=1910.0
 
Title: Re: Problem with INS13
Post by: chromvis on August 28, 2016, 11:55:34 pm
In the title of your GPS module it is Neo6M, in "included" section it is Neo8M. It only have 4 wires, so  it is either NAZA compatible (which I doubt), or magnetometer is not wired. Actually, in the discussion section of the same HK page it is mentioned that magnetometer is not wired.
Since mag sign in your screenshot is yellow - you have communication with magnetometer. There are just significant difference between on-board and external mag calibration.
 
In any way, all these GPS (NAZA, or PixHawk style) are working only with "next" version of LibrePilot which is not released yet. You should compile it on your own (risk!). Currently there is some sort of a bug, which requires specific calibration procedure (https://forum.librepilot.org/index.php?topic=2187.0).
If you follow TheOtherCliff recommendations you will be able calibrate both mags. I tested it with Revo and with Sparky2 FC and also with NAZA-type and Arducopter-type GPS units - all work fine.
You need to start calibration than in System tab press  "upright red arrow" (save to board) button and than proceed with calibration.
 
Title: Re: Problem with INS13
Post by: VectorJones on August 29, 2016, 12:41:17 am

Looking at your screenshot the Mag alarm is orange, maybe without motor started.


In the title of your GPS module it is Neo6M, in "included" section it is Neo8M.
Since mag sign in your screenshot is yellow - you have communication with magnetometer. There are just significant difference between on-board and external mag calibration.
 

I am looking at the IC of the GPS and it says "Neo6M".

The MAG is always green, it just lit up yellow because i brought the quad inside when i took the screen shot.


Using only the onboard Mag you cannot fly without mag alarm, all power parts (big wires, esc, motors) are too close and cause strong magnetic fields.
A simple Lipo alarm device can also disturb the mag.


Well if the onboard MAG is not usefull and there is no support or aux MAG, the Revo board I bought is technically and incomplete product.

I've seen other ppl use smaller quads with GPS modes such as auto-takeoff and anto-land. But how is this just hanppening to me?

At the moment I kinda regret going for librepilot  :-\
Title: Re: Problem with INS13
Post by: f5soh on August 29, 2016, 12:55:28 am
Quote
Well if the onboard MAG is not usefull and there is no support or aux MAG, the Revo board I bought is technically and incomplete product.
I've seen other ppl use smaller quads with GPS modes such as auto-takeoff and anto-land. But how is this just hanppening to me?
At the moment I kinda regret going for librepilot  :-\

All working setups in small frames and mostly all big frames uses a external Mag.
OnBoard mag can be used on big frames if all wiring is perfectly done, twisted to avoid/minimize mag fields from strong currents.

If you are not happy with LibrePilot you can also try dRonin, Taulabs or older OpenPilot versions if something better for you and maybe reduce magically Mag fields due to external power components too close.

Title: Re: Problem with INS13
Post by: VectorJones on August 29, 2016, 04:53:20 am
Quote
Well if the onboard MAG is not usefull and there is no support or aux MAG, the Revo board I bought is technically and incomplete product.
I've seen other ppl use smaller quads with GPS modes such as auto-takeoff and anto-land. But how is this just hanppening to me?
At the moment I kinda regret going for librepilot  :-\

All working setups in small frames and mostly all big frames uses a external Mag.
OnBoard mag can be used on big frames if all wiring is perfectly done, twisted to avoid/minimize mag fields from strong currents.

If you are not happy with LibrePilot you can also try dRonin, Taulabs or older OpenPilot versions if something better for you and maybe reduce magically Mag fields due to external power components too close.


The thing is that confuses me is how other people can use GPS modes and when I use gps mode the drone just goes crazy.

I see old videos, that  I assume that are before the extMAG was available, using those modes.

When I tried position hold, the drone just circled around like it had a region of interest in the middle.
Title: Re: Problem with INS13
Post by: f5soh on August 29, 2016, 05:05:19 am
Typical "toilet bowling", the quad try to correct position but his heading is wrong (disturbed Mag) and finally do a circle trajectory around the expected position.
Sometimes you can fly maintaining the correct heading only based on gyros, but generally a small heading drift comes and cause issues.

The only external mag supported was original OP GPSv9 starting from OpenPilot 14.10 release to LibrePilot 15.09
The current "next" version add additional support to I2C mag and Naza GPS with Mag.
Title: Re: Problem with INS13
Post by: datapool on August 29, 2016, 10:20:30 am
I had the same "track to go" - but  finally the forum here is great to get help and solve everything.

1) The first important thing is that you get the latest "next" release on your FC revo in order to be able to use external mag. See here:
https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging (https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging)

2) After that you need to check if your external GPS delivers mag data with the 4 wires. Often the external mag wires are not pre-instaled. You will see this on the magentometer screen for external/internal and see if data is rushing in. If not, you need to browse the forum and maybe need to solder 2 extra wires to get the mag data. Some external mags directly communicata via the 4 wires (like DJI/Naza clones) - some need additional two wires to be placed and connceted to main/flexi port in addition. My recommendation would be to get a DJI/Naza compatible GPS/mag which delivers the mag data directly over the 4 wires. So easy install.

3) There is currently an issue with the external mag calibration in the next release. So you need to start the calibration, go back to the system/settings tab and save the data via the red arrow. After that go back to the calibration and continue mag calibration.

These 3 steps helped me getting my external mag setup in order to get the GPS modes working.
Title: Re: Problem with INS13
Post by: VectorJones on August 29, 2016, 06:34:55 pm
I had the same "track to go" - but  finally the forum here is great to get help and solve everything.

1) The first important thing is that you get the latest "next" release on your FC revo in order to be able to use external mag. See here:
https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging (https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging)

2) After that you need to check if your external GPS delivers mag data with the 4 wires. Often the external mag wires are not pre-instaled. You will see this on the magentometer screen for external/internal and see if data is rushing in. If not, you need to browse the forum and maybe need to solder 2 extra wires to get the mag data. Some external mags directly communicata via the 4 wires (like DJI/Naza clones) - some need additional two wires to be placed and connceted to main/flexi port in addition. My recommendation would be to get a DJI/Naza compatible GPS/mag which delivers the mag data directly over the 4 wires. So easy install.

3) There is currently an issue with the external mag calibration in the next release. So you need to start the calibration, go back to the system/settings tab and save the data via the red arrow. After that go back to the calibration and continue mag calibration.

These 3 steps helped me getting my external mag setup in order to get the GPS modes working.

Thanks for the clear response datapool!!

The GPS module i got is kinda BS, because you cannot use the MAG, it has to be connected via I2C and the connection is not there.

I will try to solder it or get a new GPS module.

BTW the new GCS is much better then the old one.

Thanks again !
Title: Re: Problem with INS13
Post by: VectorJones on August 30, 2016, 05:10:12 am
One thing to ask,

Will the this naza clone (http://www.ebay.co.uk/itm/OCDAY-NEO-M8N-GPS-Compass-Support-DJI-Naza-V1-V2-Lite-Flight-Controller-New-GT-/391528322666?hash=item5b28e8166a:g:T0wAAOSw0UdXqZ0w) perform the same as this GPS module (http://www.hobbyking.com/hobbyking/store/__99118__Mini_Ublox_NEO_M8N_GPS_for_CC3D_Revolution_Cleanflight_Firmware_.html?strSearch=cc3d%20gps)?

The PCB quality is obviously different, but both "engines" are NEO-M8N so they should perform the same, right?
Title: Re: Problem with INS13
Post by: hwh on August 30, 2016, 05:30:00 am
The first is a naza clone that has a mag in it as well as the gps.  With the next branch of the firmware it gives both a gps and an external mag over one four pin cable.  It won't work with the 15.09 release.  It requires the connector to be replaced to hook it up to a cc3d or revo.  These are the ones we currently recommend.

The second one is only a gps, it doesn't have a cable for a mag but does seem to have the correct connector to hook up.   It would work as a gps only under any OP or LP version.  Without a separate external mag board to go with it GPS modes probably wouldn't work.

GPS performance is probably similar but it really depends on what (if any) external lna, saw filter, and antenna they used.
Title: Re: Problem with INS13
Post by: VectorJones on August 31, 2016, 03:31:08 am
The first is a naza clone that has a mag in it as well as the gps.  With the next branch of the firmware it gives both a gps and an external mag over one four pin cable.  It won't work with the 15.09 release.  It requires the connector to be replaced to hook it up to a cc3d or revo.  These are the ones we currently recommend.

The second one is only a gps, it doesn't have a cable for a mag but does seem to have the correct connector to hook up.   It would work as a gps only under any OP or LP version.  Without a separate external mag board to go with it GPS modes probably wouldn't work.

GPS performance is probably similar but it really depends on what (if any) external lna, saw filter, and antenna they used.

Hello,

You didn't recommend any. I will solder some wires to mine and try to use it over I2C.

As for the Naza clone, TheOtherCliff used it in the next version. So i think i will be getting one.

Thanks!
Title: Re: Problem with INS13
Post by: VectorJones on September 01, 2016, 10:21:16 pm
The INS13 saga continues!

f5soh and chromvis, you were right! (ofc) The inernal MAG was working on the groud, with some thrust it wen't bad.

The GPS (http://www.hobbyking.com/hobbyking/store/__89565__Mini_Ublox_Neo_6M_GPS_for_CC3D_Revolution_Flight_Controller_w_Built_in_Compass.html) module does not have the auxMAG wired, so i soldered the I2C wires, connected over Flexi Port and it started working.

All calibrations (exceptthermo) have ben done. The aux mag is working fine even with the magnetic fields of the thrust, but again when i turn on the INS13 witht he drone on the ground it apears that is flying arround. Even when I try "positionHold" mode with "Complementary+MAG+GPSoutdoor" it drifts arround, but not in a toilet bowl way.

Here is a video of it showing thrust effect on the MAG's and the INS13: https://www.dropbox.com/s/edmzebvwiiknopk/20160901_173903.mp4?dl=0

So now i don't really know where to turn, any ideas?

Thank you!
Title: Re: Problem with INS13
Post by: datapool on September 02, 2016, 08:59:38 pm
to me it looks like the auxmag calibration is not correct. Do you have used the "workaraound" during calibration? Meaning you start calibration (1 click), go back to systems/settings and save the settings via red arrow and go back to calibration screen to complete the calibration routine? Thats important with current next release.
Title: Re: Problem with INS13
Post by: VectorJones on September 02, 2016, 09:29:33 pm
to me it looks like the auxmag calibration is not correct. Do you have used the "workaraound" during calibration? Meaning you start calibration (1 click), go back to systems/settings and save the settings via red arrow and go back to calibration screen to complete the calibration routine? Thats important with current next release.

No, I didn't do the workaraound. I also read that I probably have to change the pitch 180º.

Didn't try it today because of the hurricane, will try tomorrow if the weather is good.
Title: Re: Problem with INS13
Post by: chromvis on September 03, 2016, 05:00:25 am
In INS13 mode NEXT will only work if you calibrate your mag using workaround procedure. I tested different builds and 3 different quads with Revo and Sparky2 - nothing work unless you calibrate with workaround suggested by TheOtherCliff.
In your video I could not see orientation bars on the right, but your Aux.Mag.Orientation settings are all 0 - in most cases Pitch should be 180 (you are right) but not always. I depends on atual orientation of magnetometer chip on your GPS board. Find actual numbers is a bit tricky. You set number, click SAVE, than wait 10 - 15 sec and may even rotate your quad to see if bars on the right stay close to 0. If not - your numbers are wrong. You should do it away from any metal parts. (In your video it looks like you have folding table, if it has metal frame or enforcement bars - your calibration won't work. Same for folding chair.)
Title: Re: Problem with INS13
Post by: VectorJones on September 03, 2016, 03:55:35 pm
In INS13 mode NEXT will only work if you calibrate your mag using workaround procedure. I tested different builds and 3 different quads with Revo and Sparky2 - nothing work unless you calibrate with workaround suggested by TheOtherCliff.
In your video I could not see orientation bars on the right, but your Aux.Mag.Orientation settings are all 0 - in most cases Pitch should be 180 (you are right) but not always. I depends on atual orientation of magnetometer chip on your GPS board. Find actual numbers is a bit tricky. You set number, click SAVE, than wait 10 - 15 sec and may even rotate your quad to see if bars on the right stay close to 0. If not - your numbers are wrong. You should do it away from any metal parts. (In your video it looks like you have folding table, if it has metal frame or enforcement bars - your calibration won't work. Same for folding chair.)


The bench is made out of wood, it has some metal screws. The MAG orientation is correct if not in INS13, if i look at the MAP and point it north, it goes north.

The hurricane has settled down, I will calibrate, test it and post the results.
Title: Re: Problem with INS13
Post by: VectorJones on September 03, 2016, 11:13:49 pm
Hello,

I did the auxMAG calibration with the workaround, flipped 180º and it worked. I did try PositionHold and it did a fair job for the wind that existed.

The second time I tried to calibrate with the workaround I failed several times, I don't know what i did different and never had a successful caliration. By the end it started to do something that it sometimes does that the percentage bar goes really slow in steps of 20%.


So I would like to ask "f5soh" if he could explain the workarround in a more detailed step-by-step version, this would really be important to not miss this step.

What I did was place the quad in position for the first step, open the lower "System" tab, drop down the "Data Objects" and press the "AuxMagSensor" so I can press the (https://librepilot.atlassian.net/wiki/download/attachments/7733253/Upload_button.png).

After that I go back and press "Start" on the Mag Calibration page, go back to (https://librepilot.atlassian.net/wiki/download/attachments/7733253/Upload_button.png), after that I press "Save Position", again (https://librepilot.atlassian.net/wiki/download/attachments/7733253/Upload_button.png).... Until the end. When the green text apears i press (https://librepilot.atlassian.net/wiki/download/attachments/7733253/Upload_button.png), and "Save" on the Sensor calibration page, and (https://librepilot.atlassian.net/wiki/download/attachments/7733253/Upload_button.png).


I've tried a buch of different ways on the second try but never did it, even took the 180º Pitch away and redid it again.


Again, I was successful on the first try, but never could do it again.

"f5soh" please give us a step-by-step version.

Thanks
Title: Re: Problem with INS13
Post by: f5soh on September 03, 2016, 11:33:29 pm
https://forum.librepilot.org/index.php?topic=2187.msg15708#msg15708

The AuxMag orientation settings doesn't matter while calibrating
Title: Re: Problem with INS13
Post by: VectorJones on September 04, 2016, 12:18:45 am
https://forum.librepilot.org/index.php?topic=2187.msg15708#msg15708

The AuxMag orientation settings doesn't matter while calibrating

Thanks for the fast response f5soh,  but I already read that before the calibration and was unable to do the process.

Can you detail or more?


Thanks
Title: Re: Problem with INS13
Post by: f5soh on September 04, 2016, 12:42:16 am
You can also manually reset the scale values to 1 and bias values to 0 before start the calibration.

You should wait the fix if you are not able to use the workaround.
Title: Re: Problem with INS13
Post by: VectorJones on September 04, 2016, 02:32:31 am
You can also manually reset the scale values to 1 and bias values to 0 before start the calibration.

You should wait the fix if you are not able to use the workaround.

Hello f5soh,

I have no idea of what you are talking about.

To use the (https://librepilot.atlassian.net/wiki/download/attachments/7733253/Upload_button.png) I need to  first select something from "Settings" or "Data Objects", what do I select?

Do I press (https://librepilot.atlassian.net/wiki/download/attachments/7733253/Upload_button.png) in the END  of the calibration or between each position?

I'm not shure I can wait for the fix, can only fly for another 2 days, only will be able to fly again next summer after that.
Title: Re: Problem with INS13
Post by: VectorJones on September 04, 2016, 05:29:47 pm
I did a manual set to on the auxMAG to auxmagsettings.mag_bias to 0,0,0 and auxmagsettings.mag_transform to 1,0,0,0,1,0,0,0,1 ->(https://librepilot.atlassian.net/wiki/download/attachments/7733253/Upload_button.png)

Normal calibration and it worked.


Today the wind was more calm but the PositionHold set the drone drifting to the side. I am done for this year, I hope that in 8 months there will be a better version of the GCS and a way to calibrate the MAG's on the spot without the GCS.

Thanks for everything!
Title: Re: Problem with INS13
Post by: chromvis on September 05, 2016, 07:20:57 am
You need to set AuxMag Bias to 0 in all axis and aux mag_transform to 1 on r0c0, r1c1 and r2c2 in system tab.
save it and start workaround calibration.