Two nRFL24's on one processor - but different

I have two Receiver radios ( on different frequencies) I wish to connect to a single Arduino -I can do this by switching each with the CE line.
But because I can have simulataneous events, and its important I timely capture these, I wanted 2 frequencies and to use the IRQ pin of the nRFL24s to signal it has received a message , capture that, then at a later instance "turn the radios on" to clear the messages ( message content is not important).
( I have tried a single receiver , different pipes and using ACK to resend any lost signals ( from overlap) -but it gets messy/slow when I have to work out which transmitter to ACK ( if I just ACK both , then signals again get lost)).

BUT .....if CE is not set then the interrupt for the corresponding radio receiver does not signal when I send a message to it.

I would like to use the two radios and one Arduino is there any other way I can switch them whilst keeping them both active? (MISO, MOSi, SCK are all paralleled). Two buses ??

Hope that makes some sense - image the project as two people having pushbuttons and I want to see who presses first , but capture the fact both are pressed.

Any time you have two transceivers near to each other, when one transmits, the RF will block the other receiver from receiving anything but the first transmitter. Makes no difference if they are hundreds of megahertz apart in frequency.

Only the receivers are close to one another, ACK will be off

By design, ALL nRFL24s are trensceivers. TRFM

Yes but you can stop them transmitting or stop them receiving using standard library commands as you wish ( it can’t send and receive at the same time for example ) …I will try them next to each other tho to be sure .
meanwhile …,,Any idea how to solve my request ?

I wonder if it is to do with the CE & CSN signals. Looking at my nRF24L01 datasheet, it says in the pin functions table that CSN is the SPI chip select signal.

The wording for the CE signal is "Chip Enable Activates RX or TX mode". Further on in the Data and Control Interface chapter it says "CE (this signal is active high and used to activate the chip in RX or TX mode)". That does suggest that the radio could be disabled (i.e. not see an incoming message) if CE is set incorrectly.

Off the top of my head I would have thought it would have been the CSN line, but equally everything i've typed could be wrong - need more caffeine ....

2 Likes

Thx - something to try there - not helped by the different names used for all the pins :rofl:

That is true, but has no bearing on your design. The nRFL24 sends a message and expects an ack. If none received in the alloted time, it will send again and again, until a limit is reached. So, there is no guarantee your receiver will tell you it received a message on the first try or even the second try, etc.

ACK can be turned off so the receiver doesn’t reply , and the transmitter not look for one so that’s not an issue - got that covered .

Any ideas for my initial request …

Think of a wireless FM microphone with two NE555 tone generators as input, not a mike. On the receive end, one matching FM receiver with two tone detection ICs tuned to the two tones from the microphone. Your Arduino can monitor the output of the tone detector chips and determine when both are on and which one came on first.

One transmitter. One receiver. So no blocking, no nothing except the two tones.

I don't think the Arduino can talk and listen at the same time. :wink:

Sorry but this is a bit tiresome - read the posts .

There is no radio conflict or talking and listening at the same time !!
It’s nothing like a FM transmitter sending two tones ( pipes ?) as said simultaneous transmit ion can cause a clash and nothing getting through

I need a way to switch in and out two receivers to the Arduino without switching the receiver off , so it’s IRQ still responds . I’m looking for input on that side , ignore the rest .
It’s a a SPI coms issue nothing more

Think might have sorted this now - have gone for an ATtiny 85 to handle each receiver, keep the SPI bus going etc - each radio on a different frequency ( 20 ch apart) and each with ACK turned off for the pipe in use.
The receivers are 3cm apart and no issues with signals getting through ( as they only receive).
On each transmitter I send the "data" 5 times ( with 1mS delay) to improve chances of it getting through as ACK is not being used.
The IRQ pins of the nRFL24's are used to signal to a further processor that something has been received and this is used for timing the input .

  • If ACK is enabled , then disabled for the pipe being used, the IRQ signal from the Radio is still present.

I did look at software SPI to give two buses on one processor .. but didn't go for it to save a bit of learning.

I would expect this is the real solution of your problem. You did not try it?

I have a workable solution, but yes that is worth a look and could be a lot better - I had tried with CE .
I’ll give it a go - just need the IRQ output to work when coms is switched off .

Thank you

I've got some nRF24L01 modules in the post to me (didn't have enough working ones). Once they arrive, i'll try connecting 2 of then up to an UNO and see if they can both generate IRQs when messages are received.

1 Like

Hi @markd833, @Smajdalf

I have just tried switching the CSN line - with it held high IRQ signals are still generated , so that looks like the answer I was looking for.

thx !!!!

Great news! Just to clarify, are you now using the CSN line as the SPI slave select signal?

I had a look through the source code to the library I have, and it looks like a call to startListening() sets the CE pin high, and a call to stopListening() sets the CE pin low.

That would tie in with the datasheet so that CE high = Activates RX or TX mode.

CE is also driven low when when powerDown() is called. That makes sense as you would want to turn off the module receiver to save battery power.

@markd833

almost....
I have setup two receivers and two transmitters one set on ch 100 , the other on ch 120.
I have just taken the CSN pin from the nRFL24 and conmnected it to VCC and noted the IRQ line still drops when the tranmission is active , I have left CE where it was.
Also checked that the IRQ doesn't drop when the wrong channel is in use .

I've not been switching messages/SPI from the Arduino side (thats next) - think in the spi library I can make two instances for devices, but unsure how to turn off the CSN line to each.

For my application the payload is not of interest , so after starting up both nRFL24's I will turn off ( >Vcc) both CSN lines.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.