Magnetometer/compass - hardware connection, full software setup, and calibration in Betaflight

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 59

  • @alexeysushko
    @alexeysushko Год назад +3

    Exactly what is needed. Connected M8Q-5883 to Mamba Basic F405 and didn't see the magnetometer. When setting "set mag_i2c_device=1" everything worked! Thanks!

  • @thematerwelon178
    @thematerwelon178 Год назад +2

    THANK YOU!!! I've been struggling with getting my compass to work correctly for almost a year now, and your tutorial just made it happen.

    • @i3Drones
      @i3Drones  Год назад

      If you like it smash the like button, if other videos from my channel doesn't like you smash two time the dislike button - but overall subscribe! ;-)

  • @Fedablio
    @Fedablio Год назад

    Excellent job! 😀

    • @i3Drones
      @i3Drones  Год назад +1

      If your magnetometer is placed in a specific position be aware of "MAG Alignment" drop down box in the GUI. Go to the Configuration tab in Betaflight Configurator, you will see a section on the right called "Board and Sensor Alignment". At the bottom of that section you will see a "MAG Alignment" setting.Or you can do by using the CLI commands:
      align_mag = CUSTOM
      mag_align_roll = xxxx
      mag_align_pitch = xxxxx
      mag_align_yaw = xxxxx
      and in the end calibrate.

  • @shotbyarian
    @shotbyarian 6 месяцев назад

    if/when you have time, i would love a redo of this video for betaflight 4.5 since a lot has changed, thanks a lot!

  • @OneTakeFPV
    @OneTakeFPV Год назад +3

    thx for your tutorial. In betaflight 4.3.0 mag_declination got removed because its unused....

    • @i3Drones
      @i3Drones  Год назад

      Thank you! Please suppors as you can ...

  • @felipee4319
    @felipee4319 Год назад

    Thaaankksss !!

  • @doro4414
    @doro4414 3 месяца назад

    what if I do not have separate SDA and SCL pads?

  • @levshx
    @levshx Год назад

    for good quality, you must adjust the sensor yourself.
    align_mag = CUSTOM
    mag_align_roll = xxxx
    mag_align_pitch = xxxxx
    mag_align_yaw = xxxxx
    and calibrate after setting the correct location

  • @gregstewart4692
    @gregstewart4692 Год назад +1

    Hey, I appreciate this information. The magnetometer never seems to show with any FC, or when there is clearly a device using it like a GPS and Compass combined. I just tried entering the settings you guided me to use with the JBF7 v2 with BF 4.3.1. "Magnetic declination" is not recognized as a valid command. Anyway, I entered what I thought were the correct settings and BF is saying that I now have 8 i2c errors. I made the mistake of not saving a dump before I started this. After 4&1/2 years you would think I know better. I did save a "diff all" though, so I am going to reflash and put my settings back in. How can I know what is correct with regard to what you are doing?

  • @allwrightadventures6675
    @allwrightadventures6675 Год назад

    Quick question does the cli commands need to be given I betaflight 4.4? When I inputed them it didn't recognize the mag declination command? thanks

    • @i3Drones
      @i3Drones  Год назад

      You must downloading a software version for your FMU that does have the magnetometer part incorporated.
      The new "cloud build" option allows you to select the different components you want to incorporate.
      Reading their documentation I found: "For those missing a barometer: You can try any or all of BARO_MS5611 BARO_SPI_MS5611 BARO_BMP280 BARO_SPI_BMP280 BARO_BMP388 BARO_SPI_BMP388 BARO_LPS BARO_SPI_LPS BARO_QMP6988 BARO_SPI_QMP6988 BARO_DPS310 BARO_SPI_DPS310 BARO_BMP085 BARO_2SMBP_02B BARO_SPI_2SMBP_02B in the custom defines input box."
      The link is here:
      betaflight.com/docs/release/Betaflight-4.4-Release-Notes

  • @a_fry
    @a_fry Год назад

    do you have to enter different coordinates every time you travel somewhere?

    • @i3Drones
      @i3Drones  Год назад

      Yes if you want to have an accurate determination.

  • @ourchannel8215
    @ourchannel8215 6 месяцев назад

    HMC5883L...why not support on drone...hard to fine compass module with original ic...i cant fine to buy HMC5883

    • @i3Drones
      @i3Drones  6 месяцев назад +1

      You have links here:
      www.optimusdigital.ro/ro/senzori-senzori-inertiali/5187-modul-busola-digitala-qmc5883l.html
      ardushop.ro/en/electronics/233-3-axes-magnetic-field-sensor-hmc5883.html

    • @ourchannel8215
      @ourchannel8215 6 месяцев назад

      @@i3Drones im from malaysia...many online product come from china 🥴...posible for buy from US,but its much different price...
      thanks for link 👍

  • @gregstewart4692
    @gregstewart4692 Год назад

    I just re-flashed the board and the 8 i2c errors are still present. Since I don't know what the original settings were (my mistake) I don't really know what to do. What would you suggest?

    • @i3Drones
      @i3Drones  Год назад

      I’m unfamiliar with JBF7 V2 but searching on the web (you have a very nice FMU !!!!), I found that the I2C port is shared with UART 3. So, first, disable UAR3 from the port configuration. At this point, I do not know if it is enough to activate the I2C port - maybe additional steps are required. Also, from the internet, I found that your board has a barometer - I intuit that the barometer is connected to the I2C bus (it is possible to use SPI also). So, what would I try if I were in your shoes: 1. disable UAR3, 2. Disconnect the magnetometer from I2C, 3. Set mag_bustype = NONE, 4. Set mag_hardware = NONE, 4. set mag_spi_device = 0, 5. set mag_i2c_device = 1 (for barometer). Now, use the status in CLI to see if the barometer is detected. If it is not possible to work on the SPI bus or to activate the I2C bus additional steps are required.

    • @RuderalisFPV
      @RuderalisFPV Год назад

      @@i3Drones i didnt get option for magnetic declination as a valid command either, getting a i2c error, after doing a status command in cli, using a brainfpv radix2 with a matek m8q-5883 gps

    • @i3Drones
      @i3Drones  Год назад

      @@RuderalisFPV first your barometer is detected?

  • @_mr_hyde_
    @_mr_hyde_ Год назад

    hello, i have BLITZ Mini F7 and M8Q when i type declination i have an error. Any ideas ?

    • @i3Drones
      @i3Drones  Год назад

      Please tell me the error, may be based on this I can help you.

    • @_mr_hyde_
      @_mr_hyde_ Год назад

      @@i3DronesError IN set: INVAILD NAME###

    • @i3Drones
      @i3Drones  Год назад

      ​@@_mr_hyde_ I think the problem is that you missed a letter in the command: set mag_declination. I think INVAILD NAME means that BF received a non-existent command.

  • @theandymann4433
    @theandymann4433 2 года назад

    Hi I have been having a lot of trouble setting up compass MQ8 - 5883
    With Mamba Mk4 F722
    i have tried all your settings still no luck!
    Any suggestions would be appreciated

    • @i3Drones
      @i3Drones  2 года назад

      It's far too vague what you're telling me. I can't figure out the problem.

    • @i3Drones
      @i3Drones  2 года назад

      First, check once again if the hardware connections are correctly done. SDA (controller) SDA (magnetometer) & SCL (controller) SCL (magnetometer). Check also the power lines.

    • @i3Drones
      @i3Drones  2 года назад +1

      Searching on the web I found this issue: I2C is not working on dedicated pins - so, follow the remaping procedure presented there:
      github.com/iNavFlight/inav/issues/6441

    • @theandymann4433
      @theandymann4433 2 года назад

      @@i3Drones thanks for the reply, this may be above my level as i am a newbie! will give it a go. Will it work ok with the MAMBAF722_2022B as this is a different fimware to the I2C. My Baro works fine atm i just cannot get the compass to show up?

    • @i3Drones
      @i3Drones  2 года назад

      @@theandymann4433 if I guess, it is possible to have a problem with set mag_i2c_device - try different values 1, 2, 3 or 4, it is the only one parameter that I do not understand completely. But, first power up the drone.

  • @kimeunsankim8859
    @kimeunsankim8859 11 месяцев назад

  • @maciejmotylinsky
    @maciejmotylinsky Год назад

    Commend not work on BF4.4 and controller Blitz F7 (Chimera7 V2 Pro O3)

    • @i3Drones
      @i3Drones  Год назад

      I haven't tested the controls in BF 4.4, but the controls should work without problems.
      The only problem I see is downloading a software version for your FMU that does not have the magnetometer part incorporated.
      The new "cloud build" option allows you to select the different components you want to incorporate.
      Reading their documentation I found: "For those missing a barometer: You can try any or all of BARO_MS5611 BARO_SPI_MS5611 BARO_BMP280 BARO_SPI_BMP280 BARO_BMP388 BARO_SPI_BMP388 BARO_LPS BARO_SPI_LPS BARO_QMP6988 BARO_SPI_QMP6988 BARO_DPS310 BARO_SPI_DPS310 BARO_BMP085 BARO_2SMBP_02B BARO_SPI_2SMBP_02B in the custom defines input box."
      The link is here:
      betaflight.com/docs/release/Betaflight%204.4%20Release%20Notes

  • @dantanase
    @dantanase Год назад

    Beitian Dual BN-220 GPS are compas?

    • @i3Drones
      @i3Drones  Год назад

      No, BN-220 has no compass. More, the Bn-220 is not so grate GPS - you have a study here: ruclips.net/video/QfwV7NP5BI8/видео.html

  • @myoung2761
    @myoung2761 Год назад

    Just confirming, Betaflight 4.4 does not have magnetometer support?

    • @i3Drones
      @i3Drones  Год назад

      The new "cloud build" option allows you to select the different components you want to incorporate.
      Reading their documentation I found: "For those missing a barometer: You can try any or all of BARO_MS5611 BARO_SPI_MS5611 BARO_BMP280 BARO_SPI_BMP280 BARO_BMP388 BARO_SPI_BMP388 BARO_LPS BARO_SPI_LPS BARO_QMP6988 BARO_SPI_QMP6988 BARO_DPS310 BARO_SPI_DPS310 BARO_BMP085 BARO_2SMBP_02B BARO_SPI_2SMBP_02B in the custom defines input box."
      The link is here:
      betaflight.com/docs/release/Betaflight-4.4-Release-Notes

    • @myoung2761
      @myoung2761 Год назад

      @@i3Drones you're a genius. I'm an idiot

    • @i3Drones
      @i3Drones  Год назад +1

      @@myoung2761 I'm not a genius, I have a little more experience then you. Please like and subscribe.

    • @myoung2761
      @myoung2761 Год назад

      @@i3Drones Definitely earned my sub! How would I set magnetic declination on betaflight 4.4.1? I get an invalid command error when typing it in CLI

    • @i3Drones
      @i3Drones  Год назад

      @@myoung2761 Up to now, I do not install 4.4.1. - may be in this weekend - may be it is the same problem, select the build with compass.

  • @shotbyarian
    @shotbyarian 6 месяцев назад

    unfortunately i am getting this error: # set mag_i2c_device=1
    ###ERROR IN set: INVALID NAME: mag_i2c_device=1###

    • @shotbyarian
      @shotbyarian 6 месяцев назад

      had to manually chose magnetometer when flashing firmare, if anyone has the same issue

    • @i3Drones
      @i3Drones  6 месяцев назад +1

      ​@@shotbyarian yes, in cloud you must choose the magnetometer.

    • @shotbyarian
      @shotbyarian 5 месяцев назад

      @@i3Drones unfortunately the magnetometer is still greyed out for me even if i try all the different ic2 devices (0-4), any idea why? flywoo m10 mini w compass

    • @i3Drones
      @i3Drones  5 месяцев назад

      @@shotbyarian it is possible to connected incorrectly or to a I2C port unchecked by the Betaflight. So, first search for a hardware issue.

  • @Mitternacht63729
    @Mitternacht63729 4 месяца назад

    Hmc5883l nu fjnctioneaza, deci sunt disperat am remapat tot firele ok totul ok

    • @i3Drones
      @i3Drones  4 месяца назад

      Buna! Vezi ca in noua abordare trebuie sa selectezi componentele pe care vrei sa le utilizezi inainte de a construi imaginea care va rula pe drona. Deci, ai facut asa ceva?

  • @TheZerocul
    @TheZerocul Год назад

    I have M8Q-5883 does not connect to Kakute H7, Betaflight 4.4.no command command from your video is entered, gives an error, what to do?

    • @i3Drones
      @i3Drones  Год назад

      I haven't tested the controls in BF 4.4, but the controls should work without problems.
      The only problem I see is downloading a software version for your FMU that does not have the magnetometer part incorporated.
      The new "cloud build" option allows you to select the different components you want to incorporate.
      Reading their documentation I found: "For those missing a barometer: You can try any or all of BARO_MS5611 BARO_SPI_MS5611 BARO_BMP280 BARO_SPI_BMP280 BARO_BMP388 BARO_SPI_BMP388 BARO_LPS BARO_SPI_LPS BARO_QMP6988 BARO_SPI_QMP6988 BARO_DPS310 BARO_SPI_DPS310 BARO_BMP085 BARO_2SMBP_02B BARO_SPI_2SMBP_02B in the custom defines input box."
      The link is here:
      betaflight.com/docs/release/Betaflight-4.4-Release-Notes