How to Interface GPS Module (NEO-6m) with Arduino

image-2

The Global Positioning System (GPS) is a satellite-based navigation system made up of a network of 24 satellites placed into orbit by the U.S. Department of Defense. GPS was originally intended for military applications, but in the 1980s, the U.S. government made the system available for civilian use. GPS works in any weather conditions, anywhere in the world, 24 hours

NEO-6m

The GPS NEO-6M is a great little GPS module that is very easy to use with the Arduino. It has excellent tracking performance and is very sensitive to satellite signals. The module comes with a built-in antenna and can track up to 22 satellites.

Arduino Uno

Arduino UNO R3 is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins, 6 analog input pins, a USB connection, a power jack, an ICSP header, and a reset button. It is the successor to the Arduino Duemilanove. The Arduino UNO R3 is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins, 6 analog input pins, a USB connection, a power jack, an ICSP header, and a reset button. It is the successor to the Arduino Duemilanove. The ATmega328P on the Arduino UNO R3 comes pre-programmed with a bootloader that allows you to upload new code to it without using an external programmer. You can simply use a USB cable to connect the Arduino UNO R3 to your computer and upload your code. The Arduino UNO R3 has a number of features that make it a great choice for your next microcontroller board: -It is based on the ATmega328P, which is a widely used and well-supported microcontroller. -It has a USB connection, so it is easy to connect

LCD 16×2

A 16×2 LCD display is a liquid crystal display that is made up of two lines with 16 characters each. This type of display is commonly used in devices such as calculators, microwaves, and some types of industrial equipment.

Arduino Uno R3 x 1Buy Now
LCD display x 1Buy Now
GPS Neo6m Buy Now
Bread Board x 1Buy Now
Jumper wire male to female x 1Buy Now

connections

Arduino Uno to bluetooth

  • GND ==> GND
  • TX ==> Digital pin (D3)
  • RX ==> Digital pin (D4)
  • Vcc ==> 3.3 V

Arduino Uno to LCD

  • VSS ==> GND
  • VCC ==> 5V
  • VEE ==> 10K Resistor
  • RS ==> A0 (Analog pin)
  • R/W ==> GND
  • E ==> A1
  • D4 ==> A2
  • D5 ==> A3
  • D6 ==> A4
  • D7 ==> A5
  • LED+ ==> VCC
  • LED- ==> GND

Arduino Code

#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
#include <TinyGPS.h>
//long   lat,lon; // create variable for latitude and longitude object
float lat = 28.5458,lon = 77.1703; // create variable for latitude and longitude object 
SoftwareSerial gpsSerial(3,4);//rx,tx
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
TinyGPS gps; // create gps object
void setup(){
Serial.begin(9600); // connect serial
//Serial.println("The GPS Received Signal:");
gpsSerial.begin(9600); // connect gps sensor
lcd.begin(16,2);
}
 
void loop(){
    while(gpsSerial.available()){ // check for gps data
    if(gps.encode(gpsSerial.read()))// encode gps data
    { 
    gps.f_get_position(&lat,&lon); // get latitude and longitude
    // display position
    lcd.clear();
    lcd.setCursor(1,0);
    lcd.print("GPS Signal");
    //Serial.print("Position: ");
    //Serial.print("Latitude:");
    //Serial.print(lat,6);
    //Serial.print(";");
    //Serial.print("Longitude:");
    //Serial.println(lon,6); 
    lcd.setCursor(1,0);
    lcd.print("LAT:");
    lcd.setCursor(5,0);
    lcd.print(lat);
    //Serial.print(lat);
    //Serial.print(" ");
    
    lcd.setCursor(0,1);
    lcd.print(",LON:");
    lcd.setCursor(5,1);
    lcd.print(lon);
    
   }
  }
  
  String latitude = String(lat,6);
    String longitude = String(lon,6);
  Serial.println(latitude+";"+longitude);
  delay(1000);
  
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Main Menu