The project has two main sections:
- Controller Node
- Target Node
The controller node acts as the bridge between the smartphone and the remote appliance system.
The target node is installed at the appliance side and is responsible for receiving LoRa commands and controlling the connected loads.
The overall communication path is:
Smartphone → BLE → Controller Arduino → RYLR999 LoRa → Target RYLR999 → Target Arduino → Relay → Appliance
For feedback, the communication can also travel in the opposite direction:
Target Arduino → RYLR999 → Controller RYLR999 → Controller Arduino
This creates a basic two-way wireless control system.
How the Project Works?
The smartphone connects to the controller's RYLR999 module using Bluetooth Low Energy.
A BLE application such as LightBlue can be used to send the appliance commands.
The controller Arduino receives the BLE data and identifies the requested operation. It then prepares the corresponding application-level command for transmission through LoRa.
The controller-side RYLR999 sends the command wirelessly to the second RYLR999 located at the target node.
The target Arduino receives the command and determines which appliance needs to be switched.
For example, when the bulb ON command is received, the Arduino activates relay channel 1. When the fan ON command is received, relay channel 2 is activated.
After processing a command, the target node can return an acknowledgment such as DONE.
Communication Technologies
Bluetooth Low Energy
BLE is used between the smartphone and controller.
This provides a convenient way to send commands from an Android phone without requiring Wi-Fi or an internet connection.
The LightBlue BLE application is used as the smartphone-side interface.
LoRa
LoRa provides the wireless link between the controller and target nodes.
The RYLR999 modules are responsible for this communication.
LoRa is particularly useful when the two nodes need to communicate over a longer distance than a typical local BLE connection.
The actual range is environment-dependent and can be affected by antenna selection, placement, height, obstacles, interference, and radio configuration.
UART
The Arduino communicates with the RYLR999 modules through UART.
Because the Arduino Nano has only one hardware serial interface, SoftwareSerial is used for the BLE side of the controller.
Hardware
The main components used in the project are:
- Arduino Nano ×2
- Reyax RYLR999 LoRa + BLE modules ×2
- 5V bidirectional voltage level shifters ×2
- 16×2 I2C LCDs ×2
- 2-channel relay module
- 12V DC fan
- 240V AC bulb
- 12V power supply
- Jumper wires
- Android smartphone
- LightBlue BLE application
RYLR999 Interface
The RYLR999 provides separate interfaces for BLE and LoRa communication.
The important pins used in this project are:
- VDD – power supply
- RST – reset input; LOW resets the module
- TXD_BLE – BLE UART transmit
- RXD_LoRa – LoRa UART receive
- TXD_LoRa – LoRa UART transmit
- RXD_BLE – BLE UART receive
- GND – ground
The Arduino Nano uses 5V logic while the RYLR999 uses 3.3V logic. Bidirectional level shifters are therefore used between the Arduino and RYLR999 UART signals.
Controller Circuit
The controller contains:
- Arduino Nano
- RYLR999
- Bidirectional level shifter
- 16×2 I2C LCD
The RYLR999 power connections are:
- VDD → Arduino 5V
- GND → Arduino GND
For the LoRa UART:
- RYLR999 TXD_LoRa → LV2 → HV2 → Arduino RX D0
- Arduino TX D1 → HV1 → LV1 → RYLR999 RXD_LoRa
The BLE UART uses SoftwareSerial:
- Arduino D2 (BLE_TX) → HV3 → LV3 → RYLR999 RXD_BLE
- RYLR999 TXD_BLE → LV4 → HV4 → Arduino D3 (BLE_RX)
The voltage level shifter is powered with:
- HV supply → Arduino 5V
- LV supply → Arduino 3.3V
Controller LCD
The controller LCD uses the Arduino Nano's I2C interface:
- VCC → 5V
- GND → GND
- SDA → A4
- SCL → A5
The I2C address is 0x27.
The A0, A1, and A2 address jumpers should not be shorted.
Target Circuit
The target node contains:
- Arduino Nano
- RYLR999 LoRa module
- Bidirectional voltage level shifter
- 16×2 I2C LCD...
Akshay Jain