Cov txheej txheem:

Arduino + GPS Module - Qhov Chaw Ceeb Toom: 6 Cov Kauj Ruam
Arduino + GPS Module - Qhov Chaw Ceeb Toom: 6 Cov Kauj Ruam

Video: Arduino + GPS Module - Qhov Chaw Ceeb Toom: 6 Cov Kauj Ruam

Video: Arduino + GPS Module - Qhov Chaw Ceeb Toom: 6 Cov Kauj Ruam
Video: How I Made this Electric Car that can go Anywhere 2024, Hlis ntuj nqeg
Anonim
Arduino + GPS Module - Qhov Chaw Ceeb Toom Qhia
Arduino + GPS Module - Qhov Chaw Ceeb Toom Qhia

Peb siv sijhawm ntau npaum li cas nyob rau hauv kev tsheb sib tsoo? Kuv tau ua Arduino-powered lub hom phiaj ceeb toom rau siv lub sijhawm no hauv txoj hauv kev tsim khoom.

Txhua leej txhua tus paub tias kev tsheb sib tsoo tuaj yeem yog lub sijhawm tseem ceeb. Thiab nws tsis tuaj yeem kwv yees ntev npaum li cas nws yuav siv los ntawm keeb kwm mus rau qhov chaw.

Qhov teeb meem ntawm kev tsheb sib tsoo cuam tshuam rau kuv thaum kuv tuaj txog hauv ib lub nroog ob lub hlis dhau los. Txhua txhua hnub kuv siv sijhawm ntau dua ob teev nyob rau hauv jams. Thiab kuv xav tias zoo li vim li cas kuv thiaj siv tsis tau lub sijhawm no los ua ib yam dab tsi?

Nco tseg: Kuv siv tsheb thauj mus los rau pej xeem.:-)

Muaj ntau ntau lwm yam uas koj tuaj yeem ua thaum raug daig hauv tsheb!

Qee qhov hauv qab no tsis yog lom zem xwb, tab sis tsim tau ib yam:

Siv sijhawm los xav thiab phiaj xwm, rau cov haujlwm tam sim no thiab yav tom ntej. Siv sijhawm los qhia koj tus kheej, saib cov vis dis aus qhia lossis kawm chav kawm e-kev kawm ntawm Udemy, Coursera, thiab lwm yam lossis nyeem cov phiaj xwm ntawm Insructables:). Thiab tau kawg ua cov khoom siv hluav taws xob ib txwm tshoov kuv lub siab. Yog li kuv tau tsim lub chaw ceeb toom ceeb toom siv Arduino thiab GPS module. Yog li nws ua dab tsi yog thaum twg koj nyob ze rau koj lub hom phiaj, nws ceeb toom koj los ntawm ci ci LED lossis los ntawm kev co (los ntawm kev siv lub tshuab me me vibrating). Kuv tau muab cov kab hluav taws xob rau ob qho tib si LED thiab lub cev muaj zog.

Txog qhov ntawd, ua ntej koj yuav tsum nrhiav txoj kab nruab nrab thiab ntev mus txhawm rau txheeb xyuas qhov chaw. Thaum koj pom koj qhov chaw nyob, koj tuaj yeem siv txoj kab nruab nrab thiab qhov ntev kom pom qhov deb mus rau qhov chaw thiab los ntawm kev khaws ntau yam koj tuaj yeem qhib lub ceeb toom. Lub logic yog qhov yooj yim, txoj cai?!

Yog li cia peb pib …….

Kauj Ruam 1: Qhov Chaw thiab Cov Cuab Yeej:

Txhawm rau pib nrog koj qhov chaw ceeb toom ceeb toom, ntawm no yog ntu uas xav tau:

Arduino UAS

Duab
Duab

NEO-6M GPS Module

GPS sawv cev rau lub ntiaj teb txoj haujlwm ua haujlwm thiab tuaj yeem siv los txiav txim txoj haujlwm, sijhawm thiab nrawm yog tias koj tab tom taug kev.

Duab
Duab
  • Cov qauv no muaj tus kav hlau txais xov sab nraud thiab ua hauv EEPROM.
  • Interface: RS232 TTL
  • Lub hwj chim: 3V txog 5V
  • Default baudrate: 9600 bps
  • Ua haujlwm nrog tus qauv NMEA kab lus

NEO-6M GPS module muaj plaub tus pin: VCC, RX, TX, thiab GND. Tus qauv sib txuas lus nrog Arduino ntawm kev sib txuas lus txuas nrog siv TX thiab RX tus pin, yog li cov xov hlau tsis tuaj yeem yooj yim dua:

NEO-6M GPS ModuleWiring rau Arduino UNO

VCC VIN

RX TX tus pin txhais hauv software software

TX RX tus pin txhais hauv cov software software

GND GND

L293D IB

Duab
Duab

L293D yog 16-tus pin tsav tsheb IC uas tuaj yeem tswj tau txog ob lub DC motors ib txhij hauv ib qho kev qhia. Vim li cas thiaj siv L293D?

Cov tswv yim rau tus tsav tsheb IC lossis tus tsav tsheb yog lub teeb liab tam sim no. Lub luag haujlwm ntawm Circuit yog hloov pauv lub teeb liab tam sim no mus rau lub teeb liab tam sim no. Qhov teeb liab tam sim no tau muab rau lub tshuab.

TinyGPS ++ Lub Tsev Qiv Ntawv:

TinyGPS ++ lub tsev qiv ntawv ua rau nws yooj yim kom tau txais cov ntaub ntawv ntawm qhov chaw hauv hom ntawv uas muaj txiaj ntsig thiab nkag siab tau yooj yim. Qhov chaw TinyGPS ++ tso cai rau koj kom tau txais txoj hauv kev ntau dua li tsuas yog qhov chaw, thiab hauv txoj hauv kev yooj yim, ntxiv rau qhov chaw, koj tuaj yeem tau txais:

> hnub tim

> sijhawm

> ceev

> chav kawm

> altitude

> satellites

> hmoob

Kauj Ruam 2: Kev ntes Latitude thiab Longitude:

Capturing Latitude thiab Longitude
Capturing Latitude thiab Longitude

Kuv yuav hais kom rub cov ntaub ntawv fritzing muab hauv cov phiaj xwm nplooj ntawv kom zoo dua ntawm kev sib txuas lossis yog tias koj muaj kev tsis ntseeg siab thov nug hauv cov lus.

Kauj Ruam 3: Arduino Code rau Qhov Chaw Ntes:

Arduino Code rau Kev Ntsuas Qhov Chaw
Arduino Code rau Kev Ntsuas Qhov Chaw

Nco tseg: Koj yuav tsum teeb tsa TinyGPS ++ Library

txuas raws li daim duab qhia chaw thiab xa cov lus saum toj no, Qhib cov ntawv saib ntawm tus nqi baud ntawm 9600 thiab koj yuav pom cov zis hauv qab no

Nco tseg: Txhawm rau kom tau txais latitude thiab longitude nws yuav siv qee lub sijhawm vim tias tus neeg txais yuav tsum tau ntes cov cim. thaum twg nws pib tau txais cov cim ntawm LED ntawm GPS module ntsais muag.

Kauj Ruam 4: Cov Lus Ceeb Toom Los Ntawm LED:

Qhov Chaw Ceeb Toom Qhia Los Ntawm LED
Qhov Chaw Ceeb Toom Qhia Los Ntawm LED
Qhov Chaw Ceeb Toom Qhia Los Ntawm LED
Qhov Chaw Ceeb Toom Qhia Los Ntawm LED

Yog li kom ntseeg tau tias kuv lub tswv yim ua haujlwm Kuv tau ua tus qauv siv LED los ceeb toom rau lub hom phiaj. Yog li qhov kuv tau ua yog, Kuv tau ntxiv Latitude thiab Longitude qhov tseem ceeb ntawm qhov chaw los ntawm cov cai dhau los (Nyeem_Lat_Lng.ino) thiab pom qhov deb mus rau qhov chaw ntawm qhov chaw tam sim no. Thiab siv nws los teeb tsa ntau yam uas LED yuav tsum qhib.

Tshaj tawm cov cai thiab koj yuav pom cov hauv qab no ntawm cov ntawv saib.

Duab
Duab

Yog li qhov kev ncua deb mus rau qhov chaw tuaj yeem siv los txheeb xyuas qhov ntau ntawm qhov ua haujlwm tso tawm (ceeb toom) yuav tsum ua.

Kauj Ruam 5: Qhov Kawg

Qhov Kawg!
Qhov Kawg!
Qhov Kawg!
Qhov Kawg!
Qhov Kawg!
Qhov Kawg!

OK kuv tsab ntawv ua haujlwm tau zoo. Tam sim no kuv xav muab kuv txoj haujlwm tso rau hauv lub thawv uas tuaj yeem haum rau Arduino, GPS module, lub cev muaj zog nrog tus tsav tsheb IC, thiab lub zog 9V.

Kev txuas mus rau L293D IC

Duab
Duab
  • Txuas 5V kom Pab Tau 1, Vs thiab Vss ntawm L293D
  • Txuas cov pins tso tawm digital (peb tab tom siv 6 thiab 7) txhawm rau nkag 1 thiab tawm tswv yim 2 ntawm L293D.
  • Txuas koj Arduino's GND rau ob qho GND pins ntawm tib sab ntawm L293D
  • Thaum kawg txuas cov zis 1 thiab tso tawm 2 ntawm L293D rau koj lub koob pins.

Pom zoo: