$USD
  • EUR€
  • £GBP
  • $USD
SELECTION GUIDE

Getting Started with LoRaWAN

DFRobot May 06 2023 3391

LoRaWAN, which stands for Long Range Wide Area Network, is a low-power, long-range wireless communication protocol specifically designed for Internet of Things (IoT) devices. It enables devices to transmit and receive small packets of data over long distances with minimal power consumption. Its advantages in remote geolocation services, cost-effectiveness, and end-to-end security allow for infinite wireless communication applications to be realized, such as intelligent bicycle trackers, smart farming, and cold chain monitoring, among others.

LoRaWAN

Figure: LoRaWAN

 

However, deploying and utilizing LoRaWAN for the entire project may require a longer period of time, and if there are unforeseeable design issues, inappropriate technical use cases, and incorrect network and device settings, they could all potentially waste your time. Therefore, this article presents four simple steps to help you become familiar with LoRaWAN and decide how to apply it in your project.

What preparations do we need to make to quickly set up an application using LoRaWAN? Let us use this article to help you quickly get started with LoRaWAN, so that even beginners can easily implement the basics of LoRaWAN.

 

STEP 1: What are the advantages of LoRaWAN?

Compared to traditional communication protocols, LoRaWAN offers several advantages, including its ability to cover large geographical areas, low power consumption, and secure communication. This technology is particularly suitable for applications where devices need to communicate over long distances without draining their batteries.

 

1. Low Cost:

In LoRaWAN, the devices that are usually in greater quantity are the gateways and terminals. Since the gateway only serves as a data forwarder, its price is relatively cheap, at around $50 USD. The terminal device only needs to send data information to the gateway, so the price of the terminal device is around $10 USD.

 

2. Wide Coverage Range:

Using CSS and ADR, LoRaWAN can communicate with a gateway up to 15 km away in unobstructed open areas or up to 5 km away in urban areas. This means that a single gateway can cover all devices in an area of approximately 700 square kilometers.

 

3. Low Power Consumption and Long Life:

Compared to 4G CAT1, LoRaWAN boasts ultra-low power consumption, whereas 4G CAT1 lacks low power features. In outdoor settings such as agriculture and forestry, 4G CAT1 cannot be battery-powered like LoRaWAN.

Due to the requirements of low power consumption and low peak current, the power consumption of LoRaWAN terminal devices in sleep mode is below 5uA, which significantly reduces the device's power consumption. A single charge can extend the device's life to 10 years, greatly reducing the cost of support and maintenance.

 

4. Strong Penetration Capability:

LoRa wireless modulation technology can penetrate indoor depths, with the ability to reach underground water and gas meter sensors.

 

5. No need for a frequency license:

LoRaWAN operates on a free public spectrum, available for anyone to use, which sets it apart from NB-IoT, another low-power technology that requires carrier networks. LoRaWAN's private network feature gives it greater economic and operational flexibility.

LoRaWAN networks are deployed on free ISM bands (EU868, AS923, US915MHz), allowing any service provider or enterprise to deploy and operate LoRaWAN networks without a frequency license.

 

LoRaWAN technology is a cost-effective option for applications that require long life, low power consumption, wide coverage range, but do not require large data transmissions. It allows anyone to start a LoRaWAN project and deploy and operate LoRaWAN networks without a frequency license.

 

STEP2: What can LoRaWAN be used for?

LoRaWAN, according to the ABI Research Whitepaper published in 2019 titled "LoRaWAN®, Competitors or Complementary," has demonstrated its widespread adoption in various vertical fields, including:

  • Enabling public community affairs such as gas and water meter queries, which have successfully implemented intelligent electricity meter queries.
  • Constructing smart buildings, that can perform environmental monitoring and real-time monitoring of office and living environments.
  • Tracking logistics and assets, allowing for the tracking of complex supply chain links and ensuring asset visibility and traceability.
  • Industrial and intelligent manufacturing, used for real-time monitoring of production processes and monitoring machine operating conditions to reduce downtime.
  • Intelligent agriculture is used to monitor soil moisture or livestock conditions, in order to increase crop or dairy production.

 

Now that we know what LoRaWAN is capable of, how do we get started on a project utilizing it?

 

STEP 3: How Does LoRaWAN Work?

Next, let us delve into how LoRaWAN works. The network architecture diagram from the official LoRa Alliance white paper is shown below. A LoRaWAN network architecture comprises four components: end devices, gateways, network servers (NS), and application servers. The network topology between gateways and end devices is star-shaped, and due to the long-range characteristic of LoRa, they can use single-hop transmission between them. The official document lists 6 typical applications in the end devices section, and you will notice that end devices can simultaneously transmit to multiple gateways, while gateways forward LoRaWAN protocol data between NS and end devices. LoRaWAN communication is bidirectional, allowing end devices to send and receive data. The protocol uses various frequency bands and data rates, enabling adaptive data rate (ADR) optimization of communication based on network conditions.

LoRaWAN Star Network Topology
 

Figure: LoRaWAN Star Network Topology

 

STEP 4: Preparing for the LoRaWAN Project

To embark on your first LoRaWAN project, you will require a LoRaWAN gateway, a LoRaWAN end-device (such as a sensor), and software for managing the network and processing data.


 

Preparation and Selection of Tools

Your LoRaWAN project will require the following components:

  • LoRaWAN End-Device: The end-device, such as a sensor or actuator, is responsible for collecting data or executing operations based on received instructions. It communicates with the gateway using the LoRaWAN protocol.
  • Gateway: The gateway is a crucial component that bridges communication between end-devices and the network server. It receives and sends data packets to and from end-devices.
  • Software and Tools: You will need software for managing the LoRaWAN network and processing the collected data. This may include a network server, application server, and development tools for programming end-devices.

 

Setting Up the Environment

Once you have obtained the necessary hardware and software, you can proceed to set up the environment by configuring the LoRaWAN gateway according to the manufacturer's instructions. This may involve setting up the network connection, specifying the frequency band, and ensuring that the gateway is connected to the network server.

Depending on the requirements and constraints of the IoT application, LoRaWAN gateways can be deployed online or offline. For online gateways, they need to have a return network to connect to the internet, and the communication return can be optional WiFi, Ethernet, cellular network, etc. Online connected gateways mainly use LoRaWAN network servers deployed in the cloud.

When the LoRaWAN gateway is deployed offline, it can use the built-in network server of the gateway itself, or connect to the network server deployed locally on a PC or server. Whether the gateway is online or offline, it must register with the LoRaWAN network server and then appropriately configure the data packet forwarder.

 

There are also many different network service platforms to choose from, such as The Things Network, Tencent Cloud IoT Platform, AWS IoT Core for LoRaWAN, etc.

  • The Things Network is a very well-known network server provider in the LoRaWAN industry, especially for developers. They operate a good developer community that attracts many developers to use their platform to build their own private network servers.

The Things Network

 

  • ChirpStack is an open-source network server that provides rich application APIs. It can be deployed on a user's own server and used for commercial purposes.

ChirpStack
 

 

Registering and activating terminal devices:

Registering terminal devices on the network server involves specifying the device's unique identifier (DevEUI) and security key. The network server uses this information to authenticate and encrypt communication with the terminal device.

Registering and activating terminal devices

 

Figure: Registering and activating terminal devices

 

Setting up the application server:

Ensure that the application server is configured to receive and process data from terminal devices. This involves specifying data formats and setting up any required integrations with other systems.

Setting up the application server
 

Figure: Setting up the application server

 

The application server is responsible for decrypting data received from sensors and encrypting data sent to terminal devices. Data can be integrated into existing data management systems or IoT platforms such as AWS, Azure, Google Cloud, and Thingspeak. These IoT platforms allow you to aggregate, visualize, and analyze real-time data streams in the cloud, making it more convenient to observe data and control devices on both PCs and smartphones.

 

Test application:

Conduct a controlled-environment test of the terminal device application to ensure it runs as expected. Verify that data has been transmitted to the gateway and received by the application server.

vineyard pest monitoring system
 

Figure: vineyard pest monitoring system

 

Deploy the application:

After successful testing, deploy the terminal device application to the target location. Monitor the system and ensure proper transmission and processing of data.

Vineyard pest monitoring system-LoRaWAN End-Device
 

Figure: Vineyard pest monitoring system-LoRaWAN End-Device

 

vineyard pest monitoring system-gateway Arduino Pro WisGate Edge
 

Figure: vineyard pest monitoring system-gateway Arduino Pro WisGate Edge

 

Summary

LoRaWAN is a powerful technology that enables remote low-power communication for IoT applications. By following the steps outlined in this article, you can begin preparing for your first LoRaWAN project and experience the benefits of this technology firsthand. There are also many other applications of LoRaWAN that you can explore to see their effectiveness.

REVIEW