I'm having trouble setting up a radio connection using two NRF24L01+PA+LNA modules. I'm using adapters that allow me to power the modules with 5V. I connected one module to an Arduino Uno and the other to a Nano.
I have tried following various tutorials, but I haven't been able to get them to work. I found Robin2's post and tried the SimpleTx and SimpleRx examples, but I still haven't had any success.
If anyone could provide some guidance, I would really appreciate it.
In Robin2's tutorial, in reply #30, there is a sketch to check the connection between the radio module and its controlling processor. Did you run that sketch on each module? What were the results?
How are the modules powered? Ptobably 80% of the problems with rf24 modules is lack of sufficient current, especially with the high power modules.
CheckConnection Starting
FIRST WITH THE DEFAULT ADDRESSES after power on
Note that RF24 does NOT reset when Arduino resets - only when power is removed
If the numbers are mostly 0x00 or 0xff it means that the Arduino is not
communicating with the nRF24
SPI Speedz = 10 Mhz
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xe7e7e7e7e7 0x4141417852
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xe7e7e7e7e7
RX_PW_P0-6 = 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0e
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1 MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MAX
ARC = 0
AND NOW WITH ADDRESS AAAxR 0x41 41 41 78 52 ON P1
and 250KBPS data rate
SPI Speedz = 10 Mhz
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xe7e7e7e7e7 0x4141417852
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xe7e7e7e7e7
RX_PW_P0-6 = 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x27
CONFIG = 0x0e
DYNPD/FEATURE = 0x00 0x00
Data Rate = 250 KBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MAX
ARC = 0
Here is the result for the receiver (Uno):
CheckConnection Starting
FIRST WITH THE DEFAULT ADDRESSES after power on
Note that RF24 does NOT reset when Arduino resets - only when power is removed
If the numbers are mostly 0x00 or 0xff it means that the Arduino is not
communicating with the nRF24
SPI Speedz = 10 Mhz
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xe7e7e7e7e7 0xc2c2c2c2c2
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xe7e7e7e7e7
RX_PW_P0-6 = 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0e
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1 MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MAX
ARC = 0
AND NOW WITH ADDRESS AAAxR 0x41 41 41 78 52 ON P1
and 250KBPS data rate
SPI Speedz = 10 Mhz
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xe7e7e7e7e7 0x4141417852
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xe7e7e7e7e7
RX_PW_P0-6 = 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x27
CONFIG = 0x0e
DYNPD/FEATURE = 0x00 0x00
Data Rate = 250 KBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MAX
ARC = 0
By the way, I was wondering why the printPrettyDetails method is not used in Robin2's CheckConnection code?
I have no idea. I would say to ask Robin2, but, unfortunately, they don't seem to watch the forum any more.
I use home made versions of those adapters on my rf24 projects with good success. So power should be OK.
Have you tried moving the modules farther apart? The high powered modules may mot work if too close together. Move them a few meters apart and reduce their output power (PA_MIN) for testing.
I connected the receiver to a computer for the serial output. I then powered on the transmitter and started walking away, but the receiver didn't receive anything.
I tried using a 12V 2A wall power adapter connected to the breadboard module in the transmitter circuit (Nano). I tried moving the Tx and Rx a few meters apart but the wall adapter made no difference.
Out of curiosity, why are 9V batteries not compatible? Voltage? Current?
Not in the slightest. The radio draws high currents when transmitting. That happens so quickly that no DMM will see the true value. You can try a 2 AA cell battery pack.
80% of problems with the rf24 radios can be traced to lack of current capability of the power supply. Until you have a robust enough power supply, there is not much point in trying anything else.
A 10uF to 100uF cap attached to the radio as close as possible to the power supply input on the module can help.
The adapters can help if the supply to the adapter can provide the current. You can't connect a 9V battery that to an adapter and expect it to magically make up for the poor current capability of the battery.
I loaded this code onto my Uno and had the SimpleTx sketch on my Nano. I messed around with channels and I could clearly tell that the Scanner was picking up on The Tx (Nano)!
Throughout all of this I was powering the circuits via USB ports on my computer.