DEV Community

Akshay Jain
Akshay Jain

Posted on

Long-Range Appliance Control System Using Arduino and LoRa

Most IoT projects depend on Wi-Fi and cloud services. But what if the device you want to control is located far away from your router, or internet connectivity isn't available at all?

That's the question that led me to experiment with a long-range appliance control system using Arduino Nano and the Reyax RYLR999 LoRa module.

The idea was simple:

Can a smartphone control electrical appliances located hundreds of meters—or even kilometers—away without using Wi-Fi?

The answer turned out to be yes.

In this project, I combined Bluetooth Low Energy (BLE) and LoRa communication to create a wireless system capable of controlling a lamp and a fan remotely.

Why LoRa?

LoRa (Long Range Radio) is a wireless communication technology designed specifically for transmitting data over very large distances while consuming very little power.

Unlike Bluetooth or Wi-Fi, LoRa is not intended for high-speed data transfer. Instead, it focuses on:

Long communication range
Low power consumption
Reliable transmission
Simple infrastructure

The system consists of two separate nodes.

Controller Node

The controller node acts as the bridge between the smartphone and the LoRa network.

A smartphone connects to the Reyax RYLR999 module using Bluetooth Low Energy through the LightBlue mobile application. Commands received from the phone are processed by an Arduino Nano and then transmitted over LoRa.

Target Node

A second RYLR999 module receives the LoRa message and passes it to another Arduino Nano.

The Arduino interprets the command and controls relay outputs connected to appliances.

Relay channel 1 controls a 240V AC bulb.
Relay channel 2 controls a 12V DC fan.

After executing the command, the receiver sends a response back to the controller node, providing confirmation that the operation was successful.

Hardware Used

Arduino Nano ×2
Reyax RYLR999 LoRa + BLE Module ×2
Bidirectional voltage level shifter ×2
16×2 I2C LCD display ×2
Two-channel relay module
Jumper wires
12V power supply
12V DC fan
240V AC bulb
Why Use the RYLR999 Module?

One thing I really liked about the Reyax RYLR999 module is that it combines two communication technologies inside a single module:

Bluetooth Low Energy
LoRa

This allows the smartphone to communicate locally through BLE, while LoRa handles long-distance communication.

Essentially, the module transforms short-range Bluetooth commands into long-range LoRa transmissions.

Understanding the Communication Flow

The sequence is fairly straightforward:

  • The smartphone sends a command through Bluetooth.
  • The controller node receives the command.
  • Arduino processes the message.
  • The LoRa module transmits the command.
  • The target node receives the message.
  • Arduino activates the appropriate relay.
  • The appliance switches ON or OFF.
  • A confirmation response is sent back.

This creates a simple but reliable two-way communication system.

Controller Connections

The controller setup consists of:

Arduino Nano
RYLR999 Module
Voltage Level Shifter
I2C LCD

Because the RYLR999 module operates with 3.3V logic while the Arduino uses 5V logic, a bidirectional level shifter is placed between them.

The module's LoRa TX pin connects to the Arduino RX pin through the level shifter, and the Arduino TX pin connects back to the module's LoRa RX pin.

SoftwareSerial communication is used for Bluetooth communication:

D2 → BLE Transmit
D3 → BLE Receive

The I2C LCD uses:

SDA → A4
SCL → A5

The display shows command and communication status information.

Target Connections

The target node also uses an Arduino Nano and an RYLR999 module.

This node continuously listens for LoRa packets.

A two-channel relay module is connected to:

D11 → Bulb control
D12 → Fan control

The relay module allows the Arduino to safely switch both AC and DC loads.

A second I2C LCD provides feedback about received commands and appliance status.

⚠️ Be careful when working with mains voltage. Disconnect power before wiring the AC bulb circuit.

Why Is a Voltage Level Shifter Needed?

The Arduino Nano uses 5V logic levels, while the RYLR999 module operates with 3.3V logic. Directly connecting them can damage the module.

To safely interface both devices, a bidirectional voltage level shifter is used between the Arduino and the RYLR999.

This ensures reliable serial communication without risking the hardware.

Relays: Connecting the Digital World to Real Appliances

Microcontrollers cannot directly control high-voltage devices.

That's where relays come in.

A relay acts as an electrically controlled switch. It allows a low-voltage signal from the Arduino to safely control:

  • AC loads such as bulbs
  • DC loads such as fans and motors

This isolation makes the system much safer and more practical.

Real-Time Feedback Using LCD Displays

Both nodes include 16×2 I2C LCD displays.

These displays show:

System initialization
Received commands
LoRa transmission status
Response messages

Having visual feedback makes debugging and troubleshooting much easier.

Commands Used

The smartphone sends commands using the LightBlue BLE application.

Examples include:

*L1# → Turn bulb ON
*L0# → Turn bulb OFF
*F1# → Turn fan ON
*F0# → Turn fan OFF

After successful execution, the target node sends back:

DONE

Potential Applications

This architecture can easily be expanded for:

Irrigation systems
Warehouse automation
Remote lighting
Industrial control

Final Thoughts

I documented the complete project, including wiring diagrams, source code, and configuration steps, on Play with Circuit, where I share tutorials on Arduino, embedded systems, and practical electronics projects.

Top comments (0)