In this Lora project, we will see how to control high voltage devices with the LoRa Arduino relay control circuit. In this Arduino Lora project, we will use the Reyax RYLR896 Lora module, Arduino, and 12v relay module to control 5 home appliances with the Lora transmitter and receiver module. So this is also a useful home automation project for the smart home. I will share the complete circuit diagram, Arduino Code, and all other details with simple 6 steps to make this Lora Arduino Project.
- Lora Modules REYAX RYLR896 2no
- Arduino Nano 2no
- 12v relay module 1no
- FTDI232 USB to serial interface board 1no
- 7805 voltage regulator 1no
- 22uF capacitor 1no
- 4.7k Resistor 1no
- 10k Resistor 6no
- Push switches 5no
Step 1: Connect Lora Module with PC
Before connecting the LORA module with Arduino, we have to set some parameters like Address, Band for the Lora module using AT commands. So we need to connect the Lora Module with USB to serial interface board as per the circuit diagram. So that we can connect the Lora module with Laptop or PC. Here I have used FTDI232 USB to Serial interface board.
Step 2: Set the Parameter for Transmitter Lora
First Connect the Lora module with laptop. In the Arduino IDE select the PORT Tool–>Port Open the Serial Monitor and set the Brud rate to 115200.
Now we can set the parameters with some basic AT commands.
First, type AT then press enter key. We should get +OK in the serial monitor. Then type AT+ADDRESS=0 to set the address to 0 for transmitter Lora. Then type AT+BAND=865000000 to set the band 865MHz. The frequency band for LoRa Technology in my country is 865 MHz to 867 MHz. You have to set the band as per your country. You can google it to know the band for your country. The default Network id is 0. so we will not change it for this Lora project.
Step 3: Set the Parameter for Receiving Lora
In a similar way, we have to set the parameters for the receiving Lora module
First, type AT then press enter key. We should get +OK in the serial monitor.
Then type AT+ADDRESS=1 to set the address to 1 for receiving Lora.
Then type AT+BAND=865000000 to set the band 865MHz. You can google it to know the band for your country.
The default Network id is 0. so we will not change it for this Lora project.
Step 4: Transmitter LoRa Arduino Circuit
In the transmitter Lora circuit, we have connected the transmitter Lora module with Arduino Nano as per the circuit diagram.
In the Transmitter Lora circuit, 5 push buttons are connected with Arduino digital pin D2, D3, D4, D5, D6. Whenever we press any push-button, the signal sent to receiving the Lora module to turn on or off the respective relay.
Here I have made a voltage divider with two resistors 4.7k and 10k to drop down 5v logic level to 3.3v logic level. Arduino can send the signal at 5v logic level but the Lora module RYLR896 can only receive the signal at 3.3v logic level. So we have connected the voltage divider between Arduino TX pin and Lora RYLR896 RX pin.
Step 5: Receiving LoRa Arduino Circuit
I have connected the receiving Lora module with Arduino Nano as per the receiving Lora circuit diagram.
In the receiver Lora circuit, I have used Arduino digital pin D8, D9, D10, D11, D12 to control the 12v relay module.
Here voltage divider is not required as Arduino can receive signal at 3.3v logic level from the receiving Lora module RYLR896.
I have used a voltage regulator 7805 (5-volt) to fed 5v supply to the Arduino circuit.
Order the PCB
After downloading the Garber file you can easily order the PCB
1. Visit https://jlcpcb.com and Sign in / Sign up
2. Click on the QUOTE NOW button.
3 Click on the "Add your Gerber file" button. Then browse and select the Gerber file you have downloaded.
Uploading the Gerber File and Set the Parameters
4. Set the required parameter...Read more »