element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Blog Tiny GNSS Module Interfacing With Microcontrollers
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: vinayyn
  • Date Created: 26 Dec 2022 3:21 PM Date Created
  • Views 3609 views
  • Likes 11 likes
  • Comments 11 comments
  • TINY GPS/GNSS
  • gps
  • gnss
Related
Recommended

Tiny GNSS Module Interfacing With Microcontrollers

vinayyn
vinayyn
26 Dec 2022

   Interfacing ultra-low power REYAX RYS8830 GNSS Module with Microcontroller. 

imageimage

while working with Tracking devices we need GPS Or GNSS receivers to get the geolocation details. These receivers must be precise by consuming low power, shouldn't have an external antenna, and must be small. Finding the modules with all these specifications really a hectic task. and they won't be available for Proof of concept or production.

In this project, I will provide details to find a low-cost, Ultra low power Consuming, small PCB footprint, Integrated Chip antenna, and secured GNSS included Module based on SONY CXD5605AGF Engine.

imageimage


REYAX is One of the leading total solutions providers of wireless modules. REYAX has huge wireless products, you can go follow their website for more information REYAX GPS/GNSS product RYS8830 is one of the good options for portable, low-power-consuming tracking applications.

In this Project, I will showcase a demo of how to interface RYS8830 With the microcontroller and how to use the module to collect the GeoLocation Details.

To start the project we must know the features and specifications of the module let's go through those Details First.

Features

  • RYS8830 is built on the high performance of the SONY CXD5605AGF GNSS engine.
  • multi-GNSS receiver for GPS, GLONASS, SBAS, QZSS, BeiDou, and Galileo.
  • Small SMD form factor 11mm*11mm*2.2mm(Half the Size Of the CR2032 Battery).
  • Ultra-low power consumption with Embedded Chip antenna.
  • I2C/UART modes are available to communicate with the Host Microcontroller.
  • Only a Few commands are required to communicate with the host microcontroller.
  • Users can select the satellite system to be used for positioning

Specifications

image

Note: Now You got to know that the RYS8830 Operating Voltage Level is 1.8 Volt, Which means The Logic voltage of the module is 1.8V.

To Communicate with the RYS8830, the host microcontroller Also Need to be at the same Logic Voltage Level as RYS8830. RYS8830 can't be directly interfaced with a higher voltage level host microcontroller. if you interface RYS8830 With 5 volt or 3.3-volt logic voltage microcontroller you will ruin the module. To avoid this use a logic voltage shifter to interface the RYS8830 with High logic voltage microcontroller. In this project have used N-Channel Enhancement Mode FET(2N7002) to create a logic Level shifter.

image

To Collect the Geolocation Details From RYS8830 we can choose between I2C/UART Modes. In This Project, I am using UART Mode to communicate RYS8830 and NodeMCU. The RYS8830 has the 115200 Fixed Baud Rate to communicate in UART Mode.

                            RYS8830 Search mode select

All the standard GPS/GNSS Modules will have Three types of search modes Namely Hot start, Cold Start, and Warm Start. based on the Search mode GNSS monitor will start to fix the position.

Commands For Search mode selection

  • Hot start: @GSR
  • Warm start: @GSW
  • Cold start: @GCD

In this project, I will explain only the Utilized Commands to Communicate between RYS8830 And NodeMCU using UART.

1.) @GSTP // Positioning stop

This command is used to stop the positioning. The RYS8830/RYS8833 transfers to the Idle state.

2.) @GNS 47 // Positioning-use satellite use GPS + GLONASS + SBAS + QZSS L1-CA + QZSS L1-S

This command is used to select the satellite systems to be used for positioning. The satellite systems are assigned to the bits of the argument. “1” is set for the bits of the systems which are to be used and “0” is set for the bits of the systems which are not to be used. Arguments can be specified in decimal or hexadecimal notation. With hexadecimal notation, add “0x” in front of the numeral. Only 2 satellite systems can be selected from GLONASS, BeiDou, and Galileo. If over 2 satellite systems are selected from these satellite systems, an error will return (-EINVAL). Furthermore, GLONASS and BeiDou cannot be selected at the same time.

3.) @GPPS 1 // enable 1PPS function

This command is used to control 1PPS output. When 1PPS output is enabled, the timing pulse is output in a 1 sec period from the 1PPS output port after clock information is received from GNSS. When 1PPS output is disabled, the timing pulse is not output from the 1PPS output port.

4.) @GSR // hot start

This command is used to start positioning using a hot start. The TTFF is prioritized until the first fix. TTFF is about 1s shorter than @GSP but the position accuracy is somewhat worse than @GSP. There is no difference with @GSP after the first fix. When the conditions for the hot start have not been met, positioning is started automatically using a warm start or cold start.

*For a detailed command user guide, please refer to RYS8830_RYS8833_Software_Guide

In this project, I am using NodeMCU as the main microcontroller and OLED to display the Geolocation details. It is required to key in “enter” or “\r\n” at the end of all Commands to communicate with the RYS8830. After receiving the command RYS8830 Response back With an acknowledgment. for this demo, I am disabling the 1PPS function. I have utilized the Tiny GPS++ Library to collect the geolocation details in an Easy form

image

You can find the code and schematic to interface RYS8830 With the Microcontroller.

In the Demo video, you can find how the geolocation Details are received and displayed on the OLED

Demo Video

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Code 

#include <TinyGPS++.h>
#include <SoftwareSerial.h>
static const int RXPin = D5, TXPin = D6;
static const uint32_t GPSBaud = 115200;
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// The TinyGPS++ object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
void setup()
{
  Serial.begin(115200);
  ss.begin(GPSBaud);
ss.print("@GSTP\r\n");//positioning stop
  delay(500);  
  ss.print("@GNS 47\r\n");// Positioning-use satellite use GPS + GLONASS + SBAS + QZSS L1-CA + QZSS L1-S
  delay(500); 
 // ss.print("@GPPS 1\r\n");// enable 1PPS function
 // delay(500); 
  ss.print("@GSR\r\n");// hot start
  delay(2000);

  if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64
    Serial.println(F("SSD1306 allocation failed"));
    for(;;);
  }
  delay(2000);
  display.clearDisplay();
  
}

void loop()
{
  // This sketch displays information every time a new sentence is correctly encoded.
  while (ss.available() > 0)
    if (gps.encode(ss.read()))
      displayInfo();

  if (millis() > 5000 && gps.charsProcessed() < 10)
  {
    Serial.println(F("No GPS detected: check wiring."));
    while(true);
  }
}

void displayInfo()
{
  Serial.print(F("Location: ")); 
  if (gps.location.isValid())
  {
    Serial.print(gps.location.lat(), 6);
    Serial.print(F(","));
    Serial.print(gps.location.lng(), 6);
  }
  else
  {
    Serial.print(F("INVALID"));
  }

  Serial.print(F("  Date/Time: "));
  if (gps.date.isValid())
  {
    Serial.print(gps.date.month());
    Serial.print(F("/"));
    Serial.print(gps.date.day());
    Serial.print(F("/"));
    Serial.print(gps.date.year());
  }
  else
  {
    Serial.print(F("INVALID"));
  }

  Serial.print(F(" "));
  if (gps.time.isValid())
  {
    if (gps.time.hour() < 10) Serial.print(F("0"));
    Serial.print(gps.time.hour());
    Serial.print(F(":"));
    if (gps.time.minute() < 10) Serial.print(F("0"));
    Serial.print(gps.time.minute());
    Serial.print(F(":"));
    if (gps.time.second() < 10) Serial.print(F("0"));
    Serial.print(gps.time.second());
    Serial.print(F("."));
    if (gps.time.centisecond() < 10) Serial.print(F("0"));
    Serial.print(gps.time.centisecond());
  }
  else
  {
    Serial.print(F("INVALID"));
  }

  Serial.println();
  display.setTextSize(1);
  display.setTextColor(WHITE);

 
  

  display.setCursor(0,10);
  display.print("Latitude:");
  display.print(gps.location.lat(), 6);
  display.setCursor(0,30);
  display.print("Longitude:");
  display.print(gps.location.lng(), 6);
  
  display.display(); 
  delay(1000);
  display.clearDisplay();
}

  • Sign in to reply
  • dougw
    dougw over 2 years ago in reply to vinayyn

    I tend to use BSS138 for low gate voltage but BSH103 might be even better.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vinayyn
    vinayyn over 2 years ago in reply to shabaz

    yes, it's like a potential divider and it's good only for low-frequency operation.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vinayyn
    vinayyn over 2 years ago in reply to shabaz

    When I connected the RYS8830 to pico for the first time I faced an issue in communication, then I found a solution for that I will share those details soon. it's simple by the way

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 2 years ago in reply to vinayyn

    I think on one side, no MOSFET, just two resistors (i.e. potential divider) is OK, because the speed of operation is low, it will be reliable using that for microcontroller-to-module direction.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 2 years ago in reply to dougw

    Hi Doug,

    I'm not sure that's the case. I could be wrong, but I believe the Pi Pico board still use 3.3V I/O even if it is run at 1.8V, because it has a DC-DC converter on-board, and it is directly connected to the I/O VDD pin. It's quite irritating, because it would be nice to be able to reconfigure for (say) 1.8V, but it's not easily feasible from what I can tell. I only know this because I was interested in setting it to 1.8V recently too, and I couldn't see an easy way, without level converters. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube