LoRa multiple transmitter to single receiver

Hi All,

I am developing a system with LoRa (REYAX RYLR890) and Arduino pro mini.

So far, I've set and tested, and everything worked out. (A single transmitter to a single receiver)

But, when I tried to communicate two transmitters to one receiver, the receiver can only read one of them.

For example,

Transmitter Address : 0,2
Receiver Address: 1

Receiver Serial Monitor says

(turn on tx 0)
RCV + 0, ~~~
RCV + 0, ~~~
RCV + 0, ~~~
(turn on tx 2 as well)
RCV + 2, ~~~
RCV + 2, ~~~
RCV + 2, ~~~
(turn off tx 2)
RCV + 0, ~~~
RCV + 0, ~~~
RCV + 0, ~~~
....

What I expected

(turn on tx 0 and 2)
RCV + 0, ~~~
RCV + 2, ~~~
RCV + 0, ~~~
RCV + 2, ~~~
RCV + 0, ~~~

Lora can communicate only one to one?
or, what should I have to do for this system?
I will increase the number of transmitters in the future. (i.e., multiple transmitter to a single receiver)

Thank you!

FYI)
<<>>

#include "Adafruit_MCP9808.h"
#include <Wire.h>

Adafruit_MCP9808 tempsensor = Adafruit_MCP9808();
#define ledPin 2

unsigned long lastTransmission;
const int interval = 200;

void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(ledPin, OUTPUT);
if (!tempsensor.begin()) {
Serial.println("Couldn't find MCP9808!");
while (1);
}
}

void loop() {
// put your main code here, to run repeatedly:
//delay(1000);

//float f = c * 9.0 / 5.0 + 32;
//Serial.print("Temp: "); Serial.print(c); Serial.print("*C\t");
//Serial.print(f); Serial.println("*F");

if (millis() > lastTransmission + interval) {
//Transmission Due!
float c = tempsensor.readTempC();
String msg = "AT+SEND=1,8,"+String(c)+"ºC";
Serial.println(msg);
//Serial.println("AT+SEND=1,8,",C);
digitalWrite(ledPin, HIGH);
delay(200);
digitalWrite(ledPin, LOW);
lastTransmission = millis();
}
}

<<>>
#define ledPin 2

String incomingString;

void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(ledPin, OUTPUT);
Serial.println("Ready");
}

void loop() {
// put your main code here, to run repeatedly:
if (Serial.available()) {
incomingString = Serial.readString();
if (incomingString.indexOf("ºC") > 0) {
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
Serial.println("received: " + incomingString);
}
}
}

A standard LoRa device can only receive from one transmitter at a time, it cannot receive from two transmitters if they are both transmitting at the same time.

srnet:
A standard LoRa device can only receive from one transmitter at a time, it cannot receive from two transmitters if they are both transmitting at the same time.

Thank you for your reply.

Then, if I want to receive data from 5 sensors (each of which transmits data via its LoRa module), do I have to set 5 receiver LoRa modules at the control station?

For example, let's assume I wanna monitor each room's temperature at home.

Living room: transmitter 1
Bathroom: transmitter 2
Kitchen: transmitter 3
Room: transmitter 4

Control Station: Receiver 1~4

It would be the only solution?
Aren't there any solution that I use only 1 (or less than 4) receiver at the control station

euihyun_han:
It would be the only solution?
Aren't there any solution that I use only 1 (or less than 4) receiver at the control station

There is, read post #1 again.

A single LoRa receiver can receive signals from hundreads of different transmitters. But if two (or more transmitters) are transmitting at the same way there is no way for the receiver to seperate the signals.

srnet:
There is, read post #1 again.

A single LoRa receiver can receive signals from hundreads of different transmitters. But if two (or more transmitters) are transmitting at the same way there is no way for the receiver to seperate the signals.

Thank you for your reply again.

I didn't understand the meaning of 'transmitting at the same way.'

My two transmitters have different AT addresses; 0 and 2 (and they are sending the signal to the receiver; address = 1). Isn't it enough to distinguish themselves?

May I know what kind of features or parameters I should change to make them transmit in a different way?

p.s. When I googled about it more, there is a module which is called concentrator to receive data from multiple end-nodes. (I could find gateways as well, but I don't need WAN for it.) Could it be a solution as well?

Sorry, typo on my part for the second time I gave the information, post #3 should have read;

"But if two (or more transmitters) are transmitting at the same time there is no way for the receiver to seperate the signals"

There are LoRa multi channel gateways typically you need a Raspberry Pi to run them. They cost circa £100.

I got it.

Thank you for your help!

For what it's worth I use environmental sensors (5 of them) that all transmit data back to a single LoRa receiver (not a gateway). As they only transmit a few bytes each (temperature, humidity, pressure, lux & battery volts) every 30 minutes they hardly ever clash with each other.

Riva:
For what it's worth I use environmental sensors (5 of them) that all transmit data back to a single LoRa receiver (not a gateway). As they only transmit a few bytes each (temperature, humidity, pressure, lux & battery volts) every 30 minutes they hardly ever clash with each other.

Thank you for sharing your use case.

If I understood your set-up correctly,

  1. The receiver doesn't change its address while getting data.
  2. There are 5 transmitters.
  3. Transmitters have time gaps, like
    sensor 1: at every 6, 36 min
    sensor 2: at every 12, 42 min
    sensor 3: at every 18, 48 min
    sensor 4: at every 24, 54 min
    sensor 5: at every 30, 60 min
  4. It works quite well. (no data clash at the receiver)

I was also thinking of testing this way. By the way, do you have any ideas what the shortest-possible-time gap? (here, it is 6 mins)

euihyun_han:
I was also thinking of testing this way. By the way, do you have any ideas what the shortest-possible-time gap? (here, it is 6 mins)

You would need to work that out.

It wil depend on the amount of data you are sending and the LoRa settings in use since these affect the air time of the packet and longer packets are more likley to suffer colisions.

And then, assuming that the timings will change since its unlikely the Arduino will remain syncronised to the second for long, it becomes a random thing and you would need to decide what is an acceptable level of collisions to put up with. Send a sequence number with each packet so you can tell if any are missed.

Or just try it and see.

euihyun_han:
If I understood your set-up correctly,

  1. The receiver doesn't change its address while getting data.
    No address changes as not required with this LoRa library I use.
  2. There are 5 transmitters.
    Yes.
  3. Transmitters have time gaps, like
    sensor 1: at every 6, 36 min
    sensor 2: at every 12, 42 min
    sensor 3: at every 18, 48 min
    sensor 4: at every 24, 54 min
    sensor 5: at every 30, 60 min
    No, they just transmit readings every 30 minutes. I transmit a reading, wait a short random time then tx the same message again. I do this three times so if the message clashes it will hopefully make it one of the other times.
  4. It works quite well. (no data clash at the receiver)
    With a 30 minute window I very vary rarely have clashes but as the data is not critical it does not matter. The main thing for me is good battery life and this will run for over a year on an 18650 cell.

I was also thinking of testing this way. By the way, do you have any ideas what the shortest-possible-time gap? (here, it is 6 mins)

It depends on how critical the data is to you. I don't use two way link when sending data but if it was important I would send and check for an acknowledge and then try several more times if on ack received.

Riva:
It depends on how critical the data is to you. I don't use two way link when sending data but if it was important I would send and check for an acknowledge and then try several more times if on ack received.

Thank you for your details.

Recently, I did some tests to see when the clash happens.

And even tho 1 single transmitter sends the signal every 10ms (i mean very rapidly), the receiver can read it around every 2s. So I assumed that if I transmit data in 2s, it induces data clash.

So I set 2 transmitters and set their interval 1s, 2s, 3s.
i.e.,
Test 1
tx 1: at 1s, 3s, 5s, ...
tx 2: at 2s, 4s, 6s, ...
Test 2
tx 1: at 2s, 6s, 10s, ...
tx 2: at 4s, 8s, 12s, ...
Test 3
tx 1: at 3s, 9s, 15s, ...
tx 2: at 6s, 12s, 18s, ...

And as you can expect
test1: a lot of clashes happened
test2: barely happened (but sometimes)
test3: no clashes

Of course, it includes some timing errors because I didn't have RTC modules. (I reset transmitters at the same time by hand to synchronize 'millis()' function)

So, I can say possible time gap for two modules is 2 secs between 2 sensors (and 4 secs in one sensor) in my case. But I think it depends on the environment where you use the modules.

By the way, in your use case, do you put your Arduinos on sleep mode while they are not sensing? If so, how do you wake them up every 30 min? like RTC module or watchdog timer? In my case, battery consuming is also very important, so I'm using sleep mode but it's very hard to synchronize different Arduinos when there are not connected to each other or there is no RTC module. Do you have any recommendations?

euihyun_han:
By the way, in your use case, do you put your Arduinos on sleep mode while they are not sensing? If so, how do you wake them up every 30 min? like RTC module or watchdog timer? In my case, battery consuming is also very important, so I'm using sleep mode but it's very hard to synchronize different Arduinos when there are not connected to each other or there is no RTC module. Do you have any recommendations?

I have had a 'bare bones' Arduino, which actually an ATmega328P with MCP1700 regulator, reading a BME280 sensor and sending the data over LoRa every 15minutes. Wakeup is using the watchdog timer wakeup only.

After 6 months of operation the 155mAhr battery has dropped from 4218mV to 3898mV. Its dropped only 30mV in the last month. So based on that the 155mAhr battery may have a life of 27 months.

A set of AA batteries could therefore last 40 years, if they did not self discharge, daft ain't it.

euihyun_han:
By the way, in your use case, do you put your Arduinos on sleep mode while they are not sensing? If so, how do you wake them up every 30 min? like RTC module or watchdog timer? In my case, battery consuming is also very important, so I'm using sleep mode but it's very hard to synchronize different Arduinos when there are not connected to each other or there is no RTC module. Do you have any recommendations?

I just use watchdog sleep (max 8 seconds a time) and just count the number of wakes. I take readings every 5 minutes and then send the average value every 30 minutes.
You could use an RTC to wake the Arduino using an alarm but that's extra hardware (and another battery).
I did consider using an TPL5110 or TPL5111 to control the Arduino on/off but as I get 1+ years per battery I can live with that.

Why do you need exact timing on the transmitter end? The gateway device (ESP32-Lora) I send the readings to is powered all the time so uses NTP time and adds a timestamp and RSSI to the received messages.

srnet:
I have had a 'bare bones' Arduino, which actually an ATmega328P with MCP1700 regulator, reading a BME280 sensor and sending the data over LoRa every 15minutes. Wakeup is using the watchdog timer wakeup only.

After 6 months of operation the 155mAhr battery has dropped from 4218mV to 3898mV. Its dropped only 30mV in the last month. So based on that the 155mAhr battery may have a life of 27 months.

A set of AA batteries could therefore last 40 years, if they did not self discharge, daft ain't it.

Thank you for sharing your battery experience.
My goal is also to save battery as far as I can.
I might need to move to something more raw, such as bare bones or microprocessors. (But I haven't tried these things so far.)

Riva:
I just use watchdog sleep (max 8 seconds a time) and just count the number of wakes. I take readings every 5 minutes and then send the average value every 30 minutes.
You could use an RTC to wake the Arduino using an alarm but that's extra hardware (and another battery).
I did consider using an TPL5110 or TPL5111 to control the Arduino on/off but as I get 1+ years per battery I can live with that.

Why do you need exact timing on the transmitter end? The gateway device (ESP32-Lora) I send the readings to is powered all the time so uses NTP time and adds a timestamp and RSSI to the received messages.

The reason why I thought about RTC modules is to synchronize other end-node sensors transmitting timing.
As far as I understand, WDT is a kind of relative time from the moment Arduino is reset. So, if I want to transmit like below

tx1: 0s, 8s, 16s, 24s,...
tx2: 4s, 12s, 20s, 28s,...

with WDT sleep_4s function, they have to start WDT at (almost) the same time.
If I reset tx2 late, it will transmit signals at 7s, 15s, 23s, ...
Then, around 7s~8s, 15s~16s, it might induce data collision. (between end-node transmitters and receiver(gateway))
In case there are more sensors, it will be much harder to synchronize all of them to avoid data crashes.
That's why I considered the use of RTC modules. But I don't want to use extra modules if it is possible.
So I am also really curious how multi-node LoRa gate receives all data from multiple nodes at the same time.

How important is it you get no collisions, just transmit the data, wait a random time + 8 seconds and send again.