LoRa LPWAN — Long Range Low Power Wide Area Network

LoRa was developed by Semtech, founder LoRa Alliance — ESP_IDF_Series Episode #01

J3
Jungletronics
8 min readJun 4, 2020

--

This post is all about LoRa.

What protocol does it use? How does LoRa radio Signal work? How is the LoRa Frame structure? Why is LoRa long-range radio? Welcome o/

Fig 1. In case you didn’t know, LoRa stands for Long Range radio, which is a wireless protocol developed by Semtech (you’ll find their SX127x chipset on Heltec boards).

LoRa uses license-free sub-gigahertz radio frequency bands like 433 MHz, 868 MHz (Europe), 915 MHz (Australia and South/North America), and 923 MHz (Asia).

LoRa enables long-range transmissions (more than 10 km in rural areas) with low power consumption.

The technology covers the physical layer, while other technologies and protocols such as LoRaWAN (Long Range Wide Area Network) cover the upper layers (read more on https://en.wikipedia.org/wiki/LoRa).

LoRa uses LPWAN standard (Low Power Wide Area Network).

LPWAN name is formed by three components: Low Power, Wide Area, and Network.

Most IoT devices work with batteries. It has not much power to spend.

We want it kilometers to reach. But it has no power to spend (a dilemma).

The increase of bandwidth should provide a better quality of the signal, better distance range...

But bandwidth is scarce for IoT mainly for its low power profile.

Bandwidth is at a premium.

Everybody’s vying for space and bandwidth is valued and restricted in embedded systems.

Engineering involves maximizing performance using minimal resources.

If we want to create radio connections for a certain distance we can either increase the transmission power or decrease the bandwidth of the channel.

And bandwidth was Semtech’s last resort. It restricts the bandwidth to enables LoRa long-range transmissions while maintaining its low power consumption. Simple like that!

Bandwidth specified for LoRa is therefore restricted under an international agreement to 500 kilohertz 250 kilohertz and 125 kilohertz and in Europe further restricted to just 250 kilohertz and 125 kilohertz. Please read on. Don’t stop!

What frequency does LoRa use?

Fig 2. LoRa has a unique place: long-range and actually extremely low bandwidth — From https://pycom.io/chirpstack-a-lorawan-network-server-to-make-you-sing/

LoRa uses license-free sub-gigahertz radio frequency bands like 433 MHz, 868 MHz (Europe), 915 MHz (Australia and North America and Brazil), and 923 MHz (Asia).

LoRa enables long-range transmissions (more than 10 km in rural areas) with low power consumption.

Why is LoRa long-range?

LoRa, actually, is a smart way to get a reliable receiver sensitivity and low bit error rate (BER) from cheap chips. That means low-data rate applications can get a much longer range using LoRa rather than using other comparably priced radio technologies.

LoRa devices Lead the Way for Smart Agriculture. Internet of Things (IoT) is paving the way for farmers to enter into smart farms due to its low power consumption and wide coverage.

LoRa infrastructure is economical to build. In terms of communication coverage, it communicates the farthest. A single gateway or base station can cover several kilometers (Km) if such a gateway or base station installation is higher than an obstacle.

LoRa signals can’t really transmit over 10 km. LoRa’s range depends on the radio line-of-sight. Radio waves in the 400- to 900-MHz range may pass through some obstructions, depending on their composition, but will be absorbed or reflected otherwise.

How does LoRa Signal Works?

LoRa uses the Industrial, Scientific, and Medical (ISM) radio band.

In the ISM band, regulation is being done through a duty cycle. For example, 433 MHz, 868 MHz (Europe), 915 MHz (Australia and North America), and 923 MHz (Asia).

LoRa also defines and uses a spreading factor for communication range.

Spreading factor? The spreading factors are — in short — the duration of the chirp. LoRa operates with spread factors from 7 to 12. SF7 is the shortest time on-air, SF12 will be the longest. Each step up in the spreading factor doubles the time on-air to transmit the same amount of data.

The higher the spreading factor, the longer the communication distance, but the bitrate falls. Studies have revealed that most times, LoRa uses a high spreading factor for a wide range of communication.

However, as the spreading factor increases, the time that a packet stays in the wireless network increases in asymmetry, and as the number of nodes increases, the transmission rate for packets decreases. In addition, the EU uses the 868 ISM band, which overlaps with Sigfox used in IoT. IoT devices using the ISM band will increase so that collisions between packets are more frequent and packet delivery rates are lowered.

Physical Frame Format — How is the LoRa Frame?

Fig 3. Structure of a LoRa frame. A schematic summarizing the frame format. From https://www.mdpi.com/1424-8220/16/9/1466/htm

Although the LoRa modulation can be used to transmit arbitrary frames, a physical frame format is specified and implemented in Semtech’s transmitters and receivers. The bandwidth and spreading factors are constant for a frame.

A LoRa frame begins with a preamble. The preamble starts with a sequence of constant upchirps that cover the whole frequency band.

The last two upchirps encode the sync word. The sync word is a one-byte value that is used to differentiate LoRa networks that use the same frequency bands. A device configured with a given sync word will stop listening to transmission if the decoded sync word does not match its configuration. The sync word is followed by two and a quarter downchirps, for a duration of 2.25 symbols. The total duration of this preamble can be configured between 10.25 and 65,539.25 symbols.

After the preamble, there is an optional header. When it is present, this header is transmitted with a code rate of 4/8. This indicates the size of the payload (in bytes), the code rate used for the end of the transmission, and whether or not a 16-bit CRC for the payload is present at the end of the frame. The header also includes a CRC to allow the receiver to discard packets with invalid headers. The payload size is stored using one byte, limiting the size of the payload to 255 bytes. The header is optional to allow disabling it in situations where it is not necessary, for instance when the payload length, coding rate, and CRC presence are known in advance.

The payload is sent after the header, and at the end of the frame is the optional CRC.

So the LoRa solution is amazing, don’t you think? See how cool it is?

Is LoRa free?

LoRa devices transmit in an open frequency range which does not require a government license to transmit on. i.e. LoRa operates in license-free frequency bands and one does not need a license from government or state, to transmit on these frequencies. LoRa uses a 400- to the 900- MHz range.

This is an illustration of the layers of LoRa framework application:

Fig 4. https://www.mdpi.com/2073-8994/12/4/552/htm

That’s all for now, In the upcoming episodes a real project with WiFi LoRa 32 (v2), a classic IoT dev-board designed & produced by Heltec Automation(TM) using the native ESP-IDF ;)

See you soon!

Bye!

Related Post

00#Episode — ESP_IDF_Series — ESP-IDF Programming Guide + WiFi LoRa 32 (v2) — How To Get Started

01#Episode — ESP_IDF_Series — LoRa LPWAN — Long Range Low Power Wide Area Network — LoRa was developed by Semtech, founder LoRa Alliance —(this one:)

02#Episode — ESP_IDF_Series — ESP-IDF Programming Guide + WiFi LoRa 32 (v2) + idf.py utility — How To Really Get Started

03#Episode — ESP_IDF_Series — ESP32-IDF — HelloWorld Get Started — How To Get Started

05#Episode FreeRTOS — A Real Real-Time TV Transmissions — Fundamental Understanding about FreeRTOS Apps — IoT

01#Episode # #esp32MeshSeries — FreeRTOS — ESP32 MESH — HANDS-ON — Simple Mesh ESP32 Mesh Net — Expressif SDK-IDF

Notes

Credits and References

A Study of LoRa: Long Range & Low Power Networks for the Internet of Things by Aloÿs Augustin, Jiazi Yi, Thomas Clausen, and William Mark Townsley

ChirpStack — A LoRaWAN Network Server to Make You Sing by Lily Griffey-Hill

LoRa CHIRP by Richard Wenner

#112 LoRa / LoRaWAN De-Mystified / Tutorial by Andreas Spiess

https://github.com/Inteform/esp32-lora-library at GitHub

https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series#instructions at GitHub

https://www.anatel.gov.br/legislacao/component/pesquisa/view-results/module-188/searchterm-Tm9ybWFSYWRpb2ZyZXF1ZW5jaWE

Brazil uses AU915–928 LoRa Frequencies: https://kierenblack.nz/au915-928-lora-frequencies/

Heltec LoRa basic library API at GitHub

https://heltec.org/project/wifi-lora-32/

--

--

J3
Jungletronics

Hi, Guys o/ I am J3! I am just a hobby-dev, playing around with Python, Django, Ruby, Rails, Lego, Arduino, Raspy, PIC, AI… Welcome! Join us!