Wireless Communication up to 1.5km in the forrest

Hi Guys,
i am currently trying to create a network of wirelessly connected nodes and one base.
There will be up to 128 nodes wich all need to be able to communicate with one base station in the middle.
The Base should be able to transmit and receive messages from the nodes wich are up to 1.5km away.
Also the nodes move (Maybe important for antenna stuff)
The data transmission is not that high. Only 2 bytes once in a while.

Currently i am using an HC-12 but i get really bad results with it (175m).
I am using the HC-12 with FU3 mode and P8 (since i live in germany and its not allowed to use more power) -.-

also there is the standart spring antena mounted right now.
I have also tryed to use a LORA module but i think one of them arrived defect and i dont know if its worth it to order a new one. And if it is it would be nice if you could recomend a good one :slight_smile:

My question is if you know any other module wich is capable of there ranges or if i am just using the HC-12 the wrong way.

Sorry if my english is not that great, its not my native language.

LG Julian

You are wasting your time and money using anything above about 100 mHz in a forest especially when it gets wet.

Paul

Wilgelmy:
Currently i am using an HC-12 but i get really bad results with it (175m).
I am using the HC-12 with FU3 mode and P8 (since i live in germany and its not allowed to use more power)

I have also tryed to use a LORA module but i think one of them arrived defect and i dont know if its worth it to order a new one. And if it is it would be nice if you could recomend a good one

The HC12 in FU4 mode should go almost twice as far, but its not going to be nearly good enough. Based on your test of FU3 @ 175m, you can expect a LoRa device to cover 10 times that distance at the same data rate and power so an equivalent range of 1.75km.

However you data requirements are very low, 2 bytes only ocaisionally, so you can use the ability of LoRa to gain considerable link advantage by slowing it right down.

So if the LoRa were to cover 1.75km @ 5000bps, if you slowed it right down to 100bps, range would increase by a further factor of 7 (so 12km range). The newer SX126X series LoRa devices use very stable oscillators and could increase range by a further factor of 2 (24km).

The results of comparing range of LoRa (@434Mhz) in a wet versus dry forest are here;

Lost in a Wet or Dry Forest

Perservere with the LoRa modules, they seem a good fit for you project, I would be amazed if you cannot get them to work, 434Mhz would be better than 868Mhz.

I get quite stable results with LoraWan modules. The last forest walks where well above 1.5km - mostly spruce (Fichten). I did my tests with TheThingsNetwork (TTN) on 868Mhz. If you need lot of downstream data (from the basic station to the nodes in the forest), you might consider your own network or a peer to peer network with 433Mhz. During my walk the node was in my backpack, the base stations/gateways were inside the house - a very limiting factor with much improvement potential.

Proposal: Do your resarch if you can use TTN. Buy two cheap esp32 modules and do some experiments. Set up one module as Gateway and one as node. If you get stable results on TTN/868 well done. Consider to buy a real multichannel gateway and use low power modules for your nodes. You still can use both of your esp32 modules as nodes or for developing new stuff. If your experiments with ttn are not successfully - try peer to peer mode with the same modules. If 868 is not working for your distances, you might get better results with 433 Modules.

P.S.: you will find some information on TTN/Lorawan modules and gateways on my page in German.

First of all thanks for your quick Respons to all of you :smiley:

Paul_KD7HB:
You are wasting your time and money using anything above about 100 mHz in a forest especially when it gets wet.

Paul

Well I just thought that i need frequencys like that to get the required bandwith.
If you think that possible could you then recommend a module?

srnet:
The HC12 in FU4 mode should go almost twice as far, but its not going to be nearly good enough. Based on your test of FU3 @ 175m, you can expect a LoRa device to cover 10 times that distance at the same data rate and power so an equivalent range of 1.75km.

Ok that sounds interresing i´ll look into that.

srnet:
However you data requirements are very low, 2 bytes only ocaisionally, so you can use the ability of LoRa to gain considerable link advantage by slowing it right down.

So if the LoRa were to cover 1.75km @ 5000bps, if you slowed it right down to 100bps, range would increase by a further factor of 7 (so 12km range). The newer SX126X series LoRa devices use very stable oscillators and could increase range by a further factor of 2 (24km).

The results of comparing range of LoRa (@434Mhz) in a wet versus dry forest are here;

Lost in a Wet or Dry Forest

Perservere with the LoRa modules, they seem a good fit for you project, I would be amazed if you cannot get them to work, 434Mhz would be better than 868Mhz.

Wow that sounds perfekt!
But there are so many different types of modules that i dont know what to buy….
Could you help me out with that?

noiasca:
I get quite stable results with LoraWan modules. The last forest walks where well above 1.5km - mostly spruce (Fichten). I did my tests with TheThingsNetwork (TTN) on 868Mhz. If you need lot of downstream data (from the basic station to the nodes in the forest), you might consider your own network or a peer to peer network with 433Mhz. During my walk the node was in my backpack, the base stations/gateways were inside the house - a very limiting factor with much improvement potential.

Proposal: Do your resarch if you can use TTN. Buy two cheap esp32 modules and do some experiments. Set up one module as Gateway and one as node. If you get stable results on TTN/868 well done. Consider to buy a real multichannel gateway and use low power modules for your nodes. You still can use both of your esp32 modules as nodes or for developing new stuff. If your experiments with ttn are not successfully - try peer to peer mode with the same modules. If 868 is not working for your distances, you might get better results with 433 Modules.

P.S.: you will find some information on TTN/Lorawan modules and gateways on my page in German.

Ok i am not really into lorawan but isnt that based on gateways that people open up and then allow others to use them?
If so its not really usefull for me since i am planing on using that in an area where there are none of These gateways (looked it up in TTN)
I know peer to peer is a think but can i connect more that to modules together like that?

Thanks again for all the replies

Regards Julian

Wilgelmy:
Ok i am not really into lorawan but isnt that based on gateways that people open up and then allow others to use them?
If so its not really usefull for me since i am planing on using that in an area where there are none of These gateways (looked it up in TTN)

TheThingsNetwork is one implementation of LoRaWAN with public gateways. You are not limited to the existing gateways! It is also up to you to extend this network - just install a gateway for your area. If you are lucky and someone else provides coverage - consider this other station as "backup" station just in case your gateway fails. Therefore I proposed modules which can be used as "Single-channel gateways" to start with AND as nodes to give you the opportunity to test what really fits to you. Even if you decide not to use TTN - these moduls can be used for plain Lora Peer to Peer communications also.

noiasca:
TheThingsNetwork is one implementation of LoRaWAN with public gateways. You are not limited to the existing gateways! It is also up to you to extend this network - just install a gateway for your area. If you are lucky and someone else provides coverage - consider this other station as "backup" station just in case your gateway fails. Therefore I proposed modules which can be used as "Single-channel gateways" to start with AND as nodes to give you the opportunity to test what really fits to you. Even if you decide not to use TTN - these moduls can be used for plain Lora Peer to Peer communications also.

ok i just googled lora gateways and they are really expensive -.-
do i need to use these prebuild ones or is there a way to diy those? (without buying a 100$ pcb…)

Wilgelmy:
ok i just googled lora gateways and they are really expensive -.-

Hardly 'really expensive' and a small percentage of the cost of your 128 nodes. Consider the overall cost of the project to achieve what you want, rather than individual bits of it.

A Gateway can be built with a Raspberry Pi Zero and a IC880 concentrator, around £120 ish.

The required multichannel LoRa devices are not low cost, I guess if you spent a month or two on a design and are real good at SMT stuff, you maight manage a DIY job.

I feel like repeating myself, but that's ok:

When you decide to go with TTN you will start with a single channel gateway for about 30 EUR.
When you decide to go further, you will invest in a Multi-Channel.
The cheapest solution might be the TheThingsNetwork Indoor Gateway for around 80 EUR, not my favorite one, but if money rulez - at least it works under some conditions.

Currently I would suggest the RAK 7258 which sells for around 140 EUR in Europe.

And as srnet mentioned, don't forget the overall project costs ... 128 nodes, 128 batteries, 128 boxes, 128 antennas - THIS is the cost driver you should take care of - not one (or even two ) basic stations.

noiasca:
When you decide to go with TTN you will start with a single channel gateway for about 30 EUR.

Not a good idea.

The other member of the community around you can loose connections to their applications.

noiasca:
I feel like repeating myself, but that's ok:

When you decide to go with TTN you will start with a single channel gateway for about 30 EUR.
When you decide to go further, you will invest in a Multi-Channel.
The cheapest solution might be the TheThingsNetwork Indoor Gateway for around 80 EUR, not my favorite one, but if money rulez - at least it works under some conditions.

Currently I would suggest the RAK 7258 which sells for around 140 EUR in Europe.

And as srnet mentioned, don't forget the overall project costs ... 128 nodes, 128 batteries, 128 boxes, 128 antennas - THIS is the cost driver you should take care of - not one (or even two ) basic stations.

Sorry if you feel like that but i am still thankfull that you take your time to Reply :slight_smile:
If i go for the 30€ singe channel one is it possible to communicate with 2 nodes at once?
And what if 2 nodes send a command at the same time will ne gateway be able to pick these both up?
If not will the multichannel gateway be able to do so?

And just for clarification i don´t want to build all these nodes from the start. I just want to be able to add them afterwards.

I am only concirned about money while i am in the prototyping phase since i am a student…

srnet:
Not a good idea.

The other member of the community around you can loose connections to their applications.

Since the loacation of the gateway wont be static i am not planning to make it public.

Regards Julian

On of the guiding principles of the free to use TTN service, which someone else is paying for remember, is that installed gateways are TTN compliant, so as to prevent disruption to other users of TTN compliant nodes and gateways.

The devices you are referring to are more accuratly described as single channel packet forwarders. These devices are most definetly not supported by or approved of by TTN.

srnet:
On of the guiding principles of the free to use TTN service, which someone else is paying for remember, is that installed gateways are TTN compliant, so as to prevent disruption to other users of TTN compliant nodes and gateways.

The devices you are referring to are more accuratly described as single channel packet forwarders. These devices are most definetly not supported by or approved of by TTN.

OK so maybe i got that wrong.
I need something that is able to receive messages of nodes process these messages and then send them out to another node. I thought this thing is called "Gateway". I dont need a connection to the Internet. So i dont want this gateway to have a connection to TTN.

Maybe you can tell my some more about channel packet forwarders? Are they able to send/receive multible messages at once?

Sorry if i didnt describe my problem good enought in the first place

Regards Julian

just to be clear on that, single channel gateways ARE supported by ttn. And there are a lot of modules which can perform well as Single Channel Gateways. In fact there is a clear statement of ttn that they do not recommend to use them, but this does not exclude them.

In my humble opinion, a single channel gateway on TTN

  • is better than no gateway at all
  • can be used in exact that kind of evaluation phase when people want to clarify if ttn is the proper network for them.
  • is the starting point for people to enrich the ttn later.

ok the TO decides not to use an internet based / cloud service. This is the only argument against TTN so far. I don't find it very clever in the current analysis phase but ok.

Regarding the simultaneity sending and receiving:

First you should understand that sending "some bytes" will take "milliseconds" of airtime. So it will be very unlikely that two nodes are sending at the same time. If that happens the probability is very high that the receiver will only receive grab.

For that reason, nodes could do "channel hopping" and use different frequencies (channels) for each sending. On the other hand you need receivers that can receive on more than one frequency. And this is the reason why networks prefer multichannel receivers - to be able to receive simultaneous on more channels.

By the way, this is just an example of design decision which was done by people offering an internet based / cloud service. You can consider, that these guys have done lot more thinking about how to build a big network, so before reinventing the wheel have a look on that.

noiasca:
just to be clear on that, single channel gateways ARE supported by ttn. And there are a lot of modules which can perform well as Single Channel Gateways. In fact there is a clear statement of ttn that they do not recommend to use them, but this does not exclude them.

Single-channel gateways | The Things Network

In my humble opinion, a single channel gateway on TTN

  • is better than no gateway at all
  • can be used in exact that kind of evaluation phase when people want to clarify if ttn is the proper network for them.
  • is the starting point for people to enrich the ttn later.

ok the TO decides not to use an internet based / cloud service. This is the only argument against TTN so far. I don't find it very clever in the current analysis phase but ok.

Regarding the simultaneity sending and receiving:

First you should understand that sending "some bytes" will take "milliseconds" of airtime. So it will be very unlikely that two nodes are sending at the same time. If that happens the probability is very high that the receiver will only receive grab.

For that reason, nodes could do "channel hopping" and use different frequencies (channels) for each sending. On the other hand you need receivers that can receive on more than one frequency. And this is the reason why networks prefer multichannel receivers - to be able to receive simultaneous on more channels.

By the way, this is just an example of design decision which was done by people offering an internet based / cloud service. You can consider, that these guys have done lot more thinking about how to build a big network, so before reinventing the wheel have a look on that.

Thanks again for that very usefull information.
I have talked to a friend of mine with which i am doing the projekt with and we decided that we want to try the range of 2 lora modules first. (p2p) If this test is succesfull we are going to invest into a propper gateway.

Wich brings me to my questions.
What lora module would you recomment for the nodes?
and will the range we get out of this test differ from the range that we will get with the gateway?

Regards Julian

Just as a reality check, if what you want to do is practical, many people would have been doing it for years. I'm not that familiar with the lora products, so your results will be informative. You might look on amazon and see the "telemetry" products that are available. I think most are for line of sight use.

zoomkat:
Just as a reality check, if what you want to do is practical, many people would have been doing it for years. I'm not that familiar with the lora products, so your results will be informative.

I am pretty sure that people did that before :smiley:
But i´ll keep you updated of what i find out.

zoomkat:
You might look on amazon and see the "telemetry" products that are available. I think most are for line of sight use.

yes i allready did that but they are not that easy customizable for my Needs

Regards Julian

Wilgelmy:
Wich brings me to my questions.
What lora module would you recomment for the nodes?

I used the TTGO LORA32 V2.0 modules to start with in Peer to Peer Mode
http://werner.rothschopf.net/201903_ttgo_lora32_v2.htm

Wilgelmy:
and will the range we get out of this test differ from the range that we will get with the gateway?

No not really, it will differ on your used antenna, antenna placement and your sketch settings.

BT, BLE, WLAN (I am fighting much with WLAN reliability, Fritzbox imported from Germany) and standard packet radio just don't cover the distance.

This product works rather well. I used it to monitor tree shake well over 1 km, but with only 5 nodes.

Get two of the above for your microcontroller of choice, hook up your sensor and battery, and see what you get in wet and dry conditions in the forest you'll be using your final set up.

Then, as the others mentioned, get a LoRa gateway. Nobody forces you to use the gateway's bridging function to relay your data to the Internet ; )

ok guys just a little update

i received my lora modules today and i got a pretty good range (600m) out of them without having to change anything. (it was not line of sight)
But since you guys sayed that i could achieve a lot more range i would like to know what i could change to increase the range.

Are there some settings i can adjust in the code?

Receiver:

#include <SPI.h>
#include <LoRa.h>
#include <Wire.h>  
#include "SSD1306.h" 
#include "images.h"

#define SCK     5    // GPIO5  -- SX1278's SCK
#define MISO    19   // GPIO19 -- SX1278's MISO
#define MOSI    27   // GPIO27 -- SX1278's MOSI
#define SS      18   // GPIO18 -- SX1278's CS
#define RST     14   // GPIO14 -- SX1278's RESET
#define DI0     26   // GPIO26 -- SX1278's IRQ(Interrupt Request)
#define BAND    433E6

SSD1306 display(0x3c, 21, 22);
String rssi = "RSSI --";
String packSize = "--";
String packet ;
int counter = 0;
String tmp;



void loraData(){
  display.clear();
  display.setTextAlignment(TEXT_ALIGN_LEFT);
  display.setFont(ArialMT_Plain_10);
  display.drawString(0 , 15 , "Received "+ packSize + " bytes");
  display.drawStringMaxWidth(0 , 26 , 128, packet);
  display.drawString(0, 0, rssi);  
  tmp = String(counter, BIN);
  while(tmp.length() < 21)
  {
    tmp = "0" + tmp;
  }
  if(packet == tmp)
  {
    display.drawStringMaxWidth(0 , 37 , 128, "Package received");
  }else
  {
   display.drawStringMaxWidth(0 , 37 , 128, "Receiving failed");
  }
  display.display();
  
  
  counter++;
}

void cbk(int packetSize) {
  packet ="";
  packSize = String(packetSize,DEC);
  for (int i = 0; i < packetSize; i++) { packet += (char) LoRa.read(); }
  rssi = "RSSI " + String(LoRa.packetRssi(), DEC) ;
  loraData();
}

void setup() {
  pinMode(16,OUTPUT);
  digitalWrite(16, LOW);    // set GPIO16 low to reset OLED
  delay(50); 
  digitalWrite(16, HIGH); // while OLED is running, must set GPIO16 in high、
  
  Serial.begin(9600);
  while (!Serial);
  Serial.println();
  Serial.println("LoRa Receiver Callback");
  SPI.begin(SCK,MISO,MOSI,SS);
  LoRa.setPins(SS,RST,DI0);  
  if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
  //LoRa.onReceive(cbk);
  LoRa.receive();
  Serial.println("init ok");
  display.init();
  display.flipScreenVertically();  
  display.setFont(ArialMT_Plain_10);
  display.drawString(0 , 15 , "Received "+ packSize + " bytes");
  display.display();
  
  delay(1500);
}

void loop() {
  int packetSize = LoRa.parsePacket();
  if (packetSize) { cbk(packetSize);  }
  delay(10);
}

Sender:

#include <SPI.h>
#include <LoRa.h>
#include <Wire.h>  
#include "SSD1306.h" 
#include "images.h"

#define SCK     5    // GPIO5  -- SX1278's SCK
#define MISO    19   // GPIO19 -- SX1278's MISO
#define MOSI    27   // GPIO27 -- SX1278's MOSI
#define SS      18   // GPIO18 -- SX1278's CS
#define RST     14   // GPIO14 -- SX1278's RESET
#define DI0     26   // GPIO26 -- SX1278's IRQ(Interrupt Request)
#define BAND    433E6

unsigned int counter = 0;

SSD1306 display(0x3c, 21, 22);
String rssi = "RSSI --";
String packSize = "--";
String packet ;
String tmp;



void setup() {
  pinMode(16,OUTPUT);
  pinMode(25,OUTPUT);
  
  digitalWrite(16, LOW);    // set GPIO16 low to reset OLED
  delay(50); 
  digitalWrite(16, HIGH); // while OLED is running, must set GPIO16 in high
  
  Serial.begin(9600);
  while (!Serial);
  Serial.println();
  Serial.println("LoRa Sender Test");
  
  SPI.begin(SCK,MISO,MOSI,SS);
  LoRa.setPins(SS,RST,DI0);
  if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
  //LoRa.onReceive(cbk);
//  LoRa.receive();
  Serial.println("init ok");
  display.init();
  display.flipScreenVertically();  
  display.setFont(ArialMT_Plain_10);
  display.drawString(0, 0, "Sending packet: ");
  display.display();
  delay(1500);
}

void loop() {
  display.clear();
  display.setTextAlignment(TEXT_ALIGN_LEFT);
  display.setFont(ArialMT_Plain_10);
  
  display.drawString(0, 0, "Sending packet: ");
  display.drawString(90, 0, String(counter));
  display.display();

  // send packetF,
  tmp = String(counter, BIN);
  while(tmp.length() < 21)
  {
    tmp = "0" + tmp;
  }
  LoRa.beginPacket();
  LoRa.print(tmp);
  LoRa.endPacket();
  Serial.println("Package Send");
  Serial.println(tmp);

  counter++;
  delay(500);                     // wait for a second
}

and what kind of antenna would you recommend?

Regards
Julian

Edit:
I am currently working on a custom PCB. Has anyone done that before and can recommend a LORA module?