Overview

The SX1278 is a long-range, low-power wireless transceiver IC manufactured by Semtech. Sold commercially on popular breakout modules such as the AI-Thinker Ra-02, it operates in the 433 MHz unlicensed ISM frequency band.

Utilizing Semtech's patented LoRa (Long Range) chirp spread spectrum (CSS) modulation, the SX1278 achieves extreme receiver sensitivities down to 148 dBm-148\text{ dBm} while delivering up to +20 dBm+20\text{ dBm} (100 mW100\text{ mW}) transmit power. This enables robust line-of-sight wireless communication links exceeding 5 to 10 kilometers5\text{ to }10\text{ kilometers} in rural environments over an SPI bus, outperforming traditional FSK/GFSK radio modules.

Quick reference

Operating voltage (VDD)1.8 V to 3.7 V DC (3.3 V nominal)
Nominal frequency433 MHz ISM band (configurable 137 MHz to 525 MHz)
Modulation schemesLoRa, FSK, GFSK, MSK, GMSK, OOK
InterfaceSPI (Mode 0,0, up to 10 MHz)
Transmit powerUp to +20 dBm+20\text{ dBm} (100 mW100\text{ mW}) programmable
Receiver sensitivityDown to 148 dBm-148\text{ dBm} (at Spreading Factor 12)
Packet buffer256-byte dual-port SRAM TX/RX FIFO
I/O tolerance3.3V logic (requires level shifters for 5V Arduinos)

Pinout (AI-Thinker Ra-02 Module Header)

text
             ┌───────────┐
         GND ─┤ 1      16├─ GND
        3.3V ─┤ 2      15├─ DIO1 / DIO2
       RESET ─┤ 3      14├─ DIO0
        DIO0 ─┤ 4      13├─ MISO
        DIO1 ─┤ 5      12├─ MOSI
        DIO2 ─┤ 6      11├─ SCK
        DIO3 ─┤ 7      10├─ NSS / CS
        GND  ─┤ 8       9├─ GND
             └───────────┘
PinNameTypeDescription
1, 8, 9, 16GNDPowerGround reference (0 V)
23.3VPowerSupply power input (+1.8 V to +3.7 V DC)
3RESETDigital InputActive-Low hardware reset pin
4DIO0Digital OutputInterrupt 0 (RX Done / TX Done trigger)
10NSS / CSDigital InputActive-Low SPI Chip Select
11SCKDigital InputSPI Clock Input
12MOSIDigital InputSPI Master Output Slave Input
13MISODigital OutputSPI Master Input Slave Output

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply VoltageVDDV_{DD}1.83.33.7VDC power rail
Transmit Current (+20dBm)Itx_20I_{tx\_20}120140mAMax power transmit (+20 dBm)
Transmit Current (+13dBm)Itx_13I_{tx\_13}2935mAStandard power transmit
Receive CurrentIrxI_{rx}12.114.0mAActive reception mode
Sleep CurrentIsleepI_{sleep}0.21.0µASleep mode
Spreading Factor (SF)SFSF612Programmable chirp factor
Bandwidth (BW)BWBW7.8125500kHzSignal bandwidth

LoRa Modulation Parameters & Range Math

  1. Spreading Factor (SF 6 to 12): Higher SF values increase receiver sensitivity and link range at the cost of lower data rate and longer airtime.
  2. Bandwidth (BW 125/250/500 kHz): Wider bandwidths increase data throughput; narrower bandwidths increase signal range.
  3. Coding Rate (CR 4/5 to 4/8): Forward Error Correction (FEC) rate.

Data Rate (bps)=SF×BW2SF×CR\text{Data Rate (bps)} = SF \times \frac{BW}{2^{SF}} \times CR

Wiring

SX1278 (Ra-02) PinArduino Uno (via Level Shifter)ESP32Notes
3.3V3.3V Rail3.3VDo not connect to 5V
GNDGNDGNDShared system ground
NSS (CS)Digital D10GPIO 5SPI Chip Select
SCKDigital D13GPIO 18SPI Clock
MOSIDigital D11GPIO 23SPI MOSI
MISODigital D12GPIO 19SPI MISO
DIO0Digital D2 (INT0)GPIO 2RX / TX Interrupt trigger
RESETDigital D9GPIO 14Hardware Reset
Warning

No-Antenna Power Warning:

  • Never transmit on the SX1278 without an antenna connected to the IPEX connector or SMA pin. Transmitting +20 dBm+20\text{ dBm} power into an open load causes RF energy reflection that will destroy the onboard Power Amplifier (PA).

Example (Arduino LoRa.h Library by Sandeep Mistry)

cpp
#include <SPI.h>
#include <LoRa.h>

#define SCK 18
#define MISO 19
#define MOSI 23
#define SS 5
#define RST 14
#define DIO0 2

void setup() {
  Serial.begin(115200);
  while (!Serial);

  Serial.println("SX1278 LoRa Transmitter Test");

  // Configure SPI pins for ESP32
  SPI.begin(SCK, MISO, MOSI, SS);
  LoRa.setPins(SS, RST, DIO0);

  // Initialize at 433 MHz
  if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed! Check wiring & antenna.");
    while (1);
  }

  // Set transmit power to +17 dBm
  LoRa.setTxPower(17);
  Serial.println("SX1278 LoRa initialized at 433 MHz.");
}

int counter = 0;

void loop() {
  Serial.print("Sending packet: "); Serial.println(counter);

  LoRa.beginPacket();
  LoRa.print("VoltDocs Telemetry #");
  LoRa.print(counter);
  LoRa.endPacket();

  counter++;
  delay(5000);
}

Common mistakes

  • Connecting 5V logic directly to SPI pins: The SX1278 operates on 3.3V logic. Connecting 5V Arduino SPI signals directly to NSS, SCK, or MOSI damages the chip. Use a resistor divider or bi-directional logic level converter.
  • Conflating 433 MHz (SX1278) and 868/915 MHz (SX1276) versions: SX1278 is tuned specifically for 433 MHz. Attempting to transmit at 868 MHz or 915 MHz results in extreme power loss due to internal RF matching network mismatch.

Notes

  • SX1278 vs SX1276 vs RFM95W: SX1278 is optimized for 433 MHz; SX1276 / RFM95W are optimized for 868 MHz (Europe) and 915 MHz (Americas).

Assets & downloads