LC76G GNSS Module

From Waveshare Wiki
Jump to: navigation, search
LC76G
LC76G GNSS Module.jpg
L76K
L76K GPS Module.jpg
{{{name3}}}


GNSS
UART/I2C
{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

The LC76G GPS Module is a Multi-GNSS (Global Navigation Satellite System) module, supports GPS, BeiDou (BDS), GLONASS, Galileo, and QZSS systems, allows multi-system combined or single-system independent positioning. Supports EPO™ (Extended Predictive Orbit) and EASY™ (Embedded Assist System) function, provides a good positioning experience of fast, accurate, high-performance.
For this module, we provides control demos for Raspberry Pi, Arduino, Raspberry Pi Pico and ESP32.

Parameters

Model LC76G(AB) L76K L76B
Compatible
Picture
LC76G p.png
L76K p.png
L76B p.png
GNSS GPS/GLONASS/Galileo/BDS/QZSS GPS/GLONASS/BDS/QZSS GPS/BDS/QZSS
Form Factor LCC LCC LCC
Dimensions 9.7×10.1×2.4 9.7×10.1×2.4 9.7×10.1×2.4
Weight (g) 0.6 0.4 0.5
Normal Operating Temperature -40℃ ~+85℃ -40℃ ~+85℃ -40℃ ~+85℃
Storage Temperature -40℃ ~+90℃ -40℃ ~+90℃ -40℃ ~+90℃
Main Feature
Function Standard Standard Example
Chip AG3352Q AT6558R MT333
L1 Receiver (Channel) 47 tracking ch 32 tracking ch/72 acquisition ch 22 tracking ch/66 acquisition ch
L1 Receiver SBAS Support N/A Support
A-GNSS Support Support Support
Sensitivity (Auto-aquisition) -147dBm -148dBm -148dBm
Sensitivity (re-acquisition) -159dBm -160dBm -160dBm
Sensitivity (tracking) -166dBm -162dBm -163dBm
TTFF (Time To First Fix) Cold Starts 26s, Autonomous
12s, with EASY™
5s,with EPO™
30s, Autonomous
5.5s, With AGNSS
35s, Autonomous
15s, with EASY™
TTFF (Time To First Fix) Warm Starts 20s, Autonomous
2s, with EASY™
/ 30s, Autonomous
5s, with EASY™
TTFF (Time To First Fix) Hot Starts 1s 2s 1s
Position Accuracy 1.5m CEP 2.0m CEP 2.5m CEP
Velocity Accuracy 0.1m/s 0.1m/s 0.1m/s
Acceleration Accuracy (Max) 0.1m/s² 0.1m/s² 0.1m/s²
Timing Accuracy 100ns 30ns 10ns
Update Rate (Max) 10Hz 5Hz 10Hz
Default Baudrate 115200bps 9600bps 9600bps
Geo-fence /
Interference Detection /
Anti-jamming /
LNA
Electrical Parameters
Power Supply 2.55to3.6V 2.7Vto3.4V 2.8Vto4.3V
Power Consumption (Acquisition) 36mA(G3B) 29mA (GPS+BDS) 29mA (GPS+BDS)
Power Consumption (Tracking) 36mA(G3B) 29mA (GPS+BDS) 18mA (GPS+BDS)
Power Consumption (RTC backup/low power consumption 13μA 8μA 7μA
Interface
UART
IIC (NMEA) /
Reset
Timing Pulse
Antenna
Short circuit and open circuit detection
Antenna Type Active, Passive Active, Passive Active, Passive
Antenna Power Supply External or Internal External or Internal External or Internal

Interface

Interface Description
VCC Power supply (3.3V~5V)
GND Ground
TX UART data output
RX UART command input
PPS GPS status indicator
RST Reset pin
SDA I2C data pin
SCL I2C clock pin

NMEA0183

  • The host control output NMEA0183 information from the serial port and analyzes NMEA 0183 sentence to output the information.
  • NMEA 0183 is a standard format developed by the National Marine Electronics Association for marine electronic equipment. It has now become a unified RTCM (Radio Technical Commission for Maritime Services) standard protocol for GPS navigation equipment.
  • NMEA 0183 includes 7 protocol frames including $GPZDA, $GPRMC, $GPVTG, $GPGNS, $GPGGA, $GPGSA, $GPGSV*3, $GPGLL, $GPGST, among which the first two characters followed by $ represent the country or region. For example, GPGGA stands for American GPS, BDGGA stands for China Beidou, GLGGA stands for Russia GLONASS, GAGGA stands for EU Galileo, and GNGGA stands for multi-satellite joint positioning.
  • Take $GPRMC as an example to briefly describe the information represented by each part of the protocol frame. Please refer to the NMEA 0183 manual for the other 6 protocol frames.
Recommended Minimum Specific GPS/TRANSIT Data (RMC) recommended positioning information
$GPRMC,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>,<9>,<10>,<11>,<12> *hh<CR><LF>
$GNRMC,010555.000,A,2232.4682,N,11404.6748,E,0.00,125.29,230822,,,D*71
<1> UTC time, hhmmss.sss (hour, minute, second) format
<2> Positioning state, A=valid positioning, V=invalid positioning
<3> Latitude ddmm.mmmm (degrees and minutes) format (the front 0 will also be transmitted)
<4> Latitude hemisphere N (Northern Hemisphere) or S (Southern Hemisphere)
<5> Longitude dddmm.mmmm (degrees and minutes) format (the preceding 0 will also be transmitted)
<6> Longitude hemisphere E (East longitude) or W (West longitude)
<7> Ground speed (000.0~999.9 knots, the preceding 0 will also be transmitted)
<8> Ground heading (000.0~359.9 degrees, with true north as the reference, the preceding 0 will also be transmitted)
<9> UTC date, ddmmyy (day month year) format
<10> Magnetic declination (000.0~180.0 degrees, the previous 0 will also be transmitted)
<11> Magnetic declination direction, E (East) or W (West)
<12> Mode indication (only NMEA0183 version 3.00 output, A=autonomous positioning, D=difference, E=estimation, N=data invalid)
*hh: The last check code *hh is the data used for parity. In normal use, it is not necessary, but when there is strong electromagnetic interference in the surrounding environment, it is recommended to use. hh represents the bitwise XOR value of all characters of "$" and "*" (excluding these two characters). Individual manufacturers define their own statement format starting with "$P", followed by a 3-character manufacturer ID number, followed by a custom data body.

PAIR Sentence

This chapter describes common PAIR messages (proprietary NMEA messages defined by the chipset vendor). "P" for proprietary messages and "AIR" for chipset vendor-defined commands.

Sentence Description Example Function
$PAIR864,<PortType>,<PortIndex>,<Baudrate>*<Checksum> Configure NMEA UART baudrate $PAIR864,0,0,115200*1B
$PAIR864,0,0,9600*13
Set the baudrate as 115200/9600

<CMD>Support the following baudrate
9600
115200(default)
230400
460800
921600
3000000

$PAIR050, Set the positioning frequency $PAIR050,1000*12 Set the positioning frequency as 1Hz

<Interval>Positioning interval:
100–1000, (Default:1000) (If the set frequency is greater than 1 Hz, only RMC and GGA are output at the set frequency, and the output of other NMEA sentences is kept at 1 Hz.)

$PAIR062,<Type>,<OutputRate>*<Checksum> Configure NMEA statement output type and output frequency $PAIR062,0,3*3D Set the output frequency of GGAT statement in NMEA output to once every 3 positions
(refer to Quectel_LC26G&LC76G&LC86G_GNSS_Protocol_Specification_V1.0.0_Preliminary, 2.3.13)
$PAIR066,<GPS_Enabled>,<GLONASS_Enabled>,<Galileo_Enabled>,<BDS_Enabled>,<QZSS_Enabled>,0*<Checksum> Configuring galaxies $PAIR066,1,1,1,1,0,0*3A Configuring galaxies as GPS+GLONASS+Galileo+BDS

<*_Enabled>GNSS galaxies configuring
0 = Disable 1 = Enable (Configure GNSS galaxy mode by modifying each enabled bit.)

$PAIR004*<Checksum> Hot starts $PAIR004*3E Hot starts
$PAIR005*<Checksum> Warn starts $PAIR005*3F Warm starts
$PAIR006*<Checksum> Cold starts $PAIR006*3C Cold starts
$PAIR007*<Checksum> Clear system configuration and cold starts $PAIR007*3D Clear system configuration and cold starts

Note: After changing the configuration content, you need to modify the checksum <Checksum> accordingly. For more details, you can refer to LC76G chip GNSS protocol.


Working with Windows

  • Connect the GPS antenna and the USB to the UART module (not included), and then connect to the computer as the picture shows. After connecting, the power indicator light (PWR) is always on.

LC76G Windows01.png
Note: the red cable is not VCC and the black cable is not GND.

Module USB to UART
VCC 5V/3.3V
GND GND
RX TXD
TX RXD
PPS NC
  • Open the computer serial port debugging assistant, set the corresponding serial port number (com5 here), baud rate 9600, 8 data bits, 1 stop bit, no parity bit, and no flow control.

Sscom can be downloaded Here.
LC76G Windows02.png
Note:
1. Due to the instability of GPS indoor search, please put the module or antenna next to the balcony or window, or conduct experiments directly outdoors.
2. The first positioning of the module (cold start), under normal circumstances (outdoors, good weather, no large building block), takes 35 seconds to successfully locate, please wait patiently. If the weather conditions are bad, it may take longer to locate, or even fail to locate.

Download U-center, unzip it, and open it for installation. Run the program, click the Receiver menu, select Port, and set the actual serial port number, Baudrate: 9600. Click (connect button) to connect to the GPS module, and the u-center will display various information, as shown below:
LC76G Windows04.png

Working With Raspberry Pi

Provide C and Python demos for control in Raspberry Pi.

Enable UART Port (Skip if enabled)

Enable the Raspberry Pi terminal and input the following commands to enter the interface.

sudo raspi-config

Choose Interfacing Options -> Serial, close the shell visit, and enable the serial port of the hardware:
L76K GPS Module RPI.png

Hardware Connection

LC76G GPS Module RPI02.png

Module Raspberry Pi
VCC 5V
GND GND
TX P15
RX P14
PPS NC

Minicom Debug

Download and install minicom tool:

sudo apt-get install minicom

The corresponding serial port number for the position hardware serial port:

ls -l /dev/serial*

If the system has used the serial port and has been modified, there are two scenarios:
The default state after enabling the UART function:
Raspberry Pi Documentation-GPIO31.png
The state after modifying the UART config.
Raspberry Pi Documentation-GPIO32.png
Need to find the serial port number corresponding to serial0 (that is, the serial port on GPIO), as shown in Figure 1, the serial port number is ttyS0, and Figure 2 is ttyAMA0; use minicom to open the serial port:

sudo minicom -D /dev/ttyS0 -b 9600

-D stands for port. If the serial port number in the previous step is ttyAMA0, then it is:

sudo minicom -D /dev/ttyAMA0 -b 9600

The default baud rate of minicom is 115200, if you need to set the baud rate to 9600, add the parameter -b 9600.
LC76G GPS HAT X3PI02.png
Exit: Ctrl+A then press X alone, YES to enter.

Download and Run the Test Demo

cd
sudo apt-get install unzip -y
sudo wget https://files.waveshare.com/upload/d/dc/LC76G_GPS_Module_code.zip
sudo unzip LC76G_GPS_Module_code.zip -d ./LC76G_GPS_Module_code
sudo chmod 777 -R ./LC76G_GPS_Module_code
cd ./LC76G_GPS_Module_code

Or click here to download, and then unzip it to Raspberry Pi.

Environment Debugging

Install the related function library of the demo.

BCM2835

#Open the Raspberry Pi terminal and run the following commands: 
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz
tar zxvf bcm2835-1.71.tar.gz 
cd bcm2835-1.71/
sudo ./configure && sudo make && sudo make check && sudo make install
# For more details, you can refer to: http://www.airspayce.com/mikem/bcm2835/

WiringPi

Open he Raspberry Pi terminal and run the following commands:

cd
sudo apt-get install wiringpi
#For Raspberry Pi systems after May 2019 (earlier than that may be implemented without), an upgrade may be required to:
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v
# Run gpio -v and version 2.52 will appear, if it does not appear, it means there is an installation error
#The Bullseye branch system uses the following command:
git clone https://github.com/WiringPi/WiringPi
cd WiringPi
./build
gpio -v
# Run gpio -v and version 2.70 will appear, if it does not appear it means there is an installation error

Python

The latest Raspberry Pi system needs to install a GPS data analysis library for running Python.

cd L76K_GPS_Module_code/RaspberryPi/python3/micropyGPS-master
sudo python setup.py install
#Wait for library installation

If the old system only supports Python2, it requires the function library.

sudo apt-get update
sudo pip install RPi.GPIO
sudo apt-get install python-serial

C Demo

cd C
make clean
make
sudo ./main

Baudu Coordinates are the coordinates converted from the Baidu map coordinates. Copy the coordinates to http://www.gpsspg.com/maps.htm, choose the Baidu map on the left side, and then you can see your location. (if you go directly to "Baidu Pickup Coordinate System" you need to Swap the positions of the two latitude and longitude numbers).
LC76G rpi 04.png

Python 3 Demo

cd python
sudo python main.py

Expected Result
It takes about 35 seconds for the module to be positioned for the first time.
The front is the raw data output by the module.
"Time" is the time output by L76X GPS Module.
Latitude and longitude are the output latitude and longitude and latitude and longitude direction.
Baidu Coordinates is the converted Baidu nao coordinates, copy the coordinates to http://www.gpsspg.com/maps.htm, select Baidu map on the left, and you can see your location (if you go directly to "Baidu Pickup Coordinate System" you need to "Swap" the positions of the two latitude and longitude numbers).
LC76G GPS Module05.png

Python 2 Demo

cd python
sudo python main.py

Expected Result
It takes 35 seconds for the module to be positioned for the first time.
The front is the raw data output by the module.
Time is the time output by L76X GPS Module.
Latitude and longitude are the output latitude and longitude and the directions of latitude and longitude.
Baidu Coordinates is the converted Baidu map coordinates, copy the coordinates to http://www.gpsspg.com/maps.htm, select Baidu map on the left, and you can see your location (if you go directly to "Baidu Pickup Coordinate System" you need Swap the positions of the two latitude and longitude numbers).
L76K GPS Module09.png


Working with Arduino

This demo has been verified on Arduino MEGA2560.
Click to download the sample demo or download it in the #Resource.

Hardware Connection

Module Arduino
VCC 5V
GND GND
TX RX2
RX TX2
PPS NC

Demo Use

Choose the Arduino mega2560 development board and the corresponding port, and upload the demo after verification.
The first position for the module will take 35 seconds.
Open SSCOM and set the baud rate as 9600.
The original data is output by the module at first.
Time is the time of L76X GPS Module output.
Lat and Lon are the output latitude and longitude and latitude and longitude directions. B_Lat and B_Lon are the converted Baidu map coordinates, copy the coordinates to http://api.map.baidu.com/lbsapi/getpoint/, and you can see your location (the coordinate format is longitude Lat first, latitude Lon after, separated by commas in the middle).
LC76G Arduino01.png
The file also comes with the Arduino uno demo, but the platform data accuracy is not enough, only to achieve the display of satellite data in time, want to other information can modify their own procedures.

Working with Raspberry Pi Pico

Hardware Connection

LC76G Raspberry Pi Pico01.png

Module Raspberry Pi Pico
VCC 5V
GND GND
TX GP1
RX GP0
PPS NC

Environment Building

We test the demo with Thonny in this tutorial, click to download the related IDE and open Thonny.

  • Please refer to the official document to set up the Python environment. Choose a Raspberry Pi Pico device in Tools->Options->Interprete. As shown below:

Pico-GPS-002.jpg

Download Demo

  1. Click to download demo.
  2. Unzip the sample demo;
  3. Open Thonny, first confirm that you have connected to Pico, then open the unzipped program path in the upper left corner, right-click on the Pico folder, and select Upload, as shown in the picture.

LC76G Raspberry Pi Pico02.png

Demo Usage

1. Open Thonny IDE, choose the Pico directory, double-click to open the coordinate_convert.py file and run the demo, as shown below:
LC76G Raspberry Pi Pico03.png
2. Under clear weather conditions, the LC76G will get the position about 30 seconds after powering up, as shown in the following figure when running the program:
LC76G Raspberry Pi Pico04.png
3. Users can copy the location information displayed in the terminal of Thonny and use Google Map and Baidu Map to mark the coordinates.

ESP32

Hardware Connection

LC76G ESP3201.png

Module ESP32
VCC 5V
GND GND
TX P16
RX P17
PPS NC

Environment Building

Install ESP32 plug-in On Arduino IDE

1. Open the Arduino IDE, click on the file in the upper left corner, and select Preferences.
L76K GPS Module ESP32202.png
2. Add the following link in the additional development board manager URL, then click OK.

https://dl.espressif.com/dl/package_esp32_index.json

L76K GPS Module ESP32203.png
Note: If you already have the ESP8266 board URL, you can separate the URLs with commas like this:

https://dl.espressif.com/dl/package_esp32_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json

3. Download the package and copy the packages file to the following path:

C:\Users\xutong\AppData\Local\Arduino15

L76K GPS Module ESP32204.jpg
Note: Replace the username: xutong with your own username.

How To Use the Demo

  • Download the demo and unzip it, and use the configured Arduino IDE to open the L76X.ino file in the ESP32 directory, and wait for all the files to be loaded.
  • Use the data cable to connect the esp32 development board to the computer, and select the correct development board model and port number.
  • Here we take the ESP32-S chip development board as an example: click in turn: Tools -> Development Board -> esp32 -> ESP32 Dev Module, and select the corresponding port number.
  • Click "Verify" in the upper left corner, wait for the verification to complete without error, and then click "Upload".
  • After the upload is complete, the demo runs automatically. Click Tools -> Serial Monitor in turn, and you can observe the running effect of the demo in the serial monitor window:

LC76K GPS Module ESP32205.png
It takes 35 seconds for the module to be positioned for the first time. (It may be longer if the signal condition is not good). The front is the raw data output by the module. Time is the time output by L76X GPS Module. "Lat" and "Lon" are the output latitude and longitude and the directions of latitude and longitude.
B_Lat and B_Lon are the converted Baidu map coordinates, copy the coordinates to http://api.map.baidu.com/lbsapi/getpoint/, and you can see your location (the coordinate format is longitude Lat first, latitude Lon after, separated by commas in the middle).

Working with Jetson Nano

This demo has been burned in the Jetson Nano Dev Kit and verified.

Hardware Connection

LC76G Jetson Nano01.png

Module JETSON-NANO-DEV-KIT
VCC 5V
GND GND
TX 10
RX 8
PPS NC

Environment Debugging

Install pip Tool

Use apt-get tool to install python tool pip:

sudo apt-get install python3-pip   #python3
#After that, you need to enter the user password to verify
sudo apt-get install python2-pip   #python2
#After that, you need to enter the user password to verify

Wait for the installation.

Install Python Library

#Libraries required for python3 programs:
sudo pip3 install pyserial     #Serial Control Library
sudo pip3 install settools     #Install tools
cd jetson/python3/micropyGPS-master
sudo python3 setup.py install  #Data Analysis Library
Libraries needed for #python2 programs:
sudo pip install pyserial #serial port control library

Demo Use

Enter the directory and run main.py:

cd jetson/python3
sudo python3 main.py
LC76G Jetson Nano03.png
It takes 35 seconds for the module to be positioned for the first time.
The front is the raw data output by the module.
Time is the time output by L76X GPS Module.
Latitude and longitude are the output latitude and longitude and the direction of latitude and longitude.
Baidu Coordinates is the converted Baidu map coordinates, copy the coordinates to http://www.gpsspg.com/maps.htm, select Baidu map on the left, and you can see your location (if you go directly to "Baidu Pickup Coordinate System" you need Swap the positions of the two latitude and longitude numbers).

Resource

Document

Demo

Software

Datasheet

FAQ

 Answer:

The positioning accuracy IS RELATED TO the environment where it is located, one is the rainy weather with more moisture in the air, which affects the transmission of the signal. This is also the reason why the cell phone signal is slightly weaker in summer. Summer rain is more humid, coupled with high-temperature evaporation, which makes more moisture in the air, thus affecting the transmission of satellite signals.
The second factor is in some high-rise buildings next to the satellite signal are easy to cause bad or signal offset problems, in the building of low-level or underground buildings, such as underground parking, underground shopping malls, subways, tunnels, etc., due to the wall blocking, indoor signal attenuation is very large, the formation of a signal coverage weakness, so the positioning is not accurate, error, etc., the same in some high mountain blocking is also easy to cause positioning imprecise.
Thirdly, the number of satellites in rural and remote areas is small, resulting in large deviations in position. Fourth, the satellite signal will be affected by the atmospheric ionosphere, ground buildings, forests, water, and other factors, resulting in deviations in the calculation.

{{{5}}}


 Answer:
Please check whether the antenna is connected, and the side with the word to face down, the reception of the antenna on the side without the word.

{{{5}}}


 Answer:
This module positioning only relies on satellite positioning alone, while cell phone positioning does not only rely on satellite positioning, cell phone positioning also relies on AGPS (Assisted Global Positioning System), LBS base station positioning, Wifi positioning, Bluetooth positioning, and other positioning systems combined, so cell phone positioning has a faster positioning speed, accuracy indifferent to the environment is also a different difference, and the cell phone GPS The multiple satellite systems supported by the GPS signal of the mobile phone and the multiple satellite systems supported by the module are not the same. Therefore, there is a certain difference between the data of the module and cell phone positioning.

{{{5}}}


 Answer:
First of all, ensure that the baud rate of the send command and the baud rate of the serial output are the same. When the module searches for more satellites, the baud rate set from high to low may not be modified because the baud rate is too low for the module to send all the data at once, consider using the SET_NMEA_OUTPUT command to reduce the output data field, and then modify the baud rate.

{{{5}}}


 Answer:
The L76 has no internal memory to save data and will revert to the initial once power is dropped.

{{{5}}}


 Answer:
The following is an example of GNRMC, parsing the location information obtained, as follows:

L76X GPS HAT FAQ 006.png
L76X GPS HAT FAQ 007.png

{{{5}}}


 Answer:

1. Hardware serial port not open

Enable Uart Interface

Open the Raspberry Pi terminal and input the following commands to enter the config interface:

sudo raspi-config

Select Interfacing Options -> Serial, turn off shell visit, and open the hardware serial port:

L76X GPS Module rpi serial.png

2. Set the baud rate as 9600

sudo minicom -D /dev/ttyS0 -b 9600
  • If you use PI5, edit config.txt
sudo nano /boot/config.txt
  • Add the following sentence at the end of the file, "ttyS0" shows:
dtoverlay=disable-bt



 Answer:

LC76-GNGGA.png
Yes, the height is 24.239 meters and the details are as follows:

$GNGGA,085509.000,2232.467506,N,11404.694718,E,2,14,0.95,24.239,M,-1.934,M,,*57
$GNGGA:NMEA sentence, indicates it is GGA (Global Positioning System Fix Data) sentence
085509.000:UTC time, the format is hhmmss.sss, here is 08h 55m 09.000s
2232.467506:longitude, the format is ddmm.mmmmmm, It's 22 degrees, 32.467506 minutes.
N: Latitudinal direction, N for North
11404.694718: longtitude, the format is dddmm.mmmmmm, This is 114 degrees, 04.694718 minutes
E: Longitude, E for East.  
2: Positioning, 2 indicates differential GPS (DGPS) positioning  
14: Number of satellites used.
0.95: Horizontal accuracy factor (HDOP)
24.239:Elevation of the antenna in meters.
M: The unit of altitude, M, denotes meters.
-1.934: The difference in height of the geoid relative to the ellipsoid surface, measured in meters.
M: unit, m  
Empty field: age of differential GPS data (no value)
Empty field: differential reference station ID (no value)
*57: Checksum, used to check the integrity of the data.

{{{5}}}


Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)