Due to the results of my previous post (Slower nRF24L01 round trip delay than expected) I found out that it will be quite difficult to reach my latency requirements.
I am thinking about using my own protocol (instead of the 6-1 Multiceiver protocol), but that would involve getting some kind of 'clocked' receive and send times for devices, which will not make it simple probably. The time to change from reading to writing is less than expected (startListening takes max 350 us and stopListening 450 us). However, if I need to do this ever 5 ms and making sure no devices are reading/sending to others, that's quite a bit of downtime.
So I was thinking, would it be a good (or stupid) idea to use TWO nRF24L01's per Arduino, one by default in reading mode, the other on writing mode (thus having bidirectional communication) and using two different channels. This means I never have to switch between reading and writing and can read/write simultaneously without message colliding.
(note: later I want to use multiple Arduinos and one STM32 device).
Does anyone see problems in this idea?
Requirement goals:
- Latency: less than 10 ms to send it from device A to B, process it (excluded, takes a few ms) and send back from B to A (or in some cases B to C). Less than 10 ms is better.
- Amount of messages: can be theoretically hundreds per second, in practice max 100 (from various devices, but all go through a processor-device).
- Payload per message: 16 bytes probably, most are shorter, some are longer but I can split or combine them if needed.
- Range: about 10 meters max, but in a music/band stage environments
- Channels: I will not use the WIFI channels, but a range of others, also (professional) wireless mics do not work on 2.4 GHz, so I don't expect too many problems.
About channels: I don't expect any problems. I should have enough channels between 2.484 and 2.525 GHz. This gives me about 40 channels for 1 mbps or 20channels for 2 mbps to chose from.
- sources:
- 2.484 GHz: WIFI Channels, first table with red/green items
- 2.525 GHz: Datasheet, paragraph 6.3.