Intermittent failure of NRF24L01+ as Receiver

Would appreciate comment or insight on this.

I have two NRF24L01+ with Atmega2560 using pin (7,8) and pin (9,10) as ce and csn with RF24 library. The test software based on the example 'Transfer' of the library.

There were two separate transmitters, A and B.

When only A or only B was on, they worked fine.

When BOTH transmitter A and B were on, after random period of a few hours, the receiver stopped receiving from either A or B, but still ok with the remaining transmitter.

Press reset button on the receiver and it was back to normal.

It seems very strange to have two nRF24s on one Arduino. Their transmissions may interfere with each other unless you are careful to use them one at a time. And if you do that you can probably achieve all you want with a single device.

Without seeing your program and information about the devices they are communicating with what more can I say.

...R
Simple nRF24L01+ Tutorial

Dual receiver was due to throughput issue.

For the above reported intermittent case,

  1. Channel for two transmitters were far away, at low and high end.
  2. Four NRF24 were 6 inches, 18 and 36 inches apart.
  3. Two transmitters and ACK from receivers are non sync, so, transmission can jam into each other while different channel did provide some degree of protection.

I just re-arranged four NRF24 to be within 3 inches of each other. It has been running fine for a short time now.

Will see if the same random error within a few hours, would repeat

Appreciate comment, insight and experience on how these figures translate into real life performance.

How well is its selectivity, subjected to front end overloading from a near by transmitter?

The receiving Atmega2560 has two NRF24L01+ with antenna 4 to 6 inches apart and PA_MAX.

The ACK from one NRF24 will jam into receiver of the other NRF24. Channels set set to tens of MHz apart hoping to minimize the jamming effect.

Specification 1.0 Sept 2008, seems reasonably good on paper, C/I Nth ACS C/I, fi > 25MHz -60 dBc

Don't split your question about one problem over multiple Threads. It just wastes everyone's time.

I am suggesting to the Moderator to merge them.

...R

Sorry just sign up for this forum. Not know the rules.

Re-test showed same issue after a few hours running AFTER re-arranging four NRF24L01+ within 4 inches, instead of, 6 inches, 18 and 36 inches apart before.

Appreciate insight and comment.

Here is the core part of the code. It is Atmega2560 on Arduino 1.8.1 and RF24 library
Transmitter send 3 packets of 32 bytes each. Wait until 33ms time mark, repeat.
Receiver loop read data, process and reformat and dump out through serial port.
Both transmitter on vastly different rf channel and different radio_1.setRetries(11,2) and (2,2)

#include <SPI.h>
#include "RF24.h"
#include "printf.h"
#include <EEPROM.h>
Rf_data_buf_struct rf_data_buf;
RF24 radio_1(9,10);
RF24 radio_0(7,8); // Set up nRF24L01 radio on SPI bus plus pins 7ce & 8csn
const uint64_t pipes[4] = { 0xABCDABCD71LL, 0x544d52687CLL, 0x544d52688CLL, 0x544d52689CLL };

void setup(void) {
Serial.begin(230400);
printf_begin();

radio_0.begin(); // Setup and configure rf radio
radio_0.setChannel(read_ch0); //60);
radio_0.setPALevel(RF24_PA_MAX);
radio_0.setDataRate(RF24_250KBPS);
radio_0.setAutoAck(1); // Ensure autoACK is enabled
radio_0.setRetries(2,2); // Optionally, increase the delay between retries & # of retries
radio_0.setCRCLength(RF24_CRC_8); // Use 8-bit CRC for performance
radio_0.openWritingPipe(pipes[0]);
radio_0.openReadingPipe(1,pipes[1]);
radio_0.startListening(); // Start listening
radio_0.printDetails(); // Dump the configuration of the rf unit for debugging
radio_0.powerUp(); //Power up the radio

radio_1.begin(); // Setup and configure rf radio
radio_1.setChannel(read_ch1);
radio_1.setPALevel(RF24_PA_MAX);
radio_1.setDataRate(RF24_250KBPS);
radio_1.setAutoAck(1);
radio_1.setRetries(11,2); // Optionally, increase the delay between retries & # of retries
radio_1.setCRCLength(RF24_CRC_8); // Use 8-bit CRC for performance
radio_1.openWritingPipe(pipes[2]);
radio_1.openReadingPipe(1,pipes[3]);
radio_1.startListening(); // Start listening
radio_1.printDetails(); // Dump the configuration of the rf unit for debugging
radio_1.powerUp(); //Power up the radio
Serial.println(" Radio power up");
}

void dump_data0(){
Serial.print(rf_data0_0.w, 4);
Serial.println(F(" "));
//..... etc
}

void loop(void){
while (radio_0.available()){
radio_0.read( &rf_data_buf, sizeof(rf_data_buf)); //rf receive buffer
process_reformat();
dump_data0();
}
while (radio_1.available()){
radio_1.read( &rf_data_buf, sizeof(rf_data_buf)); //rf receive buffer
process_reformat();
dump_data1();
}
}

I wonder if the pipe were right for the ACK. Here is dump

STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xabcdabcd71 0x544d52687c
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xabcdabcd71
RX_PW_P0-6 = 0x20 0x20 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x02
RF_CH = 0x03
RF_SETUP = 0x27
CONFIG = 0x0b
DYNPD/FEATURE = 0x00 0x00
Data Rate = 250KBPS
Model = nRF24L01+
CRC Length = 8 bits
PA Power = PA_MAX
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0x544d52688c 0x544d52689c
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0x544d52688c
RX_PW_P0-6 = 0x20 0x20 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x02
RF_CH = 0x64
RF_SETUP = 0x27
CONFIG = 0x0b
DYNPD/FEATURE = 0x00 0x00
Data Rate = 250KBPS
Model = nRF24L01+
CRC Length = 8 bits
PA Power = PA_MAX
Radio power up

Does it work indefinitely if only one nRF24 is connected to the Mega?

Does it matter which one?

...R

For over night tests, one transmitter was ok. Test with either transmitter was ok.

Data was observed on log file, when BOTH transmitters were on, error happened in a few hours, says 4 hours or so.

Could it be some software variable overflow? (a few hours, but, seem a bit random on the error time)

Could it be some rare hardware / software conditions that happens rarely in coincidence in time?
Says, when two transmitters happen to transmit with n ms (keep MCU busy) while the arduino was handling extra workload, like the timer interrupt and also the RF chip happens to do retry re-transmission? So, the chance of 'several event happening at the same time' was one chance in a few hours (60 packet per seconds)

john328:
Could it be some software variable overflow? (a few hours, but, seem a bit random on the error time)

Maybe you could test that by running the code for the two nRF24s but with only one of them connected.

Are you quite sure you can't "improve" your code so as to get all the performance you need with a single nRF24? The need for two of them implies that a 16MHz Mega can significantly out perform them. I find that hard to believe.

...R

For one RF24L01P on the receiver, does all RF24L01P need to be on same RF channel?

Any pointer to post and information on how to sync two transmitter so that they do not transmit at the same time OR let them collide occasionally and let the RF24 chip do auto re-transmission

Any point to example on interrupt driven software using the RF24 chip interrupt pin?

Referring to Reply #12

  1. you can change channels in software

  2. if the two TXs are on the same Arduino it should be easy. If they are on different Arduinos I doubt if it is possible - unless you treat them as slaves that only respond when the Master calls them

  3. I haven't done that - I have never needed it. I wonder would it be any advantage?

...R