0% found this document useful (0 votes)
56 views4 pages

Gy Neo6mv2

Uploaded by

zoran zdravcha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views4 pages

Gy Neo6mv2

Uploaded by

zoran zdravcha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

GY-NEO6MV2 / 180943

First connect 5V power to the module so that the internal battery can start charging for at least 1 hour best for 2 hours
before continuing with this tutorial.
Hardware Overview:
Receiver Type: 50 channels, GPS L1(1575.42Mhz)
Horizontal Position Accuracy: 2.5m
Navigation Update Rate: 1HZ (5Hz maximum)
Capture Time: Cool start: 27sHot start: 1s
Navigation Sensitivity: -161dBm
Communication Protocol: NMEA, UBX Binary, RTCM
Serial Baud Rate: 4800-230400 (default 9600)
Operating Temperature: -40°C ~ 85°C
Operating Voltage: 2.7V ~ 3.6V
Operating Current: 45mA
TXD/RXD Impedance: 510Ω

There is an LED on the NEO-6M GPS Module which indicates the status of Position Fix. It’ll blink at various states depending
on what state it’s in:
No Blinking – It’s searching for satellites.
Blink every 1s – Position Fix is found(The module can see enough satellites).
Must be used outside not indoors

Wiring NEO-6M GPS module with Arduino UNO

Libaries required:
<TinyGPS.h> https://www.arduinolibraries.info/libraries/tiny-gps
<RTClib.h> download RTClib-2.0.1.zip https://www.arduinolibraries.info/libraries/rt-clib

Hardware Used:
A shield with RTC and SC Card: ST1046 / XD-204 / 170098
https://mantech.co.za/Stock.aspx?Query=ST1046and
SD card: https://mantech.co.za/ProductInfo.aspx?Item=340M5017-D
Datasheet for the NEO-6M https://mantech.co.za/Datasheets/Products/GY-NEO6MV2^1.pdf
The sketch
/* GPS_logger by LogMaker360
code belongs to this video: https://www.youtube.com/watch?v=dy2iygCZTIM
write by Moz for Youtube changel LogMaker360 26-10-2016
*/
// I have a Data Logger Module Shield V1.0 for Arduino UNO SD Card
// and a GY-NEO6MV2 new NEO-6M GPS Module NEO6MV2 gps
//real time clock is included on the Data logger shield.
#include <SoftwareSerial.h>
#include <TinyGPS.h> // https://www.arduinolibraries.info/libraries/tiny-gps
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include "RTClib.h" // download RTClib-2.0.1.zip https://www.arduinolibraries.info/libraries/rt-clib
#include <OneWire.h>
File dataFile;
DateTime now;
RTC_DS1307 RTC;
const int chipSelect = 10; // 10 pin for the SD card logger shield.
long lat,lon; // create variable for latitude and longitude object
SoftwareSerial gpsSerial(3, 4); // create gps sensor connection, UNO D3 to Mod RX, UNO D4 to Mod TX
TinyGPS gps; // create gps object

void setup(){
Serial.begin(9600); // connect serial some olther gps sensor try Serial.begin(9600); and gpsSerial.begin(4800);
gpsSerial.begin(9600); // connect gps sensor
Wire.begin(); // real time clock
RTC.begin(); // also for the real time clock
//check or the Real Time Clock is on
if (! RTC.isrunning()) {
Serial.println("RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
// uncomment it & upload to set the time, date and start run the RTC!
RTC.adjust(DateTime(__DATE__, __TIME__));
}
//setup SD card
Serial.print("Initializing SD card...");
// see if the SD card is present and can be initialized:
if (!SD.begin(chipSelect)) {
Serial.println("Card failed, or not present");
// don't do anything more:
return;
}
Serial.println("card initialized.");
//Indexing: date (year / month / day) prints only at the first line.
now = RTC.now();
dataFile = SD.open("gpsLOG.txt", FILE_WRITE);
dataFile.print("Start logging on: ");
dataFile.print(now.year(),DEC);
dataFile.print('/');
dataFile.print(now.month(),DEC);
dataFile.print('/');
dataFile.print(now.day(),DEC);
dataFile.println(" ");
dataFile.println("Latitude Longitude Time");
dataFile.close();
}

void loop(){
now = RTC.now();
//log the time and gps coordinaten every 10 seconds
while(gpsSerial.available()){ // check for gps data
if(gps.encode(gpsSerial.read())){ // encode gps data
gps.get_position(&lat,&lon); // get latitude and longitude
// display position
Serial.print("Position: ");
Serial.print("coordinaat ");Serial.print(lat/1000000); Serial.print(".");Serial.print(lat%1000000);Serial.print(" ");// print
latitude to serialmonitor

Serial.print(", ");Serial.print(lon/1000000); Serial.print(".");Serial.println(lon%1000000);// print longitude to serialmonitor


dataFile = SD.open("gpsLOG.txt", FILE_WRITE);
if (dataFile) {
dataFile.print(lat/1000000); dataFile.print("."); dataFile.print(lat%1000000); dataFile.print(" ");// print latitude to the SD
card
dataFile.print(" ");
dataFile.print(lon/1000000); dataFile.print("."); dataFile.print(lon%1000000);// print longitude to SD Card
dataFile.print(" ");
dataFile.print(now.hour(),DEC);
dataFile.print(":");
dataFile.print(now.minute(),DEC);
dataFile.print(":");
dataFile.println(now.second(),DEC);
dataFile.close();
// print to the serial port too:
Serial.println("data stored");
}
///Serial.println("minute past");
// }
// if the file isn't open, pop up an error:
else {
Serial.println("error opening gpslog.txt");
}//}
delay(10000);
}
}
} // END
Other Referances:
https://lastminuteengineers.com/neo6m-gps-arduino-tutorial/
check pins int RXPin = 3; //from NEO-6M pin RX
int TXPin = 4; //from NEO-6M pin TX
Burn sketch and go outside with laptop open Serial Monitor

Real Time Clock: RTC test and adjusting Date and time.
https://learn.adafruit.com/adafruit-data-logger-shield/using-the-real-time-clock

Using the SD Card:


https://learn.adafruit.com/adafruit-data-logger-shield/using-the-sd-card

Image of setup connected to a 6V battery as Stand Alone Trakker

wait +-40 - 120 second for blinking to start.


GPSLOG.TXT files

You might also like