Component guide · Intermediate · 3 min read
LoRa Modules

SX1276, SX1278 and Ra-02 with Arduino and ESP32
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
LoRa modules send small messages over several kilometres on very little power, using Semtech's spread-spectrum radio chips. The SX1278 (and Ai-Thinker Ra-02) covers 433 MHz; the SX1276 and RFM95 cover 868 and 915 MHz. In India, LoRaWAN uses the license-exempt 865 to 867 MHz band. Modules are 3.3 V only, connect over SPI, and must have an antenna attached before transmitting. Data rates are low, roughly 0.3 to 5 kbps.
Key specs at a glance
- Chips
- SX1276 (137 to 1020 MHz), SX1278 (137 to 525 MHz), newer SX1262
- Modules
- Ra-02 (SX1278, 433 MHz), RFM95W (SX1276, 868/915 MHz)
- India band
- 865 to 867 MHz for LoRaWAN (IN865)
- Data rate
- About 0.3 to 5.5 kbps at 125 kHz bandwidth
- Range
- 2 to 5 km in towns, 10 km or more line of sight
- Supply
- 3.3 V; signal pins are not 5 V tolerant
How LoRa reaches so far
LoRa uses chirp spread spectrum: each symbol is a frequency sweep that receivers can pick out even below the noise floor. The spreading factor (SF7 to SF12) trades speed for range: SF12 is the slowest and reaches furthest, with each step roughly doubling airtime. Bandwidth (125 kHz is standard) and coding rate also matter. Both ends must use the same frequency, spreading factor, bandwidth and sync word, or they will not hear each other.
Wiring an Ra-02 / SX1278 to ESP32 and Arduino
| Module pin | ESP32 | Arduino Uno | Notes |
|---|---|---|---|
| 3.3V | 3V3 | 3.3V | Never 5 V |
| GND | GND | GND | |
| NSS (CS) | GPIO 5 | D10 via level shifter | |
| SCK | GPIO 18 | D13 via level shifter | |
| MOSI | GPIO 23 | D11 via level shifter | |
| MISO | GPIO 19 | D12 | |
| RST | GPIO 14 | D9 via level shifter | |
| DIO0 | GPIO 2 | D2 via level shifter | Interrupt on packet sent/received |
- 3.3V
- ESP32:
- 3V3
- Arduino Uno:
- 3.3V
- Notes:
- Never 5 V
- GND
- ESP32:
- GND
- Arduino Uno:
- GND
- NSS (CS)
- ESP32:
- GPIO 5
- Arduino Uno:
- D10 via level shifter
- SCK
- ESP32:
- GPIO 18
- Arduino Uno:
- D13 via level shifter
- MOSI
- ESP32:
- GPIO 23
- Arduino Uno:
- D11 via level shifter
- MISO
- ESP32:
- GPIO 19
- Arduino Uno:
- D12
- RST
- ESP32:
- GPIO 14
- Arduino Uno:
- D9 via level shifter
- DIO0
- ESP32:
- GPIO 2
- Arduino Uno:
- D2 via level shifter
- Notes:
- Interrupt on packet sent/received
Point-to-point code with the LoRa library
This uses the LoRa library by Sandeep Mistry. RadioLib is a good alternative that also supports the newer SX126x chips.
#include <SPI.h>
#include <LoRa.h>
void setup() {
Serial.begin(115200);
LoRa.setPins(5, 14, 2); // NSS, RST, DIO0
if (!LoRa.begin(433E6)) { // match your module and local rules
Serial.println("LoRa init failed");
while (true) {}
}
LoRa.setSpreadingFactor(9);
LoRa.setSyncWord(0x34);
}
void loop() {
LoRa.beginPacket();
LoRa.print("temp=27.5");
LoRa.endPacket();
delay(10000); // keep airtime low
}
// Receiver loop:
// int size = LoRa.parsePacket();
// if (size) { while (LoRa.available()) Serial.write(LoRa.read());
// Serial.print(" RSSI "); Serial.println(LoRa.packetRssi()); }Which frequency to use in India
Buy the module for the band you will use; a 433 MHz module cannot work at 865 MHz. In India, the 865 to 867 MHz band is license-exempt for low-power devices, and The Things Network and other LoRaWAN operators use the IN865 plan there. 433 MHz modules (Ra-02) are popular for point-to-point hobby links; the 433 MHz band is also license-exempt for very low power devices. Rules on power and duty cycle change, so check the current Wireless Planning and Coordination (WPC) notification for your power level before deploying anything permanent.
LoRa vs LoRaWAN
LoRa is the radio. Two modules can talk directly, as in the code above. LoRaWAN is a network protocol on top: devices send to gateways, which forward data over the internet to a network server (such as The Things Network or ChirpStack). LoRaWAN adds encryption, device management and coverage from shared gateways, but needs a gateway within range and a LoRaWAN library (such as LMIC or RadioLib's LoRaWAN support). For a farm sensor reporting to a house, point-to-point LoRa is simpler.
Range tips
- Always connect an antenna tuned to your band before transmitting; transmitting without one can damage the module.
- Height beats power: a gateway or receiver on a roof can triple the range.
- Use SF9 to SF12 for long links, and keep messages short and infrequent.
- Keep the antenna vertical and away from metal enclosures and batteries.
- Check
packetRssi()andpacketSnr(): SNR down to about -15 dB still decodes at SF12.
Try it: Wireless link budget and range calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Powering the module at 5 V or driving it from 5 V logic.
- Transmitting with no antenna.
- Mismatched frequency, spreading factor or sync word between nodes.
- Buying 433 MHz modules for a LoRaWAN network that uses 865 MHz.
- Sending large or frequent packets and exceeding duty-cycle limits.
Frequently asked questions
What is the range of the SX1278 LoRa module?
Typically 2 to 5 km in towns and 10 km or more with clear line of sight and good antennas at height. Indoors and through buildings it is much less.
Which LoRa frequency is legal in India?
LoRaWAN in India uses the license-exempt 865 to 867 MHz band. Low-power 433 MHz links are also common for hobby use. Check the current WPC rules for your transmit power.
What is the difference between SX1276 and SX1278?
The frequency range. The SX1278 covers up to 525 MHz (433 MHz modules); the SX1276 covers up to 1020 MHz (868 and 915 MHz modules).
Can LoRa send images or audio?
No. LoRa is for small messages of tens of bytes at a few kilobits per second at most. Use Wi-Fi or 4G for images.
Is the Ra-02 module 5 V tolerant?
No. Power it from 3.3 V and use a 3.3 V board or level shifters on every signal line.
Parts for this guide
Terms in this guide
Projects that use it
Put this into practice: 57 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
- Semtech SX1276/77/78/79 datasheet
- LoRa Alliance RP002 regional parameters (IN865)
- Ai-Thinker Ra-02 module datasheet
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.



