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
- 2-channel relay module
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:
- Arduino D11 → Relay CH1
- Arduino D12 → Relay CH2
The relay module is powered from the Arduino:
- Relay VCC → 5V
- Relay GND → GND
Target LCD
The target LCD uses the same I2C arrangement:
- VCC → 5V
- GND → GND
- SDA → A4
- SCL → A5
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:
- The user sends
*L1#from the smartphone. - The controller receives the command through BLE.
- The controller Arduino processes the command.
- The controller RYLR999 sends the corresponding LoRa message.
- The target RYLR999 receives the message.
- The target Arduino identifies the bulb ON command.
- Relay CH1 is activated.
- The 240V AC bulb is switched ON.
- The target node can send a
DONEacknowledgment 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:
- Arduino IDE 2.3.4 or above
- LiquidCrystal_I2C library by Frank de Brabander v1.1.2
- LightBlue BLE application
The LCD library is used to interface with the 16×2 I2C displays.
Possible Applications
The same architecture could be adapted for:
- Remote lighting control
- Farm and agricultural equipment
- Pump control
- Building automation
- Remote machinery
- Industrial control interfaces
- Long-range actuator systems
- Remote sensor and control networks
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:
- Create a dedicated smartphone application.
- Display acknowledgments directly in the mobile interface.
- Add more relay channels.
- Add sensors for monitoring.
- Add error handling and retransmission.
- Add command authentication.
- Record communication status.
- Design a dedicated PCB.
- Add a proper enclosure.
- Add additional electrical protection.
- Introduce automation rules based on sensor inputs.
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.
Akshay Jain