Arduino ProjectsLORA PROJECTS

LoRa Network, Master Arduino LoRa to Multiple Arduino Lora Nodes, LoRa End Nodes

LoRa Network using Arduino, Description:

 

LoRa Network, Master Arduino LoRa to Multiple Arduino Lora Nodes, LoRa End Nodes- In this article, you will learn how to make a LoRa Network using Arduino boards, SX1278 LoRa transceiver modules, a Servo, an I2C supported SSD1306 Oled display module, and a pair of Potentiometers.

I have already uploaded an article on the LoRa network, in which I have practically demonstrated that how a LoRaWAN can be implemented by using multiple LoRa transceiver modules. Guys, you might be thinking that when I have already implemented LoRaWAN, then what is the need to work on this project once again? Well, you will get its answer in a minute.

allpcb circuit


As you know, every person or a company has a specific requirement that for what purpose a LoRa network has to be designed. Similarly, I also had to keep certain personal requirements into consideration when I was designing my LoRaWAN or LoRa network. I wanted, that my designed LoRa network had a Master Node and rest of the LoRa Nodes just act as sensor Nodes.

LoRa Network

So, keeping in view this necessity before me, I worked out and designed this LoRaWAN network. I used a total of 3 Nodes in this LoRaWAN network.

To the master Lora Node an i2c supported Oled display module is connected which I used for displaying the data received from the other two LoRa nodes.



To the Lora Node1 a potentiometer is connected which I used as the sensor. You can replace this sensor with any other sensor of your choice.

To the Lora Node2, DS18b20 waterproof one-wire digital temperature sensor is connected.

LoRa Network

The Master Lora Node, first, send request to the Lora Node1, for this I created a timer using the millis() function. So, for the first 5 seconds the Master Lora node sends multiple requests to the Lora Node1 and receive data from the Node1, this time duration can be changed in the programming. But it’s good to give it enough time so that the master node can get multiple replies from the Lora end device. As you can clearly see for the first 5 seconds it receives data from the Node1 and then for the other 5 seconds it receives data from the Lora Node2 to which the DS18b20 Temperature sensor is connected.

LoRa Network

The Node name is also printed on the Oled display module so there is no confusion at all.

You can clearly see, that in this project I am only monitoring the sensors and I am not controlling anything.


A few days back, one of my followers asked me, that how can we send sensors data from the Master LoRa Node to Multiple LoRa END devices? If you remember during my previously designed LoRa network, I used to send data to Master Node from END devices. Whereas, in today’s LoRa Network, I will send data or commands from the Master LoRa node to multiple LoRa END devices.

LoRa Network

As you can see a master LoRa Node, having two potentiometers connected to it. Servo is connected to LoRa node 1, whereas the Oled display module is connected with LoRa Node 2. I have programmed the Master LoRa node in such a manner that one of the two potentiometers will control Servo, whereas value of the second potentiometer will be printed on the Oled display module. Instead of using the potentiometers you can use some other types of sensors and the same thing applies to the Servo and Oled display module. It’s totally up to you what exactly you want to control.

By the way, you might be thinking how does Arduino come to know about which potentiometer’s data has to be sent on which LoRa Node or LoRa END device? Well, you don’t have to be confused, in this network every LoRa node has a specific address. And it is with the help of these addresses, the master LoRa node knows which potentiometer data has to be sent onto which LoRa END device. Enough with the talking, let’s practically see this LoRa network in action?


 

LoRa Network

You can see, I have powered up all LoRa Nodes. And, you can also clearly see there is no physical connection between the Nodes, because it is obviously a wireless Network. Right now value on the Oled display module is 827 and you can also see the position of the Servo. Now, I will use the two potentiometers on the Master LoRa Node to change the value on the Oled display and to change the position of the Servo.

LoRa Network

So, you can see how easily we can transmit data and commands from a Master LoRa Node to multiple LoRa END devices. You can also convert Master Node into an loT Gateway and as such, you can manage your LoRa Nodes from any country of the world through the application of your cell phone. Therefore, if you are interested to learn how to design a LoRa gateway, you must surely watch out my previous videos. You can find links in the description given below.

I am sure by now you might have got an idea of how does this system works. So, without any further delay, let’s get started!!!



Amazon Links:

Arduino Nano USB-C Type (Recommended)

LoRa SX1278 Module

SSD1306 128×64 Oled i2c display Module

Servo

*Disclosure: These are affiliate links. As an Amazon Associate I earn from qualifying purchases.


SX1278 LoRa Module:

LoRa Network

Features:

  • Frequency Range: 868 / 915 MHz
  • Sensitivity up to -139dBm @Lora
  • Maximum output power: 20 dBm
  • 13mA@receiver mode
  • Sleep current <200 nA
  • Data transfer rate: @FSK,1.2-300 Kbps
  • @Lora TM, 0.018-37.5 Kbps
  • Lora TM, FSK, GFSK & OOK Modulation mode
  • Built-in ESD Protection
  • 127 dB Dynamic Range RSSI
  • Packet engine up to 256 bytes with FIFO and CRC
  • Hopping frequency
  • Built-in temperature sensor and low battery indicator
  • Excellent blocking immunity
  • Operating Temperature Range:-40 ~ + 85 °C

Applications:

  • Remote control
  • Remote meter reading
  • Home security alarm and remote keyless entry
  • Industrial control
  • Home automation remote sensing
  • Individual data records
  • Toys control
  • Sensor network
  • Tire pressure monitoring
  • Health monitoring
  • Wireless PC peripherals
  • Tag reading and writing


Master Lora Node, Circuit Diagram:

LoRa Network

The VCC of the LoRa module is connected with the 3.3V of the Arduino. The MISO Pin of the LoRa module is connected with the Arduino pin 12. The MOSI pin is connected with pin 11. The SCK pin of the LoRa module is connected with pin 13. The NSS pin is connected with the Arduino’s pin 10 and the ground pin of the LoRa module is connected with the Arduino’s GND.

Two potentiometers are connected with the Arduino analog pins A2 and A3. Now, let’s take a look at the circuit diagram of the LoRa Node 1.

Lora Node1, Circuit Diagram:

LoRa Network

The Lora module connections with the Arduino Nano remains exactly the same.

On the left side, you can see a 5V regulated power supply based on the LM7805 voltage regulator. We use this regulated 5 volts to power up the Arduino and all the other electronics.

The signal wire of the Servo is connected with the PWM 3 of the Arduino. If you want to use a large servo motor then you should use a separate 5v power supply with the Servo. Otherwise, your Arduino will keep resetting. Now, let’s take a look at the circuit diagram of the LoRa Node 2.


Lora Node2, Circuit Diagram:

LoRa Network

The Lora module connections with the Arduino and the 5V regulated power supply wiring remains exactly the same.

The SDA and SCL or SCK pins of the SSD1306 Oled display module are connected with the A4 and A5 pins of the Arduino. While the VCC and GND pins of the Oled display module are connected with the Arduino’s 5 volts and GND pins.

Lora Network Arduino Programming:

Before, you start the programming; first of all, make sure you download all the necessary libraries.

Download: LoRa.h

Download: Adafruit_GFX.h

Download: Adafruit_SSD1306.h

Master LoRa Node, Arduino Code:



LoRa Node 1, Arduino Code:


LoRa Node 2, Arduino Code:


Watch Video Tutorial:

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Related Articles

One Comment

  1. Hi can you Make blogs on some advanced Lora topics like creating a Lora node with micro controller which you already did in your posts and sending the Lora node data to the gateway ( may be indoor gateway or outdoor gateway ) and from from the gateway to the things network server and here once we receive our pay load from things network ,it will be in hex format format ,we need to write a decoder script to understand in human readable formats , Iam finding no topic on Lora how to write customized decoder scrips for Various sensors , it will be a great help if we get more information on payload formatters like how to write decoder scripts for sensors and after that there is no use if we have sensor data even though in readable format until unless it is visualized ,please make some blogs how to visualize the data from TTN network server to integrate to aws iot core ,IBM cloud ,azure webbooks (like ubidots ..etc) EVEN THOUGH WE HAVE DOCUMENTATIONS ON INTERNET its is bit difficult to understand to the beginners LACK of proper support from those cloud platforms
    This kind of Research project will give us an end to end solution and it will be great lesson for lot research students like me . I really appreciate your time to make awesome content like this Hats off to you Shahzada Fahad

    Waiting for your future content

    god bless you

    thanks
    sai from canada

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button