Issue with Lora range

I have a setup of 2 x (Lora modules RFM95 + ESP32) that exchange messages between each other. The issue is that the max range I can get is around 100m. I suspect the antenna being wrongly used. The attached picture shows how I connected the RFM95 antenna to the PCB.
pcb
I used the antenna connector shown in this picture:
antenna_pcb_connector


What's could be wrong ? Thank you very much.

Hello,
resolder all antenna connection.
They looks like terrible!

Hi szakaria,

How how you oriented the antennas? Monopole antennas radiate perpendicularly, with almost zero power coming out of the ends. So definitely don’t point them at each other - they need to be more like parallel to work.

Hi,
Did you design the PCB, it would have been better if you positioned the RFM closer to the antenna socket.
What frequency is your RFM unit?
Are you using the correct aerial?

Have you checked out the hoperf site for info on antennas and applications?

It has application documentation that may help.

Tom... :smiley: :+1: :coffee: :australia:

1 Like

The picture of the pcb socket is an SMA.

Is the antenna of the matching polarity, some of those small antennas can be RP-SMA.

Hi R11K,
Do you mean that I have to change the antenna connector to the PCB to the one like in this picture?

Hi Srnet,
This is the description of the antenna I used (copy/paste from aliexpress): 868MHz SMA Connector Antenna for Lora Board IOT Lora32u4 II Wifi Lora32 Lora Module RCmall. Here is the link: https://www.aliexpress.com/item/4000221726126.html?spm=a2g0s.9042311.0.0.43c24c4dWDKVkI.
Thanks

I meant does the antenna plug match the pcb socket, they dont always.

it looks like the antenna has a centre pin male connector and the socket a matching female centre socket, so they should match.

What LoRa settings are you using ?

Hi Tom,
Thank you for the document. I will try to read it during this weekend. The RFM unit's frequency is 868MHz. I am using an antenna described by aliexpress as: 868MHz SMA Connector Antenna for Lora Board IOT Lora32u4 II Wifi Lora32 Lora Module RCmall

The antenna plug match the pcb socket. What do you mean by the Lora settings? if you mean the frequency, the RFM in use is 868MHz module.

The LoRa module needs to be configured, via the Arduino sketch that you did not post with;

Frequency
Transmit power
Spreading factor
Bandwidth
Coding rate

And a few other things too ...............................

I see. I am using the following library: GitHub - sandeepmistry/arduino-LoRa: An Arduino library for sending and receiving data using LoRa radios. that is available in the Arduino IDE libraries. I only need to adapt the frequency in the sketch. Below is a working example with my setup:

#include <SPI.h>
#include <LoRa.h>
//define the pins used by the transceiver module
#define ss 5
#define rst 14
#define dio0 2
int counter = 0;

void setup() {
  //initialize Serial Monitor
  Serial.begin(9600);
  while (!Serial);
  Serial.println("LoRa Sender");
  //setup LoRa transceiver module
  LoRa.setPins(ss, rst, dio0);
  //replace the LoRa.begin(---E-) argument with your location's frequency 
  //433E6 for Asia
  //866E6 for Europe
  //915E6 for North America
  while (!LoRa.begin(866E6)) {
    Serial.println(".");
    delay(500);
  }
   // Change sync word (0xF3) to match the receiver
  // The sync word assures you don't get LoRa messages from other LoRa transceivers
  // ranges from 0-0xFF
  LoRa.setSyncWord(0xF3);
  Serial.println("LoRa Initializing OK!");
}
void loop() {
  Serial.print("Sending packet: ");
  Serial.println(counter);
  //Send LoRa packet to receiver
  LoRa.beginPacket();
  LoRa.print("hello ");
  LoRa.print(counter);
  LoRa.endPacket();
  counter++;
  delay(10000);
}

While answering you question, I could notice that in the sketch I have 866E6 as frequency and my RFM module uses 868MHz. Maybe I should change the line:
while (!LoRa.begin(866E6)) {
to
while (!LoRa.begin(868E6)) {
?

2Mhz difference in frequency wont matter much.

One cause of extreme short range with LoRa modules, is that the transmitter module is damaged because it was operated, even for a short time, with no or a faulty antenna. Such damadged modules may not work very well as transmitters but are often OK for receivers.

So you added that change as well, I would suggest you do not change the syncword until you are sure everything is working.

Hi,

`while (!LoRa.begin(866E6)) {`
to
`while (!LoRa.begin(868E6)) {`
?

It should be

while (!LoRa.begin(868E6)) {

Initialize the library with the specified frequency.
LoRa.begin(frequency);
frequency - frequency in Hz (433E6, 868E6, 915E6)

They are the three parameter values that the library uses.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Yes I added the change. The communication between the 2 Lora transceivers is fine.
I will try to bring the antenna plug as near as possible to the antenna pin (ANT) of the RFM module and test.

Thanks Tom. I will try this and revert.

The design of the PCB track which carries the signal from the rfm95 to the antenna connector can also be important. If not done correctly, there will be an impedance mismatch which will reduce the range. The impedance of the PCB track should be 50 ohm to match your antenna. As mentioned already, shorter is better. But you also have to use the correct track width to get as close as you can to 50 ohm, and that depends on the copper track thickness, the PCB thickness, the dielectric constant of the PCB material, whether you have a ground plane on the other side of the PCB... There are calculators on-line to help you. Search for "microstrip calculator".

1 Like

It can sometimes be useful to know what settings have been applied to a LoRa device as this can have a very significant impact on range.

There is a library that will print out the current settings of a LoRa device like this;

Lora Device found
SX1278_PABOOST,434000000hz,SF7,BW125000,CR4:5,LDRO_Off,SyncWord_0x12,IQNormal,Preamble_8
SX1278_PABOOST,SLEEP,Version_12,PacketMode_LoRa,Explicit,CRC_On,AGCauto_On,LNAgain_1

1 Like

Hi, no I wasn’t suggesting a change of components. Monopole is just the type of antenna you have, and they point their signal in a particular way:

In the top arrangement the signal from each antenna will be received by the other one, but in the bottom one it is unlikely you will get any signal other than when the antennas are very close together.

1 Like