NRF24L01+ 2.4gHz communication

Please add any feature requests for Flowcode version 6 here

Moderator: Benj

Forum rules
Only feature requests will be considered here. General questions should not be posted in this forum.
MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by MJU »

Benj wrote:Looks like I need to rig up a working circuit so I can sign off the code.

Here are the updated examples using the latest component with the address in place. Fingers crossed this works. If not then let me know and I will try and do some further tests here.
nRF24L01_TX.fcfx
nRF24L01_RX.fcfx
Thinking about it I have been misdirected by the Arduino code, setting the address as 5 individual bytes would be much easier then passing in an array!
I have flashed these charts into a PIC 16F877A.
Connected the modules onto them (with 3.3V power and the 5V tolerant to the PIC's).

For some reason I suspect the RX Flowchart from being faulty.
I've put LCD messages into the different steps to get feedback from the PIC to where the error occurs.
After the initialise I get a number 83 as an acknowledge back, so this means the module is initialised properly?
In the branch where no message is received I've put a message "No radio" but he never displays this message.
The program always follows the branch where the data is available.
Also when I switch off the TX module.

So I guess there is something wrong with the "Available" function?
BenJ, does this Flowchart work over there?

When I started the TX-module I saw that some features dimmed, so in my opinion this means that the TX module uses a lot of current, so this one works?

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by MJU »

Bump..

Maybe if I find the time this weekend, I will read the datasheet and will hook up my logic analyser.
Did someone have a go with this component already?

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by dazz »

HI Mju
Had a try as per last message, had a few things on display such as init dataready and read variable but got random results also found that if module disconnected still showed on display as initiated etc, so not sure if its my radio modules as well as the component, will try to link both via arduino to see if my radios are ok but so busy this will be in a few days. will have another look at the data sheet but my head is so fried at present it looks like the datasheet was written in Martian. (i dont think benj has forgotten more that he and other staff are rushed of their feet at present)
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by MJU »

I read on other forums that the modules have a problem with the power supply.
I've soldered some capacitors over the power connections on the board to get them working but this didn't help.
Even the Arduino sketches on this page ( http://arduino-info.wikispaces.com/Nrf2 ... 4GHz-HowTo ) don't work..

Strange

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by MJU »

Still hoping someone can check this new component.
So I can see if the problem occurs only here with me?

fernandosartorelli
Posts: 7
Joined: Wed Sep 18, 2013 11:15 pm
Location: Argentina
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by fernandosartorelli »

Hello, sorry for my English . Probe component and the receiver was checked, when you start the reception does not work but the clock.
I currently have the RF24 connected to Arduino to manage the libraries Maniac and I manage them via RS232 .
regards

djicke
Posts: 2
Joined: Wed Apr 29, 2015 10:54 pm
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by djicke »

Hi all,
I am new on this forum.
I am student in electronics and carry a project for school, in France.
For this project, I have to drive two RF2401 (Rx and Tx) modules through Flowcode.
I have followed with best attention your exchanges and have been very happy to read this all.
I thank you all about this.
However,I have some issues and would appreciate your suggestions.
I assembled the hardware (Arduino Uno + RF2401 module) and tried your code proposals.
The whole does compile immediately, which is great.
Then, the code is locked juste after the RF2401 initialize command.
Would anyone have experienced this and have understood what I should do to overcome this ?
Buy the way, I should mention that I didn't pay attention to the Fsel connection, which I do not understand the functionality. It might come from this, but I do not know what to connect on this...
Thank you for you advices if any.

Regards

djicke
Posts: 2
Joined: Wed Apr 29, 2015 10:54 pm
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by djicke »

Hi every one,
After some further tests, it comes out that probably my hw setup is faulty, since some step do pass randomly.
I expect some poor power supply and/or connections, that I'm going to check.
I come back when I'm done with this.
However, reading the different comments, it seems that there are some issues with the library.
Does anyone know how to create a cfpx library ? I could then try on my own...
Thx
regards

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by MJU »

I have finally made the NRF24L01 to work without the previous problems... the only thing is that the Flowcode component doesn't work.

I've overcome the power problems and the NRF's are working without problems if I use a Arduino library.
The distance the radio's work is quite good so I really want to use them with Flowcode.

I've altered the charts BenJ made ( http://www.matrixtsl.com/mmforums/viewt ... 536#p67361 ) and off course used his last component but I can't seem to get the TX and the RX communicating.
For testing purpose I use the Flowcharts BenJ posted, but instead of using a LCD I send data via RS232 (and read it back with a serial monitor) on a computer.
I've put a test before initialisation of the NRF component to be sure the serial data is received well, and this works.

I have the TX send data and try to read it back with the RX.
After putting back my Arduino sketch onto the Arduino it works well again.

Both modules have the same pipe address..

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by MJU »

Yesterday evening I tried following..

Both sender and receiver use a Arduino sketch, both same Pipe address. => This works.
Next: sender the Flowcode chart with the same Pipe address as the above = Don't work
Then: sender the Arduino sketch, receiver with RS232 with the Flowcode chart = Don't work..

In the last example the initialisation of the NRF24L01+ doesn't return anything (not any number)..

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by MJU »

I have found some problems with the NRF24L01 component that is ready to be released.

I have made my own working NRF24L01 Flowchart from scratch by using the SPI component.
With this I made sure my TX and RX are both working.
By checking the MM component I found soms problems with this last one.

- First problem: the flowcode component has a "FSEL" connection, what is this?
The datasheet for the chip doesn't mention any "FSEL" pin.
Is this the IRQ pin??

- I have looked at the MM component initialisation with a logic analyser and found this setup:
  • Write SETUP_RETR 01001111
    Read RF_SETUP 11111111
    Write RF_SETUP 00000111
    Read RF_SETUP 11111111
    Write RF_SETUP 00100111
    Read RF_SETUP 11111111
    Read RF_SETUP 11111111
    Write RF_SETUP 00000111
    Read RF_SETUP 11111111
    Read CONFIG 11111111
    Write CONFIG 00001100
    Write DYNPD 00000000
    Write STATUS 01110000
    Write RF_CH 01001100
    RX flush
    TX flush
    Write CONFIG 00010001
    Write TX_ADDR 00010001
    Write RX_PW_P0 00100000
The READ_RF is issued several times, but why?
The Write CONFIG 00010001 is wrong (just before Write TX_ADDR), this must become: WRITE_RX (so 0x2A instead of 0x20).
The component sets the TX address the same value as the RX address for data pipe 0, I don't see anything in the datasheet if this is allowed (the reset values are different for these).

Because the error in the set write address, the config register is set to the first byte of the RX address, this way the module is confused.
The 0x20 must be 0x2A followed by the 5 bytes of RX address..

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by Benj »

Hello,

Here is the component source if you want to have a play. I'm not sure about the FSEL pin I either got it from my module pin out or from the Arduino example code.

As you say it doesn't seem to be used anywhere so we can probably get rid of it.
nRF24L01.fcfx
(79.26 KiB) Downloaded 426 times

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by MJU »

I've been reading the code for the component, but this is out of my league.

I find a few 0X20 in the code, but I can't see what it does.
My programming skills are worse than my tenaciousness to get this chip working.

Anyone else that wants to play with it? :D

TedO
Posts: 79
Joined: Sat Mar 14, 2015 7:52 am
Has thanked: 46 times
Been thanked: 26 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by TedO »

I am currently playing around with Benj's programs posted above.

As I am still a novice and do not understand all the terminologies etc, please forgive my dumb questions :oops: . Can someone kindly assist me in the following:

In the component macro of the NRF24L01 there is a "FSEL" that is connected to Port C.1 The radio modules that I have purchased have all the SPI connectors on the PCB as per the component macro, however, there is an IRQ which I understand to be an Interrupt request pin, is this the same as the FSEl function or not? What does the FSEL stand for?

Thanks :D
Ted

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: NRF24L01+ 2.4gHz communication

Post by Benj »

Hi Ted,

It looks like the FSEL pin is the IRQ pin. I copied the name from the original Arduino library. I don't think it is actually used in the code.

Post Reply