Interfacing between LoRa Sx-1278 and Arduino Uno

I've been trying to connect Arduino Uno with LoRa SX-1278 Module and test send the data. For this, I've installed LoRa Library by "Sandeep Mistry" (V0.8.0) in arduino IDE.
Connected the pins in the below manner:

The sender code is as follows:

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

#define SCK 13
#define MISO 12
#define MOSI 11
#define SS 10
#define DIO0 3
#define RST 9

int counter = 0;

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

  Serial.println("LoRa Sender");
  //LoRa.setSPIFrequency(8E6);
  LoRa.setPins(SS, RST, DIO0);
  if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
  Serial.println("LoRa Initializing OK!!");
}

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

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

  counter++;

  delay(500);
}

However, after uploading the code to the board, I'm always getting an error as:

LoRa Sender
Starting LoRa failed!
LoRa Sender
Starting LoRa failed!
LoRa Sender
Starting LoRa failed!

I've also tried 915 frequency, but getting the same error!!

I have followed a tutorial page - Interfacing SX1278 Ra-02 LORA Module with Arduino

Any help in fixing this issue is appreciated!! Thanks !!

Note:
In one of the Arduino Forums, few people suggest that Arduino Uno (despite connecting the 3.3V to LoRa 3.3V pin) always sends 5V power supply, due to which Lora board might fail / broke!! - I'm not very sure on this, as it was not mentioned in any of the tutorials that I've referred to!!

The SX1278 LoRa module uses 3.3V logic and you should not connect it to a 5V logic Arduino such as a UNO, that the LoRa module is connected to the 3.3V output is not relevant to this requirement.

You can try logic level converters between the UNO and the LoRa module but you really need a seperate 3.3V supply for the LoRa module, the UNO cannot supply a lot of current on its 3.3V pin.

Heaps easier and far less bother to use a 3.3V logic level Arduino or something like an ESP32.

Just goes to show how reliable a lot of so called 'tutorials' on the Internet are.

1 Like

@srnet - your response seems to me that, the logic level convertors aren't a good alternative as well.. Is that so ?

It brings me to a question - Why does the Arduino Nano / Uno board has the 3.3V and 5V pins?? When both the pins are going to output 5V supply.

How about connecting the Arduino Uno board with a ESP8266 module and then connecting the ESP8266 and LoRa 3.3V power supply ? Do you think it can work.

There are some good ones, but the common cheap MOSFET logic level converters produce SPI signals that are marginal, when you look at them on a scope.

The 3.3V pin outputs a 3.3V at a low current, nothing more.

1 Like

The 3.3V pin outputs a 3.3V at a low current, nothing more.

Does that mean, if we connect the Arduino device to a lower current (like 3.3V supply) then the lora transmitter receives 3.3V from the Arduino's 3.3V output pin ?

One last question - While I was testing connection with lora - Arduino connection, the Lora board got too heated, I was assuming the board got damaged. Is there any way to test the lora module's working status ?

Thanks for answering my questions!! I hope I got more insights here :slight_smile:

Well if you connect the LoRa 3.3V supply pin to the 3.3V supply output on the UNO, then yes the LoRa module has its 3.3V supply. But the UNO often does not provide enough current for a radio module thats transmitting stuff.

If you see the "Starting LoRa failed!" message thats a good indication of a faulty module, assuming the connections are correct.

If the module does initialize then you really need to use an RF power meter to measure that the RF power output is what it should be. Plus a working LoRa receiver to check if transmitted packets are good.