NRF24L star networks

Hi,

This was suggested to me as a solution and I just wanted to check some thing.

I am assuming these would be fine (I am using the 5v mini pro so like the fact these have a built in 3-7volt regualtor

or https://www.coolcomponents.co.uk/mobile/wireless/other/nrf24l01-module.html with regulation

But My main question is i want to create a network with a raspberry pi as the central hub and ardunio's boards as the spokes. I am correct in thinking that I can create a hub/spoke /mesh network with these modules and they are not only point to point?

Cheers

Did you consider reading the datasheet of the NRF24L01+?

DevilWAH:
But My main question is i want to create a network with a raspberry pi as the central hub and ardunio's boards as the spokes. I am correct in thinking that I can create a hub/spoke /mesh network with these modules and they are not only point to point?

You need to describe what you want in a lot more detail.

Normally an nRF24 talks to one other nRF24 which acknowledges the message. You can arrange for several "slaves" to listen on the same address but then you have to disable the acknowledgement process.

Using the one-to-one system you can create a hub-spoke system because each message takes very little time.

This Simple nRF24L01+ Tutorial may help.

If you can arrange for one nRF24 to act as master and poll the others in turn using the technique in my second example that will probably be the simplest system. However I recognize that it is not suitable for every situation - hence the need for more detail from you.

My link includes a link to TMRh20's RF24 library. There are other variants that add Network and a Mesh features on top of the basic library - but I have not needed to use them.

...R

Whandall:
Did you consider reading the datasheet of the NRF24L01+?

yes. Did and have

Thank you for that, I know i need to look at this a lot more but this does confirm that these are half duplex devices. So its send data then listen then send then listen. If you want to create a multi node network its more like created a bus type network topology.

and i think your idea of polling would work fine.

Each remote device could be sensing events and storing an event ID + milies since last poll that event happened. Then when its polled it just needs to send these two values, the master device if has the time stamp of the "last poll" it can calculate the events realtime time stamp using the milies as an off set.

The actually Idea is to have a race track with (lets image) 4 checkpoints. Each of these check points can sense the cars as they pass through and identify each one. This sensing will be done by an ardunio board, Probable an IR LED on the bottom of the car passing over a photo sensor. and i was thinking each car will flash its LED at a different rate and to could the number of pluses over a time frame to see what car is going past.

So then once it has the car ID and the time stamp it will transmit this back to a raspberry pi. the Pi will work out split times, speeds, etc etc, and then send back to the ardunio a array value that it will use to light a RGB Led strip / array on the check point. showing what order the cars passed though the checkpoint, who was fastest between the gates, who hasa made up places /lost places etc etc.

So each gate will sense the cars and control the LED displays. but the CPU grunt work will be carried out by the Pi, which will me I am not limited by the memory on the Ardunio boards and I can also combine the data from all the Checkpoints before deciding what each LED display should show.

As long as I can do a poll all the check points at about 5-10Hz this would be fine, so each poll from the pi would be

  1. have you any news for me
  2. set your LED display to this .....

each of these are very small payloads and don't need to be real time. updating the gate 5 times a second is plenty fast enough even once a second would be OK, its really once all the cars have been though to change to show spectators what happened (some thing that can be hard when watching RC racing cars across the other side of a room / field)

Cheers for the info very useful to get an idea of what can be done :slight_smile:

Robin2:
You need to describe what you want in a lot more detail.

Normally an nRF24 talks to one other nRF24 which acknowledges the message. You can arrange for several "slaves" to listen on the same address but then you have to disable the acknowledgement process.

Using the one-to-one system you can create a hub-spoke system because each message takes very little time.

This Simple nRF24L01+ Tutorial may help.

If you can arrange for one nRF24 to act as master and poll the others in turn using the technique in my second example that will probably be the simplest system. However I recognize that it is not suitable for every situation - hence the need for more detail from you.

My link includes a link to TMRh20's RF24 library. There are other variants that add Network and a Mesh features on top of the basic library - but I have not needed to use them.

...R

DevilWAH:
The actually Idea is to have a race track with (lets image) 4 checkpoints. Each of these check points can sense the cars as they pass through and identify each one. This sensing will be done by an ardunio board, Probable an IR LED on the bottom of the car passing over a photo sensor. and i was thinking each car will flash its LED at a different rate and to could the number of pluses over a time frame to see what car is going past.

So then once it has the car ID and the time stamp it will transmit this back to a raspberry pi. the Pi will work out split times, speeds, etc etc, and then send back to the ardunio a array value that it will use to light a RGB Led strip / array on the check point. showing what order the cars passed though the checkpoint, who was fastest between the gates, who hasa made up places /lost places etc etc.

I suspect the wireless stuff will be the simplest part of this project.

As long as I can do a poll all the check points at about 5-10Hz this would be fine, so each poll from the pi would be

That should be perfectly feasible. IIRC a round-trip transmission takes less than 10 millisecs

I note that you are not planning to use the nRF24's to send a message back at the instant that a car passes a sensor to allow the timing to be done on the RPi. I don't think that would be at all feasible or any sort of consistent and precise timing. But getting several Arduinos to operate with closely synchronized timing will be a challenge. Maybe you could experiment to see if the RPi could send a time stamp that each Arduino would use to correct its millis() count.

...R

Robin2:
Maybe you could experiment to see if the RPi could send a time stamp that each Arduino would use to correct its millis() count.

...R

I was thinking that the pi would restart a counter, so when the Ardunio get polled it restarts a counting loop in millis

And when it replies it tells the PI, "this event happent X number of millis since we last spoke and this event happened Y number of Millis, etc. I am aiming for better than 1/100 second timing and no more than 1/1000. to start with 1/10 would be good :slight_smile:

I was not sure how the Ardunio could talk back immidealty as I thought the NRF24 switched back and forth between TX and RX I was not sure from the Sheets (have not got one to play with yet) how the communication stream works.

going to be fun playing around with in once they arrive :slight_smile:

DevilWAH:
I was not sure how the Ardunio could talk back immidealty

The simplest way to do that is to use the ackPayload feature as that takes care of the swap between talk and listen behind the scenes. But the data for the payload must have been loaded before the message is sent so it is necessarily one step behind.

Whatever scheme you use I think it will be best to plan for an asynchronous system in which it is not necessary for anything to happen immediately.

...R