Table of Contents

>> Back to LoRa Main topics

lamaPLC: AI-Thinker LoRA products

AI-Thinker Ra-02 Ai-Thinker's LoRa product line is divided into the Ra Series (SPI-based), which provides raw access to the radio chip for custom protocols, and the LoRaWAN Series (SoC-based), which includes an integrated MCU and pre-installed AT firmware for standard network connections.

The Ai-Thinker Ra-01 and Ra-02 series consists of compact, low-power LoRa transceiver modules designed for long-range wireless data communication in the Internet of Things (IoT). Both modules are built around the Semtech SX1278 chip and operate primarily in the 410 MHz to 525 MHz frequency range, making them a standard choice for DIY and industrial projects requiring high interference resistance and low power consumption.

Product SeriesModelFrequencyCore ChipInterfacePrimary Use Case
Ra Series (SPI)Ra-01410–525 MHzSX1278SPILow-cost DIY, spring antenna included
Ra-02410–525 MHzSX1278SPIPoint-to-point, external IPEX antenna
Ra-01H803–930 MHzSX1276SPIHigh-frequency (EU868/US915) DIY projects
Ra-01S/SC410–525 MHzSX1268/LLCC68SPIModern replacement for Ra-01/02 with better efficiency
LoRaWAN (SoC)Ra-07/07H410–960 MHzASR6501UART (AT)Integrated Cortex-M0+; standard LoRaWAN nodes
Ra-08/08H410–930 MHzASR6601UART (AT)Integrated Cortex-M4; supports LoRaWAN/LinkWAN
Ra-09410–525 MHzSTM32WLE5UART/SPIHigh-performance industrial IoT; multi-modulation support

Key Product Highlights

Key Differences: Ra-01 vs. Ra-02

The main difference between the two modules is the method of antenna connection, which greatly affects their deployment flexibility and range.

RA-01 / RA-02 Supported Network Topologies

Network Configuration Requirements

To ensure these modules communicate in the same network, they must share identical software settings:

Range and Performance in a Network

RA-01 / RA-02 Pinout

RA-01 / RA-02 Pinout

PinLabelTypeDescription
1ANT / GNDAntennaRa-01: Antenna solder point. Ra-02: Usually Ground (uses IPEX connector instead)
2GNDPowerGround
33.3VPowerSupply Voltage (2.5V - 3.7V). Do not use 5V
4RESETInputReset pin (active low)
5DIO0I/ODigital I/O 0 (standard interrupt for RX/TX done)
6DIO1I/ODigital I/O 1 (timeout/other interrupts)
7DIO2I/ODigital I/O 2 (FHSS/other interrupts)
8DIO3I/ODigital I/O 3 CAD/Header (Channel Activity Detection)
9DIO4I/ODigital I/O 4 Preamble/Ready
10DIO5I/ODigital I/O 5 System Ready / ModeReady signaling
11SCKSPISPI Serial Clock
12MISOSPISPI Master In Slave Out
13MOSISPISPI Master Out Slave In
14NSSSPISPI Chip Select (Slave Select)
15GNDPowerGround
16GNDPowerGround

DIO Functionality in LoRa Mode

PinDefault/Common FunctionDetailed Events
DIO0RX/TX DoneSignals RxDone (packet received) or TxDone (packet sent).
DIO1TimeoutSignals RxTimeout, FhssChangeChannel, or CadDetected.
DIO2FHSS/PayloadSignals FhssChangeChannel or FhssValidHeader (frequency hopping).
DIO3CAD/HeaderSignals CadDone, ValidHeader, or PayloadCrcError.
DIO4Preamble/ReadySignals PreambleDetect, ModeReady, or PllLock.
DIO5System ReadySignals ModeReady, ClkOut, or PllLock.

Important Wiring Notes

Compatibility between RA-01 and RA-02

The Ai-Thinker Ra-01 and Ra-02 are fully compatible and can communicate with each other because they are functionally identical and share the same internal hardware.

Arduino example code

To use the Ai-Thinker Ra-01 with an Arduino, the most popular and reliable choice is the Sandeep Mistry LoRa library. This library allows for simple point-to-point communication using the SX1278 chip found in the Ra-01.

Wiring

Because the Arduino Uno/Nano uses 5V logic and the Ra-01 uses 3.3V, you must use a TXS0108E (HW-0108) Logic Level Converter or voltage dividers on the data lines to avoid damaging the module.

Ra-01 PinLogic level converterArduino Pin (Uno/Nano)Wire ColorNotes
VCCVa - Vb5V redPower
GNDGNDGND blackCommon ground
SCKA4 - B4D13 greenSPI Clock
MISOA3 - B3D12 darkblueSPI Master In Slave Out
MOSIA2 - B2D11 yellowSPI Master Out Slave In
NSSA1 - B1D10 (or D7) lightblueChip Select (CS)
RESETA8 - B8D9 (or D6) purpleReset Pin
DIO0A7 - B7D2 orangeInterrupt Pin (Required for RX)

Arduino TXS0108E Ra-01

Basic Transmitter Example

This sketch sends a “hello” message every 5 seconds. You can install the required library by searching for “LoRa” by Sandeep Mistry in the Arduino Library Manager.

#include <SPI.h>
#include <LoRa.h>
 
// Define custom pins for the Ra-01 module
const int csPin = 10;          // LoRa radio chip select
const int resetPin = 9;        // LoRa radio reset
const int irqPin = 2;          // Hardware interrupt pin (DIO0)
 
int counter = 0;
 
void setup() {
  Serial.begin(9600);
  while (!Serial);
 
  Serial.println("LoRa Sender starting...");
 
  // Override default pins
  LoRa.setPins(csPin, resetPin, irqPin);
 
  // Initialize Ra-01 at 433 MHz (E6 is exponent for MHz)
  if (!LoRa.begin(433E6)) { 
    Serial.println("Starting LoRa failed! Check wiring.");
    while (1);
  }
 
  Serial.println("LoRa Initialized OK!");
}
 
void loop() {
  Serial.print("Sending packet: ");
  Serial.println(counter);
 
  // Send packet
  LoRa.beginPacket();
  LoRa.print("hello ");
  LoRa.print(counter);
  LoRa.endPacket();
 
  counter++;
  delay(5000); // Wait 5 seconds
}

Key Library Functions

Lora topics on lamaPLC




This page has been accessed for: Today: 7, Until now: 8