Cov txheej txheem:

RC Dav Hlau Altimeter (sib xws nrog Spektrum Telemetry): 7 Kauj Ruam
RC Dav Hlau Altimeter (sib xws nrog Spektrum Telemetry): 7 Kauj Ruam

Video: RC Dav Hlau Altimeter (sib xws nrog Spektrum Telemetry): 7 Kauj Ruam

Video: RC Dav Hlau Altimeter (sib xws nrog Spektrum Telemetry): 7 Kauj Ruam
Video: Xov xwm saib Meskas ras dav hlau zoo saib heev li/USAF Thunderbird performance travis 2019 2024, Kaum ib hlis
Anonim
RC Dav Hlau Altimeter (sib xws nrog Spektrum Telemetry)
RC Dav Hlau Altimeter (sib xws nrog Spektrum Telemetry)

Kuv tau ua qhov ntsuas siab no yog li tus kws tsav dav hlau tuaj yeem paub tias lawv nyob hauv qab 400 ko taw txwv ntawm RC dav hlau hauv Asmeskas. Kuv tus phooj ywg txhawj xeeb txij li nws tsis tuaj yeem hais tseeb tias nws ib txwm nyob qis dua 400 ft, thiab xav tau kev lees paub ntxiv tias lub sensor nrog cov ntaub ntawv xov tooj cua yuav muab. Yog lawm, koj tuaj yeem yuav lub sensor los ntawm Spektrum, tab sis koj tuaj yeem tsim qhov haujlwm no tsawg dua $ 20 nrog cov laug cam tawg (uas twb tau nce nqi lawm). Yog tias koj twb muaj J-link programmer, koj tuaj yeem tsim qhov no ntawm pawg thawj coj saib rau ob peb duas las. Tsis hais txog ib zaug koj nkag siab Xbus raws tu qauv, koj tuaj yeem ua ib qho ntawm lwm qhov kev txhawb siab! Tab sis kuv yuav tsuas yog npog qhov siab nyob hauv txoj haujlwm no …

Daim ntawv teev npe:

  • Kuv siv Seeeduino XIAO microcontroller board rau txoj haujlwm no txij li nws tau me me, siv M0 tus txheej txheem uas muaj lub zog txaus rau txoj haujlwm no, muaj ob qho tib si I2C thiab SPI npaj tawm ntawm lub npov, thiab siv 3.3v logic yog li tsis muaj qib hloov pauv yog yuav tsum tau

    https://www.seeedstudio.com/Seeeduino-XIAO-Arduino…

  • Txog huab cua ntsuas pom, Kuv yuav BMP388 pawg thawj coj tawg los ntawm Adafruit. Lub rooj tsavxwm muaj ob qho tib si I2C thiab SPI tawg, thiab tuaj yeem ua haujlwm ntawm 3.3v lossis 5v logic.

    https://www.adafruit.com/product/3966

  • Protoboard rau thaiv kab hluav taws xob
  • Solder/soldering hlau
  • Txiv neej/poj niam tus pin headers yog li kuv tuaj yeem yooj yim tshem lub sensor/microcontroller.
  • Khawm me me. Kuv siv qhov no rau rov pib qhov siab pib.
  • 10k resistor rau rub tawm ntawm lub pob.
  • JST-XH 4 tus pin poj niam txuas rau ntsaws rau hauv chaw nres nkoj telemetry ntawm Spektrum tus txais
  • SEGGER J-Link EDU programmer kom nyem M0 yam tsis muaj bootloader.

    https://www.adafruit.com/product/3571

  • Adafruit SWD 10-pin breakout board

    www.adafruit.com/product/2743

Khoom siv

  • Kuv kuj tau luam tawm 3D lub thawv me me rau kuv qhov siab, tab sis qhov no tsis xav tau.
  • Oscilloscope- Yog tias koj tsis muaj, kuv xav qhia qhov no:

    https://store.digilentinc.com/analog-discovery-2-1…

Kauj Ruam 1: Kawm txog Spektrum Telemetry Protocol

Kawm paub Spektrum Telemetry Protocol
Kawm paub Spektrum Telemetry Protocol
Kawm paub Spektrum Telemetry Protocol
Kawm paub Spektrum Telemetry Protocol
Kawm paub Spektrum Telemetry Protocol
Kawm paub Spektrum Telemetry Protocol

Qhov no feem ntau ua tiav rau kuv los ntawm Raymond Domingo. Lawv twb tau ua qhov ntsuas siab sib xws nrog Spektrum, yog li ua raws li qhov chaws ntawd tau pab tiag. Cov ntawv xov xwm Spektrum xov tooj cua tau sau rau qhov seem ntawm qhov khoob. Ntsuas cov ntaub ntawv theem ntawm tus txais tau qhia tias kuv yuav xav tau 3.3v logic.

Tus neeg txais yuav xa qhov chaw nyob ntawm lub cuab yeej, thiab tom qab ntawd cia siab tias yuav teb 16-byte. Cov ntawv qhia pom cov qauv rau txhua qhov sib txawv ntawm cov ntsuas. Txawm hais tias tus qauv tsis yog 16 bytes ntev, tus txais yuav cia siab 16 bytes rov qab txhua lub sijhawm.

Spektrum Cov Ntaub Ntawv:

www.spektrumrc.com/ProdInfo/Files/SPM_Tele…

Raymond Domingo Txoj Haujlwm:

www.aerobtec.com/download/altisSpektrumInte…

Kauj ruam 2: Xaiv Hardware

Xaiv Hardware
Xaiv Hardware
Xaiv Hardware
Xaiv Hardware
Xaiv Hardware
Xaiv Hardware

Kuv siv BMP388 pawg thawj coj tawg los ntawm Adafruit rau kev nkag siab. Kev tawg tawm muab I2C thiab SPI kev tawg, thiab ua haujlwm ntawm 3.3v lossis 5v kev xav. Adafruit ib txwm ua txoj haujlwm zoo nrog lawv cov laug cam tawg, yog li kuv yuav nws. Kuv siv DFRobot Gravity BMP388 pawg hloov chaw hauv kuv tsim txij li thaum kuv Adafruit board tau siv lawm.

Muab hais tias tus tswv I2C ntaus ntawv siv 3.3v logic, Kuv xav tau 3.3v microcontroller, thiab kuv xav kom nws me me. Kuv tab tom yuav siv Adafruit Trinket M0, tab sis lawv nyob nraum kim, thiab tsis muaj ntau tus pin tawg tawm. Tom qab ntawd kuv pom Pawg Saibeduino XIAO. Nws yog M0 pawg thawj coj nrog I2C thiab SPI npaj txhij mus, nrog USB-C txuas. Ntxiv thiab, nws yog qhov me me tiag tiag! Zuag qhia tag nrho kuv nyiam lub rooj tsavxwm no (txawm hais tias qeeb pib siv lead ua coj kuv mus ib txhis los txiav txim).

Spektrum siv JST-XH qhov loj 4-pin txiv neej txuas ntawm tus txais rau "Xbus" chaw nres nkoj uas peb yuav nkag mus rau. Kuv siv 4-tus pin JST-XH poj niam ntsaws rau ntawm qhov siab thiab nws ua haujlwm zoo kawg nkaus.

Kauj ruam 3: Sau Software

Kuv siv Arduino IDE los sau tag nrho cov cai. Kuv tau theej Spektrum telemetry raws tu qauv tawm ntawm lawv cov ntawv thiab ntxiv rau hauv kuv lub tsev qiv ntawv Arduino. Txij li Adafruit ib txwm muaj cov tsev qiv ntawv zoo rau lawv tawg, kuv tau siv lawv lub tsev qiv ntawv BMP3XX rau BMP388 sensor.

Lub ntsiab lus tseem ceeb los ntawm kuv tus qauv yog:

  • Teeb I2C coj los ua tus neeg siv khoom thiab teb rau Spektrum qhov chaw nyob qhov siab (0x12).
  • Nyeem BMP388 barometer los ntawm SPI.
  • Txuag cov ntaub ntawv qhov siab nyob hauv ob qhov sib txawv kom qhov I2C thov los ntawm tus txais yuav tsis ua txhaum cov ntaub ntawv, thiab hloov pauv ntawm ob qhov tsis thaum nqa cov ntaub ntawv. Qhov no ua kom ntseeg tau tias cov ntaub ntawv xa mus rau tus txais yog ib txwm ua tiav.
  • Siv lub pob kom xoom qhov ntsuas siab.

Yog xav paub ntau ntxiv thiab txheeb xyuas cov cai, saib cov vis dis aus.

Kauj Ruam 4: Txhim Kho Cov Hluav Taws Xob

Hlau Circuit
Hlau Circuit
Hlau Circuit
Hlau Circuit
Hlau Circuit
Hlau Circuit
Hlau Circuit
Hlau Circuit

Kuv siv protoboard, tab sis yog tias koj xav siv sijhawm los tsim cov phiaj xwm milled, koj tuaj yeem ua rau lub tshuab nqus tsev ntau dua.

Kuv txuas JST-XH txuas rau XIAO's I2C pins. Txij li thaum tus neeg txais khoom tso tawm 5 volts rau lub npav telemetry, qhov zoo los ntawm lub tsheb npav mus rau XIAO's VCC tus pin. Txoj kev ntawd onboard 3.3v tus tswj hwm tau siv los txhawb lub zog BMP388.

Kauj Ruam 5: Sau yam tsis muaj Bootloader

Sau tsis muaj Bootloader
Sau tsis muaj Bootloader
Sau tsis muaj Bootloader
Sau tsis muaj Bootloader
  1. Nrhiav koj daim ntawv teev lus.txt (rau txhua lub rooj tsavxwm koj siv).

    Hauv kuv qhov xwm txheej, nws tau nyob ntawm no: C: / Users / AppData / Local / Arduino15 / packages / Seeeduino / hardware / samd / 1.7.7 / boards.txt

  2. Luam koj lub rooj tsavxwm, thiab hloov npe thawj tus yuam sij los qhia qhov tsis muaj bootloader version. Kuv nyuam qhuav ntxiv _nbl rau lub npe qub.

    • Laus: seeed_XIAO_m0
    • Tshiab: seeed_XIAO_m0_nbl
  3. Hloov tus.name tus nqi:

    • Laus: seeed_XIAO_m0_nbl.name = Seeeduino XIAO
    • Tshiab: seeed_XIAO_m0_nbl.name = Seeeduino XIAO Tsis muaj Bootloader
  4. Hloov kho qhov txuas txuas rau nyem yam tsis muaj bootloader los ntawm kev hloov tus tsim ld tsab ntawv:

    • Laus: seeed_XIAO_m0_nbl.build.ldscript = linker_scripts/gcc/flash_with_bootloader.ld
    • Tshiab: seeed_XIAO_m0_nbl.build.ldscript = linker_scripts/gcc/flash_with out _bootloader.ld
  5. Rov pib dua Arduino IDE.
  6. Xaiv qhov tshiab "Seeeduino XIAO Tsis Muaj Bootloader" pawg thawj coj los ntawm cov laug cam.
  7. Xaiv "Export Compiled Binary"
  8. Thaum suav ua ke, cov ntaub ntawv.bin yuav nyob hauv koj li Arduino qhov project.

Kauj Ruam 6: Flash MCU Nrog J-Txuas

Flash MCU Nrog J-Txuas
Flash MCU Nrog J-Txuas
Flash MCU Nrog J-Txuas
Flash MCU Nrog J-Txuas
Flash MCU Nrog J-Txuas
Flash MCU Nrog J-Txuas

Adafruit muaj cov lus qhia zoo ntawm kev rov tsim dua lub bootloader ntawm M0/M4 ntaus ntawv. Hauv peb qhov xwm txheej, peb xav tshem lub bootloader, tab sis nws ua haujlwm ib yam nkaus.

learn.adafruit.com/how-to-program-samd-boo…

Thaum koj ua qhov no, koj yuav tsis tuaj yeem xa cov cai los ntawm USB. Koj tuaj yeem ua raws cov lus qhia saum toj no kom nyem lub bootloader rov qab mus rau lub cuab yeej txhawm rau upload cov lej los ntawm USB dua li koj tuaj yeem tuaj ntawm lub hoobkas.

Adafruit phau ntawv qhia yog qhov ua tau zoo heev, tab sis cov no yog cov theem pib:

  1. Cov hlua hluav taws xob txuas rau sab nraum qab ntawm XIAO lub rooj tsavxwm.

    • Phau ntawv qhia Adafruit tsis tau hais tias RST tus pin ntawm 2x5 pawg thawj coj tawg yuav tsum tau txuas nrog tus pin rov pib dua ntawm Adafruit cov laug cam. Tab sis rau XIAO, Kuv xav tau txuas rau tag nrho plaub daim ntaub nyob tom qab ntawm lub rooj tsavxwm.
    • VREF tus pin xav tau txuas nrog XIAO 3.3v tus pin. Qhov no qhia tus debugger tias cov cuab yeej logic yog 3.3v. Yog tsis muaj nws, yog tias koj xaiv qhov kev xaiv tsis raug, koj tuaj yeem ua rau lub microcontroller puas.
  2. Txuas cov xov hlau txuas mus rau J-Txuas.
  3. Fais fab ntawm XIAO lub rooj tsavxwm nrog USB cable.
  4. Qhib Atmel Studio.
  5. Xaiv Cov Cuab Yeej Cuab Yeej Programming
  6. Xaiv koj lub rooj tsavxwm M0. Hauv qhov no, ATSAMD21G18A
  7. Xaiv SWD.
  8. Nyeem qhov teeb tsa los ntawm lub hom phiaj.
  9. Yog tias koj siv EDU J-Txuas, pom zoo rau cov lus siv (yog tias koj ua raws li cov lus siv).
  10. Txheeb xyuas tias qhov nyeem hauv qhov hluav taws xob yog qhov raug nyob ntawm kaum sab xis saum toj. Yog tias nws tsis yog 3.3v, koj tuaj yeem tsoo koj lub rooj tsavxwm!
  11. Tshem cov khau raj tiv thaiv fuse (teeb lub bootloader loj rau 0 bytes), thiab tom qab ntawd xaiv qhov program.
  12. Hauv ntu nco, xaiv koj cov ntaub ntawv sau.bin lossis.hex, thiab xaiv qhov program.

Teeb meem Shooting:

Thaum koj nyeem cov cuab yeej teeb tsa, yog tias koj tau txais qhov hluav taws xob tawm ntawm qhov ua yuam kev, tom qab ntawv xyuas kom tseeb tias MCU tau txuas rau lub hwj chim thiab tias J-Txuas VREF tus pin txuas nrog 3.3 volts

Kauj Ruam 7: Rov Ua Dua Tshiab yam tsis muaj Crystal sab nraud

Recompile Tsis Muaj Sab Nraud Crystal
Recompile Tsis Muaj Sab Nraud Crystal

XIAO lub rooj tsavxwm muaj cov siv lead ua sab nraud uas siv sijhawm ntev los pib. Tus neeg hais lus Spektrum ua lub cuab yeej tshawb pom ntawm lub tsheb npav telemetry 350 milliseconds tom qab lub zog nce, yog li peb yuav tsum qhia tus neeg siv kom siv lub oscillator sab hauv es tsis txhob hloov pauv uas yuav ua rau pib tau ze li sai tau.

  1. Nrhiav cov boards.txt cov ntaub ntawv uas koj hloov kho ua ntej (yog, kuv tuaj yeem txuag koj cov kauj ruam no ua ntej, tab sis qhov no yog txheej txheem kev kawm rau kuv)
  2. Ntxiv "-DCRYSTALLESS" mus rau sawed_XIAO_m0_nbl.build.extra_flags hlua. Qhov no yuav qhia tus neeg siv khoom siv sab hauv oscillator.
  3. Rov sau cov cai.
  4. Re-flash MCU.
  5. Txheeb xyuas lub sijhawm pib pib nrawm txaus siv lub oscilloscope.

Raws li koj tuaj yeem pom los ntawm daim duab, lub daj daj 1 yog lub zog siv. Cyan channel 2 yog tus pin npaj rau ntawm microcontroller. Kwv yees li 10 milliseconds tom qab fais fab tuag, channel ob tau rub siab los ntawm lub microcontroller uas qhia tias nws nyob hauv lub teeb teeb. Thaum teeb tsa tiav, MCU tau sau tus lej kom rub tus pin qis, qhia tias lub voj tseem ceeb tau pib. Qhov uas pom tau tias teeb tsa yuav siv txog 3 milliseconds. Zuag qhia tag nrho cov microcontroller siv 13 milliseconds tom qab lub zog-kom npaj txhij mus.

Pom zoo: