LoRa and LoRaWAN: The Physics of Long Range, Low Power Radio
LoRa trades speed for range and range for battery life, in numbers you can calculate. Learn the trade-off, then decide if it beats Wi-Fi for your project.
LoRa is the radio, LoRaWAN is the network
LoRa is a physical layer: a modulation called chirp spread spectrum. The transmitter sweeps its carrier across the band in a fixed sequence of steps, and the receiver un-sweeps it. Because the energy is spread over a wide band, the receiver can pick the signal out well below the background noise level, which is what buys the range.
The knob that matters is the spreading factor, from SF7 to SF12. Each doubling of the spreading factor makes the receiver integrate the signal for twice as long, gaining about 3 dB of sensitivity, but it also makes the packet take roughly twice as long to send. In the Indian 865 to 867 MHz band with the standard 125 kHz channels, the rates run from 5470 bit/s at SF7 down to 250 bit/s at SF12, and a 51-byte application payload at SF12 takes roughly 2.8 seconds on air, because the LoRaWAN header adds a further 13 bytes. The consequence is a hard ceiling on what you can send. A LoRa node is a telemetry device, not a video link. One reading every few minutes, or a short status message, fits comfortably. Anything continuous does not, and no amount of antenna work will change that, because the limit is time on air rather than signal strength.
Gateway, network server and the rules you have to obey
LoRaWAN adds the network on top. End devices send to a gateway, which is just a listener that forwards every packet it hears to a network server. The server decides what to do with it. End devices join the network with an over-the-air activation, which gives each device its own session keys, rather than a static one shared by many.
Devices are also classified by how they listen. A Class A device is asleep, sends an uplink, and opens two short receive windows afterwards, one second and two seconds later. A Class B device adds scheduled ping slots on a GPS-synchronised schedule. A Class C device keeps its receiver on and can be commanded at any time, at the cost of power. Battery nodes are almost always Class A. The rules differ by region and they matter. In the Indian 865 to 867 MHz band, the regional parameters specify three mandatory default channels at 865.0625, 865.4025 and 865.985 MHz, and the PHY layer there carries no dwell-time or duty-cycle limitation. In Europe the 868 MHz band runs on a 1 percent duty cycle with 10 mW ERP, which is a very different constraint when you are planning how often a node can report. In the United States the band is 902 to 928 MHz. Know which band you are on before you buy a module.
Step by step
-
Calculate the link budget before buying anything
Add the transmit power to the antenna gain, subtract the receiver sensitivity and the path loss, and see what margin you have. This is a page of arithmetic that saves a week of range testing.
-
Match the antenna to the band
A 433 MHz antenna on an 868 MHz module will not simply be wrong, it will be badly wrong. Check the band of every module and antenna you buy, and write it on the box.
-
Transmit a fixed packet and measure the airtime
Send a 20-byte payload and time it with the serial output. Seeing the airtime grow as you raise the spreading factor makes the trade-off concrete.
-
Compare spreading factors in the real world
Measure the range at SF7 and at SF12. The SF12 test will reach further, and the difference in how long the packets take is worth measuring too.
-
Join a network and publish a reading
Activate a device over the air, subscribe to its topic and watch a sensor reading arrive on a screen somewhere else.
-
Work out the battery life from the numbers
Take the transmit current, the transmit time and the sleep current, and calculate the average current. Then check that calculation against a real battery for a week.
What you'll need
| Item | Qty | Why |
|---|---|---|
| SX1276 LoRa module, 868 MHz or 915 MHz version | 2 | The transceiver that turns serial bytes into LoRa packets. Buy the band you are actually allowed to use. |
| Spring antenna with SMA connector | 2 | A quarter-wave antenna for the band, with a matching cable, is worth more than any change to the code. |
| Arduino Nano or Uno R3 | 2 | Two nodes let you test a real link rather than a loopback to the same board. |
| DHT22 temperature and humidity sensor | 1 | One small reading per node is the right payload size for a long-range link. |
| Breadboard and jumper wires | 1 set | SPI connections to the radio need a clean, short path and good common ground. |
| 18650 cell and protected holder | 2 | Long-range testing takes many transmission attempts, and a flat battery ends the experiment early. |
Practise it before you build it
Every step above has a matching circuit in the ThinkEdge Learn simulator. The simulator runs a real
Arduino sketch against a modified-nodal-analysis solver, so digitalWrite actually drives the
LED on screen and the readings change when you change the wiring — no hardware, no burnt components.
The Mega has 4 hardware serial ports (Serial, Serial1, Serial2, Serial3). That means you can talk to 4 different devices at the SAME time — like a GPS, a Bluetooth module, an XBee radio, and the USB. Use 3 of those ports to read 3 different sensors in parallel and stream their data to the Serial Monitor as a CSV row every second. This is the foundation of every real Arduino data logger.
In factories, conveyor belts carry products past a sensor that counts them. A simple "break-beam" sensor (a light source + photodetector) registers each object as it passes. In this project, you'll simulate the conveyor with your hand: every time you press the button (mimicking a product passing the sensor), the counter increments and the LED blinks. Add a buzzer to beep once for every 10 items. This is the same logic as a people counter at a door, a coin counter at a bank, or a bottle counter on a bottling line.
The DHT11 is a small blue module that measures temperature (0-50°C) and humidity (20-90%). Inside it has a tiny microcontroller, a humidity sensor, and a thermistor. It speaks a custom one-wire protocol that the Adafruit DHT library decodes for you. You just call dht.readTemperature() and you get a number back.
A real Arduino project almost always involves a sensor + a way to see the data. The DHT11 reads temperature and humidity, and the Serial Monitor (the window in the Arduino IDE) shows the readings. The Nano is perfect for this because it plugs directly into a breadboard with no extra wiring for power — you can build a complete data logger in 5 minutes.
Combine a PIR motion sensor with a slide switch (arm/disarm) and a buzzer. This is the same logic as a real home alarm: you arm the system when you leave, and if anything moves while it is armed, it sounds the alarm. We also use millis() to keep the alarm sounding for a fixed time even if the motion stops.
Common questions
How far can LoRa actually reach?
With a matched antenna and clear line of sight, a 14 dBm node at SF12 can be heard several kilometres away in a rural area and about a kilometre or two through a town. The same hardware at SF7 might manage 20 to 30 percent of that distance and send data six times faster. Walls, hills and badly matched antennas take more off than any datasheet figure suggests.
Is LoRa better than Wi-Fi for a classroom project?
For anything inside one building, Wi-Fi wins on bandwidth and simplicity. LoRa wins when the nodes are spread out, run on a battery for months, or only need to send a number every few minutes. The honest comparison is a Wi-Fi node that sends a reading every minute against a LoRa node that sends the same reading every fifteen minutes on the same battery.
How much power does a LoRa node use?
An SX1276 transmitting at 14 dBm draws roughly 45 mA for the length of the packet, which is about 2.8 seconds at SF12 for a 51-byte payload. Between transmissions it can sleep at a few microamps. A node that reports every fifteen minutes therefore spends a tiny fraction of its life awake, which is why the battery maths works out in years rather than days.
Related guides
Try the full simulator with your class
103 guided circuit projects, 21 lessons and an in-browser Arduino simulator. The first 15 projects are free, no account needed. NCERT Science mapping on 47 projects, with Arabic and English copy in the regional builds.