Zrisst

  • *
  • 36
INS13 / Mag troubles.
« on: November 19, 2015, 04:46:46 pm »
Hello.

I've spent last two days fighting wit Mag calibration and GPS flight.

After reading all I could find, I tried my best. Go to the Airfield, Powered all systems, wait for half and hour, calibrated board, accelerometers, and mag; all using a bubble level (plastic body) and a compass (well separated) to be sure that every thing is fine (I'm very meticulous when trying to do it right).

I got a calibration, with horizontal level and correct behaviour (less accurate horizontal readings, laggy or crispy) but fine while standing.

I started with internal flying, all as wonderful as always... (I made some flying over the field just for fun... everything OK)

Then tried INS13 mode. As throttleing up horizon became unstable, flipping down and getting drunk. Almost unable to take off.

After I switched to GPSOutdoor. And then I could take off, but was almost impossible to fly, horizon not accurate, erratic stabilization... I didn't try a translation flight because of the fear of losing control.

I have twisted cables (as far I can, it's a Tarot250 and all the wiring is in the lower PCB. Placed M8N in a 10cm stand in the opposite side of the BEC, battery plug is in the middle of the down board, no option, and tried to make a very clean wiring.

UAV is my main interest, and quite frustrated.

Any help will be very appreciated.

(I don't know the rules of trouble posting; I saw in other forums that people uploads copies of configuration and FDR, so I'll do. If I'm wrong just tell me how to do it correct).
Algunos salían a buscar la inmortalidad con tanta intensidad que no volvían.
Antoine de Saint-Exupéry (de los pilotos de prueba).

f5soh

  • *****
  • 4572
    • LibrePilot
Re: INS13 / Mag troubles.
« Reply #1 on: November 19, 2015, 08:37:38 pm »
Hi,

The answer is quite simple, i think Ins13 is almost impossible using the onboard mag on a 250 sized Quad...

I see also the gyro bias not so close to 0
Code: [Select]
<field values="-0.548374,3.30163,1.98384" name="gyro_bias"/>Please redo Gyro calibration, be sure the frame is really stable. Level is not needed for Gyro calibration. Check values in UavoBrowser after.

No need a bubble level, if your frame is not twisted :)
You only need  know "level" surface.

About the Accelerometer  (six point) calibration : the perfectly vertical / horizontal position is not needed BUT in all cases do not move the frame. Beware for a not stable frame or stand on a moving / vibes desk...

We need to de-dramatize the calibration process, look this nice video from Eric :


Do you have a Oplink ? Can you monitor Mag status while flying ?
For best Mag calibration results a wireless link is a best option for Mag calibration. Outdoors, away from electrical/mag noise.

If you have a GPS with mag you can use the next branch (current dev branch) that allow I2c mag (external), i run a small quad using i2C mag and Ins13 / Rth / Waypoints without issues.

Laurent




f5soh

  • *****
  • 4572
    • LibrePilot
Re: INS13 / Mag troubles.
« Reply #2 on: November 19, 2015, 08:54:51 pm »
About HomeLocation, you should set the altitude.
Go into Attitude tab and clear Homelocation data. If good Gps data the homelocation should be set fine and used as reference, and finally altitude displayed with values close to 0m in PFD.

Looking at log file you have red Mag alarm while motors are running. Mag alarm should be solid Green or briefly orange, never red. Not surprised for a compact quad and onboard Mag.

Zrisst

  • *
  • 36
Re: INS13 / Mag troubles.
« Reply #3 on: November 19, 2015, 10:12:41 pm »
Ups, forgot to post photos.

When only EXT mag MAG light remains black. Don't know if it's correct (It's supposed that M8N have it's own compass) (Ext Mag reffers to uBlox one?).

Have to check Gyro Bias (still learning about which means each UAVObjets). I use for calibration a desk table with screw adjusting in each leg (I use the bubble for checking the table alignment) using the wall as square angle.
Mag calibration is done in the airfield, on the grass, near the runway, 10 meters away (more or less) from any metallic thing (except the laptop, I'm 1'67 tall, short arms :P ).

But I'll redo all calibration.

I use Oplink, in another table (not to touch the one I use for the frame). During flight, it's complicated to watch to the laptop trying not to crash :( Using log replay Mag movements don't correspond to model dynamics.

I'll check the video :)

Next Branch? sorry What's that? may be I get lost in translation. :'(


I set home location using the mouse, and may be there was not geoid height info. I'll fill that field. Altitud (MSA) was displayed correctly only when in INS13 mode.
Yes, Mag turns red when arming, may be to small a 250?

Thanks Laurent
Algunos salían a buscar la inmortalidad con tanta intensidad que no volvían.
Antoine de Saint-Exupéry (de los pilotos de prueba).

Zrisst

  • *
  • 36
Re: INS13 / Mag troubles.
« Reply #4 on: November 19, 2015, 10:29:46 pm »
Nice video... too late tonight to perform the calibration, Saturday morning I'll try again :)
Algunos salían a buscar la inmortalidad con tanta intensidad que no volvían.
Antoine de Saint-Exupéry (de los pilotos de prueba).

f5soh

  • *****
  • 4572
    • LibrePilot
Re: INS13 / Mag troubles.
« Reply #5 on: November 19, 2015, 10:36:45 pm »
When only EXT mag MAG light remains black. Don't know if it's correct (It's supposed that M8N have it's own compass) (Ext Mag reffers to uBlox one?).

The Ublox chip do not have Mag but looks like your have a Mag chip inside but without wiring. You should have two spare wires for I2c : SCL/SDA.
If no wires, you can open the GPS box and look for SCL/SDA labels on pcb. You can also check for a Mag chip inside, the same as the chip used in Revo board.

Quote
Next Branch? sorry What's that? may be I get lost in translation. :'(

"Next" branch refers to the branch name on source code repository, the one where the most recent changes are pushed.

Re: INS13 / Mag troubles.
« Reply #6 on: November 20, 2015, 12:29:16 am »
What kind of FC board do you have?  Can you mount it farther away from the power wires or move the PDB / wires away from the FC?

This is why the OP GPS V9 has a mag in it.  You mount the GPS/mag above all the noise.

In the past at OP, OP GPS V9 was the only solution.  Soon LP will release a version that allows you to use the mag in your M8N, but you must use FlexiPort to do this.

OP Nano FC is very limited in the number of ports it has.  There are two connections, MainPort and FlexiPort, so you can do two things from this list (but not use two GPSs at the same time):
- inexpensive GPS
- external mag in inexpensive GPS
- OP GPS V9
- telemetry
- OSD connected to FC to get GPS / artificial horizon / home pointer / battery remaining / battery voltage

OP Revo FC is a bit better because it has telemetry built in, but you still can't use all of these at once:
- inexpensive GPS
- external mag in inexpensive GPS
- OSD connected to FC to get GPS / artificial horizon / home pointer

We are working on support for TauLabs Sparky2 flight controller.  It has extra ports, including a second place to attach "external mag in inexpensive GPS".  With Sparky2 you can have everything in the list: GPS, external mag in GPS, OSD, and telemetry all at the same time.

If you want everything in the list at the same time, you must have either a Revo + OP GPS V9 ... or a Sparky2.  What features do you absolutely require?
« Last Edit: November 20, 2015, 12:33:19 am by TheOtherCliff »

Zrisst

  • *
  • 36
Re: INS13 / Mag troubles.
« Reply #7 on: November 20, 2015, 01:23:36 pm »
The Ublox chip do not have Mag but looks like your have a Mag chip inside but without wiring. You should have two spare wires for I2c : SCL/SDA.
If no wires, you can open the GPS box and look for SCL/SDA labels on pcb. You can also check for a Mag chip inside, the same as the chip used in Revo board.

I've opened the GPS capsule (I was curios about why OP ones only had 4 wires and APM had 6) and found that there was a 6 connection jst, but only 4 wires. Now I know the reason. ¿How can I connect them to the Revo?

Quote
"Next" branch refers to the branch name on source code repository, the one where the most recent changes are pushed.

I'm new to open source things, also in programming, sorry about that, I¡l try to learn quickly ;)
Algunos salían a buscar la inmortalidad con tanta intensidad que no volvían.
Antoine de Saint-Exupéry (de los pilotos de prueba).

Zrisst

  • *
  • 36
Re: INS13 / Mag troubles.
« Reply #8 on: November 20, 2015, 01:47:02 pm »
What kind of FC board do you have?  Can you mount it farther away from the power wires or move the PDB / wires away from the FC?

This is why the OP GPS V9 has a mag in it.  You mount the GPS/mag above all the noise.

In the past at OP, OP GPS V9 was the only solution.  Soon LP will release a version that allows you to use the mag in your M8N, but you must use FlexiPort to do this.

I use a Revo (bought to Banggood, hope is an original, I'm not happy with clones) I also have another Revo, a Nano, and an Atom (lots of plans in mind). There is no room in the quad for many options. The only free space is at the front, between ESC's, and I'm going to place there the FPVcam.

The GPS I use have Mag inside, but, it looks I haven't wired it correctly; only four wires come out the GPS "ufo". What's the correct way to do it? (asked in my last post reply to Laurent) Should be great to make it work, becase is set in a stand well above the frame.

Quote
OP Nano FC is very limited in the number of ports it has.  There are two connections, MainPort and FlexiPort, so you can do two things from this list (but not use two GPSs at the same time):
- inexpensive GPS
- external mag in inexpensive GPS
- OP GPS V9
- telemetry
- OSD connected to FC to get GPS / artificial horizon / home pointer / battery remaining / battery voltage

OP Revo FC is a bit better because it has telemetry built in, but you still can't use all of these at once:
- inexpensive GPS
- external mag in inexpensive GPS
- OSD connected to FC to get GPS / artificial horizon / home pointer

We are working on support for TauLabs Sparky2 flight controller.  It has extra ports, including a second place to attach "external mag in inexpensive GPS".  With Sparky2 you can have everything in the list: GPS, external mag in GPS, OSD, and telemetry all at the same time.

If you want everything in the list at the same time, you must have either a Revo + OP GPS V9 ... or a Sparky2.  What features do you absolutely require?

I didn't knew Sparky2. I'll have a look.
I couldn't find a place to buy op hardware except internet. And I was unable to find where to buy OP GPS V9 (with an affordable shipping cost to Spain).

Is the only way to have it all with Revo to use OP GPS? I'm waiting MinimOSD to get in the mailbox. :(
Anycase Autonomous flight is the main objective. The rest is optional (but if I can, "I want it all yeeeyeaaah").


Thanks.

(P.D.: I think I've kicked english grammar one or twice, sorry about that)
Algunos salían a buscar la inmortalidad con tanta intensidad que no volvían.
Antoine de Saint-Exupéry (de los pilotos de prueba).

Re: INS13 / Mag troubles.
« Reply #9 on: November 21, 2015, 12:42:16 am »
What F5soh posted was exactly correct.  It very very probably has a mag, but just doesn't have wires coming out.

All this will be documented publicly at the next release where AuxMag support probably is made public.

The mag (tiny tiny) chip is probably numbered L83 because it is an HMC5883 type.  What I would do is look up that chip, find SCL and SDA pins.  Find out what they are connected to that is easy to solder to.  Solder them to a standard OP wires/connector.  If you look up FlexiPort, you can find which connector pins are SCL and SDA.  This is only necessary for the GPS's that only have a single 4 wire cable coming out.

One last thing is that the APM style of GPS requires two power connections (PixHawk requires one).  One for GPS and the other for the mag.  GPS will accept unregulated 5V, but mag needs regulated 3.3V.  What I did for my APM GPS was steal power from the internal GPS (after the voltage regulator) and solder it to the mag.  This is also documented in the FTT thread.

A thing that would make this simpler is if you are willing to join the Flight Test Team.  There is an FTT thread that tells all about using these ext/aux mags.
https://forum.librepilot.org/index.php?topic=140.0

Zrisst

  • *
  • 36
Re: INS13 / Mag troubles.
« Reply #10 on: November 23, 2015, 11:26:05 am »
What F5soh posted was exactly correct.  It very very probably has a mag, but just doesn't have wires coming out.

All this will be documented publicly at the next release where AuxMag support probably is made public.

The mag (tiny tiny) chip is probably numbered L83 because it is an HMC5883 type.  What I would do is look up that chip, find SCL and SDA pins.  Find out what they are connected to that is easy to solder to.  Solder them to a standard OP wires/connector.  If you look up FlexiPort, you can find which connector pins are SCL and SDA.  This is only necessary for the GPS's that only have a single 4 wire cable coming out.

The GPS have a JST SH 6 pin connector. But only 4 wires coming out. Unbind connections are labelled, of course, SCL and SDA. Easy.

Quote
One last thing is that the APM style of GPS requires two power connections (PixHawk requires one).  One for GPS and the other for the mag.  GPS will accept unregulated 5V, but mag needs regulated 3.3V.  What I did for my APM GPS was steal power from the internal GPS (after the voltage regulator) and solder it to the mag.  This is also documented in the FTT thread.

Have to check this, Have to check this. No time this weekend for more.

Quote
A thing that would make this simpler is if you are willing to join the Flight Test Team.  There is an FTT thread that tells all about using these ext/aux mags.
https://forum.librepilot.org/index.php?topic=140.0

It should be great to join FTT crew. I clicked the ling but no permission.

TNKS
Algunos salían a buscar la inmortalidad con tanta intensidad que no volvían.
Antoine de Saint-Exupéry (de los pilotos de prueba).

f5soh

  • *****
  • 4572
    • LibrePilot
Re: INS13 / Mag troubles.
« Reply #11 on: November 23, 2015, 12:48:17 pm »
Quote
It should be great to join FTT crew. I clicked the ling but no permission.

Try again :)

Zrisst

  • *
  • 36
Re: INS13 / Mag troubles.
« Reply #12 on: November 23, 2015, 01:35:18 pm »
Quote
It should be great to join FTT crew. I clicked the ling but no permission.

Try again :)

Many thanks!!  :D :D :D
Algunos salían a buscar la inmortalidad con tanta intensidad que no volvían.
Antoine de Saint-Exupéry (de los pilotos de prueba).

tronn

  • *
  • 3
Re: INS13 / Mag troubles.
« Reply #13 on: December 19, 2015, 06:54:12 pm »
I got a Revo board with a Ublox M8n GPS, there where only 4 wires comming out of the GPS puck, the GPS has a 6 pin connector, so I connect SCL og SDA and put them in flexi port SCL as pin3 and SDA as pin 4, still no joy :-o

The I2C alarm still remain black, I checked that there is a wire connection from the SCL/SDA until the plug I put in the flexi port, tested with a multimeter.

My Goal with the revo is to have some waypoint and return to home feature

Please advice me

Re: INS13 / Mag troubles.
« Reply #14 on: December 19, 2015, 08:33:35 pm »
Aux mag is a feature that has not been released yet.  It will be available in the next release.  Sorry.

Sounds like you are ready for it when it gets here though.

FYI: TauLabs already has aux mag, but I recall it is not available for Revo, but it is for Sparky2.