Pages: 1 ... 3 4 [5] 6 7 ... 17   Go Down
Author Topic: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver  (Read 101273 times)
0 Members and 1 Guest are viewing this topic.
Seattle, WA
Offline Offline
God Member
*****
Karma: 11
Posts: 673
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So basically i could have multiple nodes with same adress, but with different IDs? ( not bothering with collisions ).

What do you mean 'IDs'?  RF24Network knows only addresses.
Logged


0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i mean lets say that the nrf24l01+ of sensor 1 and sensor 2 have the same adress, but the "sensors" are sending "i m sensor A" for a and "i m sensor B". so even with the same adress i can identify them from being the same.
Logged

Seattle, WA
Offline Offline
God Member
*****
Karma: 11
Posts: 673
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I see, right, they would each have their own application-specific ID that the network layer knew nothing about.  You'd put that ID in the payload.  Yes, that should work just fine.
Logged


nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8589
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That sounds like my RS485 network idea, the low level is just interested in broadcasting packets, if you want a higher level protocol you sit it on top of that. All addressing and end to end acknowledging etc is handled by a higher level.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great, i ll look into it. The awesome stuff should be that i can write ID's from the receiver to the transmitters...i look into that too. If you have any infos on how i can achieve that i ll listen smiley-wink

Logged

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

Problem solved :-)

It looks like short range connection with max power is not good idea. With setting:
  radio.setPALevel(RF24_PA_LOW);
  radio.setDataRate(RF24_250KBPS);
i've got stable link :-)

PS.
maniacbug - this driver is really nice piece of code! I owe you a Beer [~]o (if you will visit Poland ;-)
« Last Edit: December 05, 2011, 03:45:15 pm by direk » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 138
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi here, once again (thanks maniacbug) great driver....
I have been testing the nrf24l01+ only with 2 units one in main arduino has receiver and the other on one of my sensor prototype with Arduino mini Pro.

Results so fare are good, i'm  working with a 250kbits mode transferring a struct of 14byte

Now 2 questions
1 its possible to have some kind of subnet i mean i want to use 5 sensors+ 1 receiver for temp/hum
and another 5+1 for motion detection in another environment.
I wan to avoid collisions and isolated both "networks"

I was thinking on changing the rf Chanel to try this kind " sub net" its this possible ?
like  temp/hum subnet rf channel 2476
       motion subnet rf channel 2400
Will this work ?

2ª Beside the reducing to 250KBS what other parameters could be optimized for increasing the range ?


This is my scanner result how can i  interpret this :
i can't see what would be the best channels to use ..



RF24/examples/scanner/

00000000000000001111111111111111222222222222222233333333333333334444444444444444555555555555555566666666666666667777777777777777

0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

00000000000000000000000000000000011121342100000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000000000000000000113122331200000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000000000000000000112042121000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000000000000000000213364131300000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000000000000000000222122010200000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000000000000000000133132120200000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000000000000000000123022220100000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000000000000000000122122220200000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000000000000000000233343121100000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000000000000000000333251110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000000000000000000222142121300000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 


my settings

STATUS       = 0x0e
RX_DR=0
TX_DS=0
MAX_RT=0
RX_P_NO=7
TX_FULL=0
RX_ADDR_P0-1= 0xf0f0f0f0e1 0xf0f0f0f0d2
RX_ADDR_P2-5= 0xc3 0xc4 0xc5 0xc6
TX_ADDR    = 0xf0f0f0f0e1
RX_PW_P0-6 = 0x10 0x10 0x00 0x00 0x00 0x00
EN_AA= 0x00
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP= 0x27
CONFIG= 0x0f
DYNPD/FEATURE  = 0x00 0x00
Data Rate= 250KBPS
Model= nRF24L01+
CRC Length    = 16 bits
PA Power    = PA_HIGH


chanel 4c, means 2400+4c = 2476MHZ?


PS: where do i change the defaults of radio channel , power, speed so i don't need to always do it on the setup part...



Regards.

« Last Edit: December 09, 2011, 06:42:52 am by fca » Logged

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

You can use public functions like that:
radio.setChannel(xx);
radio.setPALevel(xx);
radio.setDataRate(xx);
etc...

everything is in docs -> http://maniacbug.github.com/RF24/classRF24.html
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 138
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

direk, thanks but what i was looking was the defaults i found it  in rf24.cpp  function void RF24::begin(void), i already changed for my defaults but thanks.

Let's see if maniacbug can help on my other questions (tune for range) and different subnets of 6 radios each at different rf channels..

Now another question, i'm not getting the range i would expect , my sensors distance are vertical between floors so big concrete walls between floors i can only reach one floor, i.e

Floor 0->1 but not floor 0 ->>2 ...
i have to have the reception module in floor 0 (where my server is)

So i have 2 options use a network solution and have the floor 1 module as relay for receiving sensors from floor2.... (a lot learning curve to understand the rf24 network<--- once again great work maniacbug)
 OR (question)
 if i buy a more powerful base radio like the "2.4GHz Transceiver w/ Power Amp +PreAmp nRF24L01+"  keeping the small ones for the sensors would help on improve the range  ? or all the radios would have to be like these ?

Regards


http://arduino-direct.com/sunshop/index.php?l=product_detail&p=190


Regars
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 138
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi maniacbug, are you there ?

other question is there way somehow to print the received signal strength ? so we can find where the range start to finish  and debug ?

regards..

Logged

Seattle, WA
Offline Offline
God Member
*****
Karma: 11
Posts: 673
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is my scanner result how can i  interpret this :
i can't see what would be the best channels to use ..

It's hard to tell because it's posted on the forum in regular text--it would be easier to interpret if you posted it inside 'code' blocks.  Anyway, it looks to me like you have a little noise in the 0x20-0x29 channel range, so the scanner is telling you to avoid that range, but anything else should be fine.

Beside the reducing to 250KBS what other parameters could be optimized for increasing the range ?

Using 16-bit crc and mid-range payload sizes (~8 bytes) seems to help cut down on the failures.  Make sure you have the LNA/PA power settings to max power.  Also, if range is a concern, get units with a '+' on the end, not the earlier non-plus models.

I was thinking on changing the rf Chanel to try this kind " sub net" its this possible ?
like  temp/hum subnet rf channel 2476
       motion subnet rf channel 2400
Will this work ?

Yup, this is exactly what channels are for.  If you have two separate groups of traffic, but them on different channels.  That should avoid collisions.  I haven't tried it myself, but that's the theory anyway.  You could try it out yourself and let us know how it goes.

PS: where do i change the defaults of radio channel , power, speed so i don't need to always do it on the setup part...

Just change it in the setup() of your sketch.  That will make it most clear to readers of the code what is happening.

chanel 4c, means 2400+4c = 2476MHZ?

Check the data sheet for an explanation of how the channels map to actual MHz frequencies.

Quote
i'm not getting the range i would expect , my sensors distance are vertical between floors so big concrete walls between floors i can only reach one floor, i.e

Floor 0->1 but not floor 0 ->>2 ...
i have to have the reception module in floor 0 (where my server is)

What range are you expecting?!  Through two floors of concrete??  No, I wouldn't expect that.  The way to set this up is to use all cheap units for the leaf nodes, and then have a relay node on each floor using the high-powered more expensive modules with PA.  And have a base unit with LNA.  The relays listen to the leaves, and relay the messages back to the base on a higher-powered link.

Quote
is there way somehow to print the received signal strength ? so we can find where the range start to finish  and debug ?

I don't believe so.  All of my sensor nodes have a range-finder software built in.  So you can put the unit into 'range test' mode, in which it constantly sends a test packet back to its parent.  If the send goes through, it turns on the green light, if not it turns on the red light.  I can then just walk around and explore the extents of the range.
Logged


Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 50115
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
other question is there way somehow to print the received signal strength ?
For what purpose? Surely you don't expect to correlate signal strength to distance...
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 138
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there, yes  the purpose was to do that, signal vs distance...
i have ordered 2 of that units with pa...
Meanwhile i did some tests and even on the same floor i was getting some "dark" spots.... some time ago i dismantled a wifi antenna and it was a bare cable with some spiral...
Today nothing to loose i did a spiral cable like the one one in my wifi antena , drilled a hole in the rf24l01 antena and solder that in ...
Guess what i get full range in the same floor and from all floor 2 to all floor 1....

This is not very scientific just  a test... one thing that i noticed is that i had better results with " my antena" in horizontal than in the vertical position...
Any clue why ?

Tomorrow i will solder on the hole a real wifi antenna and lets see... if it get better...

Here a photo prototype of my sensor with the "antena"...



Regards


Logged

0
Offline Offline
Shannon Member
****
Karma: 214
Posts: 12424
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You don't want to solder an antenna to the end of an existing antenna, antennas are tuned to the wavelength of interest and will perform very differently when altered this way.  The standard 1/4 wave antenna for 2.4GHz is 3.1cm long.  That helical antenna is probably a loaded 3/4 wavelength design.

Basically an antenna works best at resonance as the voltages and currents are at a maximum allowing more power to radiate away.

The orientation of an antenna is crucial as the em waves have a direction or polarization - align the antenna with the electric field axis of the radiation and you get maximum result - however indoors there is so much distortion and reflection of the radio waves its not really predictable.

http://en.wikipedia.org/wiki/Antenna_%28radio%29
Logged

[ I won't respond to messages, use the forum please ]

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

First off. Thanks for this great library and all the good info in this thread.

Secondly. In the bundled examples with the library many of the comments state that you should use pin 8 & 9 on your arduino for radio communication, while the code directly beneath the comment declares pin 9 & 10 instead. Caused some headache for me and a buddy of mine who tried out the nRF24L01 modules today for the first time. We finally figured it out though smiley
Logged

Pages: 1 ... 3 4 [5] 6 7 ... 17   Go Up
Jump to: