Quad not working with INS13
« on: April 16, 2016, 10:13:37 pm »
Hi librepiloters:

I put together my quad a couple of days ago, it has a Revo and a uBlox 6m. The quad flies beautifully before I set the Attitude Estimation Algorithm to INS13, but once I change it the rear left motor doesn't spin much at takeoff and it attempts to flip backwards. I can change it back and it works just fine, any thoughts? If it helps to know, t gets my location and locks onto 11 satellites.

Thanks,
Tim
« Last Edit: April 16, 2016, 10:44:24 pm by timelapse21 »

cato

  • *
  • 341
Re: Quad not working with INS13
« Reply #1 on: April 17, 2016, 01:16:50 am »
Hi timelapse21,

welcome to Librepilot :) Hope you will have a lot fun.

INS13 uses a lot more sensors than basic. Therefore it's much more sensitive. Check that you did all calibrations, including temperature calibration and most important mag calibration. Mag calibartion must be done in free space with no metal around. Also you need to start at a place were mag does not get affected by metal etc. Basically mag needs to stay green all the time in System Health. If it turns yellow sometimes, it is ok, but never should turn red.

There are quite a few threads about INS13 and GPS on this forum, and the wiki (https://librepilot.atlassian.net/wiki/display/LPDOC/Advanced+features). Hope you find the reason.
Nighthawk 250, MT1806, 12A ESC OneShot125, Revo, M8n GPS, FPV
Cinetank MKII, Elite 2216, 30A Afro OneShot125, Revo Clone, M8N GPS

Re: Quad not working with INS13
« Reply #2 on: April 17, 2016, 01:36:33 am »
Ok, thanks so much. I am thinking that it is the magnetometer, so I will redo the calibrations and see how that goes.

Re: Quad not working with INS13
« Reply #3 on: April 17, 2016, 02:09:03 am »
I think that I may have found the problem. When I try to take off, the mag warning turns red (it was green before), so I guess that the current which the motors start to draw is interfering with the magnetometer. This seems to be a typical problem with the Revolution, I guess I should have figured this out already!

Thanks for the suggestion, I will let you know if raising the Revolution higher works.

cato

  • *
  • 341
Re: Quad not working with INS13
« Reply #4 on: April 17, 2016, 02:34:54 pm »
Hi again,

I hope that works. On my tests so far, it always seemed a better idea to use the mag in the GPS or both. Let me know if it works with internal and changing position, otherwise it may be a solution to use an external mag from the GPS and put it on a stand.
Nighthawk 250, MT1806, 12A ESC OneShot125, Revo, M8n GPS, FPV
Cinetank MKII, Elite 2216, 30A Afro OneShot125, Revo Clone, M8N GPS

Re: Quad not working with INS13
« Reply #5 on: April 17, 2016, 04:10:53 pm »
Now I thought that only v9 GPS was able to get the compass data to the revo... I have this http://www.hobbyking.com/hobbyking/store/__89565__Mini_Ublox_Neo_6M_GPS_for_CC3D_Revolution_Flight_Controller_w_Built_in_Compass.html
GPS and it only has the one cable coming out. Does that get the data to the revo?

cato

  • *
  • 341
Re: Quad not working with INS13
« Reply #6 on: April 17, 2016, 06:37:06 pm »
Well, the current stable version indeed can only manage V9. But the next release will support I2C and DJI Mags. You can try to compile the source of the next.

I am running this code for weeks and I2C mag code simply works. I am not sure about this gps. It has only one connector, so it either has no MAG or the MAG is not connected, or it is somehow included to the GPS signal. You need to find out about that. Yet there are cheap GPS with extra mag connector for the Revo available on Ebay. The I2C mag is connectred to the Flexi Port.
« Last Edit: April 17, 2016, 07:33:09 pm by cato »
Nighthawk 250, MT1806, 12A ESC OneShot125, Revo, M8n GPS, FPV
Cinetank MKII, Elite 2216, 30A Afro OneShot125, Revo Clone, M8N GPS

Mateusz

  • *
  • 808
Re: Quad not working with INS13
« Reply #7 on: April 17, 2016, 06:55:53 pm »
You may need JST-SH 1.0 4pin connector those are cheap on eBay with precrimped wires. Easy to change. Also make sure to get mast that does not rotate.

« Last Edit: April 17, 2016, 08:00:16 pm by Mateusz »

cato

  • *
  • 341
Re: Quad not working with INS13
« Reply #8 on: April 17, 2016, 07:42:03 pm »
You could make a blind test: try to configure it like a GPS V9. For that go to System/Settings/AuxMagsettings, and set it to GPSV9 and Aux Only, then power cycle the controller. If the MAG appears in System Health than someone managed to copy the V9 (it was never put public).
Nighthawk 250, MT1806, 12A ESC OneShot125, Revo, M8n GPS, FPV
Cinetank MKII, Elite 2216, 30A Afro OneShot125, Revo Clone, M8N GPS

hwh

  • *
  • 1018
Re: Quad not working with INS13
« Reply #9 on: April 18, 2016, 01:37:50 am »
Now I thought that only v9 GPS was able to get the compass data to the revo... I have this http://www.hobbyking.com/hobbyking/store/__89565__Mini_Ublox_Neo_6M_GPS_for_CC3D_Revolution_Flight_Controller_w_Built_in_Compass.html
GPS and it only has the one cable coming out. Does that get the data to the revo?

Some gps boards like that have the chip inside but no wires and some don't have the chip at all.  Post a picture of the board inside the gps case and we can tell you which you have.  The mag chips are 3 mm square and usually marked either L883 or A983.

As the others have said, if it has the chip you can connect wires and use the mag in it if you compile and run the next branch of the software.
« Last Edit: April 18, 2016, 02:08:28 am by hwh »

Roypw

  • *
  • 45
Re: Quad not working with INS13
« Reply #10 on: April 19, 2016, 06:52:32 pm »
New to quads but built 2 a 250 and 450. Just upgraded both to Revolution and experiencing same instability problems.  450 flys best but not good and has simple OP GPS - no compass. 250 has YKS Ublox Neo 7M high precision GPS with built in compass for Revo.  Only one 4 pin connector - I used main port. It acquires stats fine and compass calibrates.

I am confused - first what is a V9 GPS?   

Second am I getting compass data from this unit on the 4 pin connector?  How can I tell?

Thank, I am working hard trying to understand all this on my own. Appreciate all the help I can get. This post has been very informative so far.

Roy

hwh

  • *
  • 1018
Re: Quad not working with INS13
« Reply #11 on: April 19, 2016, 09:00:09 pm »
V9 gps was the OpenPilot Platinum GPS, it's no longer made.   It had a mag module inside and sent the compass data on the same wires as the gps data.

If it only has one connector it's unlikely that you're using it for compass data.  If you're running release 15.09 the only external compass supported was the V9 gps.   In the pre-release "next" branch of the code there is support for two other types of external mag sensors, an I2C one and the DJI Naza gps and it's clones.  If it was a Naza clone they'd have said so where you purchased it and the I2C ones have a second 4 pin (with only 2 wires) connector.

If you post a picture of the board inside the GPS we can tell you if it's one of the GPS units that have the mag sensor inside but they didn't install wires going to it.   If it is you can add two wires and use the mag sensor in the next release.
« Last Edit: April 19, 2016, 09:19:49 pm by hwh »

Roypw

  • *
  • 45
Re: Quad not working with INS13
« Reply #12 on: April 19, 2016, 09:22:15 pm »
Thanks much. I will have to take the cap off of the GPS unit to get that picture which I will do probably tomorrow.  Appreciate the help, it's a steep learning curve on your own.

Re: Quad not working with INS13
« Reply #13 on: April 21, 2016, 02:36:21 am »
Hi Everyone:
Just want to give an update on progress. I moved the Revo higher up (Away from the PDB) and it has fixed all of my issues! GPS position hold works very well now, and I am not having the issue of it flipping when taking off. Thanks to everyone for your help, it certainly sped up the troubleshooting process.

Tim

hwh

  • *
  • 1018
Re: Quad not working with INS13
« Reply #14 on: April 21, 2016, 02:52:54 am »
@timelapse21 That's good to hear  :)