How to avoid data collision in a network of NRF devices where only 2 NRF want to communicate with each other and others dont get this data ?

Hello,

We are using NRF24L01 as a transreceiver. We have a network of NRF devices operating individually and we want one NRF to communicate only with its respective NRF. However the data collision happens during this. The NRFs in the network also receives this data despite keeping the different frequency.

We cant have multiple frequencies for our every product.

So, is there any way to avoid data collision / interference so that only 2 desired NRF will communicate with each other and other NRF devices in the network wpn't get that data ??

Thanks and Regards ,

Harshal

 

Parents
  • Hi Harshal, 

    Do you use any protocol with the nRF24L01 ? For example Enhanced Shock Burst ? 
    How do you configure the address ? 
    Could you show how exactly you configure different channels for each pair of devices ? When the channels are close to each other they can leak but I don't think they would if the channel band a far away from each other. 

  • Yes, we are using Enhanced Shock Burst.

    Also, the channels are close to each other i.e. all the NRF devices in the network are operating very close to each other.

    We configure different channels for each pair of devices from the microcontroller side via its firmware. 

  • Hi Harshal, 

    I think you are confusing the address and the frequency/channel. 
    Here is what I can find in the nRF24L01+ specification: 


    Please tell us how you configure the address, not the channel. 

  • Hello Mr. Hung,

    1. The receiving address is configured using the RX_ADDR_P1 register (since we use data pipe 1) and sending address is configured using the TX_ADDR register. Also, RX_ADDR_P0 is set equal to the sending address for the Auto Acknowledgment to work.

    2.  We haven't configured the SETUP_AW register for address width setting but the Tx as well as Rx address is unique with the address length as 5 Bytes.

    3. We haven't set up the receiver (the other NRF in the pair of 2) as the PRX (Primary Receiver). Both the NRFs in the pair are configured as PTX only.  So, do we need to set up the the other NRF in the pair as the PRX or its okay to keep it as PTX ?

    4. Our application does not require NRFs to be in MultiCeiver mode; only one to one communication is needed withing the pair of 2 NRF devices where multiple such pairs of different frequency channel are present in the network.   

    5. To have unique address is to have unique sending and receiving address for every device ?

    Thanks and Regards !!

    Harshal

  • Hi Harshal, 

    I'm not so sure if you setup both devices as PTX, how would they managed to receive data from the peer ? 
    Also could you clarify that each pair has their own unique address ? And you don't use the same address on different pairs ? 
    You can either have unique address for each device, or at least should have unique address for each pair. 

  • Hello,

    No, each pair doesn't have unique address. Actually, the same address is being used for all the NRF devices in every pair. Its because we intend to establish a bidirectional communication.

    So, we need to have :-

    1. One NRF configured as PTX and the other as PRX from the pair of two.

    2.  Unique addresses for all the NRF devices.

    Also, the way we have configured the addresses as I mentioned in the point 1 and 2 from the last message; is it appropriate ?

    Thanks and Regards,

    Harshal 

  • Hi Harshal, 


    Harshal Kadlak said:

    So, we need to have :-

    1. One NRF configured as PTX and the other as PRX from the pair of two.

    2.  Unique addresses for all the NRF devices.

    Yes both are correct. 

    Regarding your point 1 and 2:

    Harshal Kadlak said:
    1. The receiving address is configured using the RX_ADDR_P1 register (since we use data pipe 1) and sending address is configured using the TX_ADDR register. Also, RX_ADDR_P0 is set equal to the sending address for the Auto Acknowledgment to work.

    This is fine. I assume you set RX_ADDR_P0 on the PTX to the same as TX_ADDR. This is correct. 

    On the PRX , I don't know why you want to use pipe 1 instead of pipe 0 , but that's also OK. 

    Harshal Kadlak said:
    2.  We haven't configured the SETUP_AW register for address width setting but the Tx as well as Rx address is unique with the address length as 5 Bytes.

    Yes, I assume you leave it untouched and the value of SETUP_AW is 11 - 5 bytes.

Reply
  • Hi Harshal, 


    Harshal Kadlak said:

    So, we need to have :-

    1. One NRF configured as PTX and the other as PRX from the pair of two.

    2.  Unique addresses for all the NRF devices.

    Yes both are correct. 

    Regarding your point 1 and 2:

    Harshal Kadlak said:
    1. The receiving address is configured using the RX_ADDR_P1 register (since we use data pipe 1) and sending address is configured using the TX_ADDR register. Also, RX_ADDR_P0 is set equal to the sending address for the Auto Acknowledgment to work.

    This is fine. I assume you set RX_ADDR_P0 on the PTX to the same as TX_ADDR. This is correct. 

    On the PRX , I don't know why you want to use pipe 1 instead of pipe 0 , but that's also OK. 

    Harshal Kadlak said:
    2.  We haven't configured the SETUP_AW register for address width setting but the Tx as well as Rx address is unique with the address length as 5 Bytes.

    Yes, I assume you leave it untouched and the value of SETUP_AW is 11 - 5 bytes.

Children
  • Thanks Mr. Hung,

    In our application, the transmitters in every pair can be exchanged or shuffled with any other receiver to form a pair so how do we maintain the communication where no cross talk will happen and we will have the portability of any transmitter communicating only with its respective receiver. 

  • Hi Harshal, 


    Could you please explain how the PTX supposed to be changed and shuffled to other receiver. 


    How do you pair them together, and how you "unpair" the PTX with PRX to switch to new PRX ? I mean physically how do you decide a PTX should be talking to a certain PRX ? 

  • In our application, there are several pairs of NRF devices where 1 NRF in the pair acts as PTX and the other as PRX. The PRX of all the pairs are fixed / immovable / attached to the machines itself. Whereas, the PTX, can be connected and disconnected physically to the machines so that it will come in the range of PRX and communication will start between them.

    So what we need is any PTX from any pair when connected to any machine having a PRX attached shall communicate with it. The PRX will be provided the address of the PTX which is supposed to be connected to that PRX.

    For every new PTX connecting to a particular PRX, we provide its address to the PRX which is constant. 

  • Hi Harshal, 

    Could you explain what exactly happens when TX " connected to any machine having a PRX ". I assume you meant physically connect ? What kind of connection ? Is it UART/SPI/I2C/GPIO? 

    If you have a way to send the address of the PRX to the PTX , for example via UART or via keyboard. Then the PTX can just simply start using the new address. 

  • Application :-

    The machine has an arm. The PTX NRF along with its controlling MCU (communicating via SPI) are mounted on a device that physically connects to the machine's arm.

    Such machines are in various numbers and so are the connecting devices.

    All the PRX are mounted on the machine side while all the PTX are on the connecting devices' side.

    If a connecting device is connected to the machine's arm, the PTX starts sending the data; currently we've configured all the PTX and the PRX to the same sending and receiving addresses.

    Problem :-

    So when the connected PTX wants to send the data to the PRX of the machine it is connected to, the data is received by the other machines' PRX as well since all the machines (PRX) are having the same address.

    OR

    When the PRX wants to send data to its respective PTX NRF (the one which is physically connected to the machine's am), then the other nearby PTX devices (which are connected to their respective machines' arm) also receive this data because all the PTX have the same address too.

    This is where the cross-talk is happening.    

Related