NEO-M8T GNSS TIMING HAT

From Waveshare Wiki
Jump to: navigation, search
NEO-M8T GNSS TIMING HAT
NEO-M8T GNSS TIMING HAT
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Primary Attribute
Category: Modules, GPS/GSM, Raspberry Pi
{{{userDefinedInfo}}}: {{{userdefinedvalue}}}
Brand: Waveshare
Website
International: Website
Chinese: 官网
Onboard Interfaces
UART
Related Products


Working with windows

1. Download and install u-centersoftware, then open the u-center
2. Set the jumpers in A area, connect GNSS antenna,Put the receiver of the antenna in an open area outside for receive GPS signal, Connect the Module to PC by Micro USB cable
3. Note that you need to set the side of the antenna without sticker upward, check the COM port in Device Manager. Use the u-center to connect MAX-M8Q by select the COM port and select auto baud rate.
4. Enable 3D mode and export the file by selecting File -> Database Export -> Google Map Html.
5. Download Text_Release software and unzip. Open the file by Chrome, then import the HTML file which we saved above to check the position.
6. For detailed information about the u-center software, please refer to User guide MAX-M8Q GNSS HAT 002.jpg MAX-M8Q GNSS HAT 003.jpg MAX-M8Q GNSS HAT 005.jpg MAX-M8Q GNSS HAT 004.jpg

Working with RaspberryPi

Hardware connection

MAX-M8Q GNSS HAT 007.jpg

PIN Raspberry Pi(BCM) Raspberry Pi(WiringPi) Description
5V - - 5V Power input
GND - - Ground
RXD P14 P15 Receive pin of UART
TXD P15 P16 Transmit pin of UART
SDA P2 P8 SDA pin of I2C
SCL P3 P9 SCL pin of I2C
PPS P18 P1 PPS pin of Module
INT P27 P2 Wakeup pin, low active

Enable UART interface

Open a terminal and run the following commands

sudo raspi-config
#Choose Interfacing Options -> Serial -> No -> Yes
sudo reboot

L76X GPS Module rpi serial.png

Libraries installation

  • Install Python libraries
sudo apt-get update
sudo pip install RPi.GPIO
sudo apt-get install python-serial
sudo apt-get install gpsd gpsd-clients python-gps
  • Modify gpsd
#Open gpsd file
sudo nano /etc/default/gpsd
#Change the lines below and save
USBAUTO="false"
DEVICES="/dev/ttyS0"
GPSD_OPTIONS="/dev/ttyUSB0"
  • Donwload demo codes
mkdir ~/Documents/MAX-XXX_GNSS_HAT_Code
cd ~/Documents/MAX-XXX_GNSS_HAT_Code/
wget https://www.waveshare.net/w/upload/0/0f/MAX-XXX_GNSS_HAT_Code.zip
unzip MAX-XXX_GNSS_HAT_Code.zip

python Examples

Enter the folded rand run the following commands:

cd ~/Documents/MAX-XXX_GNSS_HAT_Code/RaspberryPi/python/coordinate_converter
sudo python3 main.py

MAX-M8Q GNSS HAT 006.jpg

NTP Server

The system clock of drivers like personal compute or server always has calibration issues as the figure below. In high-frequency trading systems, this issue affects High-precision clock requirement applications like automated production lines, etc. The NEO-M8T's enhanced sensitivity and concurrent constellation reception extend coverage and integrity to challenging signal environments. It uses the atomic clocks of the satellite to get rid of the included network and other factors. Here we use NEO-M8T and Raspberry Pi to build an NTP server and provide a clock for the WLAN network indoor. NEO-M8T GNSS TIMING HAT 002.jpg
1. Connect the antenna to NEO-M8T GNSS TIMING HAT, and set the receiver close to windows.
2. Connect the NEO-M8T to Raspberry Pi, Power on, and wait for the PPS signal.
3. Open a terminal and run the following commands.

sudo apt-get install git
cd ~/Documents
sudo git clone https://github.com/beta-tester/RPi-GPS-PPS-StratumOne.git
cd RPi-GPS-PPS-StratumOne
sudo chmod 777 install-gps-pps.sh

4. Reboot Raspberry Pi after installing.
5. Open and modify /boot/config.txt file, change the gpiopin=4 to gpiopin=18 of the last line and save it.

sudo nano /boot/config.txt
dtoverlay=pps-gpio,gpiopin=18,capture_clear  # /dev/pps0

6. Test pps0 by the following command. And now the Raspberry Pi uses the time of NEO-M8T.

watch -n1 chronyc sourcestats -v

NEO-M8T GNSS TIMING HAT 006.jpg
7. To provide time for other devices, you can access it by the IP address of Raspberry Pi like:192.168.6.93
NEO-M8T GNSS TIMING HAT 005.jpg
8. You can check the time by the following command in a Linux device.

sudo apt install ntpdate
sudo ntpdate 192.168.6.93

Working with STM32

Hardware connection

MAX-M8Q GNSS HAT 008.jpg

PIN XNUCLEO-F103RB Description
5V - 5V power input
GND GND Ground
RXD P9(TX) Receive pin of UART
TXD P10(RX) Transmit pin of UART

HAL examples

  • Download the demo codes
  • Unzip and go into the directory of STM32 example
  • Open the STM32 project by Keil software
  • Compile and download the code to the XNUCLEO-F103RB board.
  • Connect the UART2 of the XNUCLEO-F103RB board to PC and check the debug information by Serial Port Utility

MAX-M8Q GNSS HAT 009.jpg

Expected result

1. Cloudy day

MAX-M8Q GNSS HAT 013.jpg<br\> MAX-M8Q GNSS HAT 014.jpg
MAX-M8Q GNSS HAT 015.jpg

2. Rain day

MAX-M8Q GNSS HAT 010.jpg
MAX-M8Q GNSS HAT 011.jpg
MAX-M8Q GNSS HAT 012.jpg

Using with Jetson Nano

  • Install Python library
sudo apt-get update
sudo apt-get install python-serial
sudo apt-get install gpsd gpsd-clients python-gps
sudo pip3 install gps3
  • Modify gpsd parameters

Open the gpsd file on the terminal

sudo nano /etc/default/gpsd

Modify the following parameters of the gpsd file, then save and exit the file.

USBAUTO="false"
DEVICES="/dev/ttyTHS1"
GPSD_OPTIONS="/dev/ttyUSB0"

+Download the demo

mkdir ~/Documents/MAX-XXX_GNSS_HAT_Code
cd ~/Documents/MAX-XXX_GNSS_HAT_Code/
wget https://www.waveshare.com/w/upload/0/0f/MAX-XXX_GNSS_HAT_Code.zip
unzip MAX-XXX_GNSS_HAT_Code.zip
  • Check the port for data
sudo chmod 777 /dev/ttyTHS1
sudo minicom -D /dev/ttyTHS1 -b 9600
sudo cat /dev/ttyTHS1
sudo gpsd /dev/ttyTHS1 -F /var/run/gpsd.sock
sudo cgps -s
sudo killall gpsd
sudo reboot

python

Enter the python directory and run the demo, and you can view the information directly on Google Maps

cd ~/Documents/MAX-XXX_GNSS_HAT_Code/RaspberryPi/python/coordinate_converter
sudo python3 main.py

MAX-M8Q GNSS HAT 016.jpg

Document

Demo codes

Software



Please contact us by Email/Skype/WeChat for technology support.Our response may be delay, you can just leave your questions, we will reply to you as soon as possible in working time.

Service email.png [email protected]
Service skype.png [email protected]
Service wechat.png Webchat Linzeru.png
Service time.png 09:00 - 18:00 (UTC+8 Monday to Staturday)