Cov txheej txheem:

Xov tooj cua LoRa Ra-01 Nrog STM32 thiab ESP32: 11 Kauj Ruam
Xov tooj cua LoRa Ra-01 Nrog STM32 thiab ESP32: 11 Kauj Ruam

Video: Xov tooj cua LoRa Ra-01 Nrog STM32 thiab ESP32: 11 Kauj Ruam

Video: Xov tooj cua LoRa Ra-01 Nrog STM32 thiab ESP32: 11 Kauj Ruam
Video: 5 Daily Must-Have Habits for Immune System Health Webinar 2024, Kaum ib hlis
Anonim
Image
Image
Qhia tawm
Qhia tawm

Raws li qhov no yog cov ncauj lus nrov ntawm cov ua raws kuv cov ntawv, Kuv txiav txim siab tham txog LoRa hnub no. Txawm li cas los xij, Kuv yuav tham txog cov ncauj lus nrog qee yam tshiab: lub sijhawm no tsis siv ESP32, tab sis STM32 hloov chaw. Kuv ib txwm xav tshaj tawm txog STM32, vim nws suav tag nrho tsev neeg ntawm 32-ntsis microcontrollers tsim los ntawm STMicroelectronics. Kuv muaj ntau tus phooj ywg uas siv cov nti no sab nraum Brazil. Lawv tuaj yeem lees paub qhov ua tiav ntawm cov cuab yeej tsim khoom European no. Ua ntej, Kuv yuav qhia STM32, thiab tseem tham txog LoRa Ra-01 Module. Ib qho ntxiv, Kuv yuav tham txog kev teeb tsa STM32 hauv Arduino IDE.

Cov vis dis aus no yuav qhia koj txog STM32 cov khoom siv txhim kho tsis tau txhais rau kev ua haujlwm hauv Arduino, tab sis hloov nrog C lus lossis cov uas yog haiv neeg STMicroelectronics. Yog tias kuv tsis yuam kev, muaj yim lub tuam txhab uas tsim cov khoom sib txuas rau STM32, uas qhia peb tias muaj kev coj noj coj ua thoob ntiaj teb hais txog cov nti no.

Kuv xav piav qhia rau koj ntawm no tias STMicroelectronics tsawg kawg yog plaub zaug loj dua Microchip, thiab nws ua rau STM32 tsev neeg. Nws suav nrog cov vaj tsev tsim los ntawm cov chips me me mus rau STM32 F7, uas kuv xav tias yog "muaj zog heev".

Hauv peb qhov kev sib dhos, peb siv STM32 Maple Mini, uas zoo li Arduino Nano. Txawm li cas los xij, nws muaj zog ntau dua. Peb tseem yuav siv Ai-Thinker Ra-01. Nws yog cais los ntawm LoRa xov tooj cua, uas yuav sib tham nrog STM32 ntawm SPI (kev sib txuas lus ntawm Semtech LoRa nti).

Kauj Ruam 1: Qhia tawm

Hauv peb cov vis dis aus, koj tuaj yeem pom hauv kev sib dhos uas peb muaj STM32 Maple Mini txuas ntawm SPI mus rau Ra-01 module. Lub rooj sib txoos no xa cov ntaub ntawv mus rau peb "tus hlub" ESP32, uas muaj cov khoom siv i2c uas qhia txog cov pob khoom. Koj tuaj yeem pom tias nws tsuas yog siv 81 milliseconds rau kev npaj, xa, thiab tau txais pob khoom los ntawm ESP32, ntxiv rau rau ntawm lub vijtsam zaub. Yog tias qhov kev ncua deb tau nce, thiab muaj kev hloov pauv hauv software, lub sijhawm no zoo li yuav nce ntxiv.

Peb lub hom phiaj nrog lub rooj sib tham no yog los qhia STM32, uas yog ib qho sib txawv, xa cov ntaub ntawv hauv tus qauv Lora xov tooj cua. Nws yog ib qho tseem ceeb kom nco ntsoov tias muaj ob daim khoom siv sib txawv uas tau tham ntawm LoRa xov tooj cua raws tu qauv.

Kauj Ruam 2: LoRa Module Ra-01

LoRa Module Ra-01
LoRa Module Ra-01

Yeej, peb muaj nyob ntawm no Semtech LoRa nti, nrog qee qhov sib cais ntawm lub rooj tsavxwm, suav nrog cov kav hlau txais xov tso tawm. Lub interface yog SPI. Lub sijhawm no, peb yuav tsum ua cov lus nug ntawm nti nrawm, uas yog siab dua 300Kbps. Peb paub tias LoRa tsis ua haujlwm ntawm qhov nrawm no, vim nws tsuas yog tig ntawm 37K lossis tsawg dua. Vim li cas? Txhawm rau mus deb, koj yuav tsum txo tus nqi me ntsis. Nws yog ib qho tseem ceeb kom nco ntsoov tias kev nrawm tsis yog kev txhawj xeeb ntawm LoRa, tab sis yog nws qhov dav. Qhov zaus ntawm cov cuab yeej no yog 433MHz, thiab lub zog xa mus yog kwv yees li 18 dBm, nrog 3v3 lub zog.

Kauj Ruam 3: Maple Mini

Mini Maple Loj
Mini Maple Loj

Kuv xav txog qhov tshwj xeeb ntsig txog STM32. Qhov txawv ntawm qhov no thiab STMicroelectronics cov khoom txhim kho (STM32 L4 Series ultra qis zog) yog dab tsi? Cov khoom siv no muaj zog dua, tab sis Maple Mini ua haujlwm hauv Arduino IDE, uas ua rau nws yooj yim dua rau cov uas tsis paub zoo txog kev ua haujlwm. Peb tuaj yeem hais tias Maple Mini ua haujlwm zoo ib yam li Arduino, nrog Flash ntawm 128 KB. Maple Mini tseem muaj 20 KB ntawm RAM, USB input, LEDs, khawm, qhov tseem ceeb rau nws 34 IOs, ntxiv rau 12 16-ntsis PWMs thiab 9 12-ntsis analog inputs.

Kauj ruam 4: Pinning

Pinning
Pinning

Qhia ntawm no yog Maple Mini Pinout.

Kauj Ruam 5: Txhim Kho Kev Txhawb rau ARM 32bit Phaib

Nruab Txhawb rau ARM 32bit Phaib
Nruab Txhawb rau ARM 32bit Phaib

Hauv Arduino IDE, mus rau Cov Cuab Yeej-> Pawg-> Tus Thawj Saib Xyuas Haujlwm…

Hauv lub qhov rai uas qhib, tshawb rau Arduino SAM Boards thiab teeb tsa Arduino SAM Boards (32-ntsis ARM Cortex-M3)

Kauj Ruam 6: Lora Library

Lora Tsev Qiv Ntawv
Lora Tsev Qiv Ntawv

Tam sim no mus rau Sketch-> Xws li Lub Tsev Qiv Ntawv-> Tswj Cov Tsev Qiv Ntawv …

Nrhiav LoRa thiab teeb tsa LoRa los ntawm Sandeep Mistry

Kauj Ruam 7: SMT32 Arduino

SMT32 Arduino
SMT32 Arduino

Rub tus zip ntawm

Unzip thiab luam daim nplaub tshev rau Cov Ntaub Ntawv / Arduino / kho vajtse

Kauj Ruam 8: Sib dhos

Los ua ke
Los ua ke

Ntawm no koj tuaj yeem pom yooj yim npaum li cas peb cov phiaj xwm yog. Kuv txuas ntawm SPI Ai-Thinker module (LoRa) rau STM32.

Kauj ruam 9: Chaw

Chaw
Chaw

Tom qab rub tawm qhov chaw

code, muaj nyob rau ntawm qhov kawg ntawm kab lus no, tom qab ntawd koj mus rau qhov tsim. Tom qab ntawd, ua raws cov theem hauv daim duab no.

Kauj Ruam 10: Txoj Cai Raws Li ESP32 LoRa Xa thiab Tau Txais Video

Code Raws ESP32 LoRa Xa thiab Tau Txais Video
Code Raws ESP32 LoRa Xa thiab Tau Txais Video

Cov peev txheej uas peb siv hauv txoj haujlwm no yog tib yam uas peb twb tau siv los ua ke nrog ESP32, hauv cov vis dis aus: ESP32 LoRa nrog Arduino IDE: Xa thiab Tau Txais TX RX, nrog ib qho tshwj xeeb: nws tsis muaj cov zaub. Ib feem ntawm i2C twb tau raug tshem tawm ntawm tus lej uas kuv rub tawm hauv qab no. Txhawm rau paub seb txoj cai no ua haujlwm li cas, tsuas yog saib daim vis dis aus.

Kauj ruam 11: Cov ntaub ntawv

Rub tawm cov ntawv:

PDF

INO

Pom zoo: