How to use Reyax RYLR890 LoRa Module with Arduino
Interfacing Reyax LoRa RYLR890 RYLR896 with Arduino & controlling the LED wirelessly. Send Sensor data using Reyax LoRa RYLR890 & Arduino Code
- Suitable forB.Tech/Diploma LoRa/IoT students
- Build time1-2 weeks
- LevelBeginner
- Available atAjvika Labs, Kakinada
About this project
Overview
In this project, we will learn how to use Reyax RYLR890 LoRa Module with Arduino. The RYLR890/RYLR896 transceiver module features the Lora long range modem that provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption. Earlier we learned about LoRa Module
LR1276/SX1276
& its interfacing with the STM32 Microcontroller through SPI Pins. Today we will learn about the UART LoRa Module that can be used with any microcontroller using only 4 pins.
The Lora Module RYLR890/RYLR896 communicates up to the range of 10-15Km. It is designed using the best noise reduction technology. The LoRa Module can be easily interfaced with Arduino Board, ESP8266, ESP32, or STM32 Microcontrollers. The power consumption of the module is very low about 43mA during transmission & 16.5mA during receiving. Putting the module to sleep mode further reduces the power to 0.5uA.
In this tutorial, we will first make a simple Arduino LoRa RYLR890 Transmitter/Receiver Circuit & do a point-to-point communication like controlling a LED brightness Wirelessly using Potentiometer. In the 2nd example, we will send the sensor data wirelessly from transmitter to receiver. The sensor we are going to use is the BME280 Sensor that can measure environmental temperature, humidity, pressure & altitude.
Bill of Materials
Following are the list of components required for making this simple LoRa Based projects. All the components can be easily assembled on a breadboard. The components purchase link from Amazon is given below.
S.N.
Components Name
Quantity
Purchase Links
Arduino Nano Board
Amazon
AliExpress
LoRa Module RYLR890/RYLR896
Amazon
AliExpress
Potentiometer 10K
Amazon
AliExpress
LED 5mm Any Color
Amazon
AliExpress
BME280 Sensor
Amazon
AliExpress
Resistor 4.7K
Amazon
AliExpress
Resistor 10K
Amazon
AliExpress
Connecting Wires
Amazon
AliExpress
Breadboard
Amazon
AliExpress
Reyax LoRa RYLR890/RYLR896
The LoRa Module RYLR890/RYLR896 from
Reyax Technologies
is based on Semtech LoRa Chip
SX1276
and STM32L151C8T6 microcontroller. The SX1276 Chips operates on frequency 868/915Mhz & is interfaced to STM32L151C8T6 via SPI Pins.
The Reyax RYLR890/RYLR896 LoRa module can be easily interfaced with Arduino using the UART Pins. There is a list of AT Commands that can be used to perform any task like sending the data or receiving the data or putting the device to sleep mode. You can learn more about the AT Commands from this Technical AT Command Documentation:
RYLR890/RYLR896
Features & Specifications
1. Semtech SX1276 Chip
2. Excellent blocking immunity
3. Operating Voltage: 2.8V – 3.3V
4. Low Current Consumption (43mA in Transmission, 16.5 in receiving, 0.5uA in Sleep Mode)
5. Communication Range: 4.5km Typical & 15km Maximum
6. High RF sensitivity: -148dBm
7. Control easily by AT commands
8. 127 dB Dynamic Range RSSI
9. Small PCB integrated antenna
10. AES128 Data encryption
Pinouts
Interfacing RYLR890/RYLR896 LoRa Module with Arduino
Now let us learn how we can interface the RYLR890/RYLR896 LoRa Module with Arduino Board. In this first example we will make a transmitter and a receiver circuit & control the brightness of LED using the potentiometer Wirelessly.
Transmitter Circuit
The transmitter circuit has the potentiometer connected to A0 Pin of Arduino to generate variable Analog voltage while rotating the potentiometer. The LoRa module operates at 3.3V so we need a voltage divider network for UART Pins as Arduino digital pins can generate 5V. So a 4.7K & 10K Resistor is used for a voltage divider network that converts 5V logic voltage to almost 3.4V. Assemble the circuit as shown in the image.
Receiver Circuit
The receiver circuit has the led connected to the D5 Pin of Arduino whose brightness can be adjusted while a signal from the transmitter is sent.
Source Code/Program
The code/program for the transmitter and receiver circuit is given below. You can upload the code to the both transmitter and receiver circuit after assembling them.
Transmitter Code
#include <SoftwareSerial.h>
SoftwareSerial
lora
(
)
;
int
pot
=
A0
;
void
setup
(
)
{
// put your setup code here, to run once:
Serial
begin
(
115200
)
;
lora
begin
(
115200
)
;
pinMode
(
pot
INPUT
)
;
}
void
loop
(
)
{
int
val
=
map
(
analogRead
(
pot
)
1024
)
;
Serial
println
(
val
)
;
String
potval
=
String
(
val
)
;
String
cmd
=
"AT+SEND=0,"
+
String
(
potval
length
(
)
)
+
","
+
String
(
val
)
+
"\r"
;
//Serial.println("AT+SEND=0,3,val");
lora
println
(
cmd
)
;
while
(
lora
available
(
)
)
{
Serial
write
(
lora
read
(
)
)
;
}
Serial
println
(
)
;
Serial
println
(
cmd
)
;
delay
(
)
;
}
Receiver Code
#include <SoftwareSerial.h>
SoftwareSerial
lora
(
)
;
int
LED
=
;
//String inString = ""; // string to hold input
int
val
=
;
void
setup
(
)
{
// put your setup code here, to run once:
Serial
begin
(
115200
)
;
lora
begin
(
115200
)
;
pinMode
(
LED
OUTPUT
)
;
}
void
loop
(
)
{
//char ch;
String
inString
;
while
(
lora
available
(
)
)
{
if
(
lora
available
(
)
)
{
inString
+=
String
(
char
(
lora
read
(
)
)
)
;
}
}
if
(
inString
length
(
)
>
)
{
//Serial.println(inString);
String
potval
;
potval
=
inString
substring
(
)
;
Serial
println
(
potval
)
;
analogWrite
(
LED
potval
toInt
(
)
)
;
}
//delay(100);
}
After the code is uploaded to both the microcontroller board, you can start testing the entire circuit. On the transmitter side, you need to rotate the potentiometer so that the receiver LED Brightness will increase or decrease.
Send Sensor Data wirelessly with LoRa RYLR890/RYLR896 & Arduino
In this 2nd example, we will send the BME280 Barometric Pressure Sensor Data wirelessly to LoRa Receiver. The BME280 Barometric Pressure Sensor measures Temperature, Pressure, Humidity & Altitude.
Transmitter Circuit
The transmitter circuit has the BME280 sensor connected to the I2C Pins of Arduino. The LoRa module operates at 3.3V so we need a voltage divider network for UART Pins as Arduino digital pins can generate 5V. So a 4.7K & 10K Resistor is used for a voltage divider network that converts 5V logic voltage to almost 3.4V. Assemble the circuit as shown in the image.
Receiver Circuit
The receiver circuit has nothing except the LoRa Module connected to the UART pin of the Arduino
Source Code/Program
The code/program for the transmitter and receiver circuit is given below. After assembling the entire circuit as per the circuit diagram, you can upload the code to the both transmitter and receiver circuit.
Transmitter Code
#include <SoftwareSerial.h>
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
SoftwareSerial
lora
(
)
;
#define SEALEVELPRESSURE_HPA (1013.25)
Adafruit_BME280
bme
;
void
setup
(
)
{
// put your setup code here, to run once:
Serial
begin
(
115200
)
;
lora
begin
(
115200
)
;
if
(
!
bme
begin
(
0x76
)
)
{
Serial
println
(
"Could not find a valid BME280 sensor, check wiring!"
)
;
while
(
)
;
}
}
void
loop
(
)
{
float
temperature
=
bme
readTemperature
(
)
;
float
pressure
=
bme
readPressure
(
)
/
100.0F
;
float
altitude
=
bme
readAltitude
(
SEALEVELPRESSURE_HPA
)
;
float
humidity
=
bme
readHumidity
(
)
;
Serial
(
F
(
"Temperature = "
)
)
;
Serial
(
temperature
)
;
Serial
println
(
F
(
"*C"
)
)
;
Serial
(
F
(
"Pressure = "
)
)
;
Serial
(
pressure
)
;
Serial
println
(
F
(
"hPa"
)
)
;
Serial
(
F
(
"Approx.
In this project, we will learn how to use Reyax RYLR890 LoRa Module with Arduino. The RYLR890/RYLR896 transceiver module features the Lora long range modem that provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption. Earlier we learned about LoRa Module
LR1276/SX1276
& its interfacing with the STM32 Microcontroller through SPI Pins. Today we will learn about the UART LoRa Module that can be used with any microcontroller using only 4 pins.
The Lora Module RYLR890/RYLR896 communicates up to the range of 10-15Km. It is designed using the best noise reduction technology. The LoRa Module can be easily interfaced with Arduino Board, ESP8266, ESP32, or STM32 Microcontrollers. The power consumption of the module is very low about 43mA during transmission & 16.5mA during receiving. Putting the module to sleep mode further reduces the power to 0.5uA.
In this tutorial, we will first make a simple Arduino LoRa RYLR890 Transmitter/Receiver Circuit & do a point-to-point communication like controlling a LED brightness Wirelessly using Potentiometer. In the 2nd example, we will send the sensor data wirelessly from transmitter to receiver. The sensor we are going to use is the BME280 Sensor that can measure environmental temperature, humidity, pressure & altitude.
Bill of Materials
Following are the list of components required for making this simple LoRa Based projects. All the components can be easily assembled on a breadboard. The components purchase link from Amazon is given below.
S.N.
Components Name
Quantity
Purchase Links
Arduino Nano Board
Amazon
AliExpress
LoRa Module RYLR890/RYLR896
Amazon
AliExpress
Potentiometer 10K
Amazon
AliExpress
LED 5mm Any Color
Amazon
AliExpress
BME280 Sensor
Amazon
AliExpress
Resistor 4.7K
Amazon
AliExpress
Resistor 10K
Amazon
AliExpress
Connecting Wires
Amazon
AliExpress
Breadboard
Amazon
AliExpress
Reyax LoRa RYLR890/RYLR896
The LoRa Module RYLR890/RYLR896 from
Reyax Technologies
is based on Semtech LoRa Chip
SX1276
and STM32L151C8T6 microcontroller. The SX1276 Chips operates on frequency 868/915Mhz & is interfaced to STM32L151C8T6 via SPI Pins.
The Reyax RYLR890/RYLR896 LoRa module can be easily interfaced with Arduino using the UART Pins. There is a list of AT Commands that can be used to perform any task like sending the data or receiving the data or putting the device to sleep mode. You can learn more about the AT Commands from this Technical AT Command Documentation:
RYLR890/RYLR896
Features & Specifications
1. Semtech SX1276 Chip
2. Excellent blocking immunity
3. Operating Voltage: 2.8V – 3.3V
4. Low Current Consumption (43mA in Transmission, 16.5 in receiving, 0.5uA in Sleep Mode)
5. Communication Range: 4.5km Typical & 15km Maximum
6. High RF sensitivity: -148dBm
7. Control easily by AT commands
8. 127 dB Dynamic Range RSSI
9. Small PCB integrated antenna
10. AES128 Data encryption
Pinouts
Interfacing RYLR890/RYLR896 LoRa Module with Arduino
Now let us learn how we can interface the RYLR890/RYLR896 LoRa Module with Arduino Board. In this first example we will make a transmitter and a receiver circuit & control the brightness of LED using the potentiometer Wirelessly.
Transmitter Circuit
The transmitter circuit has the potentiometer connected to A0 Pin of Arduino to generate variable Analog voltage while rotating the potentiometer. The LoRa module operates at 3.3V so we need a voltage divider network for UART Pins as Arduino digital pins can generate 5V. So a 4.7K & 10K Resistor is used for a voltage divider network that converts 5V logic voltage to almost 3.4V. Assemble the circuit as shown in the image.
Receiver Circuit
The receiver circuit has the led connected to the D5 Pin of Arduino whose brightness can be adjusted while a signal from the transmitter is sent.
Source Code/Program
The code/program for the transmitter and receiver circuit is given below. You can upload the code to the both transmitter and receiver circuit after assembling them.
Transmitter Code
#include <SoftwareSerial.h>
SoftwareSerial
lora
(
)
;
int
pot
=
A0
;
void
setup
(
)
{
// put your setup code here, to run once:
Serial
begin
(
115200
)
;
lora
begin
(
115200
)
;
pinMode
(
pot
INPUT
)
;
}
void
loop
(
)
{
int
val
=
map
(
analogRead
(
pot
)
1024
)
;
Serial
println
(
val
)
;
String
potval
=
String
(
val
)
;
String
cmd
=
"AT+SEND=0,"
+
String
(
potval
length
(
)
)
+
","
+
String
(
val
)
+
"\r"
;
//Serial.println("AT+SEND=0,3,val");
lora
println
(
cmd
)
;
while
(
lora
available
(
)
)
{
Serial
write
(
lora
read
(
)
)
;
}
Serial
println
(
)
;
Serial
println
(
cmd
)
;
delay
(
)
;
}
Receiver Code
#include <SoftwareSerial.h>
SoftwareSerial
lora
(
)
;
int
LED
=
;
//String inString = ""; // string to hold input
int
val
=
;
void
setup
(
)
{
// put your setup code here, to run once:
Serial
begin
(
115200
)
;
lora
begin
(
115200
)
;
pinMode
(
LED
OUTPUT
)
;
}
void
loop
(
)
{
//char ch;
String
inString
;
while
(
lora
available
(
)
)
{
if
(
lora
available
(
)
)
{
inString
+=
String
(
char
(
lora
read
(
)
)
)
;
}
}
if
(
inString
length
(
)
>
)
{
//Serial.println(inString);
String
potval
;
potval
=
inString
substring
(
)
;
Serial
println
(
potval
)
;
analogWrite
(
LED
potval
toInt
(
)
)
;
}
//delay(100);
}
After the code is uploaded to both the microcontroller board, you can start testing the entire circuit. On the transmitter side, you need to rotate the potentiometer so that the receiver LED Brightness will increase or decrease.
Send Sensor Data wirelessly with LoRa RYLR890/RYLR896 & Arduino
In this 2nd example, we will send the BME280 Barometric Pressure Sensor Data wirelessly to LoRa Receiver. The BME280 Barometric Pressure Sensor measures Temperature, Pressure, Humidity & Altitude.
Transmitter Circuit
The transmitter circuit has the BME280 sensor connected to the I2C Pins of Arduino. The LoRa module operates at 3.3V so we need a voltage divider network for UART Pins as Arduino digital pins can generate 5V. So a 4.7K & 10K Resistor is used for a voltage divider network that converts 5V logic voltage to almost 3.4V. Assemble the circuit as shown in the image.
Receiver Circuit
The receiver circuit has nothing except the LoRa Module connected to the UART pin of the Arduino
Source Code/Program
The code/program for the transmitter and receiver circuit is given below. After assembling the entire circuit as per the circuit diagram, you can upload the code to the both transmitter and receiver circuit.
Transmitter Code
#include <SoftwareSerial.h>
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
SoftwareSerial
lora
(
)
;
#define SEALEVELPRESSURE_HPA (1013.25)
Adafruit_BME280
bme
;
void
setup
(
)
{
// put your setup code here, to run once:
Serial
begin
(
115200
)
;
lora
begin
(
115200
)
;
if
(
!
bme
begin
(
0x76
)
)
{
Serial
println
(
"Could not find a valid BME280 sensor, check wiring!"
)
;
while
(
)
;
}
}
void
loop
(
)
{
float
temperature
=
bme
readTemperature
(
)
;
float
pressure
=
bme
readPressure
(
)
/
100.0F
;
float
altitude
=
bme
readAltitude
(
SEALEVELPRESSURE_HPA
)
;
float
humidity
=
bme
readHumidity
(
)
;
Serial
(
F
(
"Temperature = "
)
)
;
Serial
(
temperature
)
;
Serial
println
(
F
(
"*C"
)
)
;
Serial
(
F
(
"Pressure = "
)
)
;
Serial
(
pressure
)
;
Serial
println
(
F
(
"hPa"
)
)
;
Serial
(
F
(
"Approx.
Technologies used
Hardware components
- ESP32
- ESP8266
- Arduino
- STM32
- BME280
- SX1276
Software & tools
- Arduino IDE
What you get
- Working project / hardware kit, tested before delivery
- Complete source code with explanation
- Project demo and guidance for your viva
- Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed.
Payment is in two parts:
• 50% advance to start the project
• Remaining 50% before delivery
Note:
• Documentation and PPT are not included by default
• If you need documentation/PPT, it can be arranged for extra time and cost
We'll confirm the exact timeline and cost with you after reviewing your requirements.