Cov txheej txheem:

Ib qho yooj yim Nyuaj thiab Mos Hlau Magnetometer Calibration: 6 Cov Kauj Ruam (nrog Duab)
Ib qho yooj yim Nyuaj thiab Mos Hlau Magnetometer Calibration: 6 Cov Kauj Ruam (nrog Duab)

Video: Ib qho yooj yim Nyuaj thiab Mos Hlau Magnetometer Calibration: 6 Cov Kauj Ruam (nrog Duab)

Video: Ib qho yooj yim Nyuaj thiab Mos Hlau Magnetometer Calibration: 6 Cov Kauj Ruam (nrog Duab)
Video: ua zoo poob peev los lawm nkauj xis xyooj (cover) 2024, Hlis ntuj nqeg
Anonim
Yooj Yim Nyuaj thiab Mos Hlau Magnetometer Calibration
Yooj Yim Nyuaj thiab Mos Hlau Magnetometer Calibration

Yog tias koj qhov kev nyiam ua yog RC, drones, neeg hlau, hluav taws xob, kev ua kom muaj tiag lossis zoo sib xws sai dua los sis tom qab koj yuav ntsib nrog kev ua haujlwm ntawm kev ntsuas lub ntsuas hluav taws xob. Txhua qhov ntsuas hluav taws xob ntsuas hluav taws xob yuav tsum tau ntsuas, vim tias kev ntsuas ntawm qhov chaw sib nqus tau ua rau qee qhov cuam tshuam. Muaj ob hom kev cuam tshuam no: cov hlau tsis muaj zog thiab cov hlau mos tsis zoo. Txoj kev xav txog cov kev cuam tshuam no koj tuaj yeem pom ntawm no. Txhawm rau kom tau txais kev ntsuas qhov tseeb koj yuav tsum ntsuas lub ntsuas qhov ntsuas rau qhov nyuaj thiab mos hlau tsis zoo. Cov lus qhia no piav qhia txog txoj hauv kev yooj yim yuav ua li cas.

Kauj Ruam 1: Cov Khoom Koj Xav Tau

Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau

Kho vajtse:

  • HMC5883L magnetometer module
  • Arduino Mega 2560 pawg thawj coj saib

*Tab sis koj tuaj yeem yooj yim txais cov lus qhia no rau lwm qhov ntsuas qhov ntsuas hluav taws xob lossis pawg tswj hwm arduino.

Software:

  • MagMaster
  • MagViewer

Firmware:

    Arduino Sketch

*Cov duab no tau sau rau HMC5883L tus qauv, tab sis koj tuaj yeem yooj yim saws nws rau koj tus qauv.

Lwm tus:

  • Lub thawv ntawv
  • Cov qhob cij
  • Hlau

Kauj Ruam 2: Ua Lub Xeem Calibration

Ua Lub Nroog Calibration
Ua Lub Nroog Calibration

Rau txoj kev ntsuas ntsuas koj yuav tsum ua lub thawv tshwj xeeb ntsuas (daim duab 2.1). Txhawm rau ua qhov no kuv siv lub thawv ntawv, tab sis koj tuaj yeem siv yas yas, ntoo ntoo lossis lwm yam ib yam nkaus. Koj yuav tsum koom nrog lub tshuab ntsuas hluav taws xob nrog lub thawv (piv txwv nrog kua nplaum) raws li qhia hauv daim duab 2.1. Ntawm lub ntsej muag ntawm lub npov koj yuav tsum kos cov kab ke ua haujlwm raws li kev sib koom ua ke ntawm cov qauv ntsuas hluav taws xob.

Kauj Ruam 3: Kev Txuas Hluav Taws Xob

Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob

Txuas tus ntsuas hluav taws xob ntsuas hluav taws xob thiab lub rooj tsav xwm arduino raws li qhia hauv daim duab 3.1. Nco ntsoov tias cov khoom siv hluav taws xob ntawm cov ntsuas hluav taws xob tuaj yeem yog 3, 3 V (zoo li hauv kuv qhov xwm txheej nrog HMC5883L GY-273 version).

Kauj Ruam 4: Txhim Kho Software thiab Firmware

Txhim kho Software thiab Firmware
Txhim kho Software thiab Firmware

Rub tawm cov software thiab firmware ntawm no. Cov ntawv no muaj cov ntaub ntawv:

  • MagMaster.exe - qhov ntsuas qhov ntsuas hluav taws xob
  • MagViewer.exe - qhov ntsuas hluav taws xob ntsuas qhov ntsuas pom qhov program
  • Arduino_Code - daim duab arduino rau txheej txheem ntsuas
  • Arduino_Test_Results - daim duab arduino rau kev ntsuas ntsuas ntsuas
  • Arduino_Radius_Stabilisation - daim duab arduino rau kev ntsuas ntsuas cov txiaj ntsig nrog lub voj voos kheej kheej ruaj khov algorithm
  • MagMaster Cov Ntaub Ntawv thiab MagViewer Cov Ntaub Ntawv - cov ntaub ntawv kaw lus rau MagMaster.exe thiab MagViewer.exe

Luam tag nrho cov ntaub ntawv no rau txhua daim nplaub tshev. Tshaj tawm "Arduino_Code" kos duab rau ntawm pawg thawj coj saib. Qhov kos duab arduino no xav tau HMC5883L lub tsev qiv ntawv, luam daim nplaub tshev "HMC5883L" (muab tso rau hauv "Arduino_Code" nplaub tshev) mus rau daim nplaub tshev "C: / Program Files / Arduino / libraries" ua ntej kos duab uploading.

Kauj ruam 5: Calibration

Calibration
Calibration
Calibration
Calibration
Calibration
Calibration
Calibration
Calibration

Taw qhia

Calibration ntawm magnetometer yog tus txheej txheem ntawm kev hloov pauv matrix thiab kev tsis ncaj ncees.

Txhawm rau kom tau txais kev ntsuas ntsuas ntawm qhov chaw sib nqus koj yuav tsum siv cov kev hloov pauv no thiab kev tsis ncaj ncees hauv koj qhov haujlwm. Hauv koj lub algorithm koj yuav tsum siv qhov kev tsis ncaj ncees rau vector ntawm cov ntaub ntawv tsis ntsuas calibrated magnetometer (X, Y, Z coordinates) thiab tom qab ntawd muab cov lej hloov pauv los ntawm qhov ua tau tshwm sim no (duab 5.4). C algorithm ntawm cov kev suav no koj tuaj yeem pom hauv "Arduino_Test_Results" thiab "Arduino_Radius_Stabilization" kos duab.

Cov txheej txheem ntsuas

Khiav MagMaster.exe thiab xaiv qhov chaw nres nkoj txuas ntawm arduino board. Cov hlua ntsuab ntawm lub qhov rai qhov program qhia txog kev ua haujlwm ntawm magnetometer vector (duab 5.1).

Muab qhov ntsuas qhov ntsuas hluav taws xob (lub thawv ntsuas ntsuas nrog lub ntsuas hluav taws xob txuas txuas) raws li qhia hauv daim duab 5.2.1 thiab nyem "Point 0" khawm ntawm "Axis X+" groupbox. Nco ntsoov tias lub thawv ntsuas ntsuas tsis nyob ruaj khov rau lub dav hlau tsau tsau. Tom qab ntawd tso lub ntsuas hluav taws xob raws li qhia hauv daim duab 5.2.2 thiab nyem rau "Point 180" khawm ntawm "Axis X+" groupbox thiab ntxiv rau. Koj yuav tsum ua raws li hauv qab no (saib daim duab 5.3 ib yam nkaus):

  • Daim duab 5.2.1: "Point 0", "Axis X+"
  • Daim duab 5.2.2: "Taw tes 180", "Axis X+"
  • Daim duab 5.2.3: "Point 0", "Axis X-"
  • Daim duab 5.2.4: "Point 180", "Axis X-"
  • Daim duab 5.2.5: "Point 0", "Axis Y+"
  • Daim duab 5.2.6: "Taw tes 180", "Axis Y+"
  • Daim duab 5.2.7: "Point 0", "Axis Y-"
  • Daim duab 5.2.8: "Point 180", "Axis Y-"
  • Daim duab 5.2.9: "Point 0", "Axis Z+"
  • Daim duab 5.2.10: "Taw tes 180", "Axis Z+"
  • Daim duab 5.2.11: "Point 0", "Axis Z-"
  • Daim duab 5.2.12: "Taw tes 180", "Axis Z-"

Koj yuav tsum sau lub rooj. Tom qab ntawd nyem "Xam Kev Hloov Pauv Matrix thiab Qhov Tsis Zoo" thiab tau txais qhov hloov pauv matrix thiab kev tsis ncaj ncees (daim duab 5.3).

Kev hloov pauv matrix thiab kev tsis ncaj ncees tau txais! Kev ntsuas ntsuas tiav!

Kauj Ruam 6: Xeem thiab Pom Kev Pom

Image
Image
Kuaj thiab Pom Kev
Kuaj thiab Pom Kev

Qhov ntsuas tsis ntsuas qhov muag pom

Tshaj tawm "Arduino_Code" kos duab rau ntawm pawg thawj coj saib. Khiav MagViewer.exe, xaiv qhov chaw nres nkoj txuas ntawm arduino board (lub suab nrov ntawm qhov chaw nres nkoj seraial yuav tsum yog 9600 bps) thiab nyem "Run MagViewer". Tam sim no koj tuaj yeem pom kev tswj hwm ntawm cov ntaub ntawv xov tooj cua magnetometer vector hauv 3D qhov chaw ntawm lub sijhawm tiag tiag (daim duab 6.1, video 6.1, 6.2). Cov kev ntsuas no tsis raug ntsuas.

Calibrated ntsuas kev pom kev

Hloov kho "Arduino_Radius_Stabilization" kos duab, hloov pauv qhov kev hloov pauv tsis raug thiab cov ntaub ntawv tsis ncaj ncees nrog koj tau txais thaum lub sijhawm ntsuas cov ntaub ntawv (koj cov lej hloov pauv thiab kev tsis ncaj ncees). Upload "Arduino_Radius_Stabilization" kos duab rau ntawm pawg thawj coj saib. Khiav MagViewer.exe, xaiv qhov chaw nres nkoj (qhov nrov nrov yog 9600 bps), nyem "Khiav MagViewer". Tam sim no koj tuaj yeem pom qhov ntsuas ntsuas hauv 3D qhov chaw ntawm lub sijhawm tiag tiag (duab 6.2, video 6.3, 6.4).

Los ntawm kev siv cov duab kos no koj tuaj yeem yooj yim sau cov txheej txheem rau koj txoj haujlwm magnetometer nrog ntsuas ntsuas!

Pom zoo: