nrf24l01+ horrible performance

I am in a kinda-domotic project and i am trying nrf24l01+ antennas, using arduino nano Atmega328P.

Using “RF24.h”

The main problem i found is reliability, about 10% of packets fail to reach destination, even using radio.setRetries(15, 15).

Other problem i have found is speed, tested with included examples, the average is 4kb/s being 11kb/s the maximum, and 0.21kb/s not rare.

Using radiohead <RH_NRF24.h>

The library works, but only with a certain pin combination for ce, csn. Even typing the correct one, only works using the default (8,7). And loses packets too.

Any idea of what am i doing wrong?
Or are this antennas as lousy as this?

Thanks in advance.

#-----------------RF24 code------------------------
RF24 mySwitch(7, 8);
mySwitch.begin();
mySwitch.setDataRate(RF24_1MBPS);//RF24_250KBPS || RF24_1MBPS
mySwitch.setPALevel(RF24_PA_HIGH);
mySwitch.setCRCLength(RF24_CRC_8);//RF24_CRC_16,RF24_CRC_8
mySwitch.setRetries(15, 15);
mySwitch.setChannel(81);
mySwitch.openWritingPipe(addresses[0]);
mySwitch.openReadingPipe(1, addresses[1]);

	
void sendCode(unsigned long codi) {
  //mySwitch.write( &codi, sizeof(codi) );              // Send the final one back.
  mySwitch.stopListening();                                        // First, stop listening so we can talk
  mySwitch.writeFast(&codi, sizeof(codi));
  mySwitch.txStandBy(1000);
  mySwitch.startListening();                                       // Now, resume listening so we catch the next packet
}

# Receiving via:
if (mySwitch.available()) {

i am trying nrf24l01+ antennas

With or without the radios?

Any idea of what am i doing wrong?

You only posted part of your code, so I'm only posting part of the answer.

You need to.

If you are using the high power nRF24s with external antennas then you need a good 3.3v power supply. And I suspect a Nano may not have enough 3.3v power even for the low-power nRf24 with a PCB antenna.

Over what range do you want the nRF24s to communicate?

Have a look at this Simple nRF24L01+ Tutorial.

The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work

...R

The current theory totally makes sense, it seems the 3.3v out from arduino comes from the usb-serial chip :o :confused: , therefore, the max current is not enough.

Just bought some 1117 voltage regulators, will try today.

Thanks!! :slight_smile: :slight_smile: