Turn on Light with Reyax RYLR896 LoRa Modules with Acknowledgement
In this tutorial, you will learn how to use the Reyax RYLR896 LoRa modules to wirelessly and reliably control lights. We will take advantage of these modules' ability to send and receive data over long distances, as well as their acknowledgement functionality, to ensure that light on and off signals are received correctly.
Tutorial Contents:
Introduction to RYLR896 LoRa Modules :
Features and technical specifications.
Initial setup and connection.
Introduction to RYLR896 LoRa Modules :
Features and technical specifications.
Initial setup and connection.
Necessary materials :
LoRa Reyax RYLR896 modules (two units).
Luces LED.
Microcontrollers (Arduino uno and nano).
Additional components (resistors, cables, power supply).
Necessary materials :
LoRa Reyax RYLR896 modules (two units).
Luces LED.
Microcontrollers (Arduino uno and nano).
Additional components (resistors, cables, power supply).
Hardware Configuration :
Connecting LoRa modules to the microcontroller.
Mounting the light control circuit.
Hardware Configuration :
Connecting LoRa modules to the microcontroller.
Mounting the light control circuit.
Microcontroller Programming :
Configuring the LoRa module for transmission and reception.
Code to send the on/off signal.
Implementation of acknowledgement to ensure signal reception.
Microcontroller Programming :
Configuring the LoRa module for transmission and reception.
Code to send the on/off signal.
Implementation of acknowledgement to ensure signal reception.
Testing and Troubleshooting :
Verifying communication between modules.
Troubleshooting common issues and configuration settings.
Testing and Troubleshooting :
Verifying communication between modules.
Troubleshooting common issues and configuration settings.
Practical applications :
Examples of home use and automation projects.
Project expansion to control multiple lights or devices.
Practical applications :
Examples of home use and automation projects.
Project expansion to control multiple lights or devices.
Tutorial Objectives:
Understand the basic operation of Reyax RYLR896 LoRa modules.
Learn how to configure and use modules for wireless communication.
Implement a lighting control system with confirmation of signal reception.
Develop skills to integrate LoRa into IoT and automation projects.
This tutorial is ideal for electronics and automation enthusiasts who want to explore the potential of LoRa communication for practical, long-range applications. Upon completion, you will have a functional system that will allow you to control lights wirelessly and reliably.
868/915MHz LoRa® Antenna Transceiver Module
◆ Certification: NCC, FCC
◆ Frequency range: 868/915 MHz
◆ Motor Semtech SX1276
◆ High efficiency power amplifier
◆ Excellent immunity to blocking.
◆ Low receiving current
◆ High sensitivity
◆ Easy control via AT commands
◆ Rango dinámico RSSI de 127 dB
◆ Designed with integrated antenna
◆ AES128 data encryption
◆ Working temperature: -40℃ to +85℃
◆ Dimensions: 42.5 x 18.36 x 5.5 mm
◆ Weight: 7 g
Description
The RYLR896 transceiver module features the LoRa® long-range modem that provides ultra-long-range spread spectrum communication and high immunity to interference while minimizing current consumption. The module is NCC and FCC certified.
Electronic components of the project
Arduino Nano
A socket for arduino
Un resistor de 1 KOhm
A 5mm LED diode
Female pins
Dupont cables female male
Display oled sh1106
This is a 128x64 dot monochrome OLED display module with I2C interface. It has several advantages over LCD displays, such as high brightness, very good contrast, a wider viewing angle, and low power consumption. It is compatible with Arduino Rasberry Pi and PIC microcontrollers among others. It works with logic levels from 3.3V to 5V and has a viewing angle greater than 160 degrees. The screen size is 1.3 inches. It is powered by a voltage of 3.3V to 5V. It can be used in applications such as smart watches, MP3, thermometers, instruments, and various projects, etc.
Characteristics
Interface: I2C(3.3V / 5V logic level)
Resolution: 128 x 64
Angle of view: >160 degree
Display color: Blue
Display size: 1.3 inch
Driver IC: SH1106
Power supply: DC 3.3V~5V
Operating temperature: -20~70’C
Application: smart watch, MP3, thermometer, instruments, DIY projects, etc.
A KY-004 push button module
PCB
Download the PCB
Electronic pcb diagram
Circuit with arduino nano
Circuit with Arduino Uno
#include <U8glib.h>
// Inicializa el display SH1106
U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE);
// Define el pin del botón
const int pinBoton = 12;
bool botonPresionado = false;
bool mensajeEnviado = false;
// Variables para los mensajes a mostrar en el display
String mensajeDisplay = "Presiona la tecla";
// Configuración inicial
void setup() {
// Configura el pin del botón como entrada con resistencia pull-up interna
pinMode(pinBoton, INPUT_PULLUP);
// Inicializa la comunicación serial
Serial.begin(9600);
// Dibuja el mensaje inicial en el display
dibujar();
}
// Función para dibujar en el display
void dibujar() {
u8g.firstPage();
do {
u8g.setFont(u8g_font_unifont);
u8g.drawStr(0, 22, mensajeDisplay.c_str());
} while (u8g.nextPage());
}
// Loop principal
void loop() {
// Lee el estado del botón (inverso porque estamos usando pull-up)
if (digitalRead(pinBoton) == LOW) {
if (!botonPresionado) {
botonPresionado = true;
mensajeEnviado = true;
// Envía el mensaje por el puerto serial con retorno de carro y nueva línea
Serial.print("AT+SEND=0,5,HELLO\r\n");
// Cambia el mensaje del display
mensajeDisplay = "Mensaje enviado!";
// Dibuja en el display
dibujar();
// Espera para evitar rebotes del botón
delay(200);
}
} else {
botonPresionado = false;
}
// Revisa si hay datos disponibles en el puerto serial
if (Serial.available() > 0) {
// Lee la entrada serial
String entrada = Serial.readStringUntil('\n');
// Procesa el mensaje recibido utilizando indexOf para buscar las palabras clave
if (entrada.indexOf("luzon") != -1) {
mensajeDisplay = "Luz encendida";
dibujar();
} else if (entrada.indexOf("luzoff") != -1) {
mensajeDisplay = "Luz apagada";
dibujar();
}
}
// Si no se ha enviado ningún mensaje aún, mantiene el mensaje inicial
if (!mensajeEnviado) {
dibujar();
}
}
const int pinLed = 12; // Pin digital al que está conectado el LED
bool estadoLed = false; // Variable para rastrear el estado del LED
void setup() {
// Configura el pin digital como salida
pinMode(pinLed, OUTPUT);
// Inicia la comunicación serial a 9600 baudios
Serial.begin(9600);
}
void loop() {
// Verifica si hay datos disponibles en el puerto serial
if (Serial.available() > 0) {
// Lee la cadena entrante
String entrada = Serial.readStringUntil('\n');
// Busca la palabra "HELLO" en la cadena
int indiceHello = entrada.indexOf("HELLO");
// Si "HELLO" está presente, cambia el estado del LED
if (indiceHello != -1) {
estadoLed = !estadoLed; // Cambia el estado del LED
digitalWrite(pinLed, estadoLed ? HIGH : LOW); // Enciende o apaga el LED según el nuevo estado
// Envía el mensaje por el puerto serie según el estado del LED
if (estadoLed) {
Serial.println("AT+SEND=0,5,luzon\r\n");
} else {
Serial.println("AT+SEND=0,6,luzoff\r\n");
}
}
}
}
Turn on Light with Reyax RYLR896 LoRa Modules with Acknowledgement
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by CarlosVolt Tutoriales
- Infrared stepper motor control with speed control More info and updates https://rogerbit.com/wprb/2024/09/motor-paso-a-paso-x-infrarrojo/In this proje...
- Uploading BME280 Sensor Data to ThingSpeak Using ESP32 In this tutorial, we will show you how to connect a BME280 sensor to an ESP32 to read temperature, h...
- Water pump control for irrigation via telegram and esp32 Water Pump Control by Telegram and ESP32 is an automated system that allows you to remotely control ...
- Air conditioning on/off control via telegram and esp32 In this tutorial we will see how to control an air conditioner, with an esp32 and the telegram appli...
- 35 watt stereo amplifier In this video we will see how to build an audio amplifier, with the TDA7377 integrated circuit, and ...
- Laser alarm with RFID module More info and updates in https://rogerbit.com/wprb/2024/08/alarma-laser-rfid/In this project, we bui...
- Control lights by voice commands and keys In this tutorial we will see how to create a device to control lights by voice commands, with a modu...
- Stepper motor control x bluetooth and app In this tutorial we will see a circuit, which controls a stepper motor, with an application made in ...
- DFplayermini x bluetooth mp3 player control More info and updates in https://rogerbit.com/wprb/2022/12/dfplayermini-x-bluetooth/In this tutorial...
- Robot with WiFi control and servos driven by ESP32 More info and updates in https://rogerbit.com/wprb/2023/07/robot-wifi/A robot controlled by Wi-Fi, s...
- How to make a water level meter with uln2803 In this tutorial we will see how to make a water level meter circuit with the built-in uln2803.The p...
- DTMF decoder for handy with arduino, control over several kilometers In this tutorial we will see how to make a circuit to connect to our handy, in this case a Baofeng U...
- Turn on light from thindspeak with esp32 In this tutorial, we will show you how to control lights over the Internet using an ESP32 and the Th...
- MP3 player control with webserver using ESP32 WIFI In this tutorial, you will learn how to build a web server using the ESP32 to control the YX5300 mod...
- Time clock with fingerprint IoT module, uploading data to thingspeak More info in and updates in https://rogerbit.com/wprb/2022/07/reloj-de-control-fingerprint/In this t...
- Make your own logic tip (includes printed circuit board) In this video tutorial we will see how to make a logic tip, on a printed circuit, with the integrate...
- Coil or inductor meter with Arduino and OLED display More info and updates in https://rogerbit.com/wprb/2022/06/medidor-inductores/In this tutorial we wi...
- Turn on Light with Reyax RYLR896 LoRa Modules with Acknowledgement In this tutorial, you will learn how to use the Reyax RYLR896 LoRa modules to wirelessly and reliabl...
-
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
154 1 1 -
-