Problem with the nRF24l01 module. first time using it

so i bought 2 PA/LNA nRF24l01 modules off of amazon and i tried testing whether they work or not. i have a single arduino so i tried testing them one by one. AND both of them give "weird" values. I've rechecked my wirings multiple time, but still either i get this:-

SPI Speedz	= 4 Mhz
STATUS		= 0xff RX_DR=1 TX_DS=1 MAX_RT=1 RX_P_NO=7 TX_FULL=1
RX_ADDR_P0-1	= 0xffffffffff 0xffffffffff
RX_ADDR_P2-5	= 0xff 0xff 0xff 0xff
TX_ADDR		= 0xffffffffff
RX_PW_P0-6	= 0xff 0xff 0xff 0xff 0xff 0xff
EN_AA		= 0xff
EN_RXADDR	= 0xff
RF_CH		= 0xff
RF_SETUP	= 0xff
CONFIG		= 0xff
DYNPD/FEATURE	= 0xff 0xff
Data Rate	= 1 MBPS
Model		= nRF24L01+
CRC Length	= 16 bits
PA Power	= PA_MAX
ARC		= 15

or i get this message (if i hold the arduino connections firmly) :-

SPI Speedz	= 4 Mhz
STATUS		= 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0
RX_ADDR_P0-1	= 0x0000000000 0x0000000000
RX_ADDR_P2-5	= 0x00 0x00 0x00 0x00
TX_ADDR		= 0x0000000000
RX_PW_P0-6	= 0x00 0x00 0x00 0x00 0x00 0x00
EN_AA		= 0x00
EN_RXADDR	= 0x00
RF_CH		= 0x00
RF_SETUP	= 0x00
CONFIG		= 0x00
DYNPD/FEATURE	= 0x00 0x00
Data Rate	= 1 MBPS
Model		= nRF24L01+
CRC Length	= Disabled
PA Power	= PA_MIN
ARC		= 0

so what's the problem? ive always plugged the VCC to 3.3v of my arduino uno. could it be power related? the arduino is connected to my laptop during compiling and uploading.

Welcome to the forum

How exactly did you test the modules when you only have one Arduino ? What sketch were you using ?

The modules are very power hungry and need to be fed with a suitable power supply. It is common practice to put a large value capacitor across the power connections of the modules or even better to use something like this 2 Pieces Adapter For Module Wireless NRF24L01 +2,4Ghz Card Arduino 8025702023913 | eBay

1 Like

I didnt use the example in the library, i used this code right here:-

On this site, the first code(sorry I am using mobile rn)

Oh also, i am using the adapters, i forgot to mention. Should i still add a 100uf cap?

An extra capacitor should not be necessary when using the adapter but VCC on the adapter should go to 5V on the Arduino. The adapter has an on board 3.3V regulator

Oooh ok, ill try that and see what happens. Are you sure it wont fry the board? This is the adapter i have


And where is the antenna for the nRF?

Yes. As I said, the adapter has its own on board regulator.

Do you have an antenna for the board ?

Yes, i have the regular antenna that comes with the module, and a larger antenna which os about 6 inches in height

I have it i just removed it beacause i was going to keep them away for now

I assume that you are testing them with an antenna attached

Have you tried powering the adapter with 5V ?

1 Like

Try this simple program, it tests that the NRF24L01 can be accessed via the SPI bus. No RX or TX is done so there are no special requirements fo the power supply. Its a standalone program so no NRF24L01 library is needed.

/*******************************************************************************************************
  Program Operation - This program is stand alone, it is not necessary to install a NRF2401 library.
  Connect the SPI SCK, MOSI and MISO pins as normal.
  
  The program checks that the NRF2401 can be written to and read from over the SPI bus. To read a
  register its first necessary to write the address across the SPI interface.

  The contents of the NRF2401 registers from 0x00 to 0x19 are read and printed to the serial monitor.
  If the connections are OK then the printout should look like something like this;

  57_NRF24L01_Is_It_There ?

  Print registers 0x00 to 0x1F
  Reg    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  0x00  00 3F 02 03 5F 4C 27 42 00 00 E7 52 C3 C4 C5 C6
  0x10  E7 00 20 00 00 00 00 12 00 00

  Note that this is just a 'is it there' type check, the CE pin is not used or needed for this simple check.
  If the device is faulty, not present or wired incorrectly the register contents will likely be all 00s or
  FFs. The program makes no attempt to turn on the RF transmitter or receiver so there are no special
  requirements for the power supply.

  Serial monitor baud rate is set at 9600.
*******************************************************************************************************/

#include <SPI.h>

#define CSN_PIN 10                     //this is the pin used for the NRF2401 CSN pin

#define CMD_R_REGISTER      0x00
#define CMD_W_REGISTER      0x20


void loop()
{
  Serial.println(F("Print registers 0x00 to 0x19"));
  printRegisters(0, 0x19);
  Serial.println();
  delay(5000);
}


void printRegisters(uint16_t Start, uint16_t End)
{
  uint16_t Loopv1, Loopv2, endLoopv2, RegCount, RegData;

  RegCount = End - Start + 1;
  Serial.print(F("Printing "));
  Serial.print(RegCount);
  Serial.println(F(" registers"));
  Serial.println();

  Serial.print(F("Reg    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F"));
  Serial.println();

  for (Loopv1 = Start; Loopv1 <= End;)           //32 lines
  {
    Serial.print(F("0x"));
    if (Loopv1 < 0x10)
    {
      Serial.print(F("0"));
    }
    Serial.print((Loopv1), HEX);                 //print the register number
    Serial.print(F("  "));

    if (RegCount < 16)
    {
      endLoopv2 = RegCount - 1;
    }
    else
    {
      endLoopv2 = 15;
    }

    for (Loopv2 = 0; Loopv2 <= endLoopv2; Loopv2++)
    {
      RegData = readRegister(Loopv1);
      RegCount--;

      if (RegData < 0x10)
      {
        Serial.print(F("0"));
      }
      Serial.print(RegData, HEX);                //print the register number
      Serial.print(F(" "));
      Loopv1++;
    }
    Serial.println();
  }
}


uint8_t readRegister(uint8_t reg)
{
  uint8_t result;

  digitalWrite(CSN_PIN, LOW);
  SPI.transfer(CMD_R_REGISTER | reg);
  result = SPI.transfer(0xff);
  digitalWrite(CSN_PIN, HIGH);
  return result;
}


void setup()
{
  Serial.begin(9600);
  pinMode(CSN_PIN, OUTPUT);
  Serial.println();
  Serial.println(F("57_NRF24L01_Is_It_There ?"));
  Serial.println();
  SPI.begin();
}
1 Like

i did just now, im still getting this:-

STATUS		= 0xff RX_DR=1 TX_DS=1 MAX_RT=1 RX_P_NO=7 TX_FULL=1
RX_ADDR_P0-1	= 0x7f7e7f4f10 0xffffffffff
RX_ADDR_P2-5	= 0xff 0xff 0x7f 0x00
TX_ADDR		= 0xffffffff7f
RX_PW_P0-6	= 0xff 0x7f 0xff 0x7f 0xff 0x7f
EN_AA		= 0xff
EN_RXADDR	= 0x7f
RF_CH		= 0xff
RF_SETUP	= 0x00
CONFIG		= 0x7f
DYNPD/FEATURE	= 0x7f 0xff
Data Rate	= 1 MBPS
Model		= nRF24L01+
CRC Length	= 16 bits
PA Power	= PA_MAX
ARC		= 15

i tried this code too, this is what i got :-

57_NRF24L01_Is_It_There ?

Print registers 0x00 to 0x19
Printing 26 registers

Reg    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
0x00  7F FF 7F FF 7F FF 7F FF 7F FF 7F FF 7F FF 7F FF 
0x10  7F FF 7F FF 7F FF 7F FF 7F FF 

Print registers 0x00 to 0x19
Printing 26 registers

Reg    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
0x00  7F FF 7F FF 7F FF 7F FF 7F FF 7F FF 7F FF 7F FF 
0x10  7F FF 7F FF 7F FF 7F FF 7F FF 

Print registers 0x00 to 0x19
Printing 26 registers

Reg    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
0x00  7F FF 7F FF 7F FF 7F FF 7F FF 7F FF 7F FF 7F FF 
0x10  7F FF 7F FF 7F FF 7F FF 7F FF

when i changed the VCC to 3.3V i got this instead:-

57_NRF24L01_Is_It_There ?

Print registers 0x00 to 0x19
Printing 26 registers

Reg    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
0x00  00 38 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 
0x10  00 00 00 00 00 00 00 00 00 00 

Print registers 0x00 to 0x19
Printing 26 registers

Reg    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
0x00  00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 
0x10  00 00 00 00 00 00 00 00 00 00 

Print registers 0x00 to 0x19
Printing 26 registers

i should mention that holding the arduino side jumper wire ends made the output change a bit, my arduino UNO is a bit old, but it works fine, could it be some sort of hidden connection issue?

How are you powering the adapter board during the latest tests ?

well the nrf24l01 with the adapter is connected to arduino UNO which for now is only connected to my laptop. although you told me to use VCC 5v, so i put the VCC pin to 5V

Not good. The basics of an SPI interface are not working.

So either the modules are faulty or your Arduino or wiring is.

hmm, ive ordered some new wires, ill try using those and see what happens. i dont think the arduino ports are faulty case those digital pins do work. if even with new wires, its still bad that means the nrf modules are faulty. btw this happened with both the modules

personally, this has left a bad impression of nrf on me, ive been scratching my head on this for 3 days now.

i was going to make a Tank using the nrf modules for a project. should i just settle on using NodeMCU instead of arduino + nrf. or buy new nrf modules?

I dont use 5V Arduinos these days, such as UNO or Nano, since most all modules; RF,Sensor,Display, GPS etc are natively 3.3V logic.

Its so much easier if the 3.3V logic modules you are using directly match the power supply and logic level of the Arduino you are using.