The project has two main sections:

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:

RYLR999 Interface

The RYLR999 provides separate interfaces for BLE and LoRa communication.

The important pins used in this project are:

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:

The RYLR999 power connections are:

For the LoRa UART:

The BLE UART uses SoftwareSerial:

The voltage level shifter is powered with:

Controller LCD

The controller LCD uses the Arduino Nano's I2C interface:

The I2C address is 0x27.

The A0, A1, and A2 address jumpers should not be shorted.

Target Circuit

The target node contains:

The LoRa UART is connected through the voltage level shifter in the same way as the controller's LoRa interface.

The target node does not need the BLE connection because communication with the controller is handled through LoRa.

The relay control connections are:

The relay module is powered from the Arduino:

Target LCD

The target LCD uses the same I2C arrangement:

The LCD uses I2C address 0x27.

Again, the A0, A1, and A2 address jumpers should remain unshorted.

Relay and Appliance Control

Relay channel 1 is used for the 240V AC bulb.

The AC live line is switched through the relay:

AC Live → Relay COM → Relay NO → Bulb

Relay channel 2 is used for the 12V DC fan.

The relay is placed in series with the 12V fan supply so that the Arduino can switch the fan ON and OFF.

The relay therefore provides the switching interface between the Arduino's control signals and the appliance circuits.

Command Structure

The smartphone sends the following application-level commands through BLE:

*L1#  → Bulb ON
*L0#  → Bulb OFF
*F1#  → Fan ON
*F0#  → Fan OFF

At the target application level, the corresponding commands and responses are:

L1 → DONE
L0 → DONE
F1 → DONE
F0 → DONE

The DONE message represents an acknowledgment from the target node after the command has been processed.

The actual RYLR999 LoRa transmission uses its AT-command format, which includes additional information such as the destination address and payload length. The commands above are the application-level commands used by the project.

Example: Turning the Bulb ON

A typical bulb ON operation follows this sequence:

  1. The user sends *L1# from the smartphone.
  2. The controller receives the command through BLE.
  3. The controller Arduino processes the command.
  4. The controller RYLR999 sends the corresponding LoRa message.
  5. The target RYLR999 receives the message.
  6. The target Arduino identifies the bulb ON command.
  7. Relay CH1 is activated.
  8. The 240V AC bulb is switched ON.
  9. The target node can send a DONE acknowledgment back to the controller.

The same basic process is used for controlling the fan through relay CH2.

Project Structure

The project can be thought of as four functional layers:

1. Smartphone Interface

The smartphone provides the user interface through BLE.

2. Controller

The first Arduino Nano receives BLE commands and passes the required information to the LoRa communication interface.

3. Wireless Link

The two RYLR999 modules form the LoRa communication link between the controller and target.

4. Target and Actuators

The second Arduino interprets the received command and controls the relay channels connected to the bulb and fan.

This separation makes the system easier to understand and extend.

Software

The project uses:

The LCD library is used to interface with the 16×2 I2C displays.

Possible Applications

The same architecture could be adapted for:

The appropriate implementation depends on the required range, environment, load characteristics, and electrical safety requirements.

Future Improvements

There are several directions in which this project could be extended:

Safety

The project includes a 240V AC load, so the mains section requires particular care.

Always disconnect mains power before changing or checking the AC wiring.

Use properly rated relays, wires, connectors, insulation, and protection components. The low-voltage Arduino and RYLR999 circuitry should be kept safely separated from exposed mains connections.