ESP32S3 + Lora Ra-02 (SX1278) range issue

Hi,

I got a project with an ESP32S3 and a Lora Ra-02 (SX1278) that communicate with a Heltec Wifi Lora (V3) at 433 MHz. I need some advice because the range in open area is about 100 m, and I would like to upgrade it to 500 m.

ESP32S3 (Sandeep Mistry library):

#define ss 10
#define rst 14
#define dio0 2

loraModule.setPins(ss, rst, dio0);

while (!LoRa.begin(433E6))
{
  Serial.println(".");
  delay(500);
}

loraModule.setTxPower(20);
loraModule.setSpreadingFactor(7);
loraModule.setSignalBandwidth(125E3);
loraModule.setCodingRate4(5);
loraModule.setPreambleLength(8);
loraModule.enableCrc();
loraModule.setSyncWord(0xA5);

Heltec (Heltec library) :

#define RF_FREQUENCY 433000000  // Hz

#define TX_OUTPUT_POWER 20  // dBm

#define LORA_BANDWIDTH 0          // [0: 125 kHz, \
                                  //  1: 250 kHz, \
                                  //  2: 500 kHz, \
                                  //  3: Reserved]
#define LORA_SPREADING_FACTOR 7  // [SF7..SF12]
#define LORA_CODINGRATE 1         // [1: 4/5, \
                                  //  2: 4/6, \
                                  //  3: 4/7, \
                                  //  4: 4/8]
#define LORA_PREAMBLE_LENGTH 8    // Same for Tx and Rx
#define LORA_SYMBOL_TIMEOUT 0     // Symbols
#define LORA_FIX_LENGTH_PAYLOAD_ON false
#define LORA_IQ_INVERSION_ON false

Radio.SetChannel(RF_FREQUENCY);

Radio.SetRxConfig(
    MODEM_LORA,
    LORA_BANDWIDTH,
    LORA_SPREADING_FACTOR,
    LORA_CODINGRATE,
    0,                          // AFC bandwidth (N/A)
    LORA_PREAMBLE_LENGTH,
    LORA_SYMBOL_TIMEOUT,
    LORA_FIX_LENGTH_PAYLOAD_ON,
    0,                          // payload length (0 = variable)
    true,                       // CRC enabled
    0,                          // frequency hopping
    0,                          // hop period
    LORA_IQ_INVERSION_ON,
    true                        // continuous receive mode
  );
Radio.SetTxConfig(
    MODEM_LORA,
    TX_OUTPUT_POWER,
    0,
    LORA_BANDWIDTH,
    LORA_SPREADING_FACTOR,
    LORA_CODINGRATE,
    LORA_PREAMBLE_LENGTH,
    LORA_FIX_LENGTH_PAYLOAD_ON,
    true,
    0,
    0,
    LORA_IQ_INVERSION_ON,
    3000
  );

Radio.SetSyncWord(0xA5);

I already tested to upgrade the SF, but the result is that they can’t communicate anymore.

I used this antenna for both of them :

the Heltec LoRa V3 has a
SX1262 LoRa module which is not listed as supported by sandeepmistry/arduino-LoRa library

I would tend to use the RadioLib library for both the RA-02 and Heltec LoRa V3

what is the environment - inside buildings, urban, countryside?

Dont change the syncword away from the standard 0x12 or 0x34.

Changing the syncword can cause receiver problems.

If in doubt about antennas, they might not work as advertised, just use a bit of simple wire 1/4 wavelength long.

Have you ever operated the module in transmit mode with no antenna connected ?

Using different libraries on transmitter and receiver can also cause problems, much easier to stick to a common library.

I didn’t say I used the SandeepMistry lib for Heltec Lora V3.

I assume I can call it a urban area.

I have tested communication between different libraries on different devices but would not do it in practice

as @srnet stated "Using different libraries on transmitter and receiver can also cause problems"

Best to test the the setup with clear line of sight between transmitter and receiver.

‘Urban’ areas vary a great deal, next to impossible to predict what range you might expect, but 100m would not surprise me.

With clear line of sight between TX and RX and the settings you used, excluding the syncword change, I would expect a range of 50km+.

I will test a self made antenna tomorrow thx.

I don’t think so.

I will try to use the same library and see what it changes thanks

The actual environnement where it’s going to work is in supermarket, so I’m not here for a competition of range just to get a range that can work in this type of area.

I’ll remove the SyncWord for the test but I actually want to keep it.

I did a few tests, but I don’t find the time to use the RadioLib library, and these are the results :

I thinks it’s pretty good for my uses

I didn’t change the antenna either. Do you have a picture of what it looks like, and where did you wire it?