iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.13k stars 1.47k forks source link

magnetometer are detected but no oscillation found when tuning. (beerotor F4 & radiolink se100) problem of QMC5883? #2299

Closed chan2328 closed 6 years ago

chan2328 commented 7 years ago

FC: beerotor F4, identifier: INAV, version: 1.7.3 Running firmware released on: Sep 9 2017 10:49:35 Board: BRF4, version: 0 GPS: Radiolink SE100 (ublox M8030 with DA 5883 compass)

I can make sure that the wiring between FC and GPS is correct, and the GPS automatically detected and works fine, but the magnetometer 5883 are recognized by inav only it does not work. please see below pic. i have tried several things to do such as;

  1. decreasing the i2c speed from 400khz to 200khz or 100khz.
  2. connecting the vcc from 5V to 3.3V.
  3. connect magnetometer with vcc, scl, sda, GND only.

the results are the same, no oscillation found by mag. this is a trick when i turn the compass vertically, the oscillation will change from -0 to 0 only, and then the magnetometer will be lost. the SCL and SDA of FC are measured as 3.3V and the internal barometer works fine. i just brought them last week, is it a issue of inav, FC or mag?

mag 1 2

digitalentity commented 6 years ago

My Radiolink SE100 GPS arrived. Compass is correctly detected as QMC5883 and works correctly. @chan2328 @alanfj what board are you using? I'll provide a hex built from latest development branch and we'll check if it works for you.

digitalentity commented 6 years ago

Also #2699 will attempt QMC5883 detection before HMC5883 to avoid possible misdetection

alanfj commented 6 years ago

digitalentity, this is wonderful news! I have two large FPV photography quad drones waiting for this great new (RadiolinkSE100 compass) update for the OmnibusF4Pro board. Looking forward to the new addition! Once again, thanks!

alanfj commented 6 years ago

Konstantin, digitalentity, this is wonderful news! I have two large FPV photography quad drones waiting for this great new (RadiolinkSE100 compass) update for the OmnibusF4Pro board. Looking forward to the new addition! Once again, thanks!

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Konstantin Sharlaimovmailto:notifications@github.com Sent: Sunday, January 28, 2018 1:45 AM To: iNavFlight/inavmailto:inav@noreply.github.com Cc: alanfjmailto:alanfj@msn.com; Mentionmailto:mention@noreply.github.com Subject: Re: [iNavFlight/inav] magnetometer are detected but no oscillation found when tuning. (beerotor F4 & radiolink se100) problem of QMC5883? (#2299)

My Radiolink SE100 GPS arrived. Compass is correctly detected as QMC5883 and works correctly. @chan2328https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fchan2328&data=02%7C01%7C%7Cf3cb068919784724e1db08d5661aada1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636527187118833443&sdata=0bfBndpWm5tnUKAkQFukHHWKxhHCVe%2BnGeVxi%2Fm9cbI%3D&reserved=0 @alanfjhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Falanfj&data=02%7C01%7C%7Cf3cb068919784724e1db08d5661aada1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636527187118833443&sdata=7pJA%2B8ifdlRazNJLwL3wsfV8hMfrgDWvW4nId%2BTBwq0%3D&reserved=0 what board are you using? I'll provide a hex built from latest development branch and we'll check if it works for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FiNavFlight%2Finav%2Fissues%2F2299%23issuecomment-361042322&data=02%7C01%7C%7Cf3cb068919784724e1db08d5661aada1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636527187118833443&sdata=E5YwUgGRr8Gp4dV47pWnOjQUvJn1wj3ouWWp1yJ9Fnc%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAcryERmSrd_dDsVFMf6ZWrh5iAOePim6ks5tPBd1gaJpZM4Pyhgy&data=02%7C01%7C%7Cf3cb068919784724e1db08d5661aada1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636527187118833443&sdata=rlfd57TRVOWhsOn%2F8nrRI5b5WtbH3gICCYOf0vUMUZs%3D&reserved=0.

chan2328 commented 6 years ago

@digitalentity this is great news! I am using BeerotorF4 board.

Arvycka commented 6 years ago

Received my Radiolink TS100 today, only slightly more than 2 months after ordering it :) It's quite a bit smaller: ts100 It has the same magnetometer chip as SE100 (marked DA 5883) but here it doesn't pretend to be HMC5883 - it only works if set to "FAKE" in iNav. It also gets autodetected as "FAKE" and works right away. Only problem - it fails randomly for short periods of time, and sometimes permanently - until a reboot. Sometimes with I2C errors, sometimes without - no correlation. Tried reducing I2C speed to 100kHz - it's still failing once in a while. Mine's probably faulty :( GPS appears to work OK, haven't tried it in the open field. Sees 8 sats at home. Refresh rate 5Hz.

P.S. It has a different connector than SE100 but connector and pin-out inside the housing is the same for both.

digitalentity commented 6 years ago

@Arvycka so the big GPS/Compass mimics HMC5883 and doesn't work, right? I wonder how many of this flawed GPS units are out there...

Arvycka commented 6 years ago

@digitalentity my SE100 is recognized as HMC5883 and only works with the driver modification discussed above. They've told me they'd done that on purpose since HMC5883 had been discontinued. Maybe later they've changed that since yours is detected normally as QMC5883 and so does my TS100.

McGiverGim commented 6 years ago

There're two variants of the SE100, one with the real HMC and the other with the QMC trying to mimic the HMC. In the variant with QMC, it does not work because fails calculating the MAG GAIN. According to RadioLink it works for APM and PixHawk, so I suppose that these two systems didn't use the MAG GAIN or make it in a different manner.

digitalentity commented 6 years ago

I wonder where I can get a variant with QMC mimicing the HMC chip. I think we need a proper fix for this.

McGiverGim commented 6 years ago

In theory, all the new units come with the QMC. The HMC was in firsts batch only.

digitalentity commented 6 years ago

The thing is that new batches don't try to mimic HMC, therefore work correctly with INAV's QMC5883 driver

McGiverGim commented 6 years ago

As far I understood, TS100 does not mimic HMC, SE100 does. I'm wrong?

McGiverGim commented 6 years ago

In the specifications of TS100 it says than the mag is the QMC, in the specifications of the SE100 it says than the mag is HMC. If the mount a QMC they mimic the HMC to be compatible.

Arvycka commented 6 years ago

@McGiverGim TS100 does not mimic HMC, it's detected as "FAKE" by iNav, which I suppose means "QMC5883"

McGiverGim commented 6 years ago

Yes, I was talking about SE100 only.

McGiverGim commented 6 years ago

Only to be clear:

alanfj commented 6 years ago

digitalentity, When will there be the next release candidate for this fix? I'd like to give your release a try?

alanfj commented 6 years ago

Is there going to be a release candidate for this fix; if so when? I’d like to try it??

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Konstantin Sharlaimovmailto:notifications@github.com Sent: Wednesday, January 31, 2018 4:54 AM To: iNavFlight/inavmailto:inav@noreply.github.com Cc: alanfjmailto:alanfj@msn.com; Mentionmailto:mention@noreply.github.com Subject: Re: [iNavFlight/inav] magnetometer are detected but no oscillation found when tuning. (beerotor F4 & radiolink se100) problem of QMC5883? (#2299)

The thing is that new batches don't try to mimic HMC, therefore work correctly with INAV's QMC5883 driver

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FiNavFlight%2Finav%2Fissues%2F2299%23issuecomment-361880927&data=02%7C01%7C%7C0e45519d59214fe8bba908d56890acdd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636529892929196641&sdata=jFRiUwm3%2BTmODYAjgNtdVEAJ4rCO%2B5Uo0i8NwTcsESc%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAcryEf5J2hABlVd6fqILHbjTGCBNuKNdks5tQDhpgaJpZM4Pyhgy&data=02%7C01%7C%7C0e45519d59214fe8bba908d56890acdd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636529892929196641&sdata=pim45LImPI0HiGXSKIT7gZu0ZQzsFpkBIZj%2BELVvF1Y%3D&reserved=0.

crashfrequently commented 6 years ago

I have just received an SE100 from BG. The mag is auto detected as HMC5883 but needs the mag gain modification to the driver to make it work.

JohnWonFly commented 6 years ago

Dear Arvycka. I need your help. I and my friends construct drones. Flightcontroller omnibus f4 pro v2 and GPS module ts100mini qmc5883l. We cant do it works. two week we fight with it. I can understand how change code( delete magGain) Can you build firmware inav omnibus f4 pro v2 for gps ts100mini(qmc5883l)? If you can, you deserve professional rank buy program inav, betaflight and else. Please try to do this. We won a flight, but cant start...

giacomo892 commented 6 years ago

@Arvycka FYI "FAKE" magnetometer does what the name says. It is FAKE software simulated data not coming from the magnetometer itself!!! Be aware!

Arvycka commented 6 years ago

Oh, I assumed it's supposed to mean qmc5883l, since it's not in the GUI list, only in CLI. Why does it give me hardware error if I set it to "FAKE" when no mag is connected or a HMC5883 mag is connected? But no error with qmc5883l mag?

update: INAV configurator 1.9.1 just came out and it has a much more extensive magnetometer list in the GUI, including qmc5883... In 1.8... TS100 would autodetect and work as "FAKE"

Arvycka commented 6 years ago

@JohnWonFly My TS100 magnetometer works perfectly if set to QMC5883 in INAV configurator 1.9.1 No driver mod needed.

JohnWonFly commented 6 years ago

Yea. Last day we install new version 1.9.1 and it works. Thank you for attention. with best regards

digitalentity commented 6 years ago

So, issue is resolved. Closing.

alanfj commented 6 years ago

I just tried the latest INAV Beta 1.9 on my OmnibusF4SD using the OmnibusF4PRO target and the “compass” still does not work. I have 2 of these Radiolink SE100’s, that I bought new in January ’18, and even reversed the polarity and still get nothing. Went into CLI and made sure it was set manually to QMC5883. The “GPS” functions properly. In AUTO it is still recognized as the HMC5883.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Konstantin Sharlaimovmailto:notifications@github.com Sent: Wednesday, February 21, 2018 2:43 AM To: iNavFlight/inavmailto:inav@noreply.github.com Cc: alanfjmailto:alanfj@msn.com; Mentionmailto:mention@noreply.github.com Subject: Re: [iNavFlight/inav] magnetometer are detected but no oscillation found when tuning. (beerotor F4 & radiolink se100) problem of QMC5883? (#2299)

So, issue is resolved. Closing.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FiNavFlight%2Finav%2Fissues%2F2299%23issuecomment-367239394&data=02%7C01%7C%7Cb7379063306a484ebd4a08d578fed83c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636547958292638182&sdata=CHsXEjoM%2FX74AYXY0N8P95BPd86yc8ONS5zCKO4AG3g%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAcryEbMjjkB3Nk1iB0IldHa2VskCHM-7ks5tW8kxgaJpZM4Pyhgy&data=02%7C01%7C%7Cb7379063306a484ebd4a08d578fed83c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636547958292638182&sdata=GOg%2BRDVKUsSotlHo239Va%2FY1tn6PWfTTLGnYI4TBOhI%3D&reserved=0.

digitalentity commented 6 years ago

On some clones the QMC5883 is actually detected as HMC5883 and with latest patches will function correctly with HMC5883 driver. Please re-check.

alanfj commented 6 years ago

Just rechecked and the mag indicator in the GUI stays red. Checked the graph indicators and no movement. Mag in GUI turns green w/HMC5883 checked. I tried both SE100's, which have the DA5883 chip and still nothing. I have changed it manually in the CLI for it to be QMC5883 and still nothing, At present time until this fix is made permanent, I've been using other recommended GPS/MAG's and of course they all work fine. I know you and your team of experts will eventually fix it. :)

digitalentity commented 6 years ago

@alanfj set to AUTO, let it autodetect and check if compass works.

alanfj commented 6 years ago

OK, I'll try it again.

alanfj commented 6 years ago

Re-flashed OmnibusF4SD FC to target OminbusF4PRO Beta 1.90 and in AUTO, MAG light goes blue, showing it as HMC5883, yet there is still no movement in graph. When change to FAKE, I get a red MAG light, and when changed manually in CLI I get a red MAG light and get nothing. I have 2 of these I got at the same time and get the same results on each. Even tried reversing the I2 leads and get nothing.

Arvycka commented 6 years ago

Same for me - inav 1.9.0, mag is detected as HMC5883, output is 0.

digitalentity commented 6 years ago

@alanfj @Arvycka my bad, https://github.com/iNavFlight/inav/pull/2809 was merged after RC1 was released. Stay tuned for RC2 which should be ok.

alanfj commented 6 years ago

OK, thanks digitalentity!

alanfj commented 6 years ago

(INAV 1.9 RC2) The new release works! The Radiolink SE100 is working flawlessly. Set it to AUTO and seen as HMC5883. Set to 270FLIP. Altitude-Hold w/ Position-hold is rock solid steady! It does not flinch an inch. Great job digitalentity! Thank you!

karl03 commented 6 years ago

Just wanted to give my experience. I have this gps on a 550 hexcopter and it was unusable on 1.8. I gave up on it for a while until I Found this thread. After updating to 1.9.1 it is working perfectly. Thank you very much to the inav devs :)