No video

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

  Рет қаралды 11,518

i3Drones & iTech for life

i3Drones & iTech for life

Күн бұрын

Пікірлер: 59
@alexeysushko
@alexeysushko Жыл бұрын
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 Жыл бұрын
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! ;-)
@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 Жыл бұрын
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 ...
@doro4414
@doro4414 2 ай бұрын
what if I do not have separate SDA and SCL pads?
@Fedablio
@Fedablio Жыл бұрын
Excellent job! 😀
@i3Drones
@i3Drones Жыл бұрын
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.
@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
@mingzhangjiao4779
@mingzhangjiao4779 Жыл бұрын
thx
@felipee4319
@felipee4319 Жыл бұрын
Thaaankksss !!
@gregstewart4692
@gregstewart4692 Жыл бұрын
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?
@RuderalisFPV
@RuderalisFPV Жыл бұрын
same experience here
@ourchannel8215
@ourchannel8215 5 ай бұрын
HMC5883L...why not support on drone...hard to fine compass module with original ic...i cant fine to buy HMC5883
@i3Drones
@i3Drones 5 ай бұрын
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 5 ай бұрын
@@i3Drones im from malaysia...many online product come from china 🥴...posible for buy from US,but its much different price... thanks for link 👍
@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 11 ай бұрын
do you have to enter different coordinates every time you travel somewhere?
@i3Drones
@i3Drones 11 ай бұрын
Yes if you want to have an accurate determination.
@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.
@dantanase
@dantanase 11 ай бұрын
Beitian Dual BN-220 GPS are compas?
@i3Drones
@i3Drones 11 ай бұрын
No, BN-220 has no compass. More, the Bn-220 is not so grate GPS - you have a study here: kzfaq.info/get/bejne/h8yniZp_tZumeWw.html
@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
@theandymann4433
@theandymann4433 Жыл бұрын
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 Жыл бұрын
It's far too vague what you're telling me. I can't figure out the problem.
@i3Drones
@i3Drones Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
@@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 ай бұрын
@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 Жыл бұрын
@@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 ай бұрын
​@@shotbyarian yes, in cloud you must choose the magnetometer.
@shotbyarian
@shotbyarian 4 ай бұрын
@@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 4 ай бұрын
@@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 3 ай бұрын
Hmc5883l nu fjnctioneaza, deci sunt disperat am remapat tot firele ok totul ok
@i3Drones
@i3Drones 3 ай бұрын
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
🔧Betaflight 4.5 Tuning Workflow using PIDtoolbox🔧
16:18
PIDtoolbox
Рет қаралды 12 М.
Please Help Barry Choose His Real Son
00:23
Garri Creative
Рет қаралды 23 МЛН
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 9 МЛН
Kids' Guide to Fire Safety: Essential Lessons #shorts
00:34
Fabiosa Animated
Рет қаралды 16 МЛН
I finally fixed my iNav Compass (and so can you)!
27:20
Joshua Bardwell
Рет қаралды 23 М.
Betaflight GPS and GPS Rescue - everything that you have to know
18:02
Extracting Firmware from Embedded Devices (SPI NOR Flash) ⚡
18:41
Flashback Team
Рет қаралды 568 М.
Betaflight 4.5 GPS Rescue Improvements
9:21
UAV Tech
Рет қаралды 8 М.
QST QMC5883L 3-Axis Digital Compass and Arduino MCU - The Details (3)
35:48
Robert's Smorgasbord
Рет қаралды 7 М.
Please Help Barry Choose His Real Son
00:23
Garri Creative
Рет қаралды 23 МЛН