nRF24L01 and Node Discovery

Hi Guys,

I’ve been reading up on the nRF24L01 chips (maybe use the MiRF v2 - nRF24L01 Module RP-SMA" modules) and am wondering about using them for a wireless model railroad throttle network capable of running 1 - 40 or even more nodes from a base station or gateway node.

After reading the docs I am still wondering about a few things:

  1. How nodes go about discovering each other without having pre-shared address stored in each node? I’m sure the must be a way as the manufacturers who use this stuff for wireless keyboards and mice etc must have a way to link up a set of wireless peripherals to a PC.

  2. Is there some sort of broadcast type function where a node can say “I’m here and my address is blah - is there anyone else out there on this channel?” If there is it can talk and establish a session or try another channel.

  3. Does all traffic have to be node to node or can a node broadcast to all other nodes who care to listen some how?

  4. Also with 125 different channells, what is the best strategy for selecting channels?

  5. I’ve also been reading up on the 802.15.4 alternatives and wondered what others think about 802.15.4 compared to the nRF24L01

Also I’m using AVR Mega chips if it makes a difference.

Hey, kiwi. I figured I’d chime in on your questions since I have a lot of experience with these chips.

  1. There is no auto-discovery on the 24L01 chips. You have to do this in software.

  2. You could easily do this in software, but there is no built-in functionality for it. You would have to establish a broadcast address on one pipe for all of the devices for them to hear the announcement, though.

  3. You can broadcast to as many nodes as you want. Since each node has six receive pipes, you could set up one pipe to be a broadcast address and another to be a data address.

  4. Generally, you simply choose a channel, and if you aren’t getting your packets through (auto-acknowledge and retransmit can be done by the 24L01 in Enhanced Shockburst mode), you change your RF channel. The more address and CRC bytes you use, generally the fewer junk packets you will receive at the RX device. It also helps if you are planning on being in an area that is around other common 2.4 GHz devices (Bluetooth, Zigbee, etc.), you find out what frequency ranges they work on and select an RF channel that is out of those bands.

  5. I’m sure stevech will chime in, and on this one, I will agree with him. If you can handle the lower bandwidth, you will be much better off in this situation to go with the ZigBee modules because of their additional link layer functionality.

Brennen

Are there channels that typicaly away from standard Bluetooth/Zigbee?

I’ll be honest with you in that I’m not really sure. I think they both may do some frequency hopping, so it’s hard to tell what exact frequency they operate in. I would say that somebody else will know this better than I do.

andersonj55126:
Brennen

Are there channels that typicaly away from standard Bluetooth/Zigbee?

I'm pretty sure that both of them are DSSS modulation. The Chipcon 2420 is Zigbee ready, and the spectrum looks like a series of low mountain ranges over a 2 MHz swatch of the band. What this does is raise the noise floor so range will be slightly affected at close range, but not much.

Ron

Hi brennen,

Thanks for your responses.

brennen:

  1. There is no auto-discovery on the 24L01 chips. You have to do this in software.

  2. You could easily do this in software, but there is no built-in functionality for it. You would have to establish a broadcast address on one pipe for all of the devices for them to hear the announcement, though.

  3. You can broadcast to as many nodes as you want. Since each node has six receive pipes, you could set up one pipe to be a broadcast address and another to be a data address.

Ok, I read the DS a few more times and now I understand how it could all work like what you describe.

brennen:
4) Generally, you simply choose a channel, and if you aren’t getting your packets through (auto-acknowledge and retransmit can be done by the 24L01 in Enhanced Shockburst mode), you change your RF channel. The more address and CRC bytes you use, generally the fewer junk packets you will receive at the RX device. It also helps if you are planning on being in an area that is around other common 2.4 GHz devices (Bluetooth, Zigbee, etc.), you find out what frequency ranges they work on and select an RF channel that is out of those bands.

Yeah ok this too is do-able

brennen:
5) I’m sure stevech will chime in, and on this one, I will agree with him. If you can handle the lower bandwidth, you will be much better off in this situation to go with the ZigBee modules because of their additional link layer functionality.

What makes you say this? Is it because there is more control over the link layer with the chipsets used for ZigBee or that the beacon type functionality.

Thanks again for the information.

Chiming in… using 802.15.4 modules, even without using the ZigBee option, eliminates all the work to write code to manage the communications. It’s all built into the 802.15.4 that’s embedded in the module. You just use a serial port link. You either config using a PC to set the desired node-pair addresses (their MAC layer addresses like in Ethernet), or your run-time program decides what destination address it wants to talk to, for the moment. You don’t need to know anything about how the MAC layer works.

You add ZigBee if you want the elegance of a mesh network with multi-hop routing all done automatically. This isn’t needed for very small numbers of nodes, or where nodes don’t move out of coverage of a given node.

And 802.15.4 complete plug and play modules are cheap, like $20 @ 1ea.