Cov txheej txheem:

GPS Saib Xyuas Nrog OLED Zaub Project: 5 Kauj Ruam (nrog Duab)
GPS Saib Xyuas Nrog OLED Zaub Project: 5 Kauj Ruam (nrog Duab)

Video: GPS Saib Xyuas Nrog OLED Zaub Project: 5 Kauj Ruam (nrog Duab)

Video: GPS Saib Xyuas Nrog OLED Zaub Project: 5 Kauj Ruam (nrog Duab)
Video: kuv tus niam tsev wb mus saib tsheb tsa tij ntxhoo cov ncej ntu1 2024, Kaum ib hlis
Anonim
GPS Saib Xyuas Nrog OLED Zaub Project
GPS Saib Xyuas Nrog OLED Zaub Project
GPS Saib Xyuas Nrog OLED Zaub Project
GPS Saib Xyuas Nrog OLED Zaub Project
GPS Saib Xyuas Nrog OLED Zaub Project
GPS Saib Xyuas Nrog OLED Zaub Project
GPS Saib Xyuas Nrog OLED Zaub Project
GPS Saib Xyuas Nrog OLED Zaub Project

Nyob zoo txhua tus, hauv kab lus nrawm no kuv yuav qhia koj kuv qhov haujlwm: ATGM332D GPS module nrog SAMD21J18 Microcontroller thiab SSD1306 OLED 128*64 zaub, Kuv tau tsim PCB tshwj xeeb rau nws ntawm Eagle Autodesk, thiab ua haujlwm nws siv Atmel studio 7.0 thiab ASF4 yog li hauv kab lus no kuv yuav qhia koj txoj kev taug no thiab cov ntaub ntawv kuv tau siv yog tias koj txaus siab ua nws ntawm koj tus kheej.

Tam sim no yog tias koj tab tom npaj koj li MCU/pawg thawj coj loj siv Arduino, txoj haujlwm no yuav tsum yooj yim rau koj, tab sis ntawm no kuv yuav siv ASF4 (Advanced software framwork 4) los ntawm Atmel/Microchip uas yog raws li lus C thiab yuav muab tswv yim rau koj rau yuav ua li cas nyeem GPS NMEA cov lus siv USART Asynchronous driver (Callback) thiab muab rau koj nrog lub tsev qiv ntawv yooj yim uas koj tuaj yeem siv nws nrog ib qho Micro-maub los thiab sib txawv platform los ntawm kev ntxiv tus tsav tsheb uas tsim nyog koj siv los txais cov lus los ntawm GPS (NMEA lus).

Kuv yuav faib kab lus no rau:

  1. PCB Tsim.
  2. BOM koj yuav tsum tau sib sau ua ke PCB
  3. Saib nrawm mus rau software thiab tus lej nws tus kheej thiab kuaj rau kho vajtse thiab software.
  4. kawg tab sis tsis tsawg kawg qee qhov kev txhim kho rau txoj haujlwm no.

Koj yuav pom txhua yam ntaub ntawv cuam tshuam nrog txoj haujlwm no ntawm Github (Ntawm no)

Kauj Ruam 1: PCB Tsim Siv Eagle

PCB Tsim Siv Dav Dav Dav
PCB Tsim Siv Dav Dav Dav
PCB Tsim Siv Dav Dav Dav
PCB Tsim Siv Dav Dav Dav
PCB Tsim Siv Dav Dav Dav
PCB Tsim Siv Dav Dav Dav
PCB Tsim Siv Dav Dav Dav
PCB Tsim Siv Dav Dav Dav

Txoj haujlwm no feem ntau yog nyob ib puag ncig ATGM332D GPS Module, GPS yooj yim siv vim nws tsuas xav tau ob peb yam tsis sib xws ua haujlwm, thiab peb tuaj yeem ntxiv roj teeb thaub qab kom txuag lub sijhawm/hnub yog tias peb kaw lub zog tseem ceeb los ntawm cov qauv.

thiab kom tswj hwm txhua lub cim qhia hauv kab ke Kuv tau mus nrog ATSAMD21J18B microcontroller, TQFP64 pob vim nws muaj 128KByte ntawm qhov kev zov me nyuam nco thiab 32KByte ntawm cov ntaub ntawv nco (thiab kuv muaj ntau ntawm lawv tso ncig kuv lub rooj ua haujlwm).

lub Circuit Court yuav tsum tau siv los ntawm USB 5V qhov chaw, kuj tseem USB tuaj yeem ua qhov chaw nres nkoj virtual COM (CDC USB) thiab koj tuaj yeem ntxiv tus lej rau nws yog tias koj xav tham nrog lub cuab yeej los ntawm USB.

rau cov zaub Kuv xaiv SSD1306 0.96 'OLED zaub nrog SPI npav, nws me me tab sis nws yog qhov haum rau PCB loj uas kuv xav tau, pawg thawj coj saib qhov ntev 100x31 mm.

kev ua haujlwm Microcontroller yuav dhau los ntawm SWD programmer (Kuv siv Atmel ICE) thiab yuav txuas nws los ntawm 1.27mm 10p tus pin header.

kuj kuv siv Fusion360 kom tau txais 3d saib rau pawg thawj coj saib thiab koj tuaj yeem pom qee cov duab ua rau nws ib yam.

Kauj Ruam 2: Soldering PCB

Soldering PCB
Soldering PCB
Soldering PCB
Soldering PCB
Soldering PCB
Soldering PCB

Koj muaj qhov kev xaiv xaj ib qho stencil nrog koj lub PCB, nws yooj yim dua los siv cov laug muab tshuaj txhuam rau ntawm lub rooj tsavxwm uas siv lub stencil, Kuv siv cov phaj kub los ua kom cov khoom sib xyaw ua ke, siv cua kub kuj tseem OK tab sis ceev faj thaum siv cov LED txij li thaum lawv rhiab heev rau cua sov.

soldering sab hauv qab yog yooj yim me ntsis vim tias nws tsuas yog SWD tus pin lub taub hau thiab lub roj teeb thaub qab, uas koj tuaj yeem siv tau rau lawv siv cov hlau txuas.

ua ntej koj txuas lub Circuit Court nrog ib lub zog USB, xyuas seb puas muaj hluav taws xob luv.

txuas koj lub kav hlau txais xov GPS thiab xyuas kom tseeb tias koj txuas nws qhov txuas kom raug, Kuv kho lub kav hlau txais xov nyob hauv qab ntawm pawg thawj coj saib.

Kauj Ruam 3: Software… Muaj nuj nqi… txiaj ntsig

Image
Image
Software… Ua haujlwm… tau txiaj ntsig
Software… Ua haujlwm… tau txiaj ntsig
Software… Ua haujlwm… tau txiaj ntsig
Software… Ua haujlwm… tau txiaj ntsig

Lub software yuav muab faib ua 4 ntu:

  1. USART sib txuas lus nrog ATGM332 GPS module.
  2. SPI los sib tham nrog OLED.
  3. USB CDC.
  4. GPIO los tswj LEDs

xub txuas lub USB txuas rau lub zog ntawm Circuit thiab tom qab ntawd txuas cov hlua txuas nrog SWD txuas.

Rub tawm Txoj Cai los ntawm github (Txuas ntawm no).

kom tau txais Geo-Location koj muaj 3 qhov sib txawv NMEA cov lus xaiv:

  1. GPGGA
  2. GPRMC
  3. GPGLL

Kuv siv GPRMC kab lus kom tau txais qhov chaw nyob, sijhawm thiab hnub tim (sijhawm yog 0.0 GMT) yog li hauv cov cai koj yuav pom:

GPRMC. Enable = 1;/*0 yog tsis xav tau cov lus no*/

GPGGA. Enable = 0;/*0 yog tsis xav tau cov lus no*/

GPGLL. Enable = 0;/*0 yog tsis xav tau cov lus no*/

koj tuaj yeem pab lawv txhua tus ua ke thiab nyeem lawv tib lub sijhawm kom tau txais cov ntaub ntawv koj xav tau.

ib zaug muaj cov kab lus GPRMC siv tau, theGPRMC. Ready yuav dhau los ua 1 thiab koj tuaj yeem tau txais tag nrho cov ntaub ntawv muaj nyob hauv kab lus no, txheeb xyuas qhov txuas no kom pom cov ntaub ntawv muaj nyob hauv kab lus no.

yooj yim yog Kho yog 'A' uas txhais tau tias Qhov Chaw nyob muaj, yog Kho yog 'V' uas txhais tau tias qhov chaw tsis muaj.

ceeb toom tias ATSAMD21 muaj RTC sab hauv, tab sis ntawm no kuv tsis siv nws thiab hloov kuv siv sijhawm thiab Hnub tim ncaj qha los ntawm GPS, yog li yog tias koj tsis xav siv CR1220 Cov roj teeb thaub qab, thaum koj txuas lub USB fais fab qhov chaw koj yuav plam Lub Sijhawm/Hnub thiab rau lub sijhawm tom ntej uas koj siv hluav taws xob hauv lub sijhawm sijhawm/thaj tsam ntawm cov zaub yuav tsis tas mus txog thaum GPS muaj lub sijhawm/hnub siv tau.

cov zaub yuav qhia koj tam sim no ntawm GPS thiab yuav qhia Geo-qhov chaw thaum nws muaj, txawm li cas los xij muaj 3 LEDs ntawm Pawg Thawj Coj:

  1. Ntsuab LED txuas nrog PA06, thiab yuav ntsais yog tias muaj qhov siv tau ntawm thaj chaw Geo.
  2. Txiv kab ntxwv LED txuas nrog PA07 thiab yuav ntsais ib zaug thib ob yog tias tsis muaj qhov Geo-siv tau.
  3. Liab LED qhov no txuas nrog PPS tus pin ntawm GPS Module thiab yuav ntsais tsuas yog thaum muaj lub teeb liab siv tau cuam tshuam nrog Qhov Chaw.

Cov txiaj ntsig

Lub voj voog ua haujlwm tau zoo heev nrog kuv, tau txais Geo-qhov chaw los ntawm GPS siv sijhawm 20-30 vib nas this sab nraum nrog pom tseeb rau saum ntuj thiab nruab nrab ntawm cov tsev tsis muaj teeb meem txawm tias muaj lub kav hlau txais xov nyob hauv qab ntawm pawg thawj coj saib.

Kauj Ruam 4: 3D Luam Ntawv Case… Sort Of

Cov Ntaub Ntawv Luam Ntawv 3D … Txheeb Ntawm
Cov Ntaub Ntawv Luam Ntawv 3D … Txheeb Ntawm

Kuv tau npaj cov ntaub ntawv yooj yim (tus tuav meej dua) rau lub voj voog no tab sis vim yog KEVID-19 muaj kev sib kis thiab raug kaw kuv nyob tam sim no, Kuv tsis tuaj yeem ncav cuag kuv lub tshuab luam ntawv 3d los luam nws, yog li kuv yuav hloov kho ntu no nrog stl cov ntaub ntawv thiab cov duab rau tus tuav thaum nws muaj.

Kauj Ruam 5: Yam Yuav Txhim Kho…

Yam Txhim Kho…
Yam Txhim Kho…
Yam Txhim Kho…
Yam Txhim Kho…
Yam Txhim Kho…
Yam Txhim Kho…
  1. Tsiv tus SWD txuas mus rau sab saum toj vim nws yooj yim dua los txuas nws nrog koj tus programmer.
  2. Hwj chim ntawm Circuit Court los ntawm Lithium roj teeb, Kuv tau ua nws los ntawm kev siv lub jumper thiab nws ua haujlwm tau zoo, tsis nco qab tias Linear (LDO) tus tswj hwm muaj V poob qhov hluav taws xob yog tias (Vbat - Vout) tsawg dua Vdrop txwv qhov Circuit Court yuav tsis ua haujlwm. kom raug.
  3. ua tus neeg siv khawm me ntsis kom nws thiaj li yooj yim nias.
  4. ntxiv USB CDC code yog li koj tuaj yeem sib tham/tsim cov haujlwm tshwj xeeb rau MAC/PC/linux.
  5. Txog GPS tus kav hlau txais xov, Kuv siv Tus kav hlau txais xov nquag rau txoj haujlwm no, siv lub kav hlau txais xov dhau los yog qhov ua tau, los ntawm kev ntxiv Tsawg suab nrov op-Amp zoo li AT2659 (txheeb xyuas cov txheej txheem ntawm ATGM332 Datasheet P.14).
  6. rau OLED 0.96 'SSD1306, lub tsev qiv ntawv raug cai los ntawm microchip thaum xub thawj rau 128*32 zaub, txhawm rau hloov pauv txoj cai los ua haujlwm nrog 128*64 koj yuav tsum mus rau ssd1306.c thiab hloov kho tus lej (kos duab).

Pom zoo: