Skip to content
E

LoRa

Interfacing RA 02 LoRa with ESP32

What is the RA 02?

The RA-02 is a budget LoRa transceiver module built around Semtech's SX1278 chip, offering long-range, low-power wireless communication on the 433MHz band. LoRa's chirp spread-spectrum modulation trades data rate for range and noise immunity, letting the RA-02 reach several kilometers line-of-sight at very low transmit power — making it a favorite for remote telemetry, weather stations, and long-range sensor links where Wi-Fi and Bluetooth simply can't reach.

Specifications

ChipsetSemtech SX1278 LoRa transceiver
Frequency band433MHz (other SX127x-based modules cover 868MHz/915MHz)
Operating voltage1.8V–3.7V DC (3.3V typical — NOT 5V tolerant)
Operating current~10.8 mA RX, up to ~120 mA TX at max power
Transmit powerUp to +20 dBm (100mW), configurable in software
RangeSeveral kilometers line-of-sight typical, dependent on antenna, terrain, and spreading factor settings
ModulationLoRa chirp spread spectrum, also supports legacy FSK/OOK modes
InterfaceSPI, plus DIO interrupt pins for packet-ready/done signaling

RA 02 Pinout

PinNameDescription
13.3VPower, 3.3V DC only
2GNDGround
3MOSISPI data in
4MISOSPI data out
5SCKSPI clock
6NSS (CS)SPI chip select, active LOW
7RESETActive-LOW module reset
8DIO0Interrupt pin signaling packet transmit-done or receive-ready, used by most LoRa libraries
9ANTAntenna connection — a matching 433MHz wire or spring antenna is required for usable range

The RA-02 communicates over SPI, not UART, so it needs 4 SPI lines plus RESET and DIO0 wired to the host microcontroller (libraries like Sandeep Mistry's LoRa library or RadioHead expect this exact pin set). Like most bare radio modules, all logic is 3.3V only — use a level shifter when wiring to 5V boards like the Arduino Uno, and always attach an antenna before powering on transmit to avoid damaging the power amplifier.

Setting Up RA 02 with ESP32

Library

RadioHead by Mike McCauley

Arduino IDE → Tools → Manage Libraries → search "RadioHead"

Library guide

Wiring

Component pinESP32 pinNote
3.3V3.3V3.3V only -- this module is not 5V tolerant
GNDGND
MOSIGPIO23 (VSPI MOSI)
MISOGPIO19 (VSPI MISO)
SCKGPIO18 (VSPI SCK)
NSS (CS)GPIO5
RESETGPIO14
DIO0GPIO26Required by RadioHead for TX/RX interrupt signaling
ANT433MHz-tuned antenna (most RA-02 modules are 433MHz)Check your specific module's silkscreen/datasheet -- RA-02 ships in multiple frequency variants

Example code

C++

RA-02 is most commonly the 433MHz SX1278 variant -- confirm yours before setting the frequency, and never key the transmitter without an antenna attached.

Related Guides & Projects