LoRaWAN – What is it? How does it work?

Introduction

By now, every IoT enthusiast might have heard of LoRa, or LoRaWAN. Many companies use it, many cities use it, and many hobbyists have built numerous projects with it. But how does it work? Why is LoRa so “low-power”? How can LoRa reach such a long distance? I will discuss all of that in this article.

The basics: LoRa, LoRaWAN and the LoRa Alliance

First of all, it is important to know that there is a difference between LoRa and LoRaWAN.

LoRa is short for Long Range. It is the radio frequency modulation developed by Semtech Corporation. Semtech calls LoRa the “DNA” of IoT, and it certainly has become an important building block of modern and long-lasting IoT networks and systems.

LoRaWAN is short for Long Range Wide Area Network. As the name suggests, it is a protocol that allows for a network that covers a wide area and the signal reaches a long distance.

The specifications of LoRaWAN are decided by the LoRa Alliance. This is an open-source and nonprofit association of many companies (more than 500 up to now), that push forward the LoRaWAN technology. According to their website, their vision is to “empower sustainable IoT to maximize efficiency, improve quality of life and protect the planet’s resources”.

LoRa PHY modulation

I don’t want to explain too much from the ground up, so I assume that you have a basic understanding of wireless radio transmission. I assume that you know what a carrier frequency is, and what a channel is. If not, I might write a series of articles on that in the future.

Modulation is the modification of a carrier frequency so that it can transport information. LoRa modulation comes from a type of modulation called Chirp Spread Spectrum (CSS). This means, a sequence of bits is mapped to a certain frequency sweep through the spectrum and over time (a chirp signal is a signal whose frequency is changed over time, so LoRa does exactly that). This “spreads” the signal and therefore makes it more robust and more immune against RF interference.

LoRa uses sub-GHz frequencies in the license-free bands. In Europe, this is the 868 MHz band (867.1 MHz to 869.525 MHz), and in the US and Australia this is the 902 MHz to 928 MHz band. In Asia, LoRa uses the 923 MHz band. The different frequencies make it harder to develop a product that works anywhere in the world.

LoRa allows for different spreading factors (SF7 to SF12), that lead to different signal properties, e.g. different time on air and signal bandwidth, and thus also a different bit rate. The following table summarizes this:

Spreading FactorBit rateRangeAir-time for payload “hello world”
SF100.98 kbit/s8km371ms
SF91.76 kbit/s6km185ms
SF83.125 kbit/s4km103ms
SF75.47 kbit/s2km61ms
Summary of LoRa spreading factors used for uplink

If we want to look at the frequency spectrum over time, the waterfall plot generated from the data of a software-defined radio is perfect for this purpose. If you don’t know what a software-defined radio is, check out my post about them here.

Simple LoRa device and SDR stick

If you want to buy a simple microcontroller with LoRaWAN communication, I would suggest you get a set of two devices so that you can do actual communication. If you get one through this link, you support my work on this blog!

LoRaWAN protocol

If you look at the OSI layer model for networking, LoRaWAN adds the MAC layer on top of the LoRa physical layer.

The architecture of a full LoRaWAN systems consists of gateways, a network server and an application server. And of course the end devices or sensor nodes.

  • Gateway: A device with LoRa transmitters on one or more spreading factors. It receives a packet from a wireless LoRa node and forwards it to the network server (downlink). It can also transmit data to a sensor node in a defined time window (uplink).
  • Network Server: The network server i
  • Application Server:
  • Sensor Node: The sensor node or end device can have different classes according to the standard:
    • Class A: Send any time, two download receive windows afterwards. Sleep the rest of the time.
    • Class B: When receiving a beacon from a Gateway, the device can open a receive window.
    • Class C: Listening permanently for any packet from the Gateway (needs a lot of power!)

Why is LoRa low-power?

LoRa is often referred to as being an LPWAN technology (LP for “low power”, but still Wide Area). However, the key aspect of low power IoT devices is that they can put their microcontroller into a deep sleep state, which only draws severyl micro-amps of current from the battery. The device only wakes up in regular intervals to do some measurement. Then, it transmits the data usin LoRa and can go back to sleep until the uplink window is coming.

By doing this duty cycling of power-up and power-down, a device can save a lot of battery.

Further reading

If you are interested in LoRa and want to know more details, I have provided you some links for further reading:

Leave a Reply