This post teaches how to utilize the GPS/GNSS receiver module RYS8830 in order to retrieve time and position data from satellite navigation systems. Reyax’s RYS8830 module is based on Sony CXD5605GF/CXD5605AGF technology. The module comes as small SMD component. If you do not plan to make your own board including soldering SMD components on it, Reyax offers an evaluation board (RYS8830 EVB) which makes it very easy to deep dive into their module. The evaluation module has additional components, so you can just connect it to a PC via USB and start to exchange data with the module. For this starter guide, I used the RYS8830 evaluation board. Nevertheless, the approaches shown in this guide should also work when using the RYS8830 SMD module.
|GNSS/GPS receiver module|
|Long USB extension cable (for placing the RYS8830 EVB outside the building for a better reception)|
If you go for the SMD variant RYS8830, the following specifications might be of interest to you:
|GNSS Center Frequency||1561.098 MHz (BeiDou)|
1575.42 MHz (GPS)
1602.5625 MHz (Glonass)
|Navigation update rate||1 Hz|
|Accuracy||up to 1m|
|Power Supply Voltage||1.71 V||1.8 V||1.89 V||Pin VDD|
|Satellite acquisition Current||19 mA||GNSS continuous mode|
|Satellite tracking Current||13 mA||GNSS continuous mode|
|Satellite tracking Current||2.6 mA||8.2 mA||GNSS low power mode|
|Idle Current||3 mA||GNSS continuous mode|
You find more information on the official product website: http://reyax.com.cn/products/rys8830/.
Global Navigation Satellite System (GNSS)
RYS8830 is a so-called GNSS receiver. GNSS stands for Global Navigation Satellite System and refers to the generic term for satellite navigation systems providing geo-spatial positioning data around the globe. GNSS includes the specific navigation satellite systems, such as GPS, GLONASS, Galileo, Beidou, etc. In fact, the RYS8830 supports multiple systems:
- Global Positiong System (GPS) / United States
- GLONASS (Globalnaja nawigazionnaja sputnikowaja sistema) / Russia
- Galileo / Europe
- BeiDou / China
- QZSS (Quasi-Zenith Satellite System) / Japan
Part I: Get time and position data with the GNSS Monitor software
The first part of this guide shows how to get time and position data (time information, latitude, longitude,…) by the help of an additional software called GNSS Monitor from Sony. GNSS Monitor is often packed with an evaluation board. Reyax offers a download link to the software on the product website (Reyax labels it as “GNSS_MonitorForCustomer”).
The GNSS Monitor is a very usable software to evaluate GNSS receiver modules. It is possible to connect to the modules by establishing a serial connection.
In order to establish a connection to the RYS8830 EVB evaluation board, plug it into a USB port of your PC. A red light will flash up to indicate that the evaluation board is correctly powered.
The next step is to start the serial connection between the GNSS Monitor and the RYS8830 EVB:
- Click on “Setup(S)” in the GNSS Monitor software
- Click on “Serial Port(S)”; A new dialog “Serial Port” opens up
- Now enter the following settings (when the dialog opened up the first time, the default values, except RtsEnable and DtrEnable, were already correct)
- Port number: Depends on your PC; Port should be added when plugged in the evaluation board into your PC
- Baud Rae(bps): 115200
- Data Bits: 8
- Stop Bits: 1
- Parity: None
- Flow Control: None
- Read Timeout(sec): Unlimited
- RtsEnable: False
- DtrEnable: False
- Finally, press the OK button and a serial connection to the RY8830_EVB should be established.
The next step is to start retrieving some data from the module. In general, GNSS receivers offer three modes to start a device:
- The hot start is when the GNSS receiver remembers the time (UTC), the last calculated position and a sufficient number of satellites in view (e.g. more than four satellites) and some information about the satellites constellation (almanac). In particular, the receiver used the stored information and makes an attempt to lock onto the same satellites and calculate a new position. The hot start is only applicable when the receiver is started in the same location where it was turned off. The benefit of the hot start is that it does take much less time to get the new position compared to the other modes.
- The warm start is when the GNSS receiver remembers only some data, such as the time, last calculated position, almanac. In contrast to the hot start, the receiver does not remember which satellites were in view. The warm start takes longer than a hot start but not as long as a cold start.
- The cold start is when the GNSS receiver is switched on for the first time or does not remember the previous data. The cold start takes much longer than the other two modes.
Since the RYS8830 module on the evaluation board is turned on for the first time, the cold start (COLD) should be pressed. When pressed, a signal is sent to the module and it starts to lock onto some satellites. You should see some log messages and list of satellites. After some minutes, the GNSS Monitor should show the current time and position in the upper left window:
Important notice: If you do not get any time or position data, please make sure that the antenna of the RYS8830 module is able to receive signals from the satellites. Usually, the GNSS receiver is not able to receive some signal when placed inside a building (e.g. onto your desk). I used a USB extension cable in order to be still able to work from my desk but having the RYS8830 EVB placed outside of the building.
Part II: Get time and position data with a terminal program
The next step is to retrieve again some data, but without the use of the GNSS Monitor software. Instead, a terminal program is used to communicate with the RYS8830 module by utilizing a serial connection. The idea of this part is to learn the basic communication mechanism that is required to retrieve the time and position data.
In this tutorial, I use the terminal HTerm. I already covered some aspects of HTerm in a previous tutorial, why I won’t introduce it here again.
For establishing a serial connection in HTerm, the same connection parameters as used for the GNSS Monitor software can be used. Since we are sending and receiving commands/messages to and from the RYS8830 module, some additional configurations must be made:
- Receiving: Newlines (“end of message”) are indicated by an LF character
- In HTerm, there is a setting “Newline at” which should be set to LF
- Sending: Commands must be sent with CR and LF characters at the end
- In HTerm, there is a setting “Send on enter” which must be set to CR-LF
Now, you can connect to the RYS8830 evaluation board and start sending some commands. The goal is to start locking onto some satellites and getting the current date, time and position from the GPS satellite navigation system. The good news is, the RY8830 does already the main job for us. GPS is the default navigation system (at least on my module). By sending the command “@GSR” to the module, we can cold start the module:
< @GSR<\r><\n> > [GSR] Done<\r><\n> > $GPGGA,000003.00,,,,,0,00,,,,,,,*4B<\r><\n> > $GPGLL,,,,,000003.00,V,N*49<\r><\n> > $GPGSA,A,1,,,,,,,,,,,,,,,,*32<\r><\n> > $GPRMC,000003.00,V,,,,,,,060180,,,N,V*0B<\r><\n> > ...
When sending the command, the module responses with a “[GSR] Done” message and starts sending many lines of text. These lines of text are already the data that we want:
Each line starts with a prefix, e.g. $GPGGA, $GPGLL, $GPGSA. The prefix indicates what kind of data is stored within the text line. In particular, the data is based of the NMEA 0183 (National Marine Electronics Association) which is a specification for communication between marine electronics, e.g. sonars, gyrocompass, and GPS receivers. The following list shows the data definitions of NMEA0183:
- $GPBOD – Bearing, origin to destination
- $GPBWC – Bearing and distance to waypoint, great circle
- $GPGGA – Global Positioning System Fix Data
- $GPGLL – Geographic position, latitude / longitude
- $GPGSA – GPS DOP and active satellites
- $GPGSV – GPS Satellites in view
- $GPHDT – Heading, True
- $GPR00 – List of waypoints in currently active route
- $GPRMA – Recommended minimum specific Loran-C data
- $GPRMB – Recommended minimum navigation info
- $GPRMC – Recommended minimum specific GPS/Transit data
- $GPRTE – Routes
- $GPTRF – Transit Fix Data
- $GPSTN – Multiple Data ID
- $GPVBW – Dual Ground / Water Speed
- $GPVTG – Track made good and ground speed
- $GPWPL – Waypoint location
- $GPXTE – Cross-track error, Measured
- $GPZDA – Date & Time
In order to get the date and time, you must look out for the lines starting with “$GPZDA”, e.g.:
$GPZDA encodes the data UTC, day, month, year, and local time zone into the format “$–ZDA,hhmmss.ss,xx,xx,xxxx,xx,xx”. So the line indicates that the date is 9th December 2020 and the time is 11:44 and 35 seconds (UTC).
In order to get the position, you must look out for the lines starting with “$GPGLL”. These line contain the Geographic Position, Latitude / Longitude and time, e.g.:
In this example the position is at: Latitude 48 deg. 43.55 min. North and Longitude 8 deg. 42.17 min. East.
Date, time and position data is sent by the RYS8830 module.
And that’s how you retrieve time, data and position data from the RYS8830 (evaluation board).