Go Down

Topic: RF24Mesh nRF24L01 very long range (Read 889 times) previous topic - next topic

mic78000

Hello,

When I use RF24 librairy, I use to have the better long range

  radio.setPALevel(RF24_PA_MAX);
  radio.setDataRate(RF24_250KBPS);
  radio.setRetries(15,15);

I did not succeed to do the same thong with RF24Mesh Library.

Any ideas ?

Michel

Robin2

Are those the settings recommended for the Mesh library?

What distances are you talking about?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

mic78000

About 500-700m between two nodes. In fact, I test these modules and I whant to know, to test the range in différents conditions. And I whant to learn all the possibilities.

For your question : Are those the settings recommended for the Mesh library?
No, radio.setPALevel(RF24_PA_MAX) is for the RF24 Library and I suppose we have the same possibilities with RF24Mesh Library but how ?.


Robin2

I think you need to try the examples provided by TMRh20.

I have no personal experience of either the Network or Mesh extensions but from what I have read the settings for re-tries can be important.

As I understand it the Network extension adds a layer on top of the ordinary RF24 library and in so doing probably reduces potential overall throughput and the Mesh extension adds another layer on top of the Network. Presumably if the whole thing is not planned carefully all the radios will interfere with each other.

Am I correct to assume that you already have reliable communication at 500m between a pair of nRF24s using the basic RF24 library? Do you know how many retries are required as part of that? Maybe the link is close to its limit?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

mic78000

Using the basic library, today I did a test. I reached a range of 1.3km !!

I use this sort of module :NRF24L01+ with antenna

http://www.ebay.fr/itm/NRF24L01-PA-LNA-SMA-Antenna-Wireless-Transceiver-communication-module-2-4G-NR-/252608965072?hash=item3ad0aae9d0:g:eOIAAOSwtLxYE~z-

Robin2

That's good to know.

Can you give more details of how you did the test. There are often queries here about the range of those devices.

And, by the way, EBay links are not very useful because they go out of date when all the product has been sold.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

mic78000

#6
Feb 14, 2017, 11:47 pm Last Edit: Feb 15, 2017, 09:40 pm by mic78000 Reason: Modification of the two .ino
In fact I wanted to put the picture et not the link but I dit not know how.
Now I do :



For the test itself :
I change the basic code to have a blink led which stop to blink when the message is not received.
I put one nRF24L01 on my windows and the other in my car.
I give you the code in attachement, but it is not nice code!, Just for test and I am a beginner in C. If someone whant, I can do it better.
The code is for DHT temperature device but it's ok if you don't have one.



Robin2

I put one nRF24L01 on my windows and the other in my car.
Out of curiosity, how high is the window and were there any obstructions between your car and the device in the window?

And whereabouts in your car was that device?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

SamIAm93

Can you post the code you used for the mesh test?

Have a look at the Class Documentation for RF24Mesh, specifically at mesh.begin().

mic78000

Out of curiosity, how high is the window and were there any obstructions between your car and the device in the window?

And whereabouts in your car was that device?

...R
The window is about 4m from the ground. No obstruction between the window and my car. To reach 1.3km, I need to put the NRF24L01+ outside the car. Most of the time for lower Range, the antenna was in the car, but my car is a 2cv which is a very open car. It is also a very old car :-)

mic78000

#10
Feb 15, 2017, 09:30 pm Last Edit: Feb 15, 2017, 09:37 pm by mic78000
Can you post the code you used for the mesh test?

Have a look at the Class Documentation for RF24Mesh, specifically at mesh.begin().
mesh.begin :
begin (uint8_t channel=MESH_DEFAULT_CHANNEL, rf24_datarate_e data_rate=RF24_1MBPS, uint32_t timeout=MESH_RENEWAL_TIMEOUT)

I see we can modify the rate but it is already 1MBPS
we can modify timeout (not so much influence ?)
But we can't modify power (amplifier) (equivalent to radio.setPALevel(RF24_PA_MAX) I think this has a big influence for the range.

In attachements the "Mesh code"

Robin2

#11
Feb 15, 2017, 10:22 pm Last Edit: Feb 15, 2017, 10:26 pm by Robin2
But we can't modify power (amplifier)
Because something is not in the list of BEGIN items I would not assume it is forbidden.

And AFAIK max power is the default setting.

You have not actually given us any details of the tests you did with the MESH library. How many nRF24s were involved? Did any of them work at any distance? etc etc

And did you try the simpler Network library?

Quote
but my car is a 2cv
Nice

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

SamIAm93

After initializing the mesh

Code: [Select]
begin (MESH_DEFAULT_CHANNEL,RF24_250KBPS,MESH_RENEWAL_TIMEOUT);
(The lower the frequency, the better range you'll get.)

you can still call radio.setPALevel()

mic78000

Because something is not in the list of BEGIN items I would not assume it is forbidden.

And AFAIK max power is the default setting.

You have not actually given us any details of the tests you did with the MESH library. How many nRF24s were involved? Did any of them work at any distance? etc etc

And did you try the simpler Network library?
Nice

...R
No, I did not test Network Library

My range Test with Mesh Library was only with a master and a child (so with only 2 RLF24N01).
I did another try of the Mesh (to try only the Mesh and not the range) with one master and 4 child. My first resukt : it s ok but sometime when I move one NrlF24L01 I need to reset this device and sometime, it's ok, the Mesh manage fine.
I have to do others try...

mic78000

I succed but not still tested the range :

We can use radio.setPALevel but we need to put it after and not before (of course !!!) the mesh.begin.. :-)
But I test the default-value of PA_LEVEL it's already to MAX. So already for max range.

I will test with this code :
with RF24_250KBPS for best range
and a shorter TimeOut 15000 rather 60000, but I am not sure to understand what it does. I thing that more this timeout is short more often the mesh is rebuit ? (not sure at all !)

  Serial.println(F("Connecting to the mesh..."));
  // default : mesh.begin(MESH_DEFAULT_CHANNEL, RF24_250KBPS,MESH_RENEWAL_TIMEOUT);
  mesh.begin(MESH_DEFAULT_CHANNEL, RF24_250KBPS,15000);  // a test with other timeout
  //Parameters of begin
  //  channel  The radio channel (1-127) default:97
  //  data_rate The data rate (RF24_250KBPS,RF24_1MBPS,RF24_2MBPS) default:RF24_1MBPS
  //  timeout How long to attempt address renewal in milliseconds default:60000
       
  Serial.println (F ("PA Level : "));
  Serial.println (radio.getPALevel()   ); / to test default value
  radio.setPALevel(RF24_PA_MAX); // already default value. Not useful

Go Up