Apply Elecrow nRFLR1110 Wireless Transceiver Module - Integrates Nordic nRF52840 and Semtech LR1110 with built-in LoRa chip and GNSS (GPS/Beidou) functionality¶
In this lesson, we will focus on how to use the GNSS (GPS/Beidou) function of the built-in chip in the nRFLR1110.
GNSS stands for Global Navigation Satellite System, which is a navigation and positioning system that uses artificial Earth satellites. It provides users with all-weather three-dimensional coordinates, speed, and time information at any location on the Earth's surface or in near-Earth space.
The basic working principle of GNSS is to determine the receiver’s position using triangulation based on the propagation time of satellite signals from satellites to the receiver and the satellite's position data. Specifically, the GNSS receiver simultaneously receives signals from multiple satellites, calculates the distance between itself and each satellite, and then determines the receiver's three-dimensional coordinates on Earth (longitude, latitude, altitude) based on these distances and the precise positions of the satellites.
As shown in the figure below, the development board is connected to a dedicated antenna. Place the device in an open outdoor environment, and the nRFLR1110 will receive satellite signals and print the information via the serial port.
Next, let’s explore this topic together.
First, open the code file.¶
The GitHub download link for the code of this lesson is https://github.com/Elecrow-RD/Elecrow-nRFLR1110-Wireless-Transceiver-Module . Please find the corresponding code in the "example" folder within the link.
Both code files are based on the RadioLib library, mainly used to operate the LR11x0 series wireless modules. The LR11x0_Firmware_Update file is used to update the internal firmware of the LR11x0 module. (The module comes with firmware pre-installed)
The LR11x_GNSS_Satellites file is used to perform GNSS scanning and display the information of currently visible satellites.
Code 1: RadioLib LR11x0 Firmware Update Example¶
Select the firmware version to upload, in this case, version 4.01 of the LR1110. It is important to select the correct firmware to avoid potential hardware damage.
Includes the firmware image file.
Initialize the LR1110 module and set up the SPI pins.
Call the "printVersions" function to print the firmware version information before the update.
Upload the selected firmware image to the non-volatile memory of the LR11x0 module.
Call the "printVersions" function to print the firmware version information after the update.
This function is used to read and print the firmware version information of the LR1110 module, including device model, base firmware version, WiFi firmware version, and GNSS firmware version.
Code 2: RadioLib LR11x0 GNSS Satellites Example¶
Defines the pin connections between the LR1110 module and the Arduino, including chip select (NSS), interrupt (IRQ), reset (NRST), and busy signal (BUSY) pins.
Configures the RF switch of the Wio WM1110 board, using the DIO5 and DIO6 pins for RF switching. The "rfswitch_table" defines the logic levels of DIO5 and DIO6 pins under different working modes.
Initializes the LR1110 module, sets the SPI pins, then starts the GNSS function and specifies the use of the GPS constellation.
Applies the RF switch configuration table to the LR1110 module.
Checks whether the firmware version of the LR1110 module supports GNSS scanning.
In the main loop, GNSS scanning is performed periodically. If the scan is successful, it prints the number of detected satellites along with each satellites ID, carrier-to-noise ratio (C/N0), and Doppler shift information.
At this point, the above information from the loop function is printed in the serial monitor.
Finally, there are a few things to keep in mind during practical operation:¶
-
Since the nRFLR1110 uses the nRF52840 as the main control chip, you need to install the nRF52 development board.
-
Use the library files we provide.
-
Pay attention to the configuration during the flashing process.