GPS Arduino: don wuri da sanyawa

GPS Arduino

Tare da ci gaban hukumar Arduino na iya aiwatar da ɗimbin ayyuka, iyakar yawanci hasashe ne. Tare da kayan lantarki da kayayyaki, ana iya ƙara ayyukan aiki domin ku iya yin ƙarin abubuwa. Ofayan waɗannan ayyukan iya zama iyawa don gano abubuwa ko mutane, ko gano wuri ta hanyar sanyawa tare da Arduino GPS.

Irin wannan sakawa da kuma ganowa ana iya yin ta ta amfani da RFID ko masu karɓar karɓa kamar wanda zamu tattauna a wannan labarin. Tare da wannan zaku iya ƙirƙirar ɗimbin ayyuka, daga wasanni da abin da zaku ƙirƙiri mai ganowa da gano abubuwa, don gano abubuwan da aka sata, don iya gano kanku ta amfani da GPS, da sauransu

Arduino NEO-7 GPS Module

NEO-6 GPS Arduino

Don samun Arduino GPS, zaka iya amfani da NEO-6 na'urori, dangin da U-Blox suka ƙera kuma ana iya haɗa shi da kwamitin Arduino ta hanya mai sauƙi. Bugu da kari, suna da cikakkiyar hanyar sadarwa, tare da UART, SPI, I2C, da USB, ban da tallafawa NMEA, UBX binary da RTCM ladabi.

Bugu da kari, wannan Arduino GPS tare da NEO-6 shima yana ba ku damar rage girman aikinku, tunda yana da karami, kazalika da farashi mai rahusa. Dangane da amfani, shima kadan ne. Lokacin a yanayin aiki, zai buƙaci 37mA kawai. Ana amfani da shi daga 2.7 zuwa 3.6V don samfurin NEO-6Q da NEO-6M, yayin da akwai wasu ƙananan ƙarfin lantarki da ake kira NEO-6G waɗanda kawai ke buƙata tsakanin 1.75 da 2v.

Idan sun hade cikin a koyaushe, zai hada da a mai sarrafa wutar lantarki wanda zai ba shi izinin yin amfani da shi kai tsaye daga haɗin Arduino 5v.

Sauran abubuwa masu ban sha'awa na wannan rukunin sune:

  • Daƙiƙa 30 na lokacin ƙonewa sanyi, kuma kawai dakika 1 don farawa mai zafi.
  • La matsakaicin ma'aunin mita suna aiki ne kawai da 5Hz.
  • Matsayi daidai na mita 2.5 na bambancin.
  • Saurin daidai 0.1 m / s.
  • Bambancin fuskantarwa na 0.5º kawai.

Inda zan sayi NEO-6 don Arduino GPS

Kuna iya samun waɗannan na'urori da kayayyaki a cikin shagunan lantarki da yawa na musamman, ko kuma akan Amazon. Misali, anan zaka iya saya shi a farashi mai arha:

Misali tare da Arduino

Screenshot na Arduino IDE

Kuna iya koyo game da shirye-shirye tare da Arduino tare da kwas ɗin PDF kyauta wanda zaku iya sauke daga nan.

Abu na farko da yakamata kayi don haɗa shi da allon ci gaban ka kuma samun Arduino GPS ɗinka shine ka haɗa tsarin NEO-6 ɗinka zuwa hukumar. Da haɗi ana yin su ne cikin sauƙi (haɗin haɗin NEO-6 - haɗin Arduino):

  • GND - GND
  • CA - RX (D4)
  • RX - TX (D3)
  • Vcc - 5V

Da zarar kun haɗa shi, ku ma zazzage shi SoftSerial laburare a cikin ID ɗinku na Arduino, kamar yadda ake buƙata don sadarwar serial. Da alama kun riga kun sami ta daga wasu ayyukan, amma idan ba haka ba, dole ne ku samu zazzage kuma shigar a cikin IDE.

Da zarar an gama wannan, zaku iya farawa tare da lambarku mai sauƙi don yin karatun. Misali, tunda ana iya amfani da ladabi da yawa, ga zane don NMEA:

#include <SoftwareSerial.h>

const int RX = 4;
const int TX = 3;

SoftwareSerial gps(RX, TX);

void setup()
{
   Serial.begin(115200);
   gps.begin(9600);
}

void loop()
{
   if (gps.available())
   {
      char data;
      data = gps.read();
      Serial.print(data);
   }
}

Tabbas, zaku iya yin gyare-gyarenku ko amfani da wasu ladabi idan kuna so ... Hakanan zaku iya amfani da misalan da ke cikin IDE ɗin ku don wannan ɗakin karatun. Amma, kafin ƙare labarin, ya kamata ku san hakan tsarin NMEA (National Marine Electronics Asociation) na musamman ne, don fahimtar sa, dole ne ku san yadda ake amfani da shi:

$ GPRMC, hhmmss.ss, A, llll.ll, a, yyyyy.yy, a, vv, xx, ddmmyy, mm, a * hh

Wato, $ GPRMC yana biye da jerin sigogi da ke nuna wuri:

  • hhmmss.ss: shine lokacin UTC cikin awanni, minti da sakan.
  • A: matsayin mai karɓar, inda A = Yayi da V = faɗakarwa.
  • llll.ll, zuwa: shine latitude, inda a na iya zama N ko S, don arewa ko kudu.
  • yyyy.yy, a: shine tsawon. Bugu da ƙari na iya zama E ko W, wato, gabas ko yamma.
  • vv: gudun a kulli
  • xx: shine kwas din a digiri.
  • djmmyy: shine ranar UTC, a cikin kwanaki, watanni da shekara.
  • mm, a: shine bambancin maganadisu a cikin darajoji, kuma a na iya zama E ko W na gabas ko yamma.
  • * H H: Checksum ko cak.

Misali, zaka iya samun wani abu kamar haka:

$GPRMC,115446,A,2116.75,N,10310.02,W,000.5,054.7,191194,020.3,E*68


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

Kasance na farko don yin sharhi

Bar tsokaci

Your email address ba za a buga. Bukata filayen suna alama da *

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.