Using nRF24L01+

Hi

Since you are using Megas, your problem might have something to do with the power to the nRF module. I am trying to find out about this.

@ OP. There are a large number of posts regarding the nRF24XX and nRF24LXX devices. My recommendation is to read them all. Search this website as well as Google nRF24L00''s for whatever you find. it's a bit of reading but in almost every post or article I've found more and useful data.
Maniacbug's library is well done and easy to use, I recommend it highly.

Bob

Hello

Which library are you using in your program as there are a number of libraries available for nRF24L01+ radio modules.

Shiv

I just received a couple of nRF24L01 modules, and hooked them up. I used the following
library, and the GettingStarted example sketch from the library, and they worked the
first time great, which kind of amazing considering how many other devices and libraries
need serious debugging to get to work. Yay!

http://maniacbug.github.com/RF24/index.html

First off, you need to power at 3.3V ONLY. 5V will kill the modules. However,
according to the datasheet, the I/O pins are 5V tolerant. The UNO and Mega boards
cannot provide much current at 3.3V, but these modules only require around 13 mA,
so that should be ok [I think].

Then, connect the SPI pins to the usual places, and the module CS pin to Arduino D10,
and CE pin to D9. The IRQ pin on the module isn't needed, at least for the GS sketch.
I simply jumpered all the module pins to the Arduino board pins without any shields.

Note - these callouts may need changing for the Mega board. I'm using a UNO-compatible
board.

Actually, there are several bugs in the maniacbug GettingStarted sketch. The initial
signon responds with some garbage, and the modules don't go into receive mode properly
at startup, but you just have to press 'T' on one side and 'R' on the other side to get them
to talk, and they go.

I just did a little range test, and it's fairly pathetic with these things. Going from one room
to another is only good for about 25 feet [8 m] through a standard wood frame wall. I guess
that's about what to expect for 2.4 Ghz and 0 dbm [1 mW] output.

A greater range would be achieved if you use 1Mbps or 256kbps air data rate.

I need two walls and 15m. 256kbps sounds plenty fast enough for my needs. How do I ensure this rate?

Thank you.

shiu748:
A greater range would be achieved if you use 1Mbps or 256kbps air data rate.

shiu748:
A greater range would be achieved if you use 1Mbps or 256kbps air data rate.

Ok, the library defaults to 1 Mbps data rate, so I patched it 250 Kbps, and the
range increased from about 25 feet [8 m] up to roughly 40 feet [12 m]. Now
going through the wall of the house to the outside.

oric_dan:
Ok, the library defaults to 1 Mbps data rate, so I patched it 250 Kbps, a

Sounds great, but what are we talking about here?

Is the library RF24.h?

I see line 32 therein has a red zero

typedef enum { RF24_1MBPS = 0, RF24_2MBPS, RF24_250KBPS } rf24_datarate_e;

so can I just alter that to

typedef enum { RF24_1MBPS, RF24_2MBPS, RF24_250KBPS = 0 } rf24_datarate_e;

?

It looks promising........

No, in RF24.cpp is the following function, and I patched the last line as shown,

void RF24::begin(void)
{
  ....
  if( setDataRate( RF24_250KBPS ) )
  {
    p_variant = true ;
  }
  // Then set the data rate to the slowest (and most reliable) speed supported by all
  // hardware.

// MODIFIED - 02/26/13.
//  setDataRate( RF24_1MBPS ) ;
  setDataRate( RF24_250KBPS );
  ....
}

Don't ask me what the comment means, I don't know.

OK Thank you.
I'll try that out.
My RF24s have just arrived.

Which library are you using. I would recommend using the NRF24 library. Changing the air data rate is easy, just go through the examples given in the library.

shiu748:
Which library are you using. I would recommend using the NRF24 library. Changing the air data rate is easy, just go through the examples given in the library.

See reply #4.

You are using RF24 library. I would recommend using the NRF24 library, that is what I used for my research. Its simple and easy to understand.

All in all, I was "very very" happy to find that maniacbug's library and examples worked
without any MAJOR debugging efforts. In contrast, I spent several weeks mucking with the
stupid JeeNode library and s.w. before it would ever work, and then I only got lucky in the
end - ie, found a sketch in the Arduino Cookbook that worked right the first time.

OTOH, after just 1 day of testing, I'm already very disappointed with the nRF24L01 modules.
Power is too weak, and range is too small. They are basically ok for "in the same room".

After playing with Xbees for 7 or 8 years, it's very hard to beat them for ease of use and long
usable range. Nothing else comes even close, even if they are a more expensive. Maybe you
get what you pay for. The only real problem with XBees is that most of the shields are poorly
designed.

oric_dan:
OTOH, after just 1 day of testing, I'm already very disappointed with the nRF24L01 modules.
Power is too weak, and range is too small. They are basically ok for "in the same room".

OK Oric, I just want to be sure of what you are doing. Here you are clearly alluding to the nRF24L01 module.
Is that what were alluding to in reply #7 with the 12m range? My module is labelled nRF24L01+. The terms nRF24L01and nRF24L01+ seem to be used interchangeably.

The library package I have is RF24 from maniacbug.

Maybe you get what you pay for.

I don't think that there is any maybe about it.

Nick_Pyner:

oric_dan:
OTOH, after just 1 day of testing, I'm already very disappointed with the nRF24L01 modules.
Power is too weak, and range is too small. They are basically ok for "in the same room".

OK Oric, I just want to be sure of what you are doing. Here you are clearly alluding to the nRF24L01 module.
Is that what were alluding to in reply #7 with the 12m range? My module is labelled nRF24L01+. The terms nRF24L01and nRF24L01+ seem to be used interchangeably.

The library package I have is RF24 from maniacbug.

I have the "+" modules, identical to the one shown here, reply #1,
http://arduino.cc/forum/index.php/topic,148883.0.html

Max transmitted power is only 0 dbm [1 mW], as far as I can tell, and that seems to be
the case on all of these Nordic devices.

Hi. His there anyone using only mega 2560? no unos?

i have 2 mega 2560 and cant get them to communicate. i use all the pin in the forum's

GND GND
3V3 3V3
CE 53
CSN 48
SCK 52
MOSI 51
MISO 50

RF24 radio(53,48)

i also try to put ce -> 9 and 8 and csn -> 10 and 7, and nothing.. no communcation. i belive its the library its not working for the mega 2560 pin 50, 51,52. but iam a new at ardruino and iam not sure.

can someone help me? anyone with mega2560 that put it to work?

oric_dan:
Max transmitted power is only 0 dbm [1 mW], as far as I can tell, and that seems to be
the case on all of these Nordic devices.

I have one of these

http://www.ebay.com/itm/nrf24l01-PA-VER2-0-data-transmission-module-7105-905-/180719853615?pt=LH_DefaultDomain_0&hash=item2a13be202f

I have not had a chance to try any of my nrf24 stuff yet.

Re: reply #18

Hi sov229

I use both an Uno & Mega 2560 to communicate with each other OK.

My mega2560 pin asssignments are:-

CE pin 9
MI pin 50
MO pin 51
SCK pin 52
CSN pin 53

RF24 radio(9,53)

Hope this helps