Pages: 1 ... 11 12 [13] 14 15 ... 17   Go Down
Author Topic: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver  (Read 99010 times)
0 Members and 1 Guest are viewing this topic.
Pensacola FL
Offline Offline
Jr. Member
**
Karma: 2
Posts: 68
"I've forgotten more than I care to remember!" Capt. Jack Grass
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First of all>>>>>>Thank you soooo much maniacbug for the library!!!!!!

Finally!!!!  smiley-mr-green  I had three problems.
1. Bad connections on the 2x4 icd connector.  The module doesn't lend itself to easy hook up or plugging it into a std breadboard, not to mention the fact that they all are marked as pin 1 is pin 2 (2 is 1), because they have the pins going out the bottom of the board not the top. They all seem to be that way.   So a colored ribbon cable does not match the std color code 1bro, 2rd, 3ord, 4yel, etc.  Instead,  it's 1rd, 2bro, 3yel, 4org, 5blu, 6grn, 7gry, 8vio.     

2.  Reading the documentation I thought the CE and CSN pin could be any unused I/O pin.  For some reason the method  "RF24 radio(9,10);" can't be changed.  I had used different pins than 9 and 10,and it didn't work.   I understand that the SPI interface has to match that of the ucontroller hardware, but I thought the other two pins could be any unused digital I/O.
If some one can shed some light on this it would be appreciated.

3. This applies to the module with PA+LNA: Once I fixed the other two problems, the pong (repeater) would send out one reply and then stop.  The fix was to add a cap to the module.   I started with a .1uf, but didn't help.  Used a 220/15v cap and it worked. Did not check to see if a larger one was better or a smaller was the same.
 
Using the RF24 lib example "pingpair":
RANGE:  (line of sight:LOS)
    nRF24L01+    30' in doors  through two walls
                        (doors open, LOS was through 2 walls)
    nRF24L01+PA+LNA    approx 200' LOS
                        through 3 walls to outside and down the hill
Logged

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 204
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
2.  Reading the documentation I thought the CE and CSN pin could be any unused I/O pin.  For some reason the method  "RF24 radio(9,10);" can't be changed.  I had used different pins than 9 and 10,and it didn't work.   I understand that the SPI interface has to match that of the ucontroller hardware, but I thought the other two pins could be any unused digital I/O.
If some one can shed some light on this it would be appreciated.

For all my programs and forks, I'm using CE = 8, CSN = 9, no issues at all... see my fork of the RF24 on the network ( https://github.com/maniacbug/RF24/network )

Quote
3. This applies to the module with PA+LNA: Once I fixed the other two problems, the pong (repeater) would send out one reply and then stop.  The fix was to add a cap to the module.   I started with a .1uf, but didn't help.  Used a 220/15v cap and it worked. Did not check to see if a larger one was better or a smaller was the same.

When using the Arduino UNO 3.3V, no issues at all for the PA+LNA+ext antenna version...

I made an UNO nRF24L01 adapter that plugs directly to D8-D13 + Gnd
with SPI = 11,12,13 CE=8/CSN=9
I'm using pin10 as my VCC, 5V to 3.3V using this Reg LDO, TO-92
LE33CZ 3.3V LDO ( http://my.element14.com/jsp/search/productdetail.jsp?sku=9755349&CMP=i-55c5-00001621 )

I need to put a 10uF between the VCC and GND to get the nRF working on Max power...
Logged


the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

...
3. This applies to the module with PA+LNA: Once I fixed the other two problems, the pong (repeater) would send out one reply and then stop.  The fix was to add a cap to the module.   I started with a .1uf, but didn't help.  Used a 220/15v cap and it worked. Did not check to see if a larger one was better or a smaller was the same.
 
Using the RF24 lib example "pingpair":
RANGE:  (line of sight:LOS)
    nRF24L01+    30' in doors  through two walls
                        (doors open, LOS was through 2 walls)
    nRF24L01+PA+LNA    approx 200' LOS
                        through 3 walls to outside and down the hill
Yeah, I didn't see you mention which Arduino board you're using, but 3.3V current-output capability is deficient on pretty much all of them. As low as 50mA or so.

There have been MANY posts by people in the past on many threads saying how they needed to use a large cap on the RF module Vcc pin, but the problem in most cases has probably been that the 3.3V regulators used cannot supply enough current for the modules. The higher power RF modules especially require more current. With regards XBee shields, you'll notice the better shields have their own 3.3V regulator on board.

The very FIRST thing you need to do when hooking anything to an Arduino board is to know how much current the thing draws, and also how much current your Arduino board can supply.
Logged

Pensacola FL
Offline Offline
Jr. Member
**
Karma: 2
Posts: 68
"I've forgotten more than I care to remember!" Capt. Jack Grass
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 Well, I'm somewhat chagrined smiley-grin to say the least.  I went back and tested ;  yes the "Radio(x,y);"  does in fact work.   Must have been some of my other gremlins messing with me  or could have been that I had the boards on max power while only separated by a couple feet, saturating the receiver. Could have been the summer cold that I have.

I missed the threads that had mentioned the power problem, except for the mega2650.

I'm really liking the modules now, just don't like the arrangement of the modules.   I had a similar idea to the adapter board. 
 
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

200' is pretty good with the amplified modules. I bought a couple of those a few weeks ago, but haven't gotten to testing them as yet. I've been testing RFM12, RFM22, and BTs lately, plus xiveling and twittering from my ethernet shield, LOL. Plus ColorLCD shield today for data display.

I'm cooking up a home automation system, and planning to use the RFM22s at 433 Mhz to get the system off the 2.4G band, since I can pick up 30 routers here. OTOH, one of my links I want transmitting to the car on the other side of the building, so the amped-up nRF2401s might be good for that. Good to hear they're working now.
Logged

Pensacola FL
Offline Offline
Jr. Member
**
Karma: 2
Posts: 68
"I've forgotten more than I care to remember!" Capt. Jack Grass
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Range test, line of sight, each set up was only bread boarded and powered by single Li-ion cells charged to 4.2v.

The basic nRF24L01+ with the pcb trace ant. had a reliable range to about 30m.  The rf modules were not held in any particular position.  They were just dangling from the end of a 3" piece of ribbon cable.  At about 34m there was no link at all.

The nRF24L01+LNA+PA had reliable link to about 625m/2100'.  The 2db ant. were set at 90 at the joint to allow it to point directly vertical.   

Don't think that powering them with the full 5v would make a difference because the rf modules run off of 3.3v.
A small parabolic reflector at the base unit might give it some extra distance.  I'll try that once I have the prototype packaged a little better. Send the signal out, then back and have it run a servo at same end of the link.

Loop delta was about 24msec and the data structure was 12 bytes plus all of the other addressing, preamble, etc.  The base unit delayed after each successful packet for 200 msec. May also get better range by using a different channel.  All in all, not bad for the price.

Logged

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 204
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've a couple of these Nordic compatible radio modules from Inhaos, RF-2423, they have a high power mode that can output 7dBm .... they work out of the box without any modifications to my nRF codes...

http://www.inhaos.com/product_info.php?products_id=61

They are really small/SMD/1.27mm pitch and can be surface mounted directly on yr project board without the 4x2 female headers...
For testing, I solder them on one side of the SOIC-16 for breadboard compatible...


RF-2423 on SOIC-16

Logged


Pensacola FL
Offline Offline
Jr. Member
**
Karma: 2
Posts: 68
"I've forgotten more than I care to remember!" Capt. Jack Grass
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sweet!   What kind of range do you get at max power and 1Mbps?
Logged

Pensacola FL
Offline Offline
Jr. Member
**
Karma: 2
Posts: 68
"I've forgotten more than I care to remember!" Capt. Jack Grass
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I misunderstood.  I thought the module was on a .1" pitch, but I now see that you had to use an adapter.
Kind of negates the SIP layout.   They don't make it easy for anyone.  All breadboards are .1".
 
I'm still interested in the range that you get with it.  If it's not any more than the nrf24L01+, then there isn't much advantage to it.
Logged

Piossasco
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear All

I modified the Maniacbug 2.4 GHz scanner.
https://github.com/roboticboyer/Arduino/blob/master/2.4GHz%20Scanner.ino

This version only shows channel in use.


Bye
Robotic Boyer
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the recommended version/fork of this library to use at the moment?

I noticed Maniacbug's RF24 github repo was updated about a month ago, but there are several forks on github as well. Gnulfnulf is mentioned in several places, but it was last updated in April.

And then there's Maniacbug's RF24Network repo as well...
Logged

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 204
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Goto any RF24 repo/forks, click on the Network on the right side..

Choose anyone you like or suit yr requirements.. some of the later forks might fix some issues and add extra features/examples to the lib...


Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Goto any RF24 repo/forks, click on the Network on the right side..

Choose anyone you like or suit yr requirements.. some of the later forks might fix some issues and add extra features/examples to the lib...
Thanks for your reply! I've checked the forks (before posting obviously smiley) and I was just wondering if anyone has any firsthand experience which one to use. There seems to be an uncoordinated proliferation of forks being created without any proper master everything is eventually pushed/pulled into.

For example, your repo seems pretty recent/good as does the one from gcopeland. You've merged some parts from him, but not everything. For example, I'd guess this commit is useful too, but I don't know for sure.

+ All these forks make it quiet difficult for starters/newbies to know where to start, as mentioned for example in this blog post (under Critics).
« Last Edit: August 17, 2013, 05:42:03 am by aaahaaap » Logged

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 204
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I asked a student to help me draw/design and make a DIY PCB for nRF24L01 UNO adapter with 3.3V LDO from pin 10

The 3.3V LDO power regulator is LE33CZ, the 10uF is needed for the stability of power during Tx mode..

Here are some pics..








Logged


Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 204
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


For example, your repo seems pretty recent/good as does the one from gcopeland. You've merged some parts from him, but not everything. For example, I'd guess this commit is useful too, but I don't know for sure.

+ All these forks make it quiet difficult for starters/newbies to know where to start, as mentioned for example in this blog post (under Critics).

I guess this is the good and bad part of github, you can fork a repo without asking the person that started the repo (or he no longer maintain it )  but from time to time, the repo are merged back to the upstream repo...

I guess you shd just use the latest repo or repo that are frequently updated ( as least you know the person is still actively updating the repo with bug fixes or new features/examples )...

Mine had 2 Raspberry Pi libs/drivers forks on them (bcm and GPIO), so if you planned to use with RPi too, this is a good choice ... I also added some extra examples that I mentioned in my blog too...

For the SPI timing commit, thanks, I hv added that in too..

For Arduino only, gcopeland's repo is pretty good as I seek a lot of advise from him all the time...
Logged


Pages: 1 ... 11 12 [13] 14 15 ... 17   Go Up
Jump to: