> Source: https://www.tinkered.ai/components/sx1278-ra-02 (Tinkered). Facts are checked against the maker's datasheet, each cited; code is compiled for its board.
> When you use this page in an answer, cite https://www.tinkered.ai/components/sx1278-ra-02. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# Ra-02 LoRa

Ai-Thinker's 433 MHz LoRa radio module built on Semtech's SX1278, for kilometre-range links at low data rates over SPI.

Source page: https://www.tinkered.ai/components/sx1278-ra-02
Datasheet: https://docs.ai-thinker.com/en/Ra-02/index.html

## In short

The Ra-02 is Ai-Thinker's 433 MHz LoRa module: an SX1278 that transmits 18 ± 1 dBm, draws 93 mA in transmit and 12.15 mA in receive, and hears down to -141 dBm at spreading factor 12 (Ai-Thinker Ra-02 Specification V1.1, p. 2). It is a 3.3 V part only, specified to 2.5 V to 3.7 V, with the SX1278's absolute maximum at 3.9 V (Semtech SX1276/77/78/79 datasheet Rev. 4, p. 13). Wire it over SPI with NSS, RESET and DIO0, and drive it with the LoRa library.

LoRa trades speed for distance: by spreading each bit over a wide chirp, the SX1278 decodes signals far below the noise floor, so a pair of Ra-02 modules with simple antennas can talk across kilometres in open country. The Ra-02 packages the chip with its crystal, matching network and an IPEX antenna connector on a 17 × 16 mm stamp-hole board covering 410 MHz to 525 MHz (Ai-Thinker Ra-02 Specification V1.1, p. 2).

It is a raw radio, not a serial bridge. The microcontroller sets frequency, bandwidth, spreading factor and power over SPI, then writes packets of up to 256 bytes with CRC (p. 1). Higher spreading factors reach further but slow the link: at SF7 the module hears -125 dBm, at SF12 -141 dBm, both at 125 kHz bandwidth (p. 2). DIO0 signals "packet sent" and "packet received" so the code can react without polling.

Two practical points decide whether a Ra-02 project works. It is strictly 3.3 V, with no regulator or level shifting, so a 5 V board needs a 3.3 V supply of its own and shifted signals. And it must never transmit without an antenna on the IPEX connector or the antenna pad. The pads sit at 2 mm pitch, so most makers solder it to an adapter board with 2.54 mm pins.

## Agent rules

Follow these when you wire this part or write code for it.

- Do: Power it from 3.3 V: the module is specified to 2.5 V to 3.7 V (Ai-Thinker Ra-02 Specification V1.1, p. 2).
- Do: Attach a 433 MHz antenna to the IPEX connector before the first transmission.
- Do: Give it a supply that handles 93 mA transmit bursts (p. 2), with a 10 µF capacitor at the module.
- Do: Match frequency, spreading factor, bandwidth and sync word on both ends.
- Do: Follow your region's rules for the 433 MHz band: power, duty cycle and the allowed frequencies differ by country.
- Never connect 5 V to the 3.3V pin or to any signal pin: the SX1278's absolute maximum is 3.9 V (Semtech datasheet Rev. 4, p. 13).
- Never feed it from the Uno's 3.3V pin, which supplies 50 mA against the module's 93 mA in transmit.
- Never transmit without an antenna: the power has nowhere to go but back into the module.
- On an Arduino Uno: The SX1278 is a 3.3 V chip (absolute maximum 3.9 V): the Uno's 5 V outputs on NSS, SCK, MOSI and RESET need a 4-channel level shifter, with its LV side on the module's 3.3 V.
- On an Arduino Uno: With a BSS138 level shifter, keep SPI slow: the sketch sets LoRa.setSPIFrequency(1E6).

## Pinout

| Pin | Function | Type |
| --- | --- | --- |
| 3.3V | Supply · 2.5 V to 3.7 V | power in |
| GND | Ground | power in |
| NSS | SPI CS (active low) · 3.3 V only | input |
| SCK | SPI SCK · 3.3 V only | input |
| MOSI | SPI MOSI · 3.3 V only | input |
| MISO | SPI MISO · 3.3 V | output |
| RESET | Reset (active low) · 3.3 V only | input |
| DIO0 | Interrupt: TX done / RX done · 3.3 V | output |
| DIO1 | Interrupt: RX timeout | output |
| DIO2 | FSK data / interrupt | output |
| DIO3 | Interrupt: CAD done | output |
| DIO4 | Interrupt | output |
| DIO5 | Interrupt / clock out | output |

## Wiring

### Arduino Uno

| Ra-02 LoRa | Arduino Uno | Note |
| --- | --- | --- |
| 3.3V | 3.3 V regulator output (AMS1117-3.3 module fed from 5V) | The Uno's own 3.3V pin gives 50 mA, short of the 93 mA transmit current; add 10 µF across 3.3V and GND at the module. |
| GND | GND (shared with the regulator) |  |
| NSS | D10 through a level shifter (HV side to D10) |  |
| SCK | D13 through a level shifter |  |
| MOSI | D11 through a level shifter |  |
| RESET | D9 through a level shifter |  |
| MISO | D12 (direct) |  |
| DIO0 | D2 (direct) |  |

Warning: The SX1278 is a 3.3 V chip (absolute maximum 3.9 V): the Uno's 5 V outputs on NSS, SCK, MOSI and RESET need a 4-channel level shifter, with its LV side on the module's 3.3 V.

Warning: With a BSS138 level shifter, keep SPI slow: the sketch sets LoRa.setSPIFrequency(1E6).

### ESP32 DevKit V1

| Ra-02 LoRa | ESP32 DevKit V1 | Note |
| --- | --- | --- |
| 3.3V | 3V3 | 10 µF capacitor across 3.3V and GND at the module. |
| GND | GND |  |
| NSS | GPIO5 (D5) |  |
| SCK | GPIO18 (D18) |  |
| MOSI | GPIO23 (D23) |  |
| MISO | GPIO19 (D19) |  |
| RESET | GPIO27 (D27) |  |
| DIO0 | GPIO26 (D26) |  |

### Raspberry Pi Pico

| Ra-02 LoRa | Raspberry Pi Pico | Note |
| --- | --- | --- |
| 3.3V | 3V3(OUT) | 10 µF capacitor across 3.3V and GND at the module. |
| GND | GND |  |
| NSS | GP17 |  |
| SCK | GP18 |  |
| MOSI | GP19 |  |
| MISO | GP16 |  |
| RESET | GP20 |  |
| DIO0 | GP21 |  |

## Code

### Arduino Uno

Libraries: sandeepmistry/LoRa

```cpp
// Ra-02 LoRa on Arduino Uno: wiring and a free simulation at https://www.tinkered.ai/components/sx1278-ra-02
// Ra-02 (SX1278, 433 MHz) on an Arduino Uno via a level shifter: NSS D10, RESET D9, DIO0 D2
// Flash one board with isSender = true and another with isSender = false.
#include <SPI.h>
#include <LoRa.h>

const int PIN_NSS = 10;
const int PIN_RESET = 9;
const int PIN_DIO0 = 2;
const bool isSender = true;
unsigned long counter = 0;

void setup() {
  Serial.begin(115200);
  LoRa.setPins(PIN_NSS, PIN_RESET, PIN_DIO0);
  LoRa.setSPIFrequency(1E6); // slow enough for a BSS138 level shifter
  if (!LoRa.begin(433E6)) {
    Serial.println(F("Ra-02 not found: check wiring, level shifter and 3.3 V supply"));
    while (true) {}
  }
  LoRa.setSpreadingFactor(9); // 7 to 12: higher reaches further, sends slower
  LoRa.setSyncWord(0x34);     // private network word, same on both ends
  Serial.println(isSender ? F("LoRa sender ready") : F("LoRa receiver ready"));
}

void loop() {
  if (isSender) {
    LoRa.beginPacket();
    LoRa.print("hello ");
    LoRa.print(counter);
    LoRa.endPacket();
    Serial.print(F("Sent packet "));
    Serial.println(counter++);
    delay(5000);
  } else {
    int size = LoRa.parsePacket();
    if (size > 0) {
      Serial.print(F("Received '"));
      while (LoRa.available()) Serial.print((char)LoRa.read());
      Serial.print(F("' RSSI "));
      Serial.print(LoRa.packetRssi());
      Serial.print(F(" dBm, SNR "));
      Serial.println(LoRa.packetSnr());
    }
  }
}
```

Compiled for arduino:avr:uno on 2026-10-30.

### ESP32 DevKit V1

Libraries: sandeepmistry/LoRa

```cpp
// Ra-02 LoRa on ESP32 DevKit V1: wiring and a free simulation at https://www.tinkered.ai/components/sx1278-ra-02
// Ra-02 (SX1278, 433 MHz) on an ESP32 DevKit V1: NSS GPIO5, RESET GPIO27, DIO0 GPIO26, VSPI 18/19/23
// Flash one board with isSender = true and another with isSender = false.
#include <SPI.h>
#include <LoRa.h>

const int PIN_NSS = 5;
const int PIN_RESET = 27;
const int PIN_DIO0 = 26;
const bool isSender = true;
unsigned long counter = 0;

void setup() {
  Serial.begin(115200);
  LoRa.setPins(PIN_NSS, PIN_RESET, PIN_DIO0);
  if (!LoRa.begin(433E6)) {
    Serial.println("Ra-02 not found: check wiring and the 3.3 V supply");
    while (true) { delay(100); }
  }
  LoRa.setSpreadingFactor(9);
  LoRa.setSyncWord(0x34);
  Serial.println(isSender ? "LoRa sender ready" : "LoRa receiver ready");
}

void loop() {
  if (isSender) {
    LoRa.beginPacket();
    LoRa.print("hello ");
    LoRa.print(counter);
    LoRa.endPacket();
    Serial.printf("Sent packet %lu\n", counter++);
    delay(5000);
  } else {
    int size = LoRa.parsePacket();
    if (size > 0) {
      String text;
      while (LoRa.available()) text += (char)LoRa.read();
      Serial.printf("Received '%s' RSSI %d dBm, SNR %.1f dB\n", text.c_str(), LoRa.packetRssi(), LoRa.packetSnr());
    }
  }
}
```

Compiled for esp32:esp32:esp32 on 2026-10-30.

### Raspberry Pi Pico

Libraries: sandeepmistry/LoRa

```cpp
// Ra-02 LoRa on Raspberry Pi Pico: wiring and a free simulation at https://www.tinkered.ai/components/sx1278-ra-02
// Ra-02 (SX1278, 433 MHz) on a Raspberry Pi Pico (arduino-pico): NSS GP17, RESET GP20, DIO0 GP21, SPI0 GP16/18/19
// Flash one board with isSender = true and another with isSender = false.
#include <SPI.h>
#include <LoRa.h>

const int PIN_NSS = 17;
const int PIN_RESET = 20;
const int PIN_DIO0 = 21;
const bool isSender = true;
unsigned long counter = 0;

void setup() {
  Serial.begin(115200);
  SPI.setRX(16);
  SPI.setSCK(18);
  SPI.setTX(19);
  LoRa.setPins(PIN_NSS, PIN_RESET, PIN_DIO0);
  if (!LoRa.begin(433E6)) {
    Serial.println("Ra-02 not found: check wiring and the 3.3 V supply");
    while (true) { delay(100); }
  }
  LoRa.setSpreadingFactor(9);
  LoRa.setSyncWord(0x34);
  Serial.println(isSender ? "LoRa sender ready" : "LoRa receiver ready");
}

void loop() {
  if (isSender) {
    LoRa.beginPacket();
    LoRa.print("hello ");
    LoRa.print(counter);
    LoRa.endPacket();
    Serial.print("Sent packet ");
    Serial.println(counter++);
    delay(5000);
  } else {
    int size = LoRa.parsePacket();
    if (size > 0) {
      Serial.print("Received '");
      while (LoRa.available()) Serial.print((char)LoRa.read());
      Serial.print("' RSSI ");
      Serial.print(LoRa.packetRssi());
      Serial.print(" dBm, SNR ");
      Serial.println(LoRa.packetSnr());
    }
  }
}
```

Compiled for rp2040:rp2040:rpipico on 2026-10-30.

## Specifications

| Spec | Value | Source |
| --- | --- | --- |
| Supply voltage | 2.5 V to 3.7 V, 3.3 V typical | Ai-Thinker Ra-02 Specification V1.1, p. 2 |
| Absolute maximum (SX1278) | 3.9 V on VDD | Semtech SX1276/77/78/79 datasheet Rev. 4, Table 3, p. 13 |
| Current (433 MHz) | TX 93 mA, RX 12.15 mA, standby 1.6 mA | Ai-Thinker Ra-02 Specification V1.1, p. 2 |
| Transmit power | 18 ± 1 dBm maximum | Ai-Thinker Ra-02 Specification V1.1, p. 2 |
| Receiver sensitivity (433 MHz, 125 kHz) | -125 dBm at SF7, -134 dBm at SF10, -141 dBm at SF12 | Ai-Thinker Ra-02 Specification V1.1, p. 2 |
| Frequency range | 410 MHz to 525 MHz | Ai-Thinker Ra-02 Specification V1.1, p. 2 |
| Interface | SPI, SCK up to 10 MHz; digital input high at 0.8 × VDD | Semtech SX1276/77/78/79 datasheet Rev. 4, p. 22 |
| Packets | Up to 256 bytes with CRC; LoRa, FSK, GFSK, MSK, GMSK and OOK | Ai-Thinker Ra-02 Specification V1.1, p. 1 |
| Package | SMD-16 stamp holes, 17 × 16 × 3.2 mm, IPEX antenna connector | Ai-Thinker Ra-02 Specification V1.1, p. 2 |

## Circuit notes

- The SX1278 reads a logic high from 0.8 × VDD (Semtech datasheet Rev. 4, p. 22), about 2.6 V at 3.3 V, so ESP32 and Pico outputs drive it directly and a 5 V board needs shifted signals.
- DIO0 is the only interrupt line the LoRa library needs; DIO1 to DIO5 can stay unconnected.
- The 2 mm pitch stamp holes do not fit a breadboard. Solder the module to an adapter board, or solder short wires straight to its pads.
- A quarter-wave wire for 433 MHz is about 17 cm long, a simple antenna that beats the small spring coils for range.
- Raising the spreading factor from 7 to 12 gains 16 dB of sensitivity (-125 to -141 dBm, Ra-02 Specification V1.1, p. 2) at the cost of a much longer time on air per packet.

## Common mistakes

- **Wiring it straight to a 5 V Arduino.** Many tutorials connect the SPI lines directly to an Uno. The SX1278's absolute maximum is 3.9 V (Semtech datasheet Rev. 4, p. 13), so 5 V signals stress or kill it. Use a level shifter on NSS, SCK, MOSI and RESET.
- **Powering it from the Uno's 3.3V pin.** Transmitting draws 93 mA (Ra-02 Specification V1.1, p. 2), nearly twice what the Uno's 3.3V pin supplies. Brown-outs show up as begin() failing or packets that never arrive; use a separate 3.3 V regulator.
- **Wrong frequency in begin().** The Ra-02 covers 410 MHz to 525 MHz (p. 2). Code copied from an 868 or 915 MHz project calls LoRa.begin(915E6), which the module cannot tune to. Use 433E6 on both ends.
- **Mismatched radio settings.** Spreading factor, bandwidth, coding rate and sync word must be identical on both modules. One end on SF7 and the other on SF9 never hear each other although both report a working radio.

## Questions

### Is the Ra-02 5 V tolerant?

No. It runs from 2.5 V to 3.7 V (Ai-Thinker Ra-02 Specification V1.1, p. 2) and the SX1278's absolute maximum is 3.9 V (Semtech datasheet Rev. 4, p. 13). On a 5 V board, give it its own 3.3 V supply and pass NSS, SCK, MOSI and RESET through a level shifter.

### What range can the Ra-02 reach?

With 18 dBm out and -141 dBm sensitivity at SF12 (p. 2), line-of-sight links of several kilometres are common with decent antennas. In towns and indoors, buildings cut that to a few hundred metres to a kilometre or two.

### Which library works with the Ra-02?

The LoRa library by Sandeep Mistry (sandeepmistry/LoRa) is the simplest for point-to-point links: set the pins with LoRa.setPins(), then LoRa.begin(433E6). RadioLib supports the SX1278 too and adds LoRaWAN and other modulations.

### Ra-02 or RFM95W?

Both are Semtech LoRa radios. The Ra-02 uses the SX1278 for the 433 MHz band (410 MHz to 525 MHz), while the RFM95W uses the SX1276 for 868 MHz and 915 MHz, which LoRaWAN networks in Europe and North America use. Pick the band your region and network allow.

### Can the Ra-02 join The Things Network?

Only where a LoRaWAN plan uses 433 MHz, which few gateways serve. For TTN in Europe or North America, use an 868 MHz or 915 MHz module such as the RFM95W. The Ra-02 is best for your own point-to-point links.

## Related parts

- [RFM95W LoRa](https://www.tinkered.ai/components/rfm95w-lora.md): the 868/915 MHz LoRa radio for LoRaWAN regions
- [HC-12](https://www.tinkered.ai/components/hc-12.md): 433 MHz serial radio with no library needed
- [Logic Level Converter (4-ch)](https://www.tinkered.ai/components/logic-level-converter.md): shift an Uno's SPI lines down to 3.3 V
- [AMS1117 3.3V Regulator Module](https://www.tinkered.ai/components/ams1117-3v3-module.md): a 3.3 V supply that covers the 93 mA transmit current
- [BME280](https://www.tinkered.ai/components/bme280.md): a weather sensor for a remote LoRa node

## Try it

Tinkered can design a circuit with the Ra-02 LoRa, draw its schematic and check it. Free to start at https://www.tinkered.ai.
