Gy Neo6mv2
Gy Neo6mv2
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
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
Real Time Clock: RTC test and adjusting Date and time.
https://learn.adafruit.com/adafruit-data-logger-shield/using-the-real-time-clock