Go Down

Topic: Can't get nRF24L01 working (Read 4 times) previous topic - next topic

CyberBob

Hi

I need help please. I have just bought a couple of nRF24L01 (compatable) transceivers and have installed all the various libraries that are suggested on various sites. I have tried the usual tests (Poor Mans' Scanner, amongst many others) but I still get meaningless data on the serial monitor.

I followed the pinout at http://arduino-info.wikispaces.com/Nrf24L01-Poor+Man%27s+2.4+GHz+Scanner but all I get is output like this -
K°¾*ø0p

I'm using an Uno so the wiring shouldn't be a problem, though I suspect the problem might be with the modules themselves.

Any pointers would be appreciated

Thanks


CyberBob

Sorry for putting this in the Storage section, it should have gone into Networking

Simpson_Jr

Do you, at least, get these lines on your monitor ?

"Starting Poor Man's Wireless 2.4GHz Scanner ..." and
">      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <"

If not, check the baud-rate you're using, it should be 57600 baud.
The wiring of the pins did cause some problems over here by the way.
I don't remember whether it was this scanner-sketch or another, every
channel checked showed  intensive transmissions while only a few people in my
neighbourhood use WIFI.

Some of the sketches of different nRF24L01-programmers also use
different arduino-pins for the signals CE and SS, you may have to adjust those
on your arduino or in the sketches used.



matchy

Try the library:
http://maniacbug.wordpress.com/2011/11/02/getting-started-rf24/

Code: [Select]

// nRF24L01+ Active Test
#include <SPI.h>
#include <RF24.h>
#include "printf.h"
#define RF_CS 9
#define RF_CSN 7
RF24 radio(RF_CS, RF_CSN);
void setup() {
Serial.begin(9600);
printf_begin();
radio.begin();
radio.printDetails();
}
void loop() {

}


Positive sample output:
Code: [Select]

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 = 0x00 0x00 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0c
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_HIGH


Negative sample output:
Code: [Select]

STATUS = 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0
RX_ADDR_P0-1 = 0xe7e7e7e7e7 0xffffffffff
RX_ADDR_P2-5 = 0xc3 0xff 0xff 0xc6
TX_ADDR = 0xe7e7e7e7e7
RX_PW_P0-6 = 0x00 0x00 0x00 0x00 0x00 0x00
EN_AA = 0x00
EN_RXADDR = 0x00
RF_CH = 0x00
RF_SETUP = 0x00
CONFIG = 0x0c
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01
CRC Length = Disabled
PA Power = PA_MIN


JohnHoward

I hope you observed the fact the nRF24L01 is a 3.3v device and powered it off the 3v3  pin!

The pingpair example is a good one to start with.  Easy to set up and get it going. 

I second the other poster that the serial port speed would seem to be set wrong.  If the nRF24L01 is not working right, you'll still typically see all zeros or all ones from the .printDetails() when it is called.

The first one I ever tried to wire up, I got mixed up about which way the pins were designated vis a vis the diagram I was referring to.  Be sure you recheck that carefully.

On the plus side, I actually applied power to the wrong pins a couple times at the outset and the little buggers survived.

Go Up