LibrePilot Forum

General Category => General Discussion => Topic started by: sv2fpv on March 17, 2016, 04:30:23 pm

Title: Revo AuxMag
Post by: sv2fpv on March 17, 2016, 04:30:23 pm
Hi to all.
I have Revo kit from banggood
Baro is ok
"Complementary Basic" all modes fly very well
With internal compass could not fly, many problems.

Yes all the cables are twisted, but "mag interference" is here.

After I found you here, i have connected the external compass of the GPS,
downloaded the "next" and the compiler.
I did all calibrations in the house and everything is fine,
the compass without great error, indoor "SystemHealth" mag mostly is green, ATTI STAB green.

But it rains, not yet tested out the house.

Μany thanks to the Team LimbrePilot

http://www.youtube.com/watch?v=L58TpMVAXTI (http://www.youtube.com/watch?v=L58TpMVAXTI)
Title: Re: Revo AuxMag
Post by: kennyevo on March 18, 2016, 04:50:51 pm
Hi!

I'd like to use my GPS' compass too, it's a ubloxneo-6m (it says with compass), added two extra wires to the connector for A and L (I think these are SDA and SCL), connected the gps to the main port, then connected the mag to flexi.
I've built the GCS from the latest source, set the flexi port to I2C, but the GCS says auxmag not found :S
Did I miss something, or the ubloxneo-6m doesn't really have a mag? (the I2C icon is orange in system health)
Title: Re: Revo AuxMag
Post by: sv2fpv on March 21, 2016, 11:04:59 am
Hi kennyevo give a picture of the GpsBoard, may be help you.

Υesterday's tests

Stabilization default settings

1) Attitude = very stable
2) AltitudeVario = very stable level
3) PositionHold = solid rock
4) VelocityRoam = solid rock
5) GpsAssist = oh my God is a dream

no drifts
no oscillations

Νext test

1) AutoTakeoff
2) Land
3) ReturnToBase & Land
4) Flιps & Rolls
5) and more crashes

Μany thanks LimbrePilot
Title: Re: Revo AuxMag
Post by: kennyevo on March 22, 2016, 07:51:52 am
Hi!

Here's a pic of my GPS: https://drive.google.com/file/d/0B_2MdV3di_UMVm80dXZFVU1UaE0/view?usp=sharing (https://drive.google.com/file/d/0B_2MdV3di_UMVm80dXZFVU1UaE0/view?usp=sharing)

There were no cable for L and A so I added them and connected to the flexi port.
Title: Re: Revo AuxMag
Post by: sv2fpv on March 22, 2016, 08:20:55 am
Hi kennyevo

I am very sorry, the MagSensor is missing.
Title: Re: Revo AuxMag
Post by: kennyevo on March 22, 2016, 08:26:45 am
Damn, thank you for your response, then I'll buy a better gps :)
Title: Re: Revo AuxMag
Post by: zukenj on March 24, 2016, 02:18:12 am

Hi kennyevo give a picture of the GpsBoard, may be help you.

Υesterday's tests

Stabilization default settings

1) Attitude = very stable
2) AltitudeVario = very stable level
3) PositionHold = solid rock
4) VelocityRoam = solid rock
5) GpsAssist = oh my God is a dream

no drifts
no oscillations

Νext test

1) AutoTakeoff
2) Land
3) ReturnToBase & Land
4) Flιps & Rolls
5) and more crashes

Μany thanks LimbrePilot

Sv2fpv,

Did you do any calibration for your external mag?

If so, can you please tell me what you did.

Thanks
Title: Re: Revo AuxMag
Post by: f5soh on March 24, 2016, 07:32:13 am
Here is :

https://www.youtube.com/watch?v=o4V_ZGG0Hk0
Title: Re: Revo AuxMag
Post by: sv2fpv on March 24, 2016, 07:53:05 am
Εxactly
Title: Re: Revo AuxMag
Post by: zukenj on March 24, 2016, 03:02:04 pm
Here is :

https://www.youtube.com/watch?v=o4V_ZGG0Hk0

Excellent video. Thanks I will do it tonight. I got the on board all green when moved, but not the external, Last week was the other way around.
 
Title: Re: Revo AuxMag
Post by: abylone on March 24, 2016, 03:18:47 pm
Hi,
I have the Revo + GPS M8N from Banggood and I would like to use also the ext compass of the GPS.
I attached a picture of my GPS to check if it really includes the mag.

I connected the two wires SCL & SDA between the flex port and the GPS and started the Setup wizard from GCS 15.09 to configure the I2C port.
But I have the following issues:
- I don't have the choice to select "GPS u-blox + magnetometer external" in the setup wizard (only GPS u-blox)
- The I2C port is not active and stays in black color on the flight data screen.

It seems that this configuration is supported only in release 16.01 but where can I find it or do I have other issue ?

Thanks for your help
Title: Re: Revo AuxMag
Post by: f5soh on March 24, 2016, 03:23:58 pm
Looks like you need to solder two wires from SCL and SDA pads.

For i2c mag support you need to build GCS yourself, take a look how to do here:
https://librepilot.atlassian.net/wiki/display/LPDOC/Developer+Manual
Title: Re: Revo AuxMag
Post by: abylone on March 24, 2016, 06:54:49 pm
Thanks,
The two wires were connected after I took the picture so no issue about this.
I started to build GCS by myself (for the first time) and everything is going well until this step: "mingw32-make package" where I have the following error message:

Rodolphe@ElPadre MINGW32 ~/librepilot
$ mingw32-make package
/usr/bin/sh: ligne 1: qmake : commande introuvable
Makefile:185: recipe for target 'C:/msys32/home/Rodolphe/librepilot/build/uavobjgenerator/uavobjgenerator.exe' failed
mingw32-make: *** [C:/msys32/home/Rodolphe/librepilot/build/uavobjgenerator/uavobjgenerator.exe] Error 127

If you have any idea ?
Thanks,
Title: Re: Revo AuxMag
Post by: f5soh on March 24, 2016, 07:06:06 pm
Looks like you miss the Qt install  :o

your are using MINGW32 shell so you need to install 32bit packages.
https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging#WindowsBuildingandPackaging-For32bit:
Title: Re: Revo AuxMag
Post by: zukenj on March 25, 2016, 05:37:16 am
f5soh,

Thanks for that video. I have Both Mags green now.

What are the Red lines and the Yellow dots. How do I clear the map?

Regards
Title: Re: Revo AuxMag
Post by: hwh on March 25, 2016, 05:50:00 am
If you right click on the map a menu will pop up.  On it select UAV and then clear uav trail.  In the same UAV menu you can turn the trail off if you don't want it.
Title: Re: Revo AuxMag
Post by: zukenj on March 25, 2016, 02:57:41 pm
hwh,

Thanks, like always good information.

Title: Re: Revo AuxMag
Post by: ptbh on March 27, 2016, 05:43:36 pm
I too have taken the step of compiling 'next' to give the auxilary compass a try.  However, after taking quite a while to compile, it would appear it ended with a number of makefile errors:


Makefile:2364: recipe for target 'configgadgetwidget.o' failed
mingw32-make[4]: *** [configgadgetwidget.o] Error 1
mingw32-make[4]: Leaving directory 'C:/msys64/home/librepilot/build/librepilot-g                                                                                                                                                                                               cs_release/src/plugins/config'
Makefile:519: recipe for target 'sub-config-make_first' failed
mingw32-make[3]: *** [sub-config-make_first] Error 2
mingw32-make[3]: Leaving directory 'C:/msys64/home/librepilot/build/librepilot-g                                                                                                                                                                                               cs_release/src/plugins'
Makefile:127: recipe for target 'sub-plugins-make_first-ordered' failed
mingw32-make[2]: *** [sub-plugins-make_first-ordered] Error 2
mingw32-make[2]: Leaving directory 'C:/msys64/home/librepilot/build/librepilot-g                                                                                                                                                                                               cs_release/src'
Makefile:40: recipe for target 'sub-src-make_first-ordered' failed
mingw32-make[1]: *** [sub-src-make_first-ordered] Error 2
mingw32-make[1]: Leaving directory 'C:/msys64/home/librepilot/build/librepilot-g                                                                                                                                                                                               cs_release'
Makefile:269: recipe for target 'gcs' failed
mingw32-make: *** [gcs] Error 2[/i][/i][/i]


Any suggestions on what I have done wrong?  I following the instructions on the below link:

https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging#WindowsBuildingandPackaging-Introduction

Thanks in advance for any suggestions on how to fix?
Title: Re: Revo AuxMag
Post by: f5soh on March 27, 2016, 06:38:37 pm
Code: [Select]
qmake -v
If you are using qt5.6, wait for a fix.
Title: Re: Revo AuxMag
Post by: ptbh on March 27, 2016, 09:39:01 pm
Hi f5soh, thanks for the quick reply.  Yes, it does look like I am using Qt ver 5.6.0.  I see it is installed during the 'install required packages' step.  Not keen to wait for a fix as I wish to try using the aux mag ASAP.  The question is, how can I install Qt ver 5.5.1 and get the make process to use that version instead of 5.6.0?  I do actually have 5.5.1 on my machine.  Is is just a case of pointing the system variables to that?  Many thanks for any guidance you can provide.  Kind regards, Paul.
Title: Re: Revo AuxMag
Post by: raffybuffy on March 28, 2016, 04:44:11 pm
I would like to use an gps with mag on a revo board, using the flexi port via I2C, (http://www.banggood.com/it/OpenPiolot-CC3D-Revolution-Flight-Controller-Oplink-M8N-GPS-Distribution-Board-p-1000084.html).
So I have try to build the next version of GCS, I followed the instruction for building and packaging (https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging#WindowsBuildingandPackaging-GetthecodeusingMsys2) everything seems ok but the build abort with the following errors:

Makefile:2544: recipe for target 'configgadgetwidget.o' failed
mingw32-make[4]: *** [configgadgetwidget.o] Error 1
mingw32-make[4]: Leaving directory 'C:/msys32/home/raffa_000/librepilot/build/librepilot-gcs_release/src/plugins/config'
Makefile:519: recipe for target 'sub-config-make_first' failed
mingw32-make[3]: *** [sub-config-make_first] Error 2
mingw32-make[3]: Leaving directory 'C:/msys32/home/raffa_000/librepilot/build/librepilot-gcs_release/src/plugins'
Makefile:127: recipe for target 'sub-plugins-make_first-ordered' failed
mingw32-make[2]: *** [sub-plugins-make_first-ordered] Error 2
mingw32-make[2]: Leaving directory 'C:/msys32/home/raffa_000/librepilot/build/librepilot-gcs_release/src'
Makefile:40: recipe for target 'sub-src-make_first-ordered' failed
mingw32-make[1]: *** [sub-src-make_first-ordered] Error 2
mingw32-make[1]: Leaving directory 'C:/msys32/home/raffa_000/librepilot/build/librepilot-gcs_release'
Makefile:269: recipe for target 'gcs' failed
mingw32-make: *** [gcs] Error 2


I tried with different PC, one with W10 and another with Seven but  I always had the same error.

Anybody can help me? :-D
Title: Re: Revo AuxMag
Post by: f5soh on March 28, 2016, 05:35:24 pm
Moved post here.

Wait for fix that need to be merged tomorrow.
https://bitbucket.org/librepilot/librepilot/pull-requests/209/lp-208-qt-560/diff
Title: Re: Revo AuxMag
Post by: hwh on March 28, 2016, 06:23:39 pm
I would like to use an gps with mag on a revo board, using the flexi port via I2C, (http://www.banggood.com/it/OpenPiolot-CC3D-Revolution-Flight-Controller-Oplink-M8N-GPS-Distribution-Board-p-1000084.html).
So I have try to build the next version of GCS,...

Unrelated to your compile problem, have you taken the gps apart and checked to see if it actually has the mag chip in it?  The single 4 wire cable shown on Banggood is just for the gps portion.  I2C external mag requires another two wire cable to carry the mag data. Some people who have purchased gps units looking like that one have found that the mag chip was inside and they just needed to solder on another cable.  At least one person found that the mag chip wasn't installed inside.
Title: Re: Revo AuxMag
Post by: raffybuffy on March 28, 2016, 07:01:21 pm

Unrelated to your compile problem, have you taken the gps apart and checked to see if it actually has the mag chip in it?  The single 4 wire cable shown on Banggood is just for the gps portion.  I2C external mag requires another two wire cable to carry the mag data. Some people who have purchased gps units looking like that one have found that the mag chip was inside and they just needed to solder on another cable.  At least one person found that the mag chip wasn't installed inside.
Yes the mag chip was inside, i have soldered another cable just with sda and scl to connect to flexiport.
Ok I'll try tomorrow  :D
Title: Re: Revo AuxMag
Post by: heubie on March 28, 2016, 09:15:59 pm
After 30 min I had the hardware ready..... butt i'm trying now for 2 days to build the "next"version on 3 different (windows 32 and 64). But no succes. I will try one more time tomorrow but if this fails could somebody share a windows version so I can test the hardware.
Title: Re: Revo AuxMag
Post by: f5soh on March 28, 2016, 09:59:20 pm
If you can't wait tomorrow, set another repo and get windows / Qt5.6 compatible branch.

Code: [Select]
git remote add bitbucket_alessio https://bitbucket.org/alessiomorale/librepilot.git
git fetch bitbucket_alessio
git checkout bitbucket_alessio/Qt-5.6_Support_Win
Title: Re: Revo AuxMag
Post by: heubie on March 29, 2016, 05:51:04 pm
Didn't have any time yesterday so tried this afternoon. The "next" version still gave the same error's as PTBH had yesterday.
Tried to build the one that F5SOH mentioned. Build perfectly but after install (tried on two different pc's) nothing happed.
Not even a process in the taskmanager.
Can anybody provide a file for windows which will install and help me test I2C mag.

Regs
Title: Re: Revo AuxMag
Post by: raffybuffy on March 29, 2016, 08:38:39 pm
Always the same...  :-\
          ^
Makefile:2364: recipe for target 'configgadgetwidget.o' failed
mingw32-make[4]: *** [configgadgetwidget.o] Error 1
mingw32-make[4]: Leaving directory 'C:/msys64/home/raffa_000/librepilot/build/librepilot-gcs_release/src/plugins/config'
Makefile:519: recipe for target 'sub-config-make_first' failed
mingw32-make[3]: *** [sub-config-make_first] Error 2
mingw32-make[3]: Leaving directory 'C:/msys64/home/raffa_000/librepilot/build/librepilot-gcs_release/src/plugins'
Makefile:127: recipe for target 'sub-plugins-make_first-ordered' failed
mingw32-make[2]: *** [sub-plugins-make_first-ordered] Error 2
mingw32-make[2]: Leaving directory 'C:/msys64/home/raffa_000/librepilot/build/librepilot-gcs_release/src'
Makefile:40: recipe for target 'sub-src-make_first-ordered' failed
mingw32-make[1]: *** [sub-src-make_first-ordered] Error 2
mingw32-make[1]: Leaving directory 'C:/msys64/home/raffa_000/librepilot/build/librepilot-gcs_release'
Makefile:269: recipe for target 'gcs' failed
mingw32-make: *** [gcs] Error 2


Title: Re: Revo AuxMag
Post by: hwh on March 29, 2016, 09:08:46 pm
You're trying to compile "next", it's a development branch not release.  :)  Most of the time it compiles and runs fine, sometimes like now it's in the middle of changes and doesn't compile.  Like now it's usually related to supporting all three platforms, linux, windows, and Mac.  Currently it compiles fine on linux and I think they got Mac working, windows is still being worked on.
Title: Re: Revo AuxMag
Post by: raffybuffy on March 31, 2016, 12:19:43 pm
Now I'have builded without error and installed librepilot, but don't start:
"Unable to start... libpcre-1.dll.. is not present".
 :(

Title: Re: Revo AuxMag
Post by: heubie on March 31, 2016, 11:48:28 pm
Since the windows part did not work I decided to give Linux a try. I tool me two day's to get linux installed on my acer with UEFI bios.^&*(%^(&%^*&......
Only to find out that building the software did  not work either... qt5 and libssl error's......

So I'll give up and wait till it will be released. Back to the mag on the revo......
Title: Re: Revo AuxMag
Post by: Fursys on April 03, 2016, 03:47:05 pm
Now I'have builded without error and installed librepilot, but don't start:
"Unable to start... libpcre-1.dll.. is not present".
 :(

I have got same error in my system. Solved by adding ...msys64\mingw64\bin to PATH
Title: Re: Revo AuxMag
Post by: heubie on April 03, 2016, 05:20:53 pm
the  qt5 and libssl error's where in Linux.
Windows build without any error's but after install the librepilot-gcs.exe does not start.  Not even anything in the taskmanager.
Title: Re: Revo AuxMag
Post by: ptbh on April 03, 2016, 10:10:59 pm
I think I am almost there getting the 'next' branch running with Windows.

I compiled the latest branch of 'next' last night, compiled successfully without the make errors previously encountered.  However, after installing GCS and trying to run it, it would not start, giving the same 'libpcre-1.dll not present' as reported by raffybuffy on March 31.  I located this dll in 'C:\msys64\mingw64\bin' and copied it to 'C:\Program Files\LibrePilot\bin'.  This allowed GCS to start, but clicking on any of the tabs in GCS resulted in it not responding.  I therefore copied all of the other dll files in C:\msys64\mingw64\bin to C:\Program Files\LibrePilot\bin (approach by Fursys today possibly better, adding C:\msys64\mingw64\bin to PATH).  This allows GCS to function and I have managed to set up my quad with it.  However, clicking on the flight data tab causes GCS to close, so I have not yet been able to set my home location to calibrate the sensors.  I suspect this may be due to another missing file.

Any clues as to how I may be able to fix this?  I keen to get my quad working with GPS which to date has not been possible due to problems with the Revo onboard mag.

Thanks in advance for any guidance given.
Title: Re: Revo AuxMag
Post by: f5soh on April 03, 2016, 11:39:49 pm
In your case the modelview cause Flight Data tab crash.

Go to another tab and check Edit gadget mode into Windows menu
Add OpMap widget where you want
Title: Re: Revo AuxMag
Post by: TinyStego on April 04, 2016, 08:48:43 am
I tried building from the next branch and everything works, except for the PFD. When I go to the flight data tab I see the map, I see the sensors, but there's a giant blank white spot where the PFD should be. I checked the terminal and when it loads up, it says the Pfd.qml is not found. Well I checked to see what was in the pfd directory, and there wasn't even a directory! I checked back on the Github page, and even on there, there is no ground/gcs/src/share/ like there is on the 15.09 branch. Has anyone got it to work? I tried copying the pfd directory from my current install and that occupied the white spot, but it wasn't right.
Title: Re: Revo AuxMag
Post by: f5soh on April 04, 2016, 10:23:09 am
You may need to reset your config.

File > Import/Export GCS settings > Reset and restart

If still don't work under windows, a pull request is waiting for that.

Moved post to "experimental" thread :)
Title: Re: Revo AuxMag
Post by: heubie on April 04, 2016, 08:46:19 pm
I did also copy the dll's and gues what..... succes. The PFD does not work for me but I have another more serious issue.
When I use the setup wizzard and save the setting's using GPS and mag everything works fine.
I can calibrate everything but..... as soon as disconnect the usb and battery, and reconnect the battery first, and after boot reconnect the aux-mag is not recognized anymore. The only way to get it back working is to run the wizzard again.
Does anybody have this behaviour?
Title: Re: Revo AuxMag
Post by: f5soh on April 04, 2016, 08:50:24 pm
Wizard is Attitude > Magnetometer for you ?

Why you say "aux-mag is not recognized anymore", explain :)

Title: Re: Revo AuxMag
Post by: heubie on April 04, 2016, 08:55:59 pm
The wizzard is the vehicle setup wizzard.

And when I look at Attitude > Magnetometer  > AuxMag not found
Title: Re: Revo AuxMag
Post by: f5soh on April 04, 2016, 09:27:05 pm
Maybe you miss something to be saved ?

How about I2C alarm in systemHealth ?
Title: Re: Revo AuxMag
Post by: TinyStego on April 04, 2016, 09:32:07 pm
You may need to reset your config.

File > Import/Export GCS settings > Reset and restart

If still don't work under windows, a pull request is waiting for that.

Moved post to "experimental" thread :)

That worked! I'm using Arch Linux btw

I got it to work another way, but it was hacky and I think it might have screwed some stuff up. Like the transmitter is having many issues. It is very slow to go through the transmitter wizard. I can arm the quad, but can't take off.

The way I did it was taking the pfd directory from the qml directory and moved it where it wanted it. I also had to move some other files too, but the way you mentioned works a lot better, thanks!
Title: Re: Revo AuxMag
Post by: heubie on April 04, 2016, 09:37:13 pm
I double checked the saving.... :)

The I2C in system health is orange/yellow.

In the vehicle setup wizzard you have to choose your GPS selection. I have U-blox based + Mag.
Is this stored in the setting and if so where is it because I can only find AuxMag and GPSsettings
but cannot find the setting from the GPS-selection.


I did some more playing around I found that when AuxMag not found (and grayed out) and I go to the Firmware tab and do a Halt-Boot or a Reset the AuxMag turns green. It looks like the revo board does not boot (fully) when I  only connect the battery and that after the hookup  of the USB the running of the Vehicle setup Wizzard is not the solution but the reboot after this wizzard.
Title: Re: Revo AuxMag
Post by: f5soh on April 04, 2016, 10:06:12 pm
If after a normal boot with battery only the I2C alarm is orange, no chance the I2c AuxMag works.
Title: Re: Revo AuxMag
Post by: heubie on April 04, 2016, 10:21:39 pm
Correct,what happens is that after normal boot battery only the I2C alarm is orange and the AuxMag in Attitude is not found and grayed out

But when his is the case I go to firmware-tab and do a Halt-boot or reset I2C alarm turn green and AuxMag in Attitude is green and all values are OK.

So it looks like the boot up after connecting only the battery does something strange.......
Title: Re: Revo AuxMag
Post by: f5soh on April 04, 2016, 10:27:55 pm
Be sure you can thrust your +5V source and apply +5V first without USB connected.
Check wiring / bad contact.

Mag alarm in SystemHealth should be green only if you use a FusionAlgorithm that use Mag. Complementary do not use Mag.
Attitude > Magnetometer to not take in account the FusionAlgorithm and show similar alarm for both mags
Title: Re: Revo AuxMag
Post by: heubie on April 04, 2016, 10:43:40 pm
I am sure 5V is oke because GPS works fine (and the AuxMag is on the same PCB)

I running on the INS13 setting (or INS13 indoor for calibration as is mentioned in the calibartion video)
Title: Re: Revo AuxMag
Post by: f5soh on April 04, 2016, 10:52:22 pm
Check voltage.
Here i am sure it works in my test quad :)
Title: Re: Revo AuxMag
Post by: heubie on April 04, 2016, 10:56:04 pm
I will do this tommorow and report back. Thanks for your replies so far.
Title: Re: Revo AuxMag
Post by: f5soh on April 04, 2016, 11:10:08 pm
For all Windows builders:

Code: [Select]
git pull
update-core
pacman -Su

Add Librepilot repo and redo package install from list on Wiki page:
https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging#WindowsBuildingandPackaging-AddLibrePilotMinGWrepository
Title: Re: Revo AuxMag
Post by: heubie on April 05, 2016, 10:19:20 am
Check 5V supply -> OK
re-route 5V supply from direct from the power-board i.s.o. one of the ESC -> same behavior.

Check various settings of Mag Usage and Mag type -> same behavior.

Is there some sort of logging on the revo itself during booting on battery  only which I can check?

Title: Re: Revo AuxMag
Post by: f5soh on April 05, 2016, 05:04:08 pm
Check 5V supply -> OK
re-route 5V supply from direct from the power-board i.s.o. one of the ESC -> same behavior.

Check various settings of Mag Usage and Mag type -> same behavior.

You can do all you want, if still the I2C alarm you cannot use I2C.
git pull and build again Gcs, you should have something with GCS15.09+r552
Do Upgrade&Erase

Replace current firmware with file attached:
- Rescue
- Connect board
- Load firmware you saved
- Flash

Redo Wizard but without Upgrade, keep the firmware you flashed.
Title: Re: Revo AuxMag
Post by: ptbh on April 05, 2016, 10:17:35 pm
In your case the modelview cause Flight Data tab crash.

Go to another tab and check Edit gadget mode into Windows menu
Add OpMap widget where you want

Thanks for this, and yes, it does appear to be the 'Model View' widget that causes GCS to close.  Same happened when I chose it from the gadgets' menu.

This evening I was able to set my home location and run through all the calibrations (except for temperature).  The new page showing the mag status is very helpful and following calibration both the on-board and auxiliary mags were green.  I selected INS13 and set a couple of the flight modes: one to altitude hold, the other to GPS assist.

Take off was a little unsteady and at first the quad seemed less stable than in complementary mode.  Altitude hold seemed to work OK, which I assume uses just the barometer?  I then tried GPS assist, which seemed to drift a little to start with.  However, it did appear to hold its position reasonably well.  It was getting dark by this time so I decided to call it a day, but a good day given the great success of being able to fly with INS13 for the first time.

For reference, I am using a DJI Naza compatible GPS on the Flexi Port and S-bus on the Main Port.  I was using the Aux Mag only too.  I do have a GPS with I2C mag but that would have required me to use the Flexi IO port for the RX rather than S-Bus.

Anyway, thanks F5soh for your assistance and to all the others contributing to the software and support on this forum, much appreciated.  Hopefully the weather will be good at the weekend and I can experiment a little more.
Title: Re: Revo AuxMag
Post by: heubie on April 06, 2016, 09:16:12 am

You can do all you want, if still the I2C alarm you cannot use I2C.
git pull and build again Gcs, you should have something with GCS15.09+r552
Do Upgrade&Erase

Replace current firmware with file attached:
- Rescue
- Connect board
- Load firmware you saved
- Flash

Redo Wizard but without Upgrade, keep the firmware you flashed.


I had some trouble building the software but finaly got it.
First I check the behaviour from the firmware from the build -> I2C orange ( Attitude, and Stab are green) and after reboot with GCS I2C,  Attitude, and Stab are green.
Flashed the firmware from the attachment -> I2C orange ( Attitude, and Stab are green) and after reboot with GCS I2C,  Attitude, and Stab are green

So for both firmware's I still have the problem that a boot with "battery only" does not enable the AuxMag.

I am updating my Technic Lego frame so I have to finish that first to be able to do a testfilght but I think
that by connecting the battery -> wait for boot -> connect the USB -> use GCS to reboot the board (I2C, Attitude, GSM and Stab are green)-> remove the USB
the drone should fly as a normal. Hope to check that this weekend.
Title: Re: Revo AuxMag
Post by: f5soh on April 06, 2016, 10:37:30 am
Do you have another I2c to test ?

Please post your config file: File > Export UAV settings
Title: Re: Revo AuxMag
Post by: heubie on April 06, 2016, 12:00:52 pm
this is my config. (no calibrations done)
Title: Re: Revo AuxMag
Post by: f5soh on April 06, 2016, 03:36:23 pm
Your config file works perfectly here.
Whats the marking on auxMag chip ?
Title: Re: Revo AuxMag
Post by: heubie on April 06, 2016, 04:16:11 pm
I attached a picture and the number is A983 2420. I cannot see what kind of logo of the brand.

This is btw before I connected the two wires.... :)
Title: Re: Revo AuxMag
Post by: TheOtherCliff on April 06, 2016, 06:00:29 pm
It sounds to me like after power up, the GPS auxmag is taking a long time to start up.

During startup, if the code sees that USB is connected, it will delay a while (to see if you want to do a "rescue").  The bad part about booting on USB is that none of the external ports (e.g. main, flexi) are powered, so I2C aux mag won't work.

Try this for a test: plug in USB and then immediately (or after 1 second) plug in flight battery.  That may give it enough extra time for GPS auxmag to start up before the FC actually boots.  If this works, we may be able to increase an I2C timeout to get it to start up normally.
Title: Re: Revo AuxMag
Post by: heubie on April 06, 2016, 06:37:19 pm

Try this for a test: plug in USB and then immediately (or after 1 second) plug in flight battery.  That may give it enough extra time for GPS auxmag to start up before the FC actually boots.  If this works, we may be able to increase an I2C timeout to get it to start up normally.

I just did some testing:
If I put in the USB and direct after the battery (max 1 sec) the GCS connects in 1 or 2 times and AuxMag is recognized.

If I put in the USB and I wait just a little bit longer (not much longer dan 1 sec) the GCS software connetcts/disconnectes 3 times. Then it takes 2 to 4 seconds and the it connects for the 4 times and stays connected. The AuxMag is not recognized.
Title: Re: Revo AuxMag
Post by: TheOtherCliff on April 06, 2016, 07:38:49 pm
So to be clear...

If you time it correctly, and plug in USB and then flight battery, sometimes it will start up correctly the very first time?

What is the git hash of the version of next you are running?  If you do "git log" you will see it at the top line of the page.
Title: Re: Revo AuxMag
Post by: heubie on April 06, 2016, 08:02:15 pm
Yes you are right, if I do it direct after one another it startsup good everytime.
What I did is increase the time between USB and battery in small steps and found out that around 1 to 1,5 sec it starts to fail to recognize the AuxMag.

I did a git log and these are the first lines. Is this what you need?

commit d3f150f5a8b4e0977f9a1b62af689ee373a4194f
Merge: 9ca699b 94ab922
Author: Lalanne Laurent <[email protected]>
Date:   Mon Apr 4 21:36:53 2016 +0200
Title: Re: Revo AuxMag
Post by: [email protected] on April 16, 2016, 10:08:56 am
I've build a lp next branch for i2c but after calibration,i've follow video, i can't center to 0 a roll pitch and yaw.i've add a auxmag at the same of the video.
Thank you
Title: Re: Revo AuxMag
Post by: f5soh on April 16, 2016, 04:52:09 pm
You need to find the mag orientation.

Is the mag facing back compared to onboard mag ?
Do you have a special virtual attitude for your board ?

Both mag alarms are green ?
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 08:56:56 pm
Help me out

When doing the drone setup and select ubox +mag every thing is working but as soon as i reboot aux mag is gone. Whyyyy

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: f5soh on April 16, 2016, 08:59:47 pm
Next branch ?
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 09:23:53 pm
Why is it then when i reboot my mag doenst work . but disable reboot enable reboot makes it work again until i reboot again

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: f5soh on April 16, 2016, 09:35:28 pm
I2c mag need external power connected first and next connect USB
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 09:43:00 pm
Next branch ?
Umm compiled like friday and . first have bat connected and then usb ~ 10 sec in between doesnt mater

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: f5soh on April 16, 2016, 09:47:56 pm
What happens ?

I2C alarm ?
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 09:53:22 pm
What happens ?

I2C alarm ?
Its the same as the other user ....
When setup is oke . aux oke .
Reboot nada. Yello i2c gray aux
Reboot again the same
Re do setup all oke till reboot or do a halt reset thing somethimes help or disable and reanable i2c and reboot will help( doing setup allways work so no faulty cable)

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: f5soh on April 16, 2016, 10:03:11 pm
Sadly i cannot reproduce this issue, whether using a HMC5983 or HMC5883 chip.
Both works fine without any error.
Try redo wiring, more short and wires twisted just to be sure.
Title: Re: Revo AuxMag
Post by: f5soh on April 16, 2016, 10:06:52 pm
Please post a good macro picture from your GPS/mag chip
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 10:06:58 pm
Sadly i cannot reproduce this issue, whether using a HMC5983 or HMC5883 chip.
Both works fine without any error.
Try redo wiring, more short and wires twisted just to be sure.
Could you test my exe to see if you get this problem?

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 10:10:38 pm
Please post a good macro picture from your GPS/mag chip
I have added two wires to the main header no solder just added two and kable is wrapt on the cable to board
(http://uploads.tapatalk-cdn.com/20160416/15790432251cc2e4627d18dd77d0958d.jpg)

(http://uploads.tapatalk-cdn.com/20160416/d5e0529e904f1712e8c41896462ad6b0.jpg)

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 10:11:46 pm
Also i have testet this in hand same problem

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: f5soh on April 16, 2016, 10:13:38 pm
Quote
Could you test my exe to see if you get this problem?

Not related to build, firmwares are the same.
Reduce wire lenght, twist wires.

Picture from inside GPS...
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 10:16:19 pm
(http://uploads.tapatalk-cdn.com/20160416/86145914a967055536bf124be2ebcf9d.jpg)

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 10:18:48 pm
Chip id is A9832419

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: f5soh on April 16, 2016, 10:24:47 pm
Same chip works perfect here, so very strange.
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 10:27:43 pm
(http://uploads.tapatalk-cdn.com/20160416/c66d6838318b1b31c99fb0cf6c824f33.jpg)

(http://uploads.tapatalk-cdn.com/20160416/267bb9b215ffcaaa34a24a365342aba5.jpg)

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: f5soh on April 16, 2016, 10:29:43 pm
yes, Auxmag can't work without I2c. Make sense.

Try black magic :)
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 10:30:39 pm
yes, Auxmag can't work without I2c. Make sense.

Try black magic :)
Its on and i already told you doing setup is 100% working till reboot. Try reading

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 10:35:20 pm
Look (http://uploads.tapatalk-cdn.com/20160416/d4b821940c321a67cd731fdb47c87ebb.jpg)
And
(http://uploads.tapatalk-cdn.com/20160416/d052fdaf3181e5393c82e990a343fcfc.jpg)
And
(http://uploads.tapatalk-cdn.com/20160416/a02ee1bac8e9e9584fed687d36275a19.jpg)

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 10:37:10 pm
And look now .... Reset and boot

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 10:37:34 pm
(http://uploads.tapatalk-cdn.com/20160416/3c8279d67a46b5b92de1d6bc39183107.jpg)

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: f5soh on April 16, 2016, 10:38:30 pm
Its on and i already told you doing setup is 100% working till reboot. Try reading

Sorry for disturb
Title: Re: Revo AuxMag
Post by: Jhinta on April 16, 2016, 11:00:09 pm
It sounds to me like after power up, the GPS auxmag is taking a long time to start up.

During startup, if the code sees that USB is connected, it will delay a while (to see if you want to do a "rescue").  The bad part about booting on USB is that none of the external ports (e.g. main, flexi) are powered, so I2C aux mag won't work.

Try this for a test: plug in USB and then immediately (or after 1 second) plug in flight battery.  That may give it enough extra time for GPS auxmag to start up before the FC actually boots.  If this works, we may be able to increase an I2C timeout to get it to start up normally.
Yep that works

Directly after inset of usb connect battery and it will bootup all oke.

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: [email protected] on April 17, 2016, 01:14:48 am
You need to find the mag orientation.

Is the mag facing back compared to onboard mag ?
Do you have a special virtual attitude for your board ?
Both mag alarms are green ?



Not always green but most of time....after i find a center and i change a position of drone the center change but not to zero....i think the wire i to long???or calibration are not good?this chip is near really near to battery is a problem?
Title: Re: Revo AuxMag
Post by: f5soh on April 17, 2016, 12:40:20 pm
When the frame move the bargraphs change a little but return to 0 when the frame is still.
Title: Re: Revo AuxMag
Post by: [email protected] on April 17, 2016, 02:47:07 pm
When the frame move the bargraphs change a little but return to 0 when the frame is still.

But it's normal to center it i can change all 3 xyz?now the mag is always green but the ins13gps when take off not stable like a ping pong...can help me to stabilize it?
Title: Re: Revo AuxMag
Post by: Jhinta on April 17, 2016, 03:06:02 pm
It sounds to me like after power up, the GPS auxmag is taking a long time to start up.

During startup, if the code sees that USB is connected, it will delay a while (to see if you want to do a "rescue").  The bad part about booting on USB is that none of the external ports (e.g. main, flexi) are powered, so I2C aux mag won't work.

Try this for a test: plug in USB and then immediately (or after 1 second) plug in flight battery.  That may give it enough extra time for GPS auxmag to start up before the FC actually boots.  If this works, we may be able to increase an I2C timeout to get it to start up normally.
So will this be added or any info how to add this to source . willing to test.

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: f5soh on April 17, 2016, 03:41:42 pm
Quote
But it's normal to center it i can change all 3 xyz?

Don't understand your question, sorry.
Title: Re: Revo AuxMag
Post by: [email protected] on April 17, 2016, 03:48:46 pm
For got the center in mag tab i need change all of Roll pitch and Yaw.
And when mag is green all time in Ins13gps mode drone goes away like a ping pong not stabilized...
Sorry for my poor english
Title: Re: Revo AuxMag
Post by: f5soh on April 17, 2016, 04:11:04 pm
Usually you only really need Roll and Yaw values to achieve AuxMag virtual rotation.

What values do you have for AuxMag rotation ?

About In13GPS, did you test Mag alarm while starting motors and give some Throttle, maintaining firmly the frame on ground ?
Be safe !
Title: Re: Revo AuxMag
Post by: [email protected] on April 17, 2016, 04:15:25 pm
Roll 180.  Pitch -26 yaw 0

Mag was green but is unstable i use a 250 frame.
Title: Re: Revo AuxMag
Post by: f5soh on April 17, 2016, 04:35:21 pm
-26 ? Do you have tilted motors ?

If you set to AuxOnly and auxMag away from strong current the Mag alarm should/need to be always Green
Title: Re: Revo AuxMag
Post by: [email protected] on April 17, 2016, 04:41:29 pm
Is eachine racer 250 frame and auxmag is on the revolution board loke a video.
Can you help me?? I need to change a auxmag position on frame?
Title: Re: Revo AuxMag
Post by: f5soh on April 17, 2016, 05:22:11 pm
Yes, i can help you. But if you miss a question at every post, helping you become pretty hard.

So:
Quote
-26 ? Do you have tilted motors ?

Where you put your GPS ?

Post a picture from your setup please.
Title: Re: Revo AuxMag
Post by: [email protected] on April 17, 2016, 05:32:27 pm
I'm not at home now..
For tilted motor the answer is No (use a eachine racer 250 frame )
For Gps is use main port and is postioned upside from fc.
Sorry for missed question.
Title: Re: Revo AuxMag
Post by: f5soh on April 17, 2016, 05:49:30 pm
So if you don't have tilted motor you cannot have the 26° value for Pitch.
Title: Re: Revo AuxMag
Post by: [email protected] on April 17, 2016, 05:50:43 pm
So if you don't have tilted motor you cannot have the 26° value for Pitch.
Title: Re: Revo AuxMag
Post by: f5soh on April 17, 2016, 05:55:12 pm
If you put the AuxMag close to the onBoard mag the result is the same: Mag cannot work safely with strong currents.

The auxMag and Gps should be on a mast, wires twisted.

Ps: No need to quote my post when the original post is just above
Title: Re: Revo AuxMag
Post by: [email protected] on April 17, 2016, 05:57:57 pm
Ok i try to change postion like a gps antenna but not the same mast?...thank you for helping...stay tuned
Title: Re: Revo AuxMag
Post by: [email protected] on April 18, 2016, 12:54:23 am
Is it the way for correct positioned of auxmag (yellow and white capsule).
I try it tomorrow for calibration.
What do you think about?
Title: Re: Revo AuxMag
Post by: hwh on April 18, 2016, 03:23:35 am
If it's positioned correctly in the case.  The mag chip orientation is:
Title: Re: Revo AuxMag
Post by: Xviews on April 18, 2016, 09:34:38 am
same problem like user "heubie" and others with the AuxMag is not recognized with battery power up. Any solution without USB ?
Title: Re: Revo AuxMag
Post by: [email protected] on April 18, 2016, 10:19:19 am
Ok the mag is in the same position of the boardmag i ask the roll pitch yaw value is 0 0 and 0?or i need to change it?.thank you
Title: Re: Revo AuxMag
Post by: hwh on April 18, 2016, 02:57:50 pm
If the chip is on the top of the board and facing the way the picture shows all the settings for aux mag should be 0.
Title: Re: Revo AuxMag
Post by: f5soh on April 18, 2016, 03:45:45 pm
For users with AuxMag issues, update your build:

git pull and rebuild
You should see "GCS 15.09+r596-g61ce3d6" on top of window.

Go to firmware tab:
- Rescue
- Open firmware you just downloaded from this post
- Flash

Test with a basic Auxmag config using setup wizard if I2C alarm still.

Updated firmware for testing and determine the delay needed
https://forum.librepilot.org/index.php?topic=1110.msg10186#msg10186
Title: Re: Revo AuxMag
Post by: f5soh on April 18, 2016, 03:50:50 pm
@Ariele Please post a screenshot of your Magnetometer tab while all values are set to 0, and both mag calibrated and without alarm of course.
Title: Re: Revo AuxMag
Post by: Xviews on April 18, 2016, 04:08:10 pm
Okay thx i will test it :)

Update

Nice its working and windows build working too :) Best day
No Problems with mag :)
For users with AuxMag issues, update your build:

git pull and rebuild
You should see "GCS 15.09+r596-g61ce3d6" on top of window.

Go to firmware tab:
- Rescue
- Open firmware you just downloaded from this post
- Flash

Test with a basic Auxmag config using setup wizard if I2C alarm still.
Title: Re: Revo AuxMag
Post by: Jhinta on April 18, 2016, 04:55:50 pm
For users with AuxMag issues, update your build:

git pull and rebuild
You should see "GCS 15.09+r596-g61ce3d6" on top of window.

Go to firmware tab:
- Rescue
- Open firmware you just downloaded from this post
- Flash

Test with a basic Auxmag config using setup wizard if I2C alarm still.

is this the same as the build in firmware or do i need this file?
 ;D just do as told :P
Title: Re: Revo AuxMag
Post by: Jhinta on April 18, 2016, 05:46:41 pm
having problems,  :o
i2c does connect but , my quad doesnt keep its settings ,, like input switchs back to pwm where i have ppm, also random gps and i2c gets disabled
Title: Re: Revo AuxMag
Post by: f5soh on April 18, 2016, 05:49:18 pm
Be sure the GCS version is GCS 15.09+r596-g61ce3d6

Erase settings
Title: Re: Revo AuxMag
Post by: Jhinta on April 18, 2016, 05:52:28 pm
it is ,
anyway ,, when connecting bat -> gps/i2c/reciver setting all disable
usb only -> all seems fine.
just strange, seems like a half boot, normal boot , led shoel be blinging like 5 sec then steady , now it is blue 4x slow -> then boot up -> blue -> yello-> blue , etc  slowly

edit , this is random ,,  got it working ,, but it failes more then it fully boots.
Title: Re: Revo AuxMag
Post by: f5soh on April 18, 2016, 06:00:03 pm
Try this one, just in case.
Title: Re: Revo AuxMag
Post by: Jhinta on April 18, 2016, 06:13:26 pm
Boot error . this is with bat connected . usb only is fine( 10% of the time is good)(http://uploads.tapatalk-cdn.com/20160418/d4503f3ef11da745530d5a82c1eb6ee3.jpg)

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Jhinta on April 18, 2016, 06:15:14 pm
 :o v1 seem beter in booting
Title: Re: Revo AuxMag
Post by: Jhinta on April 18, 2016, 06:25:03 pm
this is what happends
https://drive.google.com/file/d/0B2mgUknSz_EfQzF6ckx3cl9ueW8/view?usp=sharing
Title: Re: Revo AuxMag
Post by: f5soh on April 18, 2016, 06:53:48 pm
Do a clean/minimal config.

Upgrade&Erase
Flash custom firmware
Setup wizard
Title: Re: Revo AuxMag
Post by: Jhinta on April 18, 2016, 07:31:05 pm
on v2, full reset, then update,
seems to be owkring ,, will try 20x times see how many fails i get .

bat charging will report later
Title: Re: Revo AuxMag
Post by: f5soh on April 18, 2016, 08:26:18 pm
Another custom firmware, we need to determine how many delay is really needed.

For users with AuxMag issues, update your build:

git pull and rebuild GCS
You should see "GCS 15.09+r596-g61ce3d6" on top of window.

Go to firmware tab:
- Rescue
- Open firmware you just downloaded from this post
- Flash

Test with a basic Auxmag config using setup wizard if I2C alarm still.
Because i don't want to build a firmware using a new UAVO set i used the GPSSettings>MinSatellites parameter for testing purposes.
"0" should give the same delay as current next so it should fail for users that experienced the auxmag issue.

Next step, increase the MinSatellites to 2, 3, 4... and test which value is needed for green I2C alarm after battery-only boot.
Change MinSatellites value and save with the small Hdd icon with red arrow.
(https://forum.librepilot.org/index.php?action=dlattach;topic=1110.0;attach=2551)

Title: Re: Revo AuxMag
Post by: [email protected] on April 18, 2016, 08:57:34 pm
@Ariele Please post a screenshot of your Magnetometer tab while all values are set to 0, and both mag calibrated and without alarm of course.


The problem is when i center and save move the frame and the value change and wan't back to center.


I try to download a firmware.
Title: Re: Revo AuxMag
Post by: Jhinta on April 18, 2016, 09:03:27 pm
oke when i leave every thing like default full erase , every thing is oke ,, i can repower all oke , but when setting up my drone some where it failes( doesnt mater witch setting it will just fail at some point)

is there a option for a terminal output?
Title: Re: Revo AuxMag
Post by: f5soh on April 18, 2016, 09:08:24 pm
The problem is when i center and save move the frame and the value change and wan't back to center.
I try to download a firmware.

If your Mag is already working you don't need to test the firmware. Do you have issue while powering with battery and I2c mag go orange ?

@Ariele Please post a screenshot of your Magnetometer tab while all values are set to 0, and both mag calibrated and without alarm of course.
Title: Re: Revo AuxMag
Post by: [email protected] on April 18, 2016, 09:31:44 pm
is it but now i'm in home and only one is green....but i repeat when i change the position of frame the value don't go to center...what's appened?. No problem with I2C but i can't understand why augmag or board mag are really unstable.
screenshot
Title: Re: Revo AuxMag
Post by: f5soh on April 18, 2016, 09:37:35 pm
First you need both mags without alarms, without that you cannot achieve the Auxmag orientation.
Without motors spinning it can be done easily, be sure you remove buzzer or some others magnetic object around the board.
I wonder how you find the 22° value.

If orientation is correct you can move, turn the frame and the 3 bars always return to 0.
Title: Re: Revo AuxMag
Post by: Xviews on April 18, 2016, 09:38:25 pm
Okay my test

On "4" I2C going Green (0,1,2,3 I2C Yellow)
I had tested the I2C on "4" more than 10 times without a Yellow I2C  ;)

I hope it helps

Another custom firmware, we need to determine how many delay is really needed.

Because i don't want to build a firmware using a new UAVO set i used the GPSSettings>MinSatellites parameter for testing purposes.
"0" should give the same delay as current next so it should fail for users that experienced the auxmag issue.

Next step, increase the MinSatellites to 2, 3, 4... and test which value is needed for green I2C alarm after battery-only boot.
Change MinSatellites value and save with the small Hdd icon with red arrow.
(https://forum.librepilot.org/index.php?action=dlattach;topic=1110.0;attach=2551)
Title: Re: Revo AuxMag
Post by: f5soh on April 18, 2016, 09:41:26 pm
Great, thanks for testing.
This means 200ms delay.

We need more testers for this I2C mag issue.

Your GPS is the ones that comes without i2c wires ?
Title: Re: Revo AuxMag
Post by: Xviews on April 18, 2016, 09:43:06 pm
thanks for nice developing
Yes without i2c wires.

"Ublox NEO-M8N GPS For Mini CC3D / Revolution Flight Controller Built-in Compass"

@f5soh can you upload an 200ms delay firmware? For a test flight with GPS and MAG
Title: Re: Revo AuxMag
Post by: Jhinta on April 18, 2016, 09:45:28 pm
Wtx

Had evrything setup till gps-ins (error) setback to com+mag reboot (multi oke) -> reset gps-ins -> error -> multi reboot error-> reset back to com+mac -> muti reboot oke -> com+mac+gps -> multi reboot all oke ....
so was thinking found problemen , gues what , now i set it to gps-ins again ,, no problem WTX mutti reboot no problem  ??? ??? ??? after 5 min errors again

one thing i can say for sure is that when com+mac and/or + gps seetings are set, no boot problems
 gps-ins giving me a hard time
Title: Re: Revo AuxMag
Post by: [email protected] on April 19, 2016, 09:26:11 am
First you need both mags without alarms, without that you cannot achieve the Auxmag orientation.
Without motors spinning it can be done easily, be sure you remove buzzer or some others magnetic object around the board.
I wonder how you find the 22° value.

If orientation is correct you can move, turn the frame and the 3 bars always return to 0.

22° is the value to get center of all parametres but after your suggenstions i think the calibration is not good becouse i do it with buzzer on and it create a error on board and aux mag?
I need to do again a calibration of mag and post a result.
Tanx
Title: Re: Revo AuxMag
Post by: f5soh on April 19, 2016, 12:05:28 pm
yes, remove buzzer.

Start monitoring the Z axis and adjust the Roll value, usually 0° or 180°.
This can be found just looking if mag chip is facing up or down.

Next, change the Yaw value to get all axis / bargraphs centered to 0.
There is no doubt when the orientation is found.

https://www.youtube.com/watch?v=qLsd4O75N9o



Title: Re: Revo AuxMag
Post by: [email protected] on April 19, 2016, 02:10:19 pm
Okay i try to do it later becouse now i'm at work...i use oplink not a cable is it a problem?
Post a result later
Title: Re: Revo AuxMag
Post by: f5soh on April 19, 2016, 03:00:56 pm
i use oplink not a cable is it a problem?

No
Title: Re: Revo AuxMag
Post by: [email protected] on April 19, 2016, 10:27:41 pm
i hve do a new calibration without a buzzer now the mag are both really green and i'm inside the house with some interference and the same with motor on no problem but when i change  frame position all 3(xyz) parametres change and not go to 0 never....can you show me a solution?
Title: Re: Revo AuxMag
Post by: [email protected] on April 19, 2016, 10:30:45 pm
first screenshot here.
Title: Re: Revo AuxMag
Post by: f5soh on April 19, 2016, 10:44:36 pm
I still don't understand... Your GPS is rotated something  about 22° ?

All blue bars should be stay/return to zero after a small delay while moving.
Title: Re: Revo AuxMag
Post by: [email protected] on April 19, 2016, 11:27:41 pm
The black antenna is a gps
The white and yellow is a auxmag.
22°is the value for get center in xyz.
After i change the position value not go to zero never only when i go to the set up position it go to center.
Please solve i go crazy.
Title: Re: Revo AuxMag
Post by: Jhinta on April 19, 2016, 11:44:29 pm
why using two gps , also you have your transmitter nex to it? bad id
the mac is highly -> HIGHLY vunreble to any thing that is magnatic ( so having a transmitter nex to it ,, no go try moving it you will see it jump over the place)
Title: Re: Revo AuxMag
Post by: f5soh on April 20, 2016, 12:18:00 am
First you don't need the black gps if only used for GPS function.

I assume your mag is the GPS yellow / white ?
So use this one for GPS and MAG, and maybe move it where the black GPS is placed, a little away from video antenna.

This GPS has a Mag chip that is facing back: put 180° for Rolll value.

Look the arrow that point forward.
We can assume the Yaw cannot be 22° here.
Yaw should be only 90° multiples, that mean: 0°, 90°, -90° or 180°

Try different values for Yaw.

Quote
Please solve i go crazy.

That exactly the same case i resolved in video i posted.

https://www.youtube.com/watch?v=qLsd4O75N9o

Title: Re: Revo AuxMag
Post by: [email protected] on April 20, 2016, 05:15:52 am
There hardware use by me...
Gps no have a mag and use an extmag attached in a photo
Tnx.
Repeat my fc is revolution board.
Gps no mag i can't see a mag chip inside(black capsule).
Auxmag is other chip on white capsule...only a mag chip no gps inside capsule.

Title: Re: Revo AuxMag
Post by: Mateusz on April 20, 2016, 09:09:10 am
So you use small external magnetometer board with HMC5883L chip.


If you do that, then you don't need to rotate Magnetometer in GCS.
So set Virtual Rotation Pitch=0, Roll=0,Yaw=0.

Calibrate your magnetometers by

Now you should see that both magnetometers show 0,0,0 values in the bars. You can now safely change "Both" to "AuxOnly" for flying.
Title: Re: Revo AuxMag
Post by: [email protected] on April 20, 2016, 09:34:47 am
Quote

  • External magnetometer board must be leveled with Revolution board, you can use nylon screw to attach HMC5883L board to Revolution board, be sure both chips orientation and angle is the same.

If you do that, then you don't need to rotate Magnetometer in GCS.
So set Virtual Rotation Pitch=0, Roll=0,Yaw=0.

Calibrate your magnetometers by
  • Uses->Both
  • Starting magnetometer calibration with full build (including battery) and firmly attached magnetometer to Revolution board, everything must be assembled and aligned.
  • Press Save 5 times (6 is the last one don't press it)
  • Now rotate very slowly whole assembled quadcopter in all axis, all directions, roll, yaw, pitch, also rotate diagonal directions. The more you rotate, the more samples for calibration.
  • Press Save last time

Now you should see that both magnetometers show 0,0,0 values in the bars. You can now safely change "Both" to "AuxOnly" for flying.


Leveled what you think level on the same plane?....you has see a photo of my frame...it's on good position for you?
Title: Re: Revo AuxMag
Post by: Mateusz on April 20, 2016, 10:20:08 am
Leveled what you think level on the same plane?....you has see a photo of my frame...it's on good position for you?

Yes, on the same plane.
But I made a mistake in my previous post (corrected now). Of course Magnetometer cannot be attached to Revo board, because it would be the same as using internal one.
It has to be attached far, maybe to GPS unit. However oriented and plane of external Mag must match mag in Revolution board.

If it does not match, then you can change VirtualBoard rotation to correct for that. But it's much easier just to install it in the same orientation as on Revo.
Title: Re: Revo AuxMag
Post by: [email protected] on April 20, 2016, 01:40:15 pm
I had auxmag in this place are good? Wait your answer for test..
Title: Re: Revo AuxMag
Post by: Mateusz on April 20, 2016, 02:22:44 pm
I had auxmag in this place are good? Wait your answer for test..

Unlikely, it may still be too close to magnetic interference, also you should not stick your electronics to carbon-fiber as carbon-fiber IS conductive.
Things like:Electronics produce magnetic field that is stronger than static earth magnetic field (which you want to detect). Also electronics produce magnetic field is dynamic/changes with current so hard to filter out.

These field will interfere with your magnetometer, as when you start motors, magnetic field produced by those components may be changing.
Best location is in GPS unit, far from above mentioned components.

Additionally you can twist wires to redirect magnetic field. Imagine wire running horizontally, if you use "right-hand" rule and point with the thumb the direction of current flow, then your hand around wire is magnetic field (see attached picture).

If you twist your wires, magnetic field will be redirected, and "flattened" in the direction where wire is going (see second picture found).

It is not possible to isolate from magnetic field, no magic voodoo nu-metal thing. What nu-metal does is it also redirects magnetic field. The only real isolation possible is with 2-3 meters of concrete wall, which you can't really use in quad-copter.
Title: Re: Revo AuxMag
Post by: [email protected] on April 20, 2016, 03:54:40 pm
Ok thing to do
1-add a auxmag to gps in anyway.
2-twist a wire for mag field.
3-make a vodoo dance for goodluck

I try to do anything but i think is to fantascientific way for use mag revo board.
Title: Re: Revo AuxMag
Post by: Jhinta on April 20, 2016, 05:12:35 pm
retested, sat-min , for me option 6 is best :-\ no errors what zo ever
4 yello or boot problems,
5 sometimes green
6 is green
Title: Re: Revo AuxMag
Post by: Mateusz on April 20, 2016, 05:17:34 pm
Ok thing to do
1-add a auxmag to gps in anyway.
2-twist a wire for mag field.
3-make a vodoo dance for goodluck

I try to do anything but i think is to fantascientific way for use mag revo board.

Nothing extraordinary about it, just basic physics. You can't expect magnetometer to measure weak and static magnetic field in the presence of stronger magnetic fields from your quadcopter. If these fields overlap how can you distinguish one from another ?
Revo is not a plug and play toy, you need to learn a bit to get everything working.
Title: Re: Revo AuxMag
Post by: Jhinta on April 20, 2016, 07:17:44 pm
i'm duesing that there will come a option for time out in system? :P
Title: Re: Revo AuxMag
Post by: Xviews on April 20, 2016, 07:37:56 pm
Quote
If you have the simple case of tilted motors, with FC and GPS mounted level to frame, you will have to adjust Configuration->Attitude->Settings->RotateVirtual->Pitch for level hover in Attitude mode.  This is just the negative of the motor tilt angle assuming that you tilt the motors forward for a racing quad.  You must determine and set that Pitch and then adjust (usually add the motor tilt angle) System->Settings->AuxMagSettings->BoardRotation->Pitch by the same amount (or the nearest integer).  So if you have 15 degree motor tilt for a racing quad and used auxmag pitch of 180 to get your mag sensor axes correct, then you need -15 for rotate virtual pitch and 195 for auxmag pitch

I think it must be Board Pitch -15 and Auxmag Orientation Pitch 165 ?
Title: Re: Revo AuxMag
Post by: [email protected] on April 20, 2016, 09:11:47 pm
Ok thing to do
1-add a auxmag to gps in anyway.
2-twist a wire for mag field.
3-make a vodoo dance for goodluck

I try to do anything but i think is to fantascientific way for use mag revo board.

Nothing extraordinary about it, just basic physics. You can't expect magnetometer to measure weak and static magnetic field in the presence of stronger magnetic fields from your quadcopter. If these fields overlap how can you distinguish one from another ?
Revo is not a plug and play toy, you need to learn a bit to get everything working.

Ok this is a result of integration auxmag and gps on one must.
I do a calibration but the mag allarm is green most very most of time but the problem of center is always here with me :-)
Any help? I need a note do a calibrarion inside the house.
Title: Re: Revo AuxMag
Post by: rabno1 on April 21, 2016, 12:15:03 pm
I've been trying out the next build to get my external mag working with my revo. I ran into the same problem of the mag not working unless I reboot the revo with the mag still powered. So I tried out the fw with the delay and the mag works great BUT for some reason when the flexi port is set to I2C it messes with the ESC startup. I'm guessing it must be holding the fc outputs at a value the ESCs don't like. Disabled the flexi port and the ESC startup is fine.
It also seems a bit unstable when it comes to the main and flexi port setting. Every so often after power cycling the fc the flexi/main setting would go back to disabled.
I've not tried the fw with the variable delay yet, I'll try it later today and let you all know how I get on with that.
Title: Re: Revo AuxMag
Post by: [email protected] on April 21, 2016, 01:40:50 pm
Output tab(motor) is set fine?50hz
Title: Re: Revo AuxMag
Post by: Jhinta on April 21, 2016, 01:49:55 pm
I've been trying out the next build to get my external mag working with my revo. I ran into the same problem of the mag not working unless I reboot the revo with the mag still powered. So I tried out the fw with the delay and the mag works great BUT for some reason when the flexi port is set to I2C it messes with the ESC startup. I'm guessing it must be holding the fc outputs at a value the ESCs don't like. Disabled the flexi port and the ESC startup is fine.
It also seems a bit unstable when it comes to the main and flexi port setting. Every so often after power cycling the fc the flexi/main setting would go back to disabled.
I've not tried the fw with the variable delay yet, I'll try it later today and let you all know how I get on with that.
Also have this. Was thinking aboout updating esc first before saying this .

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: rabno1 on April 21, 2016, 02:16:21 pm
Yeah everything set OK for the outputs.
I've re calibrated my ESCs loads of times using different methods, vehicle setup wizard,  via output screen, individualy with only the rx.
They work perfect then all I change is the flexi port from disabled to I2C and they start acting strange (beep sequence I've never heard them make before). They just don't seem to initialize so can never arm or even use the test output function in the GCS.
Title: Re: Revo AuxMag
Post by: f5soh on April 21, 2016, 02:40:31 pm
If board hang at boot, the default settings are applied.
This means the output are not set and esc do not receive signal. In this case Esc do continuous beep.

Try to resolve the I2C issue first.
Test the custom firmware from here : https://forum.librepilot.org/index.php?topic=1110.msg10186#msg10186
And find the delay you need modifying the GPSSettings>MinSatellites value used as delay setting.

For now two users (Thanks) reported: 4 and 6 delay value working fine.

I really think most of this timing issues comes from hardware issues, all Gps comes without I2C wires.
I wonder why... maybe the mag do not pass quality check and next simply sells those Gps without wires.
You can also see the product description do not mention the mag anywhere... except the marking over Gps case. Why ?
example: http://www.banggood.com/OpenPiolot-CC3D-Revolution-Flight-Controller-Oplink-M8N-GPS-Distribution-Board-p-1000084.html
Title: Re: Revo AuxMag
Post by: [email protected] on April 21, 2016, 03:57:03 pm
This gps have a mag? On over case is with compass.
Title: Re: Revo AuxMag
Post by: hwh on April 21, 2016, 04:07:17 pm
It doesn't look like it does, there should be a small square chip where I've marked.
Title: Re: Revo AuxMag
Post by: [email protected] on April 21, 2016, 04:29:39 pm
No mag...i need to buy a new gps with any suggestion?
Title: Re: Revo AuxMag
Post by: kennyevo on April 21, 2016, 05:30:11 pm
No mag...i need to buy a new gps with any suggestion?

Hi! I've ordered this from banggood: http://www.banggood.com/Ublox-NEO-M8N-Flight-Controller-GPS-with-Protective-Shell-for-PIX-PX4-Pixhawk-p-1005394.html (http://www.banggood.com/Ublox-NEO-M8N-Flight-Controller-GPS-with-Protective-Shell-for-PIX-PX4-Pixhawk-p-1005394.html)

It haven't arrived yet, but I think it's good for the price, it already has the two wires for the mag, but maybe I'll have to replace the connectors.
Title: Re: Revo AuxMag
Post by: [email protected] on April 21, 2016, 05:44:10 pm
Buyed that
http://www.banggood.com/Mini-Ublox-M8N-GPS-Module-NEO-M8N-GPS-for-APM-2_52_62_8-CC3D-SP-Racing-F3-Naze32-Flip32-PX4-p-1035454.html
Title: Re: Revo AuxMag
Post by: rabno1 on April 22, 2016, 01:23:42 am
Ok so i tried out the test firmware i started with 0 and when i got to 3 the mag seems to work every time, tried about 10 times.

But!!  I also had the outputs setup and the ESCs booted fine UNTIL! I got to 3  ???
I left the delay at 3 and disabled the flexi, ESCs fine.
I left the delay at 3, flexi set to I2C, mag set to onboard only but still set to flexi in "mag type", ESCs no good.
I left the delay at 3, flexi set to I2C, mag set to onboard only but still set to GPSV9 in "mag type", ESCs fine.

Seems like this mag takes too long to get going so it makes the Revo hang for too long and messes with the ESC initialization? The mag works great when its booted and calibrates just fine, everything is looking good to go, just cant fly the thing because the ESCs havent booted right  ::)

Is it just a crap cheap mag that hasn't passed QC?
Should i bite the bullet and just either try moving the Revo and use its own mag or buy another External mag?

Anything else i can try out to help fix this issue?
Title: Re: Revo AuxMag
Post by: rabno1 on April 22, 2016, 02:12:10 am
Quick update from me. Realized my outputs were set to PWMSync  :-[ 
I was using a imported .uav i had setup (and flew) using the Vehicle wizard.
TBH Im new to this and dont know what setting is right or not but it all works together when setting the outputs to PWM and 50Hz.
Ive got cheap (no doubt generic Chinese) 12or15A "simonK" ESCs.
Title: Re: Revo AuxMag
Post by: f5soh on April 22, 2016, 02:19:07 am
Do not use output setting to 50Hz, this give bad stabilization results.
Try PWM-490Hz, well the higher you can...
Title: Re: Revo AuxMag
Post by: rabno1 on April 22, 2016, 02:37:00 am
490Hz seems to work too. Ill try to get it flying tomorrow if the weather allows.
Title: Re: Revo AuxMag
Post by: [email protected] on April 22, 2016, 05:56:48 am
Quick update from me. Realized my outputs were set to PWMSync  :-[ 
I was using a imported .uav i had setup (and flew) using the Vehicle wizard.
TBH Im new to this and dont know what setting is right or not but it all works together when setting the outputs to PWM and 50Hz.
Ive got cheap (no doubt generic Chinese) 12or15A "simonK" ESCs.

Rapid esc set on 400Hz
Title: Re: Revo AuxMag
Post by: heubie on April 22, 2016, 09:09:59 am
Sorry for the late reply (had some battery issues and lack of time...) but I finaly got to test the delay.

In the installed of the firmware the delay was already set to 8 so the first time the AuxMag worked.
I lowered it to 7 and it failed..... back to 8 -> OK.
Back to 7 -> OK (4 times in a row)
Then I stared from zero like mentioned in https://forum.librepilot.org/index.php?topic=1110.msg10186#msg10186

If the delay is 0 it still doesn't work (like expected)
From 1 on everything worked OK. Not one out of at least 15 failed.

I gues the one failing with 7 was a glitch....
Everthing is done without any calibration. I hope to do this this weekend.
I will unplug everything now and leave it that way untill tonight and do a fresh boot with setting to 1.
This to make sure any leftover voltage is drained from al the capacitors in the boards.
Title: Re: Revo AuxMag
Post by: Jhinta on April 22, 2016, 11:08:21 am
f5soh could you give me a indication or patch file for delay ?
also does i2s inits before mainport?
Title: Re: Revo AuxMag
Post by: f5soh on April 22, 2016, 02:19:13 pm
Mainport init is after flexiport init for Revo.

Code: [Select]
------------ flight/targets/boards/revolution/firmware/pios_board.c ------------
@@ -492,11 +497,18 @@ void PIOS_Board_Init(void)
         PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_TELEM_RF_RX_BUF_LEN, PIOS_COM_TELEM_RF_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_telem_rf_id);
         break;
     case HWSETTINGS_RM_FLEXIPORT_I2C:
+        // Add big delay for buggy I2C AuxMag chips: 4x50ms=200ms
+        for (uint8_t i = 0; i < 4; ++i) {
+#ifdef PIOS_INCLUDE_WDG
+            PIOS_WDG_Clear();
+#endif /* PIOS_INCLUDE_WDG */
+            PIOS_DELAY_WaitmS(50);
+        }
Title: Re: Revo AuxMag
Post by: Jhinta on April 22, 2016, 06:20:35 pm
So what if we init main first what will happen ?

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Jhinta on April 22, 2016, 06:24:01 pm
Will test power swap on main and flex for gps see what it does

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Jhinta on April 22, 2016, 06:43:29 pm
Intresting. Power swap made it possible to have 4 (but esc dont arm 3 does arm but yellow)

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: f5soh on April 22, 2016, 06:56:15 pm
Can be an interesting way put Flexi in last position.
But this maybe made the delay dependent on others port configuration.
example:
Mainport as telemetry / i2c ok
MainPort disabled / I2c not ok
Title: Re: Revo AuxMag
Post by: rabno1 on April 25, 2016, 01:06:48 am
Sorry to be a pain in the ass noob but can someone tell me what i need to edit to add the I2C delay? Im trying to use another branch (autotune) and it doesnt have the delay built in i need for my external mag to work.
Title: Re: Revo AuxMag
Post by: f5soh on April 25, 2016, 01:25:01 am
patch is just above:
https://forum.librepilot.org/index.php?topic=1110.msg10424#msg10424
Title: Re: Revo AuxMag
Post by: rabno1 on April 25, 2016, 01:45:42 am
thanks again
Title: Re: Revo AuxMag
Post by: rsk on May 04, 2016, 04:00:27 pm
Hi guys,

I have been trying out auxmag (I2C) and can report the following:

Configuration:
- Revo Nano
- 250 frame
- PWM Futaba receiver
- Rctimer NEO-7M GPS & MAG V2.0 (UBX & I2C)

Operation:
- GPS health: green
- Homeposition: set
- I2C health: green
- MAG: health: black (in complementary mode) green (In INS13 mode)
- I get regular updates of data on settings/data objects/auxmagsensor
- for my configuration pitch=180; roll=0; yaw=0
- I have only been able to get a good calibration once; calibration normally fails. When calibration succeeded, AuxMagSettings/mag_bias was very high ~10000 and mag_transform values were very low ~0.05
- All stab and atti health indicators are green, but stabilizatrion engine is not really working. AI is all over the place and compass does not show correct bearing.
- Randomly (I cannot link it to any particular event), settings/data objects/auxmagsensor stops beeing refreshed and Auxmagsensor tab shows no change whatsoever and health indicators stay green no matter what I do
- Only way to get it back is to reboot nano controller.

Any ideas?

Thanks.
Title: Re: Revo AuxMag
Post by: f5soh on May 04, 2016, 04:03:50 pm
Quote
When calibration succeeded, AuxMagSettings/mag_bias was very high ~10000 and mag_transform values were very low ~0.05

Check the environment, this is the symptom of a magnetic field / magnetic material around the sensors.
Title: Re: Revo AuxMag
Post by: rsk on May 04, 2016, 05:36:37 pm
Will do. Thks.
Title: Re: Revo AuxMag
Post by: Jhinta on May 04, 2016, 05:59:24 pm
so got my self a ext-mac , every thing is oke, but when usb is not connected its nearly inpossible to get my esc armed. ::)
any id's?
on mainbuild firmware.

ahhh  :P fast multi fast-reinsert makes it start.
Title: Re: Revo AuxMag
Post by: kennyevo on May 04, 2016, 08:09:30 pm
Hi!

My new m8n gps arrived with a mag in it, tried to calibrate as seen in the video (but the whole thing is assembled), the onboard mag works with a 5% error, the aux works with 15%.
Is the "go to last step and rotate your fc in every direction" a good option, or should I recalibrate everything with the instructions on the calibration screen?

Thanks!
Title: Re: Revo AuxMag
Post by: Mateusz on May 04, 2016, 08:30:03 pm
Is the "go to last step and rotate your fc in every direction" a good option, or should I recalibrate everything with the instructions on the calibration screen?

Mag takes samples from the first step, so if you do something wrong on the way it will affect your calibration. Going to last step and rotating in all possible directions to cover whole sphere around is best I think. Also flight controller has internal mag and by default GCS assume the auxmag is in the same orientation. OP GPS has it in the same orientation, but many M8N units form ebay have mag chip in all different directions depending on model. You need to rotate Mag in GCS settings accordingly such that it matches with internal Mag.

Title: Re: Revo AuxMag
Post by: kennyevo on May 05, 2016, 10:04:40 am
Yep I think it's upside down, I'll try to recalibrate the mags on a field, hopefully it will be good :D
Title: Re: Revo AuxMag
Post by: [email protected] on May 05, 2016, 12:34:37 pm
so got my self a ext-mac , every thing is oke, but when usb is not connected its nearly inpossible to get my esc armed. ::)
any id's?
on mainbuild firmware.

ahhh  :P fast multi fast-reinsert makes it start.


Try to set a motor tab correct hz of you esc rspid esc is 400hz.
Title: Re: Revo AuxMag
Post by: rsk on May 05, 2016, 02:08:35 pm
I checked my setup and this is what I got:

I manually reset mag_bias to all zeroes and mag_transform to ones
I displayed the raw magnetometer data on one of the GCS scopes and found the following:
- data on corresponding axis of on_board and aux mags are perfectly correlated (range -200 to +500)
- except that at a certain point there is a huge spike (+10000 to +20000) on all axis of the aux mag
- and afterwards the data from the aux mag flatlines and GCS stops updating the corresponding data objects
- sporadically (no fixed period) additional spikes can be observed
- only way to reset the aux mag to working condition is by powering off the whole jig.

Is there a way to determine if this is a problem with the I2C interface/driver on the Nano or a faulty RCTimer GPS+mag implementation?
 
Thanks for your help.
Title: Re: Revo AuxMag
Post by: rsk on May 05, 2016, 02:11:57 pm
I forgot to mention that I also noticed that the refresh interval on the GCS metadata for the auxmagsensor went from the 1000 I manually set to 300 ms by no action of mine. :-[
Title: Re: Revo AuxMag
Post by: Mateusz on May 05, 2016, 02:24:04 pm
You could try adding pull up resistor between SDL and vcc and scl/vcc not sure value one should check i2c specs. Maybe 10k? Or shorten your wires and keep SDL away from SCL.
Title: Re: Revo AuxMag
Post by: rsk on May 05, 2016, 03:33:52 pm
Assuming standard mode I2C and a Cb of 400pF, Vcc of 3.3V then Rmin=1kohm and Rmax=3kohm. (attached paper detailing formulas)

I already have the shortest possible SCL and SDA wires. Separating them would be tough though :-\.

I am going to look at SCL and SDA with a logic analyzer and see what I find. Will report back.

Thanks

Title: Re: Revo AuxMag
Post by: f5soh on May 05, 2016, 03:50:32 pm
Revo have already pullup resistors.

(https://forum.librepilot.org/index.php?action=dlattach;topic=1110.0;attach=2879)
Title: Re: Revo AuxMag
Post by: rsk on May 05, 2016, 04:01:59 pm
Does the Nano also have the pull-ups?
Title: Re: Revo AuxMag
Post by: f5soh on May 05, 2016, 04:03:52 pm
Revo Nano has also pullup resistors like Revo but without ESD protection.
Title: Re: Revo AuxMag
Post by: rsk on May 05, 2016, 04:19:04 pm
What do you think then is happening with my setup?
Title: Re: Revo AuxMag
Post by: Mateusz on May 05, 2016, 04:28:19 pm
I am going to look at SCL and SDA with a logic analyzer and see what I find. Will report back.

I doubt logic analyzer can show the quality of signal, how the peaks look like, you would need oscilloscope.
Interesting reading http://dsscircuits.com/articles/effects-of-varying-i2c-pull-up-resistors not sure if that is any help though...
Title: Re: Revo AuxMag
Post by: rsk on May 05, 2016, 05:59:33 pm
You are right.
Title: Re: Revo AuxMag
Post by: nuggetz on May 05, 2016, 09:19:42 pm
I thought that external mag wasn't supported? Yet I see tutorials on external mag.
Title: Re: Revo AuxMag
Post by: Mateusz on May 05, 2016, 09:33:39 pm
I thought that external mag wasn't supported? Yet I see tutorials on external mag.

External Mag is supported with OP GPS in released Librepilot. Other external Mags are supported also but with development version of Librepilot, not available in binaries yet, you would need to compile code yourself ;)
Title: Re: Revo AuxMag
Post by: hwh on May 05, 2016, 10:00:05 pm
..External Mag is supported with OP GPS in released Librepilot. ...

The supported "OP GPS" he's referring to is NOT the one on sale on eBay and the Chinese sites that's called OP GPS.  That one is a tiny gps without a mag.  The supported one is the "OpenPilot GPS Platinum" AKA the "V9 GPS" and was 36mm square.   It's no longer made.
Title: Re: Revo AuxMag
Post by: nuggetz on May 05, 2016, 11:44:24 pm
Does anyone have a dev version compiled that I can use to run my external M8N Ublox/Mag? I really want to give this a spin.

Title: Re: Revo AuxMag
Post by: hwh on May 06, 2016, 12:14:06 am
The project doesn't distribute compiled pre-release versions of the software.

The instructions for downloading and compiling the "next" branch are in the developer section of the wiki
https://librepilot.atlassian.net/wiki/display/LPDOC/Developer+Manual (https://librepilot.atlassian.net/wiki/display/LPDOC/Developer+Manual)
Title: Re: Revo AuxMag
Post by: Jhinta on May 06, 2016, 12:25:22 am
Does anyone have a problem if i host them? Bins that is. And yes totaly free of ads or payments.

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: rsk on May 06, 2016, 01:48:33 am
I connected an oscilloscope to SCL and true enough, the signal is completely distorted.

I have attached the scope captures. Relevant data:

- actual frequency is 364kHz. Should be 400kHz (fast mode)
- Voltage rises only to 2.6V instead of 3.3V
- It takes the signal 1150ns to rise to 2.6V. Is should be less than 300ns

According to the tables previously provided, Rmin = 1kohm and Rmax = 1kohm

Will add the pullup resistors and report.
Title: Re: Revo AuxMag
Post by: rsk on May 06, 2016, 03:33:31 am
I added 1.2kohm pullups and there was definite improvement. See attached scope captures.

- signal rise time was reduced to 115ns which is well within specs
- speed is now about 410kHz

On the first try, I had a successful magnetometer calibration and bias and transform values seem reasonable.  Auxmag health indicator is mostly green. This is a first.

I have not lost data telemetry from the auxmag since the modification was done.

Will do more tests and report. Initial results seem promising.

Title: Re: Revo AuxMag
Post by: hwh on May 06, 2016, 03:55:51 am
Glad to hear it's working for you.  :)

The 10k pull ups on the revo are a bit weak for use with anything other than very short board to board cables.

Out of curiosity, what oscilloscope are you using?  One of the usb ones?   I've been thinking about replacing my big tektronix scope with something a little more portable.

-Hank
 
Title: Re: Revo AuxMag
Post by: rsk on May 06, 2016, 04:45:06 am
I am using a Hantek 6022 usb oscilloscope/logic analyzer. It is really convenient to use and very portable and does its job. There are a number of different models that will allow for sample rates according to your needs.

Title: Re: Revo AuxMag
Post by: nuggetz on May 07, 2016, 06:11:53 am
The project doesn't distribute compiled pre-release versions of the software.

The instructions for downloading and compiling the "next" branch are in the developer section of the wiki
https://librepilot.atlassian.net/wiki/display/LPDOC/Developer+Manual (https://librepilot.atlassian.net/wiki/display/LPDOC/Developer+Manual)

I followed those instructions and did a git checkout next and then built the package and ran the installer and GCS crashes on startup.
Title: Re: Revo AuxMag
Post by: f5soh on May 07, 2016, 11:24:37 am
Any error ?
Title: Re: Revo AuxMag
Post by: nuggetz on May 07, 2016, 05:36:58 pm
GCS just crashes. Where would I look for the error? Was hoping there was a log somewhere.
Title: Re: Revo AuxMag
Post by: f5soh on May 07, 2016, 05:47:34 pm
Please add some details, like when crashes: "when i go to firmware tab... " for example.

You can add a log while starting the app with "-log log.txt" at end. This output console content to log.txt file.

Also start GCS using the "clean configuration" link from program menu
Title: Re: Revo AuxMag
Post by: nuggetz on May 07, 2016, 05:50:05 pm
I dont get that far. After the logo pops up it crashes after a bit. Here is what the windows log says:

Faulting application name: librepilot-gcs.exe, version: 0.0.0.0, time stamp: 0x572d95fa
Faulting module name: Qt5Gui.dll, version: 5.6.0.0, time stamp: 0x5707b180
Exception code: 0xc0000005


If I run the clean GCS shortcut it launches but the GCS comes up with a totally black/blank screen. Now the regular exe doesn't crash anymore but gives the same blank screen.


Title: Re: Revo AuxMag
Post by: f5soh on May 07, 2016, 05:53:58 pm
Ah, so there is something....

Try reinstalling with MesaOpenGL ?
Title: Re: Revo AuxMag
Post by: nuggetz on May 07, 2016, 05:58:19 pm
Ah, so there is something....

Try reinstalling with MesaOpenGL ?

Yes, that did the trick. Now it launches just fine and I can see the contents of GCS. Flight data screen and PFD look normal too. Thanks.
Title: Re: Revo AuxMag
Post by: f5soh on May 07, 2016, 06:07:01 pm
I already answered the same 7 hours ago after you asked in wiki page :)
https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging

Title: Re: Revo AuxMag
Post by: nuggetz on May 08, 2016, 06:56:27 am
Thank you both!

Title: Re: Revo AuxMag
Post by: Roypw on May 10, 2016, 04:20:25 pm
Read through all this but can't find the info on how to set up the Flexi port etc for the Next build to get external mag working.  Saw it somewhere couple weeks ago but need all the GCS setup. Tried some settings last night but GCS says no external mag found.

Ublox m8n with magnetometer. Single 4wire connector plugged in Flexi port
Revo
Title: Re: Revo AuxMag
Post by: Jhinta on May 10, 2016, 04:41:19 pm
Read through all this but can't find the info on how to set up the Flexi port etc for the Next build to get external mag working.  Saw it somewhere couple weeks ago but need all the GCS setup. Tried some settings last night but GCS says no external mag found.

Ublox m8n with magnetometer. Single 4wire connector plugged in Flexi port
Revo
Please look at the pic of the cables you will see it
you need 6 wire + power  / 4 are for gps

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Jhinta on May 10, 2016, 05:11:36 pm
Master build uploaded, i will build them when i have the time ( dont ask me !!)

1: you know what this is
2: you know its not even alpha
3: use at own risk
4: it just main line build no extra or crap done to it
5: totaly free i dont ask anything
6: server capt to 5 users and 100KB/s

ftp://jhinta.no-ip.org/Public/Librepilot/

If for some reason server is down orso, DON'T PM ME !!!! , it will be online auto
Title: Re: Revo AuxMag
Post by: JCalver88 on May 10, 2016, 05:56:28 pm
Master build uploaded, i will build them when i have the time ( dont ask me !!)

1: you know what this is
2: you know its not even alpha
3: use at own risk
4: it just main line build no extra or crap done to it
5: totaly free i dont ask anything
6: server capt to 5 users and 100KB/s

ftp://jhinta.no-ip.org/Public/Librepilot/

If for some reason server is down orso, DON'T PM ME !!!! , it will be online auto

Thanks for this Jhinta, much appreciated.
Title: Re: Revo AuxMag
Post by: Roypw on May 10, 2016, 07:36:12 pm
Maybe I misunderstood, but I thought the latest build (next) allowed us to use only the 4 wire connector on the m8n GPS with magnetometer?  In fact I found the directions I was looking for (I printed them and there is no name or header info so I don't know where or who did them). These directions imply that only the Flexi port is required. No mention of adding the 2 wires on setting up any other port? There is no connection info in the write up!!
Title: Re: Revo AuxMag
Post by: f5soh on May 10, 2016, 08:03:07 pm
I2c mag is connected to the flexiPort set as I2c.
If you follow wizard, the connection diagram show all you need at some point.

(https://librepilot.atlassian.net/wiki/download/attachments/12058679/gps_wiring.png)
Title: Re: Revo AuxMag
Post by: Roypw on May 10, 2016, 08:41:05 pm
https://librepilot.atlassian.net/wiki/plugins/servlet/mobile?contentId=18382863#content/view/18382863

Found it! Here is the link. Reading it again I can use 1 cable to get both GPS and mag! 
Title: Re: Revo AuxMag
Post by: hwh on May 10, 2016, 08:45:35 pm
Only if you have a GPS Platinum (aka V9) or a DJI Naza GPS or it's clone.   All others require two ports.
Title: Re: Revo AuxMag
Post by: Roypw on May 10, 2016, 09:45:21 pm
Using build 15.09+r616-g4ada670. Followed setup instructions in link in above post.  When I set the Flexi port to i2c GCS reports no GPS in system page and Aux mag not found in the attitude<magnetometer tab. If I set Flexiport to GPS the GPS works but of course no AuxMag detected.

Now I may be causing myself problems, I am testing this on a spare Revo board with no receiver or ESCs connected. Didn't want to test on a quad first.   Could this be causing the problem? Doesn't seem related BUT?  Using 5v BEC and M8N Ublox GPS with magnetometer .

I just saw a comment that this GPS + Mag may not be one that works with Next? Only 1 four pin connector but listing on Amazon says for Revo.  (Probably just means the connector fits and GPS works - gotya)
Title: Re: Revo AuxMag
Post by: Jhinta on May 10, 2016, 09:49:51 pm
 ??? witch chipset is used by openpilot for the gps? that its using only 4 wires? witch protocal?
Title: Re: Revo AuxMag
Post by: Jhinta on May 10, 2016, 09:52:35 pm
Using build 15.09+r616-g4ada670. Followed setup instructions in link in above post.  When I set the Flexi port to i2c GCS reports no GPS in system page and Aux mag not found in the attitude<magnetometer tab. If I set Flexiport to GPS the GPS works but of course no AuxMag detected.

Now I may be causing myself problems, I am testing this on a spare Revo board with no receiver or ESCs connected. Didn't want to test on a quad first.   Could this be causing the problem? Doesn't seem related BUT?  Using 5v BEC and M8N Ublox GPS with magnetometer .

I just saw a comment that this GPS + Mag may not be one that works with Next? Only 1 four pin connector but listing on Amazon says for Revo.  (Probably just means the connector fits and GPS works - gotya)


mannn you still dont get it
4 wire for the gps
open up your gps you will see there is a 6 pin port were 2 are not used
that is your 2 wires mag
Title: Re: Revo AuxMag
Post by: f5soh on May 10, 2016, 10:03:27 pm
??? witch chipset is used by openpilot for the gps? that its using only 4 wires? witch protocal?

OP GPSv9 uses a small cpu (stm32f031), get data from GPS and mag chip.
Next data is sent over one serial line to Revo using the same ublox protocol and one special ublox packet for mag data.
Title: Re: Revo AuxMag
Post by: Jhinta on May 10, 2016, 10:05:44 pm
 :-[ i want one,  :P :P :P :P :P free port  :P :P :P :P anyinfo how to get one , as i read they are hard to get
Title: Re: Revo AuxMag
Post by: Roypw on May 10, 2016, 10:06:35 pm
Only if you have a GPS Platinum (aka V9) or a DJI Naza GPS or it's clone.   All others require two ports.

Listing on Amazon says Ublox M8N comparable with DJI Naza V1 or V2 lite flight controller? Will it work? Sorry to be such a bother but this is complex for us new guys.
Title: Re: Revo AuxMag
Post by: Roypw on May 10, 2016, 10:15:47 pm

mannn you still dont get it
4 wire for the gps
open up your gps you will see there is a 6 pin port were 2 are not used
that is your 2 wires mag
[/quote]

Then why do I see post above says DJI works with one 4 pin, and why does referenced setup say only use Flexi port. Sorry but there is a lot of stuff thrown around and it's hard to figure out a straight answer.

So I guess the answer is if I want to use the GPS I have (and no one has addressed this specific one for me) then I have to solder on 2 wires with 4 pin connector and use both the main and Flexi ports?
Title: Re: Revo AuxMag
Post by: Jhinta on May 10, 2016, 10:25:34 pm

mannn you still dont get it
4 wire for the gps
open up your gps you will see there is a 6 pin port were 2 are not used
that is your 2 wires mag

Then why do I see post above says DJI works with one 4 pin, and why does referenced setup say only use Flexi port. Sorry but there is a lot of stuff thrown around and it's hard to figure out a straight answer.

So I guess the answer is if I want to use the GPS I have (and no one has addressed this specific one for me) then I have to solder on 2 wires with 4 pin connector and use both the main and Flexi ports?
[/quote]

read 3 post above you -> thats wy
and you simply need the normal cable for your gps
and add two wires to 6pins header for i2c so in total you have 6 wire, and thats already posted also .

So yes ,, you can solder 2 wires and have a 4pin header for gps and a 2 on 4 header for i2c ---- or just add 2 wires to the header if you have them no solder needed just some handy work.
Title: Re: Revo AuxMag
Post by: hwh on May 10, 2016, 10:30:52 pm
Sellers lie or a least stretch the truth a lot.   :(

Post a link to a particular gps on Amazon and we might be able to tell you if it will work.  I really need a picture of the inside like the eBay clone auction below shows to be sure.

There are three protocols we're talking about here, Ublox, the OpenPilot extension to Ublox (only on GPS Platinum V9), and the DJI Naza GPS protocol.  Ublox by itself only carries GPS on a single connector, the other two combine GPS and Mag on the same connector.  The OpenPilot Platinum is no longer made so the only real choice for a one connector gps/mag is the Naza one.  They always have the wrong connector for us and you have to cut the connector off and splice on the correct one.

This is an eBay auction for the real, not clone one:
http://www.ebay.com/itm/DJI-NAZA-M-Lite-GPS-Compass-module-only-US-dealer-/201557456216?hash=item2eedc2b558:g:PfoAAOSw~bFWM7aU

and this is one of the clones:
http://www.ebay.com/itm/NEO-M8N-GPS-Compass-for-DJI-Naza-M-V2-Lite-Flight-Controller-Compatible-/141849336411?hash=item2106e11a5b:g:XRUAAOSwbdpWaUFW

Both will work with only one connector but require you to replace the connector on the cable.  Most people just splice on a pre-made cable that's available on both eBay and Amazon.
Title: Re: Revo AuxMag
Post by: hwh on May 10, 2016, 10:37:44 pm
The pre-made cables I'm talking about are:
http://www.ebay.com/itm/Micro-JST-SH-1-0mm-4-Pin-Connector-plug-with-Wire-x-20-sets-/151991706931?hash=item2363696533:g:53sAAOSwaZdXHxd8

or

when you purchased the revo it probably came with a bunch of short cables, you may be able to cut the end off one of them and splice it onto the cable on the gps.

You can't actually put the connectors directly onto the gps cable because the wire is too big for the connector.   And the connector pins are really, really tiny and hard to put on even with the correct 0.8 mm OD wire.  :(
Title: Re: Revo AuxMag
Post by: [email protected] on May 10, 2016, 11:41:44 pm
I've a problem with m8n gps with compass and separate pin with sda and scl wires connect to flexiport but i2c is always orange and not recognized from lp....i've used a next branch r630  but magnetometer tab show auxmag not found.
All is connectes any help?
Title: Re: Revo AuxMag
Post by: f5soh on May 10, 2016, 11:59:15 pm
Using I2c, the board should be always powered first with external power (battery/5V) and next connect Usb.

If you connect Usb first the auxMag is not powered and i2c cannot initialize.
Title: Re: Revo AuxMag
Post by: [email protected] on May 11, 2016, 12:05:45 am
After boot of fc i connect it to lp but i2c is always orange...
Title: Re: Revo AuxMag
Post by: Jhinta on May 11, 2016, 12:25:44 am
After boot of fc i connect it to lp but i2c is always orange...
Dead you read this form fully?
Because if you did you know what you could have done to have it working

Anyway i have the same gps. If you cant get it green you need delay firmware.
How why where -> read, its all on the forum


Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: Roypw on May 11, 2016, 12:53:23 am
Thanks hwh, that is really good info and in a form that us that are just digging into GPS/Mags can understand. I really appreciate responses like this, most responses are only understood by people that already know the answer.  Because of your 2 responses above I now feel I understand what is going on and can move forward.

I don't mind a little soldering, I have a station, and I have the 4 pin connectors with wires in the pins that are long enough that I can solder probably right on the GPS board.

Thanks so much,
Title: Re: Revo AuxMag
Post by: rsk on May 11, 2016, 01:20:08 am
I am assuming that your GPS+MAG is a DJI NAZA compatible unitl. If that is the case, the unit encodes the GPS and MAG information on the same serial data stream. In order to have the Revo decode it, you have to configure it as follows:

- Configuration/Hardware/Main Port or Flexi Port = GPS
- Configuration/Attitude/Magnetometer/Mag type = DJI

Cheers
Title: Re: Revo AuxMag
Post by: hwh on May 11, 2016, 02:16:00 am
...I have the 4 pin connectors with wires in the pins that are long enough that I can solder probably right on the GPS board...

Be careful not to make them too short because the reason for the aux mag is to get it as far from the magnetic disturbances caused by the motors and power wiring as possible.  Within reason the higher the better on one of those GPS mount masts.
Title: Re: Revo AuxMag
Post by: Roypw on May 11, 2016, 05:41:30 am
You are right. I will add some wire, the ones on the plug are only 5" long

Thanks again
Title: Re: Revo AuxMag
Post by: [email protected] on May 11, 2016, 07:44:53 am
After boot of fc i connect it to lp but i2c is always orange...
Dead you read this form fully?
Because if you did you know what you could have done to have it working

Anyway i have the same gps. If you cant get it green you need delay firmware.
How why where -> read, its all on the forum


Verstuurd vanaf mijn LG-D855 met Tapatalk

How do.you solve.the problem with witch firmware???can you share???
Title: Re: Revo AuxMag
Post by: Jhinta on May 11, 2016, 07:48:40 am
F5soh has it uploaded same pages back

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: [email protected] on May 11, 2016, 09:50:55 am
Okkay but the value i need to use for grren i2c is??
Do you have a same antenna and you have solved with this firmware?
Regards
Title: Re: Revo AuxMag
Post by: Jhinta on May 11, 2016, 10:15:03 am
Thats for you to find out witch delay works for you

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: [email protected] on May 11, 2016, 11:36:02 am
Thats for you to find out witch delay works for you

Verstuurd vanaf mijn LG-D855 met Tapatalk


Ok i need to change only minsat???with not reboot of fc or i need reboot everytime? Thank you for your helping
Title: Re: Revo AuxMag
Post by: Jhinta on May 11, 2016, 11:39:33 am
? The delay, sets up a start delay so changing it needs a reboot as its a start delay . and yes minsat

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: Roypw on May 12, 2016, 03:58:43 am
Have 2 GPS supposedly with Mag!  Pics below. 1 is M8N other M7N. 
I have looked at posts pics of M8N and it says no mag chip.  However if I look with a magnifying glass on mine there is a very flat chip or something there.  Question is this the mag chip?  Also I do not see the SCL and SCA labels on any pads. Assuming I do have the mag chip where do I solder the 2 wires for the Flexi port?

It appears to me that the M7N has the mag chip? Am I correct?  I plan to solder the 2 wires on the pads labeled SCL & SCA (or do I have it wrong looks like SDA) to connect to the Flexi port.

Thanks

Roy
Title: Re: Revo AuxMag
Post by: hwh on May 12, 2016, 05:27:08 am
The pictures didn't make it for some reason.

The mag chips are tiny square chips labeled either 883 or 983.   There's a pic of a gps with one in the post https://forum.librepilot.org/index.php?topic=1555.msg11573#msg11573  and my answer to him (about a minute or two ago) tells about how they're wired up.  If that doesn't match your gps well enough go ahead and post your pics here and I (or someone else) will help you more.
Title: Re: Revo AuxMag
Post by: Roypw on May 12, 2016, 12:43:08 pm
Sorry forgot the pics.
Title: Re: Revo AuxMag
Post by: Jhinta on May 12, 2016, 12:56:16 pm
You can clearly see above pic is missing a chip that sould be te mag and the other on has it on the white board

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Roypw on May 12, 2016, 01:47:35 pm
Just to be sure, I mentioned in my post that there is some sort of very flat chip or maybe some sort of thin plastic piece soldered in the space for the chip. It has the 90degree arrows on it and a white line on one edge. If I look with magnifier its is not just the circuit board, there is something soldered or glued on there?
Title: Re: Revo AuxMag
Post by: hwh on May 12, 2016, 04:29:38 pm
Just to be sure, I mentioned in my post that there is some sort of very flat chip or maybe some sort of thin plastic piece soldered in the space for the chip. It has the 90degree arrows on it and a white line on one edge. If I look with magnifier its is not just the circuit board, there is something soldered or glued on there?

No, he's right, the upper one (black board) doesn't have the mag chip on it.  The arrows/line are printed on the board.

The other one (green board) has one and you should be able to add wires and use it.  The SCL/SDA pins where the wires solder on are clearly marked.  Details of how are in the post I referenced a couple of posts up.
Title: Re: Revo AuxMag
Post by: Roypw on May 12, 2016, 07:08:56 pm
Man I hate to keep coming back for help but!  (Asked vendor for return of 1st unit without chip, thanks guys) Soldered wires to SCL & SDA on unit with chip plugged into Flixi port pins 3 & 4.  But the I2C port stays black in flat info.  Spent hours reading posts etc and think I have setup right - Main port GPS etc and GPS works, Flexi port to I2C.  Magnatometer tab set Aux Only, I2C and of course says no aux mag found.  Calibrated onboard mag and it goes green

Hope I provided enough info,vwould appreciate any help

Ps. Ohm metered connections from GPS board to Flexiport connector both good

Verified SCL to pin 3 and SDA to pin 4 on Flexi
Title: Re: Revo AuxMag
Post by: Jhinta on May 12, 2016, 07:10:46 pm
Man I hate to keep coming back for help but!  (Asked vendor for return of 1st unit without chip, thanks guys) Soldered wires to SCL & SDA on unit with chip plugged into Flixi port pins 3 & 4.  But the I2C port stays black in flat info.  Spent hours reading posts etc and think I have setup right - Main port GPS etc and GPS works, Flexi port to I2C.  Magnatometer tab set Aux Only, I2C and of course says no aux mag found.  Calibrated onboard mag and it goes green

Hope I provided enough info,vwould appreciate any help

Ps. Ohm metered connections from GPS board to Flexiport connector both good

witch board are you using ?  you have two right? did the one with mag work?
more info about that gps so others know

 if mag is black it means nothing conected (missing chip , or bad cable or twist ) organge means time out -> increas time out
Title: Re: Revo AuxMag
Post by: Roypw on May 12, 2016, 08:32:35 pm
Using GPS with green board in pic above, M7N and has chip. REVO felt ctlr.

Mag us red but u believe because onboard mag reads only 5% or so,bi am now in my basement and calibration is marginal. 

However I am not worried about mag color now, without I2C green I am not going to get any mag, right. Did you miss that in my post?
Title: Re: Revo AuxMag
Post by: Jhinta on May 12, 2016, 09:41:04 pm
I dont get it does your mac works now. As in does the board see the mac ? Is i2s green or orange or blak? Anwser that first.

Also if you have a high current or somthing els neer your mac it will never be good that why we use aux max to overcome this. But i didnt make your quad so dont know . what i do know is when you connect those wires to i2c you aux mag sould work ( as in working ) not that its calibrated it will show red by default

If i2c is black -> mainboard doesnt see anything connect to board meaning bad cable or gps unit is bad ( mac realy not connected on traces or just bad) bad solder by user .
Orange -> something is connected but time out didnt get info in time
Green mac is seen and data oke


Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: Jhinta on May 12, 2016, 09:43:45 pm
Or make a pic of your status window
And your wire setup from gps to mainboard.
Also test for volt ( does the mac get power its 2 of the 4 solderd output of the mac !) you cant break it, just test 2 outer pins sould read somthing like 3v or 5v orso

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: Roypw on May 13, 2016, 02:42:00 pm
Appreciate your help however I think that I must first get the I2C to work first before the magnatometer will work. In flight status I2C is BLACK!  As I said above I have checked with an ohm meter from the new connections in the GPS unit to the 4 pin plug that plugs into the Flexi port they are good.  Checked SCL and SDA are connected to TX pin 3 and RX pin 4 respectively.  GPS unit has power since the GPS works great with 10 or so seats acquired. 

Even tried an external mag board, a MAG3110. I2C still stays black. Not sure this unit is comparable with Revo but had it so thought it's worth a try.

Think I am missing something simple in the Next GCS.  Lots of hours reading posts and trying different setups etc., I2C stays black. 

Going to go back through posts again to see if I missed something but getting close to giving up on this whole "build your own" quad stuff because of the lack of help and guidance. 
Title: Re: Revo AuxMag
Post by: Jhinta on May 13, 2016, 02:47:27 pm
Make a photo of you wires in your gps you mad want to see the 6 wires

Also try this swap main and flex - flexy as gps main as i2c what does that do

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: Roypw on May 13, 2016, 02:58:42 pm
Already tried switching Flexi and Main. I2C stayed black. I will have to open the GPS to ge a picture, but I have described what I have done and checked with ohm meter for shorts between all 6 pins checked wires from inside GPS to Flexi connector, but I will get pic
Title: Re: Revo AuxMag
Post by: Jhinta on May 13, 2016, 03:05:06 pm
Also that you gps is working doesnt mean you mac get power . if they had a bad  mag they simply cut a trace or remove a smd or even remove the chip like you had. Thas wy im saying measure the volt on the mac. Also measure from pin to mac-pin for ohm are they even connected

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: Mateusz on May 13, 2016, 03:13:43 pm
Already tried switching Flexi and Main. I2C stayed black. I will have to open the GPS to ge a picture, but I have described what I have done and checked with ohm meter for shorts between all 6 pins checked wires from inside GPS to Flexi connector, but I will get pic

Hi Roypw,

Which sensor fusion algorithm are you using ? If you are using Complementary alone Mag will be black because it's not used.
Try other sensor fusion algorithm that actually uses Magnetometer (i.e Complementary+Mag).
Also you have to set source of Mag and in your case it will be I2C one.
Title: Re: Revo AuxMag
Post by: Jhinta on May 13, 2016, 03:15:05 pm
Lol . having a big smile now.

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Roypw on May 13, 2016, 03:27:46 pm
Pics

Note pin 4 on Flexi connector is red & 3 is black.  Connectors I picked up were wired that way.  Ohm meter on board all connections are good to small mag board except power which goes through a 3.3 v regulator
Title: Re: Revo AuxMag
Post by: Roypw on May 13, 2016, 03:31:08 pm
Already tried switching Flexi and Main. I2C stayed black. I will have to open the GPS to ge a picture, but I have described what I have done and checked with ohm meter for shorts between all 6 pins checked wires from inside GPS to Flexi connector, but I will get pic

Tried all settings in that pull down. As I have said several times the I2C is black!  Maybe I as missing something but until I get I2C working I am not going to see any aux mag.

Hi Roypw,

Which sensor fusion algorithm are you using ? If you are using Complementary alone Mag will be black because it's not used.
Try other sensor fusion algorithm that actually uses Magnetometer (i.e Complementary+Mag).
Also you have to set source of Mag and in your case it will be I2C one.
Title: Re: Revo AuxMag
Post by: Roypw on May 13, 2016, 03:38:36 pm
Checked with power on GPS unit the small mag board has 3.3v on first pin on the left. As I said above the other 3 ohm to ground, SDA & SCL
Title: Re: Revo AuxMag
Post by: Jhinta on May 13, 2016, 05:28:34 pm
Checked with power on GPS unit the small mag board has 3.3v on first pin on the left. As I said above the other 3 ohm to ground, SDA & SCL

 ( cant realy see how you set it up but im guesing you have the two wires to that 4 header connected to black and red witch sould be good looking at it) solder look good also And did you enabled comp.+mac for it to be on

Also a other thing the bin i have compiled is a 64bit the normal exe is x86. If you have two librepilot installs and you are opening the wrong one it will not work .make sure you have the right one open. programs or programs x86 made that mistake once my self

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: Jhinta on May 13, 2016, 05:47:11 pm
But looking at you photos every thing seems fine . and the mac is independed of gps it sould simply work.

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Roypw on May 13, 2016, 06:18:24 pm
GOT IT!  I went through the process again as described here https://librepilot.atlassian.net/wiki/plugins/servlet/mobile?contentId=18382863#content/view/18382863.

I think the mistake I was making was not going to system and expanding Settings>>Auxmag to set AuxMagSettings Type to Flexi and Usage to Aux Only.  I think I was doing it on the new Magnatometer tab.  Read the above procedure CAREFULLY AND FOLLOW IT CAREFULLY.  You can't just plug in mag and GPS and enter the right settings,bit must be done as the write up says!  Why it's so complex and step by step critical beats me! Maybe the official release of the next Librepilot will make easier.

now I have to calibrate the mag outside no metal around and work on stable flight. It's raining so it probably won't be today.

Thanks to all for the advice
Title: Re: Revo AuxMag
Post by: Jhinta on May 13, 2016, 06:22:43 pm
You aould have got that when you did your first setup ( did you do that)

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: Jhinta on May 13, 2016, 08:03:03 pm
Also you need both mac enabled to calibrate it. onboard mac sould be green only then you can calibrate aux mag because of you auxmac oriëntation is not the same as the onboard one

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: f5soh on May 13, 2016, 09:17:23 pm
You can calibrate both Mag at same time and monitor both mag alarms in Mag tab.
No need special fusion algorithm

And next adjust the AuxMag orientation using the 3 X,Y,Z bars
Title: Re: Revo AuxMag
Post by: Roypw on May 13, 2016, 11:20:24 pm


Both will work with only one connector but require you to replace the connector on the cable.  Most people just splice on a pre-made cable that's available on both eBay and Amazon.

I got a Naza GPS and like you advised me I need to change the connector, no problem except I can't find a pin out of the GPS.  Know the Flexi port and there is a white striped wire on the GPS that I will assume is ground but not sure. Others are all black.  This is not the DJI Naza but a Ublox but since it's for Naza with their 4 pin connector I have my fingers crossed.(the one on eBay you sent me the link for is coming next week sometime )

Can you or anyone help me with this Naza GPS pin out so I don't smoke it

Thanks

Roy
Title: Re: Revo AuxMag
Post by: hwh on May 13, 2016, 11:38:52 pm
The unmarked one is receive on the gps, I usually connect it to transmit on the FC but the gps doesn't actually pay any attention to what's sent to it.
Title: Re: Revo AuxMag
Post by: f5soh on May 14, 2016, 10:54:25 am
Quote
no problem except I can't find a pin out of the GPS

You can find information using Wizard, at some point there is a Connection diagram button.

(https://forum.librepilot.org/index.php?action=dlattach;topic=1110.0;attach=3017)

And finally got the wiring:

(https://forum.librepilot.org/index.php?action=dlattach;topic=1110.0;attach=3019)
Title: Re: Revo AuxMag
Post by: Xviews on May 14, 2016, 01:13:49 pm
He dont need the delay firmware anymore, with the new next, you need to do two power cycles and I2C goes to green, i dont know why :)

After boot of fc i connect it to lp but i2c is always orange...
Dead you read this form fully?
Because if you did you know what you could have done to have it working

Anyway i have the same gps. If you cant get it green you need delay firmware.
How why where -> read, its all on the forum


Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: MultiBen on May 14, 2016, 02:29:26 pm
The unmarked one is receive on the gps, I usually connect it to transmit on the FC but the gps doesn't actually pay any attention to what's sent to it.

Would it be possible to use this TX line for something else ( data logger, osd, etc ?)

Ben
Title: Re: Revo AuxMag
Post by: hwh on May 14, 2016, 03:37:18 pm
Not currently.  It has been discussed but this is the only gps that doesn't use the line.  The ublox and Platinum GPS units are configured by the revo on boot up using this wire.
Title: Re: Revo AuxMag
Post by: Xviews on May 16, 2016, 05:40:51 pm
I have a question , I have tilted engine mounts and in GCS rotate board "Pitch -10" and aux mag orient i set "Pitch -10" and all bargraph are centered but in the Documentation it says:

"Be aware that if you adjust "Rotate Virtual" -> Pitch (to get level hover in Attitude mode), you will also need to change AuxMagSettings -> BoardRotation -> Pitch by the same amount but opposite sign."

The problem is when I do this , is the x-axis by 10.

What is now correct?

Title: Re: Revo AuxMag
Post by: f5soh on May 16, 2016, 05:44:37 pm
If the 3 bargraphs still/return to 0 and the Attitude in PFD is correct (mean hover correctly) then you are fine.
Title: Re: Revo AuxMag
Post by: darkdave on May 18, 2016, 06:14:09 pm
If I want to use the mag compass in my GPS (Neo 6m)

I have to set my fusion to Complimentary + GPS + Mag
Stability configuration to the same above.
What else?

What do I set my Sytem Settings to? I notice there is an Aux Mag setting...

I did search for the forum for "external compass" and "external mag" but it looks like I also have to upgrade my
flash software to "NEXT". Do I have to do any programming to install "NEXT"? Or can I just download a certian file and double click it when it finished downloading?

I dont want to use my internal compass anymore because im convinced its being hit by magnetic fields nearby in the drone power distribution systems. I want to only use my external Mag.

UPDATE: I just noticed this post was not deleted but moved here, so I created teh same message in my older thread labelled:"Got return to home function working" sorry I didnt mean to create a duplicate topic. I sincerely thought this message was deleted because the admin didnt want me to keep making new threads. Please do answer if u can regardless. Thanks.

Topic moved to the right thread
Title: Re: Revo AuxMag
Post by: JCalver88 on May 19, 2016, 02:44:55 pm
I am trying to get GPS flight modes to work on my Revo board, using a UBlox Neo 7 GPS mounted on a pole.

Originally I was using the onboard mag on the revo, but after calibrating the mag (via USB), when I set it to INS13 attitude algorithm, I can see the quad thinks it is yawing and rolling wildly in the attitude simulator in Librepilot.

I have now setup the aux mag to run off the flexiport (I2C), as described here, and recalibrated, but have the same problem.

Reading this thread, it sounds symptomatic of a mag calibration issue - I've been as diligent as I can with the calibration. I have now ordered a ground-side OPLink to run the calibration remotely, removing any USB interference with the mag, but apart from it being a dodgy calibration, is there anything else that could be causing this? When I set the attitude algorithm to 'Complemetary', or even 'Complementary+Mag+GPS', it seems to be nice and stable, but when using INS13 it goes nuts.

Thanks in advance for your help,
Title: Re: Revo AuxMag
Post by: Mateusz on May 24, 2016, 04:24:41 pm
I have now setup the aux mag to run off the flexiport (I2C), as described here, and recalibrated, but have the same problem.

If you are using "next" branch of development code, the you should have Mag tab which shows error. How is that error <5% ?
Did you correct for different mag orientation on your GPS unit than it is on the Revo board ? (most likely)
Please also read my two posts on similar issue https://forum.librepilot.org/index.php?topic=1547.msg12281#msg12281

Did you check if your I2C bus is working ? Sometimes GPS+Mag combo is crappy and does not have strong enough pull-ups, so connection between Mag drops. This was also reported on this forum.
Title: Re: Revo AuxMag
Post by: JCalver88 on May 25, 2016, 01:38:12 pm
Mateusz,

Thanks for your advice, I think you're right actually, that it is a board rotation issue. I am just going through now, trying to figure out which numbers go in which boxes.

The following link describes correcting your board for magnetic inclination - which axis should this correction be made on? Roll or pitch?
Title: Re: Revo AuxMag
Post by: Mateusz on May 25, 2016, 02:00:33 pm
To my knowledge setting home location which is required for arming anyway sets magnetic inclination automatically since magnetic field is not homogeneous across earth, inclination is needed for mag. Inclination has nothing to do with rotation of mag in roll pitch or yaw directions.
Title: Re: Revo AuxMag
Post by: Mateusz on May 25, 2016, 02:08:34 pm
To my knowledge setting home location which is required for arming anyway sets magnetic inclination automatically since magnetic field is not homogeneous across earth, inclination is needed for mag. Inclination has nothing to do with rotation of mag in roll pitch or yaw directions.
In other words if curious read here https://en.m.wikipedia.org/wiki/Magnetic_dip
But no need to set that.
Only you need to set Mag rotation with respect to FC board. Default is 0,0,0 as that works with OP GPSv9 platinum. Other GPS units may have mag soldered differently.
Title: Re: Revo AuxMag
Post by: JCalver88 on May 25, 2016, 04:39:09 pm
Forgot to post the link;

https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration

Quote
Set and verify AuxMagSettings.BoardRotation
- Set GCS -> System -> Settings -> AuxMagSettings -> BoardRotation (correctly)
- - Look up (Google) "magnetic inclination" for your location.  For me in USA it is about 62 degrees.  So north for me is north and 62 degrees down also.
- - https://en.wikipedia.org/wiki/File:World_Magnetic_Inclination_2010.pdf
- - When making these changes, use the red up arrow (Save) at the top of the screen.  That will make it permanent, and also put it into effect immediately (no reboot required for changes to this setting).
- - Watch AuxMagSensor.  BoardRotation is correct if you point the nose of the GPS/mag north (and e.g. 62 down) and see a high positive number (+400) for X and flip the GPS/mag so tail is now pointing north and you see X has become a large negative number (-400).  These +-400 can easily be +100-800 or +600-300 for example.  If you are truly pointing the GPS/mag north, X will be the largest change and the change will make the number a lot more negative (about 800 more negative, taking it from about +400 to about -400)
.

What does this section refer to? Are these instructions redundant if you have your home location set?
Title: Re: Revo AuxMag
Post by: TheOtherCliff on May 25, 2016, 07:20:06 pm
Settings Home Location is a different thing.

I haven't used Basic+Mag+GPS.  I always use INS13.  I always use AuxMagSettings.Usage=AuxOnly.  Don't forget to calibrate your mags.

Those AuxMag instructions are long winded, but it is important to read and understand, otherwise you are as bad off as a cave man that I throw my car keys to and tell him to go get a hamburger.  :)  Well almost...

(note that I just pushed a source code change (25 May 2016) that makes the following numbers correct again)
GPSV9 and DJI GPS/mags both start with BoardRotation=0,0,0
Most PixHawk GPS/mags start with BoardRotation=0,180,0 (180,0,180 also works.  Prove it by flipping your hand around.)
These are ALL numbers you start with.  If you have race tilt motors that are tilted 15 degrees, you must subtract 15 from Attitude->Settings->RotateVirtual->Pitch (so usually -15) and you must add 15 to AuxMagSettings.BoardRotation.Pitch (so 195 for many PixHawk GPS/mags).
If you don't have race tilt motors, you leave those numbers alone.

Think of a single dice (a western right handed dice) that must be glued on in the correct orientation.  "One" must be pointing forward.  But that isn't enough.  Two must be pointing right and three must be pointing down.  (If your dice is left handed, 3 will be pointing up and there is nothing you can do about it.)

The 3D (forward-backward, right-left, down-up) (forward, right, and down are all positive direction) mag sensor just tells what it sees.  Example: For me in North America where north is also 62 degrees down if I point the quad nose north and 62 degrees down, the FC should see +400 on the forward-backward (x) mag sensor.  If the sensor is installed incorrectly (same thing as BoardRotation set wrong), it may see +400 on the left and right mag sensor. will get confused and the HUD will wobble roll and flip around constantly (INS13 at least).

BoardRotation MUST be set correctly.  If you have your PixHawk GPS/mag installed pointing forward, that is usually pitch=180 (or roll=180, pitch=0, and yaw=180 also works).

The instructions posted are a way of determining whether you have BoardRotation set correctly.  My BoardRotation is set correctly and I am in North America where north is north and also about 62 degrees down.  If I point my quad nose at north I get about +400 on x (and small values on y and z).  If I flip the quad to point the tail at north then I get -400 on x (and still small values on y and z).  Repeat for y and right side.  Repeat for z and down.  This tells me that BoardOrientation is correct.  Set your AuxMagSettings.BoardRotation.Pitch to 180.  Look up your magnetic inclination (dip) on the following map.  Verify that your x, y, and z now look correct.

https://upload.wikimedia.org/wikipedia/commons/d/de/World_Magnetic_Inclination_2015.pdf

For northern hemisphere north is also downward.  For southern hemisphere north is also upward.  Don't worry, it is just the magnetic field direction.  :)

My main test quad uses INS13 with a 30 back degree tilted FC/PixHawkGPS/mag stack that simulates 30 degree race tilt motors.
Title: Re: Revo AuxMag
Post by: TheOtherCliff on May 25, 2016, 09:39:21 pm
Wait.  Looks like the AucMagSettings.BoardRotation stuff has been changed.  :(
GPSV9 and DJI are no longer 0,0,0 and I need 180,0,90 for PixHawk.
That is not right.  I will fix it.
Title: Re: Revo AuxMag
Post by: TheOtherCliff on May 25, 2016, 10:17:39 pm
For those of you building your own from source code

I fixed it both in bitbucket alessiomorale/librepilot.git  shared/LP-72_Sparky2_support
and bitbucket theothercliff/librepilot.git  shared/LP-72_Sparky2_support

GPSV9 and DJI now use AuxMagSettings.BoardRotation = 0,0,0 as they should
and most PixHawk use 0,180,0 (or the equivalent 180,0,180)
Title: Re: Revo AuxMag
Post by: JCalver88 on May 26, 2016, 10:33:34 am
The instructions posted are a way of determining whether you have BoardRotation set correctly.  My BoardRotation is set correctly and I am in North America where north is north and also about 62 degrees down.  If I point my quad nose at north I get about +400 on x (and small values on y and z).  If I flip the quad to point the tail at north then I get -400 on x (and still small values on y and z).  Repeat for y and right side.  Repeat for z and down.  This tells me that BoardOrientation is correct.  Set your AuxMagSettings.BoardRotation.Pitch to 180.  Look up your magnetic inclination (dip) on the following map.  Verify that your x, y, and z now look correct.

Sorry for pressing the point, I just want to make sure I understand you correctly.

So, when I point the nose of my quad north, and 62 degrees towards the floor, it should read +400? Or when I point the nose north, and level to the ground it should read +400?

Thanks for your detailed explanations
Title: Re: Revo AuxMag
Post by: Oulala69 on June 14, 2016, 01:26:23 pm
Dear all, is there a way to find a GCS version (next branch version) to support external Mag ?

I am not able to compile a version my self, so if someone have a windows 32bits version to share, i would love it and test it

in advance thank you

Have good flights
Title: Re: Revo AuxMag
Post by: NightLord on June 15, 2016, 03:22:52 pm
Here is a link to the latest version I was able to build.

Sadly, it still has bootup issues (revo may not boot up, or boots,  but ESCs do not initialize) when auxmag is connected to flexiport vi I2C.

https://drive.google.com/file/d/0B2_XeG7fVEtAajlJUmVRb0trM00/view?usp=drivesdk
Title: Re: Revo AuxMag
Post by: Jhinta on June 15, 2016, 03:39:11 pm
Set your esc to 490 it will boot

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: NightLord on June 17, 2016, 10:48:31 am
Set your esc to 490 it will boot

Verstuurd vanaf mijn LG-D855 met Tapatalk
Thx! It does indeed seem to do the trick.

Sent from my GT-I9505 using Tapatalk

Title: Re: Revo AuxMag
Post by: TheOtherCliff on June 17, 2016, 04:59:29 pm
The instructions posted are a way of determining whether you have BoardRotation set correctly.  My BoardRotation is set correctly and I am in North America where north is north and also about 62 degrees down.  If I point my quad nose at north I get about +400 on x (and small values on y and z).  If I flip the quad to point the tail at north then I get -400 on x (and still small values on y and z).  Repeat for y and right side.  Repeat for z and down.  This tells me that BoardOrientation is correct.  Set your AuxMagSettings.BoardRotation.Pitch to 180.  Look up your magnetic inclination (dip) on the following map.  Verify that your x, y, and z now look correct.

Sorry for pressing the point, I just want to make sure I understand you correctly.

So, when I point the nose of my quad north, and 62 degrees towards the floor, it should read +400? Or when I point the nose north, and level to the ground it should read +400?

Thanks for your detailed explanations

Sorry for late reply.

The "north" in above discussion means "north and down".  The +400 means "max value" which could be 400 to 500 (and maybe even 300 to 800 or so for an uncalibrated mag).  The point is that if you point head or tail of each axis along the magnetic direction (north and down in northern hemisphere, north and up for southern hemisphere, look up the magnetic inclination or magnetic dip for your location), then that axis should show large plus for head or minus for tail ... and the other axes should show much less, ideally zero if you point exactly along magnetic direction.
Title: Re: Revo AuxMag
Post by: Thijs80 on June 30, 2016, 03:57:19 am
It seems that 'auxmag' is broken in the latest 'next' builds.
I2C status is green even when the compass is not powered.  ???

If the external compass is powered, the values in the system/data objects tab seems correct (and change if you turn the external compass), but the compass on the firmware tab does nothing. It changes direction only if you turn the Revo board. For some reason it seems that it uses it's onboard mag even if you select auxmag.
Title: Re: Revo AuxMag
Post by: TheOtherCliff on June 30, 2016, 08:28:55 am
I2C is a bus that can have several things plugged in at the same time.  In our case, the code looks toward the day when you may have more than one thing plugged in to I2C, like aux mag and airspeed.

I am going to make a guess that the I2C port on the FC is working fine, but it just didn't find anything to talk to.
Title: Re: Revo AuxMag
Post by: TheOtherCliff on June 30, 2016, 08:31:09 am
MagSensor is always the onboard
AuxMagSensor is always the external mag
MagState is the one that obeys whether it is using onboard, or external or both
Title: Re: Revo AuxMag
Post by: Thijs80 on July 01, 2016, 07:48:48 pm
I understand, but my magstate says: "Source: Aux", my AuxMagSettings are set to "AuxOnly".
But it sill uses only the onboard mag. This is with build R816.

Really looks like a bug.....or i must do something wrong  ::) But as far as i can remember it was working on older 'next'  builds.
Title: Re: Revo AuxMag
Post by: TheOtherCliff on July 03, 2016, 07:07:13 pm
Quote
If the external compass is powered, the values in the system/data objects tab seems correct (and change if you turn the external compass), but the compass on the firmware tab does nothing. It changes direction only if you turn the Revo board. For some reason it seems that it uses it's onboard mag even if you select auxmag.

I haven't looked at the GCS code for that widget, but I am guessing that it uses AttitudeState, not MagState (etc).
AttitudeState uses mainly the gyros, and only uses the mag to correct for gyro drift IIRC.
Title: Re: Revo AuxMag
Post by: n8huntsman on July 22, 2016, 07:18:29 pm
I'm using my main port for my SBUS receiver and the FLEX port for the GPS.  Can the FLEX port be used for both, GPS and external mag?
Planning to use the flexIO for the OSD, just havent gotten that far yet.
Thanks
Title: Re: Revo AuxMag
Post by: Jhinta on July 22, 2016, 07:22:02 pm
I'm using my main port for my SBUS receiver and the FLEX port for the GPS.  Can the FLEX port be used for both, GPS and external mag?
Planning to use the flexIO for the OSD, just havent gotten that far yet.
Thanks

https://forum.librepilot.org/index.php?topic=1110.270
Title: Re: Revo AuxMag
Post by: n8huntsman on July 26, 2016, 06:24:36 am
I'm using my main port for my SBUS receiver and the FLEX port for the GPS.  Can the FLEX port be used for both, GPS and external mag?
Planning to use the flexIO for the OSD, just havent gotten that far yet.
Thanks

https://forum.librepilot.org/index.php?topic=1110.270

Right, but my GPS is already in the flexi port so I can't connect the two I2C aux mag wires at the same time.  Becuase my SBUS receiver is in the main port, there is no way to make this work?
Thanks
Title: Re: Revo AuxMag
Post by: n8huntsman on July 26, 2016, 06:36:41 am
As I suspected, it can't be done.  Found my confirmation here: https://forum.librepilot.org/index.php?topic=868.0

Might look into one of these sparky controllers...

Title: Re: Revo AuxMag
Post by: Wagsy on July 26, 2016, 06:48:24 am
Hi, been following this thread and have successfully installed a DJI GPS and its built in mag to my REVO - Hexi.
Just have 4 wires going into the REVO main port.
Want to thank you boys for coding it in.
Those V9's are so hard to get.

I will make a video of it hovering and RTB tomorrow.
Title: Re: Revo AuxMag
Post by: n8huntsman on July 26, 2016, 05:33:55 pm
Hmmm, I'll have to look into the DJI GPS if it's really 4-wire and includes a mag.  I assume this could also be used on the flexi port?
Title: Re: Revo AuxMag
Post by: hwh on July 26, 2016, 06:15:11 pm
It can be plugged into either the main or flexi ports.

The "real" DJI brand ones go for about $75 USD on eBay and the clones go for around $30 on both eBay and the Chinese sites.  The DJI brand ones seem to be slightly more sensitive and stable but both work well.
Title: Re: Revo AuxMag
Post by: Wagsy on July 27, 2016, 12:29:38 am
Here is how I wired it up.
This GPS came with a NAZA FC.
Off to the park now to test and tune.
Will make a video.
Title: Re: Revo AuxMag
Post by: Wagsy on July 27, 2016, 03:02:42 am
Video to come but NAZA GPS works perfect with REVO. :)
Position Hold and RTB and land spot on, even in the wind.
Very happy, well done boys.
The key is to get those mags away from everything.

EDIT
Video from today using the DJI GPS.
https://www.youtube.com/watch?v=443R9qn3CVw
Title: Re: Revo AuxMag
Post by: tech360 on August 11, 2016, 06:34:51 pm
I'm new to this forum (and RC) but looking for insight...

I have a Revo with the Ublox M8N that I'm using on a 450 quad. I'm trying to use the Ext. Mag. on the M8N and have successfully soldered leads to the SLC/SDA pins on the M8N for connection to the I2C on the Revo.

I can configure and use the ext. mag. and have got it *reasonably* calibrated (< 5% error) but have problems on power-up:

With the ext mag connected to the I2C the quad will not always boot correctly – the esc+motors do not give a co-ordinated tone, instead (one by one) they will sound a tone and then start spinning regardless of arming or throttle settings.

If I disconnect ext. mag. then power-up it boots correctly every time – esc+motors give triple tone and everything is good. If I connect mag to I2C after that it's 50-50 whether the compass is calibrated or not.

Very frustrating because it can take 5 or 10 minutes to get a successful boot sequence where the quad is actually ready to fly. Any ideas on what is causing this? Timing issues or conflicts on the I2C bus interfering with signals to the ESCs?

Thanks for any info/experience that you can share!
Title: Re: Revo AuxMag
Post by: f5soh on August 11, 2016, 06:43:22 pm
Hi, welcome.

Moved post to the AuxMag thread.

Seems there is some issues on outputs while the I2c is used, maybe related to I2c errors.

You can try adding extra pullup resistors on GPS/Mag side, currently the onboard R3/R4 seems too high.
Be sure you got 3.3V and add two extra 10K resistors to the SDA/SCL pads, should be more easy to do in GPS/Mag pcb.

(https://forum.librepilot.org/index.php?action=dlattach;topic=1110.0;attach=3907)
Title: Revo AuxMag compass and wire question
Post by: stevek1959 on August 13, 2016, 03:02:46 pm
 Morning all,
    I received this GPS from Ebay yesterday. The mag chip is rotated 90 degrees clockwise, what do you type in mag orientation to make it correct to face front, +90?

  Also two of the wires are not soldered in?  Before I write the Ebay vendor , I am pretty sure I need at least the ground wire soldered in.
 
   Thank you for any assistance you can give.
 
                     Steve
Title: Re: Revo AuxMag
Post by: Jhinta on August 13, 2016, 03:37:09 pm
Morning all,
    I received this GPS from Ebay yesterday. The mag chip is rotated 90 degrees clockwise, what do you type in mag orientation to make it correct to face front, +90?

  Also two of the wires are not soldered in?  Before I write the Ebay vendor , I am pretty sure I need at least the ground wire soldered in.
 
   Thank you for any assistance you can give.
 
                     Steve
Site info of seller ? And you souls be abale to just connect the wires . plus minus RX and tx . you already know where ground is so

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: stevek1959 on August 13, 2016, 03:56:15 pm

   Here is the seller,  should I rotate the Yaw of my orientation 90 degrees?

  http://www.ebay.com/itm/162022996386?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
Title: Re: Revo AuxMag
Post by: f5soh on August 13, 2016, 04:01:30 pm
Looks like this one is a Naza clone because there is a Cpu in top/left corner ?

No need to know orientation, that handled with embeded firmware.
Just follow arrow on case.

You should add the ground or it don't works.

Gnd, Tx, +5V

Title: Re: Revo AuxMag
Post by: stevek1959 on August 13, 2016, 04:21:19 pm
 Thanks for the replies gentlemen.  Yes it is a Naza clone.  I assumed that you have to change the orientation of the mag in Librepilot if the mag markings cannot be read when

 facing  in a certain direction as shown on post #105 at page 8 of this discussion.
Title: Re: Revo AuxMag
Post by: f5soh on August 13, 2016, 04:26:33 pm
Whatever the Mag orientation in hardware you can check if correct using the 3 bars and check that still to 0.

https://www.youtube.com/watch?v=qLsd4O75N9o

Another solution for AuxMag orientation check, you can use the Scope with "Raw Magnetometer" and see if both mags (onBoard/external) are sync.
Go to the Scope tab, Windows menu > Edit Gadget mode and next choose the "Raw Magnetometer" scope.
Tip: Before switching to Scope tab, go to the Config > Attitude > Magnetometer tab for faster refresh rates.

(https://forum.librepilot.org/index.php?action=dlattach;topic=2132.0;attach=3881)


Title: Re: Revo AuxMag
Post by: stevek1959 on August 19, 2016, 07:45:41 pm

  Thanks again gents for the replies.   I was getting 20% orientation difference from the onboard compass with the Naza clone compass.  I bought an authentic Naza, this one:
https://www.amazon.com/DJI-Naza-M-LITE-GPS-Module/dp/B017K2RMCO/ref=sr_1_1?s=toys-and-games&ie=UTF8&qid=1471628394&sr=1-1&keywords=DJI+Naza-M+LITE+GPS+Module .   As soon as I installed it ( after soldering correct wiring adapter)
 I calibrated and get under 2% orientation difference from the onboard compass .

 Life is good now!

   
Title: Re: Revo AuxMag
Post by: Jhinta on August 20, 2016, 06:00:17 pm
So finally got my motors but my GPS is bad really bad . ~5 fixes where it would be 8+ so don't by the one I got

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: TheOtherCliff on August 21, 2016, 10:17:47 pm
OP GPS V9 and DJI/Naza GPSs use boardrotation of 0,0,0 if they are mounted with the arrow pointing forward.  Most other I2C aux mag (two cables, arrow forward) need board rotation set to either:
= 180 pitch
= or 180 roll and 180 yaw
(these two are actually the same 3D rotation)

Low satellite count can be caused by several things.
- some transmitter is close to the GPS.  FPV transmitters are bad for this, but even a normal RC receiver does telemetry transmission, so test for this by powering off all possible transmitters.
- indoors, sometimes I get a good fix indoors and sometimes no fix.
- signal is blocked from above by some metal or carbon.
- weather, especially with big water filled clouds.
- configuration can say whether to use just USA GPS or also use e.g. Glonass
- some GPSs can't receive Glonass even if configured to
- extra Glonass, etc satellites can make a big difference in the satellite count, but that doesn't help as much as you hope.
- I actually find that older Neo6 GPSs with the bigger antenna do a good job with less satellites.
Title: Re: Revo AuxMag
Post by: Jhinta on August 21, 2016, 10:58:19 pm
I know for sure my setup is oke . old GPS seeing ~7 in house where the clone only sees ~5 outside. Its a faulty GPS unit (needed to bypass filters as it otherwise doesn't work) but still bad.

And I do know a lot about GPS  . not as much as you that is,  but more then average. End settings already done . GPS is just bad.

Reverting to old setup but Mac problems (startup problem if gps-mac and high current for mb-mac ) but GPS works . will get a new one. Think I will go for a real one.

Also some info about pull up resistors but the board isn't the same have a Chinese revo clone Would like to correct the smd resistors. But board looks div. So will just keep it simple ( get a real one)



Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: TheOtherCliff on August 24, 2016, 02:25:00 am
Neo6 GPS sees only USA GPS satellites, so count is lower
Neo7+ GPS sees USA GPS plus other satellites that Neo6 simply does not see.

So that alone will cause two good, working GPSs to show different sat counts.
Title: Re: Revo AuxMag
Post by: Jhinta on August 24, 2016, 06:14:11 am
Neo6 GPS sees only USA GPS satellites, so count is lower
Neo7+ GPS sees USA GPS plus other satellites that Neo6 simply does not see.

So that alone will cause two good, working GPSs to show different sat counts.
Even so , the sat count doesn't hold every 5sec no fix or no 3d or even lower then 5 constant in open space . if my older one is only setup to usa GPS it flawless. And its a neo m8n so its should support all 4 .

If you like I could ship it to you. You can have a look.

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: TheOtherCliff on August 26, 2016, 06:41:08 pm
The newer (Neo7+) GPS should have more sats.  If it has less than an old GPS (Neo6) then the "Neo7+" sounds broken.
Title: Re: Revo AuxMag
Post by: Jhinta on August 26, 2016, 06:55:35 pm
The newer (Neo7+) GPS should have more sats.  If it has less than an old GPS (Neo6) then the "Neo7+" sounds broken.
They are both neo m8n , were one doesn't even work if filter is enabled . and my older one work flawless no Mather witch setting is used. I even connected it to ublox center . is just crap . ( just DOA hardware )

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: TheOtherCliff on August 26, 2016, 07:18:50 pm
PFD Isn't Level When You Set Up INS13 for GPS Flight

When setting up a new GPS quad it doesn't look level in the PFD/HUD.  Here is the reason and a calibration procedure that fixes this.  This procedure assumes that you are using aux mag only "AuxOnly" (not OnboardOnly or Both).  Actually, it will probably work with "Both", but I haven't tested that.

I think it's a good idea to have Attitude mode on the flight mode switch for use in emergencies.  If you use Attitude mode and adjust this leveling issue with just "Rotate Virtual" and then switch from INS13 back to Basic (or Basic to INS13), it will drift.  Basic needs one trim and INS13 needs a different trim.  The adjustment discussed here will make it level whether you are using INS13 or Basic, without recalibrating each time you change INS13/Basic.

The Reason It Isn't Level
When using Basic Attitude Estimation Algorithm (Configuration->Attitude->Settings->AttitudeEstimationAlgorithm), otherwise known as Complementary Filter (this is the version used by CC3D), you are only using the accels to tell you what is level.  When you switch to INS13, you are using the mags as an additional source of leveling information.  The direction of the mags changes according to your location on earth and is approximated by the use of the World Magnetic Model in the flight code.  For instance, where I am in the USA, the mags point about 62 degrees down.  Close to the equator, the mags point about zero degrees down.  The accels say "down is this way", and when you add the mags, the combination of accels and mags says that down is in a little different direction.

The Calibration Procedure
Use Basic Attitude Estimation Algorithm (Configuration->Attitude->Settings->AttitudeEstimationAlgorithm) with Attitude mode and adjust Rotate Virtual (Configuration->Attitude->Settings->RotateVirtual) for a motionless hover.  If it is drifting forward, you subtract from pitch.  If it is drifting left you subtract from roll.  Etc.
Then use INS13 Attitude Estimation Algorithm with Attitude mode and adjust aux mag orientation (Configuration->Attitude->Magnetometer->AuxMagOrientation) for a motionless hover.  If it is drifting forward, you subtract from pitch.  If it is drifting left you subtract from roll.  Etc.

Notes
Your blue "Aux Mag Orientation Help" bars won't be all zero any more.  That's not a problem.  In the real world sense, the aux mag is now aligned more accurately than the onboard mag.
The OnBoard mag doesn't have an adjustment, so this only works for AuxOnly.  It probably works for "Both", but that isn't optimal.
To avoid this issue, the World Magnetic Model would have to be perfect, the mags and accels would have to be calibrated perfectly, and the aux mag would have to be perfectly aligned to the model.  Even with all that, there are some models (e.g. helis and tricopters) that are not level when they hover, even if built perfectly and those would still have this leveling issue.
Title: Re: Revo AuxMag
Post by: tech360 on August 28, 2016, 10:24:00 pm
A question about compass drift:

I have my Revo 450 quad running better now, green across the board and a good, steady hover, but... I'm seeing a constant drift on the compass. If I calibrate everything and have the quad sitting on a level surface (not armed, no props, no interference, green board) I can watch the compass drift by about 1 degree to the East every 20 seconds or so. After a few minutes the heading can be 5 or 10 degrees off (always to the East) and counting. If I power-off and then power-up, then the compass snaps back to North but will start drifting again.

I'm using the M8N with the AuxMag connected to the I2C bus and the latest (Next) branch. M8N is mounted on a 8-inch fibreglass post and seems to be otherwise unaffected by power and motors (all cables twisted and routed away from mast).
Attitude Estimation Algorithm is set to "Complementary+Mag+GPSOutdoor" – seems to get the most stable results so far while I work my way up to INS13. To monitor flights I'm using OPLink at the ground station connected to Bluetooth which is paired either to my Mac (while at my desk) or to an Android tablet running LibrePilot2Go (while in the field).

Is this a calibration issue? Is it a hardware issue? Interference? Anyone have any advice or thoughts?

Thanks for the help!
Title: Re: Revo AuxMag
Post by: chromvis on August 29, 2016, 12:14:21 am
Hi,
I am not sure, but "Complimentary+Mag+GPS" I think does not include GPS and Mag in attitude evaluation and does not use EKF (may be developers could correct me). I do not see much reason to use this settings unless you are using CC3D FC.
Drift simply means discrepancy in in magnetometers calibration. There are some sort of a bug currently in "next" which requires work-around during calibration (https://forum.librepilot.org/index.php?topic=2187.0 ). Read recommendation by TheOtherCliff.
Title: Re: Revo AuxMag
Post by: tech360 on August 29, 2016, 01:26:53 am
Thank for the tip!

I'll give it a try tonight once my batteries finish recharging (and before it gets too dark out).
Title: Re: Revo AuxMag
Post by: tech360 on August 29, 2016, 02:15:27 am
Tried your workaround https://forum.librepilot.org/index.php?topic=2187.0 (https://forum.librepilot.org/index.php?topic=2187.0) and while it didn't fix the drifting compass, it did give a perfect calibration, best setup I've had so far.

The PositionHold was rock solid, no drifting, no oscillations – perfect. VelocityRoam was still a bit skittish but I was happy with the results.

Hope to start INS13 testing this week. Thanks for the help.
Title: Re: Revo AuxMag
Post by: TheOtherCliff on August 29, 2016, 11:19:29 am
A question about compass drift:

I have my Revo 450 quad running better now, green across the board and a good, steady hover, but... I'm seeing a constant drift on the compass. If I calibrate everything and have the quad sitting on a level surface (not armed, no props, no interference, green board) I can watch the compass drift by about 1 degree to the East every 20 seconds or so. After a few minutes the heading can be 5 or 10 degrees off (always to the East) and counting. If I power-off and then power-up, then the compass snaps back to North but will start drifting again.

I'm using the M8N with the AuxMag connected to the I2C bus and the latest (Next) branch. M8N is mounted on a 8-inch fibreglass post and seems to be otherwise unaffected by power and motors (all cables twisted and routed away from mast).
Attitude Estimation Algorithm is set to "Complementary+Mag+GPSOutdoor" – seems to get the most stable results so far while I work my way up to INS13. To monitor flights I'm using OPLink at the ground station connected to Bluetooth which is paired either to my Mac (while at my desk) or to an Android tablet running LibrePilot2Go (while in the field).

Is this a calibration issue? Is it a hardware issue? Interference? Anyone have any advice or thoughts?

Thanks for the help!

I don't think compass drift is an issue when using INS13.  It may be that "Complementary+Mag+GPSOutdoor" only uses mag for GPS flight.

I would guess that you can at least slow the drift down by doing a thermal calibration.
Title: Re: Revo AuxMag
Post by: TheOtherCliff on August 29, 2016, 11:29:05 am
VelocityRoam was still a bit skittish but I was happy with the results.

VelocityRoam is ... that way ...

The reason is that you are commanding velocity.  Imaging driving your car.  When doing 99kph you command 100kph.  Not much change, so it is smooth.  Now when you are stopped, you command 100kph.  It is impossible to instantly jump to 100kph, so the best the car can do is use full throttle till it gets to 100kph.

If you suddenly tell the quad to do 5mps the best it can do is bank to max bank angle and hold that till it gets to 5mps.  The way to make is smooth is to slowly move the stick so you don't jump to 5mps, but slowly go 012345 mps.
Title: Re: Revo AuxMag
Post by: tech360 on August 29, 2016, 04:47:00 pm
TheOtherCliff: Thanks for the explanation about VelocityRoam, that describes it well. It makes sense when you think about it. And you could be right about the thermal calibration, I've always skipped that step so I'll go back and try it out to see if helps with the compass drift.

I tried switching to INS13 last night but the results were not encouraging. With the drone flat on the table and all calibrations done under INS13 outdoors away from potential interference, the PFD and compass were gyrating wildly all over the place. This is with a satellite lock on 13 to 15 sats. So I guess that I have some further reading to do to better understand this mode. If it were easy then it wouldn't be fun  :)
Title: Re: Revo AuxMag
Post by: TheOtherCliff on August 30, 2016, 05:54:55 am
Read aux mag wiki about board rotation.  For I2C aux mag (Pixhawk, two cables) you should use 180 pitch.
Title: New Magnetometer tab in Attitude section of GCS in Next builds
Post by: ggrif on September 01, 2016, 02:51:49 am
Feeling my way through all the new capabilities in Next 996, came across the new Mag tab, and managed to center all values.  Previous to Zeroing I had calibrated both on-board and aux mags.

Just curious if the wide spread in roll, pitch, yaw values means anything?

Title: Re: New Magnetometer tab in Attitude section of GCS in Next builds
Post by: f5soh on September 01, 2016, 07:11:30 am
Hi,

This strange orientation values do not make sense.
See this post for the workaround about the calibration issue, maybe related:
https://forum.librepilot.org/index.php?topic=2187.msg15708#msg15708

Topic moved
Title: Re: New Magnetometer tab in Attitude section of GCS in Next builds
Post by: ggrif on September 01, 2016, 03:10:52 pm
Hi,

This strange orientation values do not make sense.
See this post for the workaround about the calibration issue, maybe related:
https://forum.librepilot.org/index.php?topic=2187.msg15708#msg15708

Topic moved

OK, will do. Revo is mounted forward and rotated 90 degrees, V9 is centered in X frame on 7" pole.

Plan to eventually place V9 directly above Revo as this has worked well for me in past.
Title: Re: Revo AuxMag
Post by: ggrif on September 01, 2016, 04:09:49 pm
Perfect now.   ;D

I think?
Title: Re: Revo AuxMag
Post by: TheOtherCliff on September 04, 2016, 05:33:34 am
You should be trying to get it to be zero no matter what angle you tilt the quad.

I bet you only get those zeros with those strange numbers when the quad is level.
Title: Re: Revo AuxMag
Post by: ggrif on September 07, 2016, 12:33:09 am
You should be trying to get it to be zero no matter what angle you tilt the quad.

I bet you only get those zeros with those strange numbers when the quad is level.

OK, didn't know about tilting the quad, need to read through the whole thread.

Sorry, but what "strange numbers"?
Title: Re: Revo AuxMag
Post by: ggrif on September 08, 2016, 04:40:47 pm
OK, now I got it!  Zero's no matter the orientation.

Always helps to read the whole thread, no matter how painful.


Title: Re: Revo AuxMag
Post by: ggrif on September 16, 2016, 10:38:01 pm
Why would Aux Mag Orientation change from one day to the next?  :o

Twice now, following an erase and upgrade (on the same frame, same components, same layout), I've initially had to set yaw to +90 to obtain all zero's in the bargraphs. V9 GPS arrow facing front of quad.  Revo rotated -90. Both mags calibrated with no errors.  Performed auto tune (way cool btw) and continued to fly 'til battery depleted. 

Next batt checked mags, both consistently green, BUT  X=32, Y=10, Z=-2.  Changed yaw orientation from 90 to 0, all bargraphs now at zero, any orientation.

Still trying to Grok all the new stuff.
Title: Re: Revo AuxMag
Post by: TheOtherCliff on September 24, 2016, 06:39:43 pm
Why would Aux Mag Orientation change from one day to the next?  :o

Twice now, following an erase and upgrade (on the same frame, same components, same layout), I've initially had to set yaw to +90 to obtain all zero's in the bargraphs. V9 GPS arrow facing front of quad.  Revo rotated -90. Both mags calibrated with no errors.  Performed auto tune (way cool btw) and continued to fly 'til battery depleted. 

Next batt checked mags, both consistently green, BUT  X=32, Y=10, Z=-2.  Changed yaw orientation from 90 to 0, all bargraphs now at zero, any orientation.

Still trying to Grok all the new stuff.

It sounds like it needed a reboot, maybe after setting "rotate virtual" and before checking mags?

If you can give steps to recreate we can at least include instructions to avoid this issue.  :)
Title: Re: Revo AuxMag
Post by: ggrif on September 26, 2016, 06:44:26 pm
Tried 3 upgrade erase/calibrate sessions so far. And, of course, I can't replicate the issue  :-\
Will post if I see problem again.

Question, a little off topic but relevant I think, I've been doing a lot of bench work lately to try to understand better how all this works.  I've noticed while monitoring the flight data screen while a test frame sits stationary on a plastic trash barrel in the street in front of my house that the GPS health gadget turns black with a red x fairly frequently, once every minute or two. Are these dropouts normal?  I've seen it with  BG Revo/OP V9, OP Revo/OP V9, and Sparky2/genuine Naza. Plan to test with Nano and Falcon soon.
Title: Re: Revo AuxMag
Post by: TheOtherCliff on October 18, 2016, 07:13:41 pm
Red X is supposed to mean "hardware problem".  The only way I can think of that it would be intermittent would be intermittent bad data.  Bad power might cause that.  Also, changing the GPS autoconfigure for ubx/OP GPS's can cause it.  Some kinds of the clone DJI GPSs send a lot of bad packets (like about 1 per second), but work OK with the packets that get through.  Are you using a switching BEC (efficient but noisy) or linear BEC (inefficient, hot, but clean power).  Also, if you have any kind of transmitter in the aircraft, you might switch it off for a test.  Even modern RC receivers transmit data back to the transmitter.  Just things to test.
Title: Re: Revo AuxMag
Post by: Jhinta on October 20, 2016, 08:34:15 pm
Finaly got a working dji protocal clone gps unit, just a Q,
does ubxgnss setting work? or is it usa only ? or do i need to change it with ublox center?
Title: Re: Revo AuxMag
Post by: f5soh on October 20, 2016, 08:49:22 pm
You cannot change settings while you the Naza GPS.
Between the Ublox module and output lines, there is a CPU.
I doubt you can change something using Ucenter, and if changed, the internal CPU will erase your custom settings at next boot.
Title: Re: Revo AuxMag
Post by: Jhinta on October 20, 2016, 09:13:27 pm
You cannot change settings while you the Naza GPS.
Between the Ublox module and output lines, there is a CPU.
I doubt you can change something using Ucenter, and if changed, the internal CPU will erase your custom settings at next boot.
I get the cpu part , but what setting are used ? Wat i realy want to know is witch sats are used (usa only?)

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: f5soh on October 20, 2016, 10:05:08 pm
According to the numbers of sats you have, you can know if Russian sats are used or not.
Title: Re: Revo AuxMag
Post by: Jhinta on October 20, 2016, 10:10:37 pm
According to the numbers of sats you have, you can know if Russian sats are used or not.
why didn't I comeup  with that . Still have to do outside test raining for the last days. Tnx

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Got Them Aux Mag Problems!!
Post by: jtrout19 on November 13, 2016, 06:01:16 am
Thought you guys would find this amusing. I am making a bit longer of a shaft just in case I am having issue in that area! Only about a couple inches.
Title: Re: Revo AuxMag
Post by: Vertigo1206 on November 20, 2016, 06:48:15 pm
Hello,

As my (complete own build) copter fly quit well wit the revolution board and without GPS I tried to activate GPS.
Added the wires to GPS for I2C of mag sensors.
connect GPS to main port and aux. mag to Flexi port.

But now there is the problem. If I Connect the GPS to the main port it is not recognized anymore.
When I connect the GPS to Flexiport the Revo board recognize the GPS without any problems, outside I get satellites and GPS went to "Green" on flight data.
If I switch GPS back to main port it is not recognized any more.
Aux Mag. Sensors on Flexi are working...

any ideas?
Title: Re: Revo AuxMag
Post by: Jhinta on November 20, 2016, 07:01:34 pm
1 when using langer cables is Just More negatief for i2c
2 using i2c and gps can give problems because of to Low pullup resistors .
3 the best i Have found to work is Just use a dji clone you dont Have those problems
4 and it doesnt Mater witch Port your using aslong as it work

And your problems seem to be startup init of i2c Read past info thats why dji protocol is recommended


Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: Vertigo1206 on November 20, 2016, 08:22:58 pm
also when I disconnect aux Mag. from Flexi port, the GPS is not working on main port
I also tried disable flexi port
Title: Re: Revo AuxMag
Post by: Jhinta on November 20, 2016, 08:31:14 pm
Disable i2c and test Both ports if they are working Just normale gps mode Does that work ? So No i2c enabled !

If Yes you Have problems with startup
When i2c is enabled

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: TheOtherCliff on November 20, 2016, 08:38:22 pm
I would start with GPS working and mag disabled.

Then move the GPS to Mainport and get it working.

To move the GPS all you should have to do is move the plug to the other port and set it up that way Configuration -> Hardware tab.

Then get the aux mag working on Flexiport.
Title: Re: Revo AuxMag
Post by: Vertigo1206 on November 20, 2016, 10:22:00 pm
I already tried it with disabled I2C on flexi port.
this was my first try. please find attached a screenshot.

usually I had a S-Bus receiver on main port, therefore main port should work.
Title: Re: Revo AuxMag
Post by: Jhinta on November 20, 2016, 10:43:34 pm
I already tried it with disabled I2C on flexi port.
this was my first try. please find attached a screenshot.

usually I had a S-Bus receiver on main port, therefore main port should work.
And with the other Port its working ? That pic is showing that nothing is connected ( bad cables , solder , bad Port )

Verstuurd vanaf mijn LG-D855 met Tapatalk

Title: Re: Revo AuxMag
Post by: TheOtherCliff on November 21, 2016, 12:01:29 am
Use a magnifying glass to look inside the Revo Mainport for bent pins.  I bet that is the problem, and the Mainport does not work at all.  A bent over pin can be straighted with an #11 Xacto to move it a little to start with, then very very very thin needlenose pliers or hemostat to clamp over the pin to straighten it.

Also, I fixed a clone Revo for a friend that had a tiny solder short on Mainport.  The tiny chip with the protection components close to the connector.
Title: Re: Revo AuxMag
Post by: Spz0 on November 22, 2016, 07:49:44 pm
I'm having an issue and I just want to make sure that I have things hooked up right before proceeding with my troubleshooting. I have an m8n GPS and have soldered wires for my mag (see pics - red is "scl", black is "sda"). I have them pinned up on the jumper in slot 3 and 4 respectively (see pic). I'm running a Revo mini. I'm getting Aux mag not found when connected to flexi using I2c protocol. Using latest gcs (16.09 I believe - not at home to verify). Im wondering a couple things. Could the fc not be sending enough power to the GPS to power both (as I am not using an ext 5v bec, I'm powering through the fc). Or maybe I'm pinned wrong?
Can someone shed some light on the situation for me?
Thanks in advance! (http://uploads.tapatalk-cdn.com/20161122/bb5655b08ce92725b27908c1b0fc7b74.jpg)(http://uploads.tapatalk-cdn.com/20161122/5d7cf52e7eba38d0e291792ee5311fa8.jpg)(http://uploads.tapatalk-cdn.com/20161122/ac0944899c7ed2f83878bdc78e91fd9b.jpg)(http://uploads.tapatalk-cdn.com/20161122/8770f8123dfc62d1482ea9072c606aeb.jpg)

Sent from my SAMSUNG-SM-N920A using Tapatalk

Title: Re: Revo AuxMag
Post by: jtrout19 on November 22, 2016, 08:39:18 pm
Have you tried swapping wires in your connector just to see. I know it can be easy to do it backwards.
Title: Re: Revo AuxMag
Post by: f5soh on November 22, 2016, 09:19:49 pm
Most GPS that comes without I2C mag wires seems defective.

Not sure if this is a picture effect but looks like the mag chip is not soldered in a right place, use a magnifier and check if all pins are placed right compared to the pads.
Chip case seems shifted to the left.
Title: Re: Revo AuxMag
Post by: Spz0 on November 22, 2016, 09:52:39 pm
Most GPS that comes without I2C mag wires seems defective.

Not sure if this is a picture effect but looks like the mag chip is not soldered in a right place, use a magnifier and check if all pins are placed right compared to the pads.
Chip case seems shifted to the left.
(http://uploads.tapatalk-cdn.com/20161122/0c776bc7e236cb605996d0075a52e9fc.jpg)

Excuse the ignorance but is this the mag?
It is on point and solder joints are good as far as I can tell

Sent from my SAMSUNG-SM-N920A using Tapatalk

Title: Re: Revo AuxMag
Post by: Jhinta on November 22, 2016, 10:28:45 pm
Nope  l88e is , thats your gps, also try swapping Red and Black cable

Verstuurd vanaf mijn LG-D855 met Tapatalk
Title: Re: Revo AuxMag
Post by: f5soh on November 22, 2016, 10:31:32 pm
(https://forum.librepilot.org/index.php?action=dlattach;topic=1110.0;attach=4639)
Title: Re: Revo AuxMag
Post by: Spz0 on November 23, 2016, 03:55:39 am
(https://forum.librepilot.org/index.php?action=dlattach;topic=1110.0;attach=4639)
It is shifted a little but all the solder points are good. I'm perplexed. Gonna run some more tests tonight, and maybe provide an external 5v power source to the GPS.
Will post results!

Sent from my SAMSUNG-SM-N920A using Tapatalk

Title: Re: Revo AuxMag
Post by: Spz0 on November 23, 2016, 04:20:57 am
Here is :

https://www.youtube.com/watch?v=o4V_ZGG0Hk0
Is there a translation for this? Or a similar tutorial?

Sent from my SAMSUNG-SM-N920A using Tapatalk

Title: Re: Revo AuxMag
Post by: TheOtherCliff on November 23, 2016, 04:37:41 am
https://librepilot.atlassian.net/wiki/display/LPDOC/Setting+Home+location
Title: Re: Revo AuxMag
Post by: undermeadow on November 27, 2016, 06:12:35 pm
Hello, I have little problem with the Mag calibration process. I am using GCS 16.09 RC2 at Win10 tablet. I followed the instructions from this forum started the Mag calibration, "skip" the 5 steps and at the last step I pick up my quad and do the calibration dance (like on the ArduCopter Calibration video) than save the last step but nothing happened - the GCS is stuck - Not Responding and I have to kill the GCS. When I try to calibrate it the way that I just very quickly rotate it chaotically and hit the save button then it is ok, the mag is green and I can fly with occasional Mag warning. But I think that it is not properly done.
Is there some time limit for the calibration step?
Title: Re: Revo AuxMag
Post by: f5soh on November 27, 2016, 06:28:13 pm
Quote
Is there a translation for this? Or a similar tutorial?

All steps are described with english comments.

Quote
s there some time limit for the calibration step?
There is no time limit.
Sounds like a connection lost between computer and board while calibrating.
Title: Re: Revo AuxMag
Post by: Mateusz on November 27, 2016, 07:19:34 pm
(https://forum.librepilot.org/index.php?action=dlattach;topic=1110.0;attach=4639)
It is shifted a little but all the solder points are good. I'm perplexed. Gonna run some more tests tonight, and maybe provide an external 5v power source to the GPS.
Will post results!


Not sure how good are you with embedded electronics, but I would try power gps from Arduino and try to read whoami register over i2c bus using Arduino. Plenty tutorials online. That would be independent check if your mag is functioning.

But first check wiring http://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration

End of page table shows wiring.
Title: Re: Revo AuxMag
Post by: Jhinta on January 07, 2017, 04:57:45 pm
finaly got it full working, used a i2c mag .
for some reason the dji clone didnt work well with the mag have to retest it.
also i would to like to know witch gps they use , as my current one sees like 10+ (gps/and other forgot the name )
if they only use gps , i thing i will keep it like this
Title: Re: Revo AuxMag
Post by: TheOtherCliff on January 09, 2017, 10:50:50 pm
I think that the authentic DJI GPS uses generation #6 Ublox GPS.

Most all the other brands, including clone DJI GPS use generation #8 Ublox GPS.

The older GPS version can only see USA GPS satellites.  The newer GPS version can use other countries' versions of GPS, notably Russian satellites, so the clones are better in that regard.  The clone that I bought has two firmware problems and one hardware problem though.  I wrote the DJI driver, so I did a lot of overnight testing.  :)

I fly (or have flown a lot) OP GPS (several versions), APM, PixHawk, DJI (authentic and clone) and they all work, even the DJI clone with the problems has only had a noticeable issue once, and I switched to Attitude mode to land it.

To switch to a different brand of GPS, you must change both the GPS type and the mag type.  Maybe that is the issue you had.
Title: Re: Revo AuxMag
Post by: Jhinta on January 09, 2017, 11:09:44 pm
I think that the authentic DJI GPS uses generation #6 Ublox GPS.

Most all the other brands, including clone DJI GPS use generation #8 Ublox GPS.

The older GPS version can only see USA GPS satellites.  The newer GPS version can use other countries' versions of GPS, notably Russian satellites, so the clones are better in that regard.  The clone that I bought has two firmware problems and one hardware problem though.  I wrote the DJI driver, so I did a lot of overnight testing.  :)

I fly (or have flown a lot) OP GPS (several versions), APM, PixHawk, DJI (authentic and clone) and they all work, even the DJI clone with the problems has only had a noticeable issue once, and I switched to Attitude mode to land it.

To switch to a different brand of GPS, you must change both the GPS type and the mag type.  Maybe that is the issue you had.

is there a source? (arduino?)
the one i have clearly doesnt work , rotating gps does almost nothing (power my smoker -> sould spike where is does only +/-1) have one of a friend where you clearly can see it spiking.
i just have realy bad luck ordering.
this one i got and not working just for ref ( https://nl.aliexpress.com/item/2016-HOT-OCDAY-NEO-M8N-GPS-Compatible-for-DJI-NAZA-Lite-V1-V2-Flight-Controller-SEP/32728812578.html )

but did go for ex-i2c mag and is fully working , but 1 port missing by that ( hoping one will ad x-bus-srxl  once its released :P)
Title: Re: Revo AuxMag
Post by: TheOtherCliff on January 11, 2017, 08:47:55 pm
is there a source? (arduino?)
the one i have clearly doesnt work , rotating gps does almost nothing (power my smoker -> sould spike where is does only +/-1) have one of a friend where you clearly can see it spiking.

Sorry.  I don't understand what you are asking.  :(
Title: Re: Revo AuxMag
Post by: Jhinta on January 11, 2017, 09:00:26 pm
is there a source? (arduino?)
the one i have clearly doesnt work , rotating gps does almost nothing (power my smoker -> sould spike where is does only +/-1) have one of a friend where you clearly can see it spiking.

Sorry.  I don't understand what you are asking.  :(

arduino source so i can add gps en mag to a arduino and arduino to revo
somwthing like this https://oshpark.com/profiles/Pawelsky
Title: Re: Revo AuxMag
Post by: TheOtherCliff on January 11, 2017, 09:06:51 pm
It's my understanding that the source for that is closed and copyrighted.  The Chinese took it anyway and that is why we have DJI GPS clones.  There may have been a hex file or other binary available at some time.  I don't know more.

Most people just by a DJI GPS.  Clones are about $28 and authentic are about $38.

You can also buy the Arduino powered adapter with code already in it.

All these can be found on eBay by searching something like:
DJI GPS
Title: Re: Revo AuxMag
Post by: TheOtherCliff on January 11, 2017, 09:08:08 pm
Pawelsky was active on RCGROUPS too.  That is where I saw a thread on this stuff.
Title: Re: Revo AuxMag
Post by: hwh on January 12, 2017, 01:53:11 am
Cliff's right, the firmware was written by Pawelsky and released on rcgroups as a hex file only.  He specifically stated he didn't want it used commercially.  The Chinese ignored him, copied the idea and design of his adapter and the hex file itself, and put out the clones.  This upset him (and rightly) and he doesn't like the clone gps units.   They do run his unmodified hex file. 

Back last year when Cliff was working on adding support for these GPS into LP I contacted Pawelsky and asked if he'd consider releasing the source code and he said no.  I don't know if he's changed his mind since then.

Even if you had the source it's hard to update the firmware in the clones, most of the time the Chinese don't burn an Arduino boot loader on them so you have to use an actual Atmel programmer to update them.

The thread over there is https://www.rcgroups.com/forums/showthread.php?2290346-Naza-v1-v2-Lite-GPS-module-alternative-(using-APM-2-6-GPS-compass-combo)
Title: Re: Revo AuxMag
Post by: gon on May 03, 2017, 02:37:21 am
Hi!
I'm trying to use the aux mag from my Ublox M8 (https://www.amazon.es/gp/product/B01FXD4BFS/).
The GPS works pretty well, but I'm not able to read the mag through I2C.
I've followed this indications https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration (https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration) and did all the connections properly, (including the connection of the battery before usb) but when I connect the usb, the I2C symbol in the System Health is in black with the red cross saying that the I2C has timed out. The STAB is blinking from green to black with the red cross each second (I guess due to the mag missing)

The mag's wires from the I2C bus were already in the gps when I bought it, I didn't solder anything. To discard it is a problem with the unit, I tried to connect it to an Arduino through I2C and I was detecting the device and even reading the mag without any problem. So I'm pretty sure the GPS+Mag is perfectly fine.

I've also tried to connect the Arduino to the Revo through I2C to see if it detects the fc without success, so I think the problem comes from the Revo board (Using 16.09 build).

What could I try to check if the I2C is working on the Revo side? The UAVO say:

I've been trying to fix this these last days without success, would love to get some ideas! :)
Title: Re: Revo AuxMag
Post by: gon on May 03, 2017, 12:16:14 pm
Okay I think the problem comes from my Flexi port. I used it before for telemetry and worked fine with an arduino, so this is why I thought the port wasn't faulty. But I've tried again for telemetry and it doesn't work anymore.

Is it possible that something has broken inside this port? Is there any way to fix it or change it?

Thanks
Title: Re: Revo AuxMag
Post by: TheOtherCliff on May 05, 2017, 07:44:07 pm
One common problem is that a pin inside the FC connector has bent over sideways.  I have very thin needle nose pliers that I have fixed this with.  First a #11 Xacto blade to get the bent pin centered a bit more and then needle nose pliers to clamp it straight again.

If that isn't it, look over it for crash damage in that area.

I had a new board come with a badly soldered connector that I had to resolder.  Maybe a weak joint broke.

Does it have power coming out?  There are functions that transmit only or receive only so as long as it isn't + or -, you might find that it is still OK for some things.
Title: Re: Revo AuxMag
Post by: gon on May 06, 2017, 07:09:32 pm
It has power coming out, but I don't see any visible flaw.

But the HobbyKing team has returned me the money and I bought a new one! (Very happy with their aftersales service)

Thank you anyway!
Title: Re: Revo AuxMag
Post by: pemil on April 29, 2018, 06:41:00 pm
Hi, First big Thanks for all the work everyone has put into this project.
I'm a beginner and just build my first 180quad using a revolution fc with Ublox M8N GPS and tried external HMC5883L mag with some issues. Main problem was the mag itself. Now I have got an ST LIS3MDL that I have implemented from the HMC5x code working. I though have some strange behavior that I think I have seen with the HMC too.

At startup of the system the aux mag update is very slow. If I save the mag configuration with GCS after startup it seems to change the update frequency. I'm not sure what impact it has on the quad it works in both conditions though some more orange mag errors if I haven't restarted. 

Any ideas why this happens, should I be concerned?

Thanks
Patrik
Title: Re: Revo AuxMag
Post by: f5soh on April 29, 2018, 06:48:54 pm
Hi,
This is the normal behavior.
Since you do not use/look the Mag settings tab, there is no need to retrieve Mag data with fast updates.
Default rate is 10s and fast rate is 130ms.
This only applies to the board <> Gcs link, flight side still updating mag data at faster rates.
Title: Re: Revo AuxMag
Post by: pemil on May 01, 2018, 05:29:26 pm
Thanks f5soh for the answer, then I don't have to chaise that anymore :)
Another question...

This mag is able to be sampled much faster than the HMC5883 device, would I gain or lose anything by changing the ODR to any of 155, 300, 560 or even 1000Hz, I think with the HMC5883 it is set to its max (75Hz)?

Thanks
Title: Re: Revo AuxMag
Post by: TheOtherCliff on May 01, 2018, 06:18:06 pm
The gyro hardware limit is 2000 degrees per second, about 5.6 rev/sec so generally you don't ever (yes we have insane mode) go faster than that.

Furthermore, most fast fliers limit that to say 720 deg/sec = 2 RPS or slower (yes some may want faster).

The acrobatic only mode (no GPS navigation) that most people use does not even use the mag.  For GPS navigation, the current version of LP uses the 3D mag completely integrated into the attitude solution, but the next version of LP has a way of only using the mag for compass heading, so it is even less important in future versions.

At 720 deg/sec the mag sample rate of 75hz would wrong by about 5 degrees on average, and in the future release that can be limited to compass heading only.  I personally use more like 400 deg/sec so it is only off by about 2.5 degrees at max rotation rate.

These amount that it is wrong is only at the configured max rotation rate.  Of course it is very accurate when there is no rotation.  It would seem that it just isn't important that the mag may be off by 5 degrees from where it actually is, but only when spinning at the highest rate.