LoRa SX1278 Not working with Arduino UNO

Hi
I am trying to setup a basic LoRa communication between two Arduino UNO boards and SX1278, 433MHz modules, one as RX and other as RX.

The wired settings are as follows

// LoRa-02 SX1278 module PINs:
// 3.3 V and ground : Connected to 3V3 and GND of Arduino UNO
// RST : Connected to PIN-9 of Arduino UNO
// NSS : Connected to PIN-10 of Arduino UNO
// MOSI : Connected to PIN-11 of Arduino UNO
// MISO : Connected to PIN-12 of Arduino UNO
// SCK : Connected to PIN-13 of Arduino UNO
// DIO0 : : Connected to PIN-2 of Arduino UNO

The connections are same for both RX and TX side.
I am using LoRa Library of Sandeep Mistry version 0.8.0 and used example programs LoRa Sender, which is as below

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

int counter = 0;

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

Serial.println("LoRa Sender");

if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
}

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

// send packet
LoRa.beginPacket();
LoRa.print("hello ");
LoRa.print(counter);
LoRa.endPacket();

counter++;

delay(5000);
}

LoRA Receive:

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

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

Serial.println("LoRa Receiver");

if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
}

void loop() {
// try to parse packet
int packetSize = LoRa.parsePacket();
if (packetSize) {
// received a packet
Serial.print("Received packet '");

// read packet
while (LoRa.available()) {
  Serial.print((char)LoRa.read());
}

// print RSSI of packet
Serial.print("' with RSSI ");
Serial.println(LoRa.packetRssi());

}
}

Except for the frequency, I have not changed any thing in code.
At the TX side, I see prints "Sending Packet" with counter incrementing
On the TX side, I do not see any packets coming.

Both TX and RX side, it does not say LoRa failed, so, I assume Lora is not failed, but the packets are not seen on RX side.

I do not know if there is issue in TX side or issue in RX side.

The LoRa Module which I use reads on case as

RA-02
ISM: 410-525MHz
PA: +18dBm
LoRa/FSK/00k

Suggest you disconnect the LoRa modules from the UNOs as soon as you can.

The LoRa modules are 3.3V logic level and its pins should not be directly connected to a 5V logic level Arduino such as a UNO, they can be damadged.

If you do want to connect the LoRa device to a UNO use logic level conversion connections.

Heaps and heaps easier to use LoRa modules with 3.3V logic Micro controllers or Arduinos.

1 Like

Both. Use logic level shifters to connect 5V and 3.3V devices. You may already have damaged one or both components.

Thank you. Unfortunately this information is forth coming clearly from demos and videos available on internet. Will try with a new set of components and level shifters.

Thank you for the suggestion. Will try with a new set of components and level shifters.

1 Like

I recommend the Adafruit Feather LoRa boards. They have advanced 3.3V processors directly connected to the radios, are easy to use and work as advertised.

1 Like

I have several of the Adafruit Feather 32u4 LoRa modules used for testing systems - with LoRa onboard removes all the problems with interconnecting wires and resultant intermittent problems
these days tending to move to Heltec WiFi LoRa 32(V3), ESP32S3 + SX1262 LoRa Node
ESP32S3 microcontroller (with onboard WiFi and BLE) + LoRa SX1262 + OLED display

Dear All.
The root cause of LoRA module not working when directly connected to Ardiono board is due to difference in IO voltage levels. As suggested in this forum, I have used level convertor to convert 5V IO signal to 3.3V while interfacing with SX1278. The problem got solved.

So, please keep in mind, to always have a level convertor between Arduinoi Uno and Semtech AX1278 LoRA module.

1 Like