GT-U7 GPS Module with EEPROM and active antenna (HCMODU0172)

Wireless and wired modules including Bluetooth, Ethernet, and IR kits.
Post Reply
admin
Site Admin
Posts: 865
Joined: Sun Aug 05, 2012 4:02 pm

GT-U7 GPS Module with EEPROM and active antenna (HCMODU0172)

Post by admin » Wed Dec 02, 2020 10:29 am

Image




This is a compact GPS module made by open-smart and utilises the GT-U7 GPS receiver. The module also includes a USB serial interface which can be accessed via a micro USB connector or directly via its 0.1” pitch serial TTL header (supplied header pins requires soldering). Out of the box the module will automatically output GPS data in the standard NMEA format making it compatible with many types of hardware and software with no configuration required. The module is also supplied with a detachable antenna which connects to the module via a U.FL pigtail cable allowing the antenna to be located in the optimal position.


Specification:

Product code: HCMODU0172
Operating frequency: L1 (1575.42 +/- 10MHz)
Operating voltage: 3.3 - 5.2V
Operating current: normal mode is 50mA, power-saving mode is 30mA
Communication interface: TTL serial port, micro USB interface (can be connected to a computer to debug)
Serial port baud rate: 9600bps
Communication format: 8N1
Interface logic voltage: 3.3V or 5V
External antenna interface: IPX.
Module dimensions: 27.5 x 26.5 x 4mm
Antenna dimensions: 15.3 x 15.3 x 6.8mm



Downloads:

Driver:
u-blox_GPS_Receiver_drv_1206.zip

Schematic:
GT-U7 Schematic.pdf

U-Center tool:
u-center Official Tool.zip

Arduino example:
neo6_reader.zip




Disclaimer: Libraries, example code, and diagrams within this forum thread are provided as an additional free service by Hobby Components and are not sold as part of any product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.
You do not have the required permissions to view the files attached to this post.

dbvolvox
Posts: 2
Joined: Tue Jan 26, 2021 3:25 pm

Re: GT-U7 GPS Module with EEPROM and active antenna (HCMODU0172)

Post by dbvolvox » Thu Jan 27, 2022 12:26 pm

I am using this module to set the time and date of a DS3231 RTC. Here is the code if others want to use it.

Code: Select all

// Syncing RTC with GPS
// GT-U7 gps module from Hobby Components HCMODU0172
// Code adapted from OPEN-SMART download from Hobby Components
// By dbvolvox January 2022
// RTC is DS3231 module e.g. Hobby Components HCMODU0094
//--------------------------------------
//NOTE: you should upload the code first and then connect to GPS module
//Wiring guide
//GT-U7 GPS    ----  Arduino Mega 2560 R3 
// VCC         ----   5V
// GND         ----   GND
// RXD         ----   NOT CONNECT
// TXD         ----   RX (19) Serial1
// PPS         ----   NOT CONNECT
// RTC
// VCC         ----   5V
// GND         ----   GND
// SDA         ----   20
// SDL        ----    21
//--------------------------------------
#include <DS3232RTC.h>      // https://github.com/JChristensen/DS3232RTC

int hh, mm, ss, dd, mo, yy, y;
#define GPRMC_TERM "$GPRMC,"   //Defines the NMEA sentence to be parsed.

char nmeaSentence[68];

String gpsDate;		
String gpsTime;			//time at prime meridian

void setup()	
{
  Serial.begin(9600);
  Serial1.begin(9600);
  setSyncProvider(RTC.get);   //the function to get the time from the RTC
    if(timeStatus() != timeSet)
        Serial.println("Unable to sync with the RTC");
    else
        Serial.println("RTC has set the system time");
      
}

void loop()		//
{
    digitalClockDisplay();
    delay(500);
    
  // For one second we parse GPS data and report some key values
  for (unsigned long start = millis(); millis() - start < 1000;)	//Keep searching GPS information in one second
  {
    while (Serial1.available())	//The serial port gets the data and starts parsing
    {
      char c = Serial1.read();	

      switch(c)					
      {
      case '$':					//$GPRM is the beginning of the sentence required
        Serial1.readBytesUntil('*', nmeaSentence, 67);		
        
         gpsTime = parseGprmcTime(nmeaSentence);

        if(gpsTime > "")		//If it is not null, use the value
        {
          int hh = gpsTime.substring(0,2).toInt();
          int mm = gpsTime.substring(2,4).toInt();
          int ss = gpsTime.substring(4,6).toInt();
          int dd = gpsTime.substring(6,8).toInt();
          int mo = gpsTime.substring(8,10).toInt();
          int yy = gpsTime.substring(10,12).toInt();
          int y = 2000 + yy;
          setTime(hh, mm, ss, dd, mo, y); 
          RTC.set(now());       
        }		
      }
    }
  }
}
void digitalClockDisplay()
{
    // digital clock display of the time on serial monitor
    Serial.print(hour());
    printDigits(minute());
    printDigits(second());
    Serial.print(' ');
    Serial.print(day());
    Serial.print(' ');
    Serial.print(month());
    Serial.print(' ');
    Serial.print(year());
    Serial.println();
}

void printDigits(int digits)
{
    // utility function for digital clock display: prints preceding colon and leading 0
    Serial.print(':');
    if(digits < 10)
        Serial.print('0');
    Serial.print(digits);
}

//Parse GPRMC NMEA sentence data from String
//String must be GPRMC or no data will be parsed
//Returns Time and Date
String parseGprmcTime(String s)
{
  int pLoc = 0; //paramater location pointer
  int lEndLoc = 0; //lat parameter end location
  int dEndLoc = 0; //direction parameter end location
  String gpsTime;
  String gpsT;
  String gpsDate;

  /*make sure that we are parsing the GPRMC string. 
   Found that setting s.substring(0,5) == "GPRMC" caused a FALSE.
   There seemed to be a 0x0D and 0x00 character at the end. Data is not
   always complete so the location of the characters to be extracted is
   uncertain hence the search for loops used to count up the actual
   position of , delimiters.  */
  if(s.substring(0,4) == "GPRM")
  {
   // Serial.println(s);
     for(int i = 0; i < 2; i++)             // Look for time
    {
      if(i < 1) 
      {
        pLoc = s.indexOf(',', pLoc+1);       
      }
      else
      {
        lEndLoc = s.indexOf(',', pLoc+1);
       gpsT = s.substring(pLoc+1, pLoc+7);
      }
    }
    int pLoc = 0;                          // Look for date
    int lEndLoc = 0;
    
      for(int i = 0; i < 10; i++)
     {
        if(i < 9) 
      {
        pLoc = s.indexOf(',', pLoc+1);
       
       }
      else
      {
        lEndLoc = s.indexOf(',', pLoc+1);
        gpsDate = s.substring(pLoc+1, lEndLoc);
       }
    }

      gpsTime = gpsT + gpsDate;
   }
    return gpsTime;                     // Time and date in one string
    
  }


// Turn char[] array into String object
String charToString(char *c)
{

  String val = "";

  for(int i = 0; i <= sizeof(c); i++) 
  {
    val = val + c[i];
  }

  return val;
}


Post Reply

Return to “Wireless / Wired”