This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf24l01+ multiceiver with three transmitters

I am trying to setup a multiceiver scenario with the nrf24l01+ with three transmitters (PTX1,PTX2 and PTX3) and one receiver (PRX) with enhanced shockburst but I am having trouble getting PTX3 to work. I am using the cheap nrf24 modules from ebay.

The closest existing question that I could find was this but even having solved for that addressing issue has not solved my problem.

My receiver (PRX) is configured as follows:

RX address 0:E7,E7,E7,E7,E7,
RX address 1:C2,C2,C2,C2,C2,
RX address 2:C3
RX address 3:C4
RX address 4:C5
RX address 5:C6
EN_AA:3F (0b00111111)
EN_RXADDR:3F (0b00111111)

Note that:

  • I have purposefully chosen the chip defaults to make sure my addressing wasn't the problem
  • I have ensured that I have only clocked in 1 byte into RX_ADDR_P[2345] and read out only 1 byte to ensure that I have the addresses correct
  • EN_AA : Enhanced shock burst is turned all for all 6 pipes (I am only using 3 however)
  • EX_RXADDR : All data pipes have been enabled

My first transmitter (PTX1) is configured as follows:

TX_ADDR:E7,E7,E7,E7,E7
RX address 0:E7,E7,E7,E7,E7
EN_AA:3F (0b00111111)
EN_RXADDR:3F (0b00111111)

My second transmitter (PTX2) is configured as follows:

TX_ADDR:C2,C2,C2,C2,C2
RX address 0:C2,C2,C2,C2,C2
EN_AA:3F (0b00111111)
EN_RXADDR:3F (0b00111111)

My first and second transmitter have no issues communicating with PRX.

My third transmitter (PTX3) is configured as follows:

TX_ADDR:C2,C2,C2,C2,C3
RX address 0:C2,C2,C2,C2,C3
EN_AA:3F (0b00111111)
EN_RXADDR:3F (0b00111111)

Note that:

  • I ensured that all 5 address bytes are clocked into TX_ADDR and RX_ADDR_0
  • TX_ADDR is equal to RX_ADDR for this receiver (as it should be)

For whatever reason, PTX3 is not able to communicate with PRX. The sending fails and even after 15 retries it is not able to send and gives up.

I have checked the following:

  • It is not faulty hardware/wiring on PTX3. I did this by flashing the code on PTX3 to behave like PTX1 and PTX2 and it was able to send successfully to PRX. Thus my guess is that I have not configured something properly on the nrf module associated with PTX3.
  • From the specification all I can see is that I need to make sure that EN_AA and EN_RXADDR are properly set (which I believe they are on PRX3) and that TX_ADDR is equal to RX_ADDR_P0 on PRX3 (which again I have setup).

I am clueless how to proceed. Any pointers would be much appreciated.

  • I don't think you are far off, so I would ask you to change the value of the last byte to something like:

    RX address 0:E7,E7,E7,E7,E7,
    RX address 1:C2,C2,C2,C2,C2,
    RX address 2:D3
    RX address 3:E4
    RX address 4:F5
    RX address 5:A6
    

    The last byte have to unique, and using 0xCx would be too similar. May I ask you to try these values and report back?

  • Thanks for your response. Just tried this but unfortunately it did not work. Config listed below.

    PTX3 still fails to send to PRX.

    I also powered off PTX1 and PTX2 while doing this to make sure there could be no other interference from other transmitters, but again, no success.

    I also tried flashing PTX3 to behave like PTX4, again, no luck.

    PRX config :

    RX address 0:E7,E7,E7,E7,E7,
    RX address 1:C2,C2,C2,C2,C2,
    RX address 2:D3,
    RX address 3:E4,
    RX address 4:F5,
    RX address 5:A6,
    EN_AA:3F,
    EN_RXADDR:3F,
    

    PTX3 config:

    TX_ADDR:C2,C2,C2,C2,D3
    RX address 0:C2,C2,C2,C2,D3
    EN_AA:3F
    EN_RXADDR:3F
    
  • Just to make sure, could you use and oscilloscope on the VDD_PA pin on the PTX3. This pin will go up to 1.8 V during transmission. So it should toggle up and down as you send packages if everything is working correctly with the board.

    Make sure you enter the address the correct way. Is it possible that you are writing the with LSB and MSB switched? Then the PTX1 and PTX2 would still work as intended, but PTX3 would fail. Your line of thought seems to be correct. Could you read out the setting after as well to make sure that they are actually as expected.

  • Sorry for the late response - I actually ended up buying an oscilloscope which I have been meaning to do for some time.

    I checked VDD_PA and it does go up to 1.8 (anywhere from 1.84V-1.88V) right before transmission on PTX3.

    I double checked PTX1 and PTX2 as well, and they are also going to up 1.8V before transmission.

    So all is well with PTX3 sending. I will check your ideas around address LSB/MSB now.

  • With respect to LSB/MSB byte addressing, I checked the way that SPI was transferring in data for command and data and it looks ok to me. Reading back out the RX_ADDR_P2 register on PRX confirms this is the case. I've uploaded the code here for your reference: github.com/.../rf24. I

    PRX config:

    RX_ADDR_P0:E7,E7,E7,E7,E7
    RX_ADDR_P1:C2,C2,C2,C2,C2
    RX_ADDR_P2:D3
    RX_ADDR_P3:E4
    RX_ADDR_P4:F5
    RX_ADDR_P5:A6
    RF_CH:00000010
    EN_AA:00111111
    EN_RXADDR:00111111
    STATUS:00001110
    CONFIG:00001011
    RF_SETUP:00100000
    

    PTX3 config:

    TX_ADDR:C2,C2,C2,C2,D3
    RX_ADDR_P0:C2,C2,C2,C2,D3
    RF_CH:00000010
    EN_AA:00111111
    EN_RXADDR:00111111
    STATUS:00001110
    CONFIG:00001011
    RF_SETUP:00100000
    About to send!
    > Message is lost ...
    
Related