2 NRF24L01+ with one arduino

Hi,

I would like to setup "full-duplex" communication between 2 arduino (2x Uno) with 4 NRF24L01 modules.

One NRF24 as RX and the other one as TX (on both UNOs)

My idea: (example for one arduino, N1 & N2 are two NRF24L01)

N1 & N2 MISO -> 12
N1 & N2 MOSI -> 11 => N1 and N2 are sharing MISO/MOSI/SCK pins
N1 & N2 SCK -> 13

N1 CE -> 8
N1 CSN -> 7 => CE and CSN pins are not shared
N2 CE -> 10
N2 CSN -> 11 9

Of course address and channel are going to be different on modules connected to the same arduino

Is this the correct way to wire it? If not, what is the correct way to do it? (Is it even possible?)

Thank you :slight_smile:

The CSN pin is the SPI chip select pin, so I personally would wire that to pins 10 and 9. In the Arduino SPI library, 10 is the default chip select pin so I'd stick to the same strategy.

The CE pins are chip enable pins, which seems like they just turn the radios on or off. They don't have anything to do with the SPI communications, just FYI. You can wire those to whatever digital output pin you want.

Other than that, everything else you have will work just fine. Are you familiar with using SPI (e.g. proper use of slave select, etc)?

Also, keep in mind that the NRF24LO1's require 3.3v power, but can take 5v logic inputs (as long as you supply between 2.7-3.6v).

Ok, thank you, I will give it a try :slight_smile:

JimmyFL:
N1 & N2 MISO -> 12
**N1 & N2 MOSI -> 11 ** => N1 and N2 are sharing MISO/MOSI/SCK pins
N1 & N2 SCK -> 13

N1 CE -> 8
N1 CSN -> 7 => CE and CSN pins are not shared
N2 CE -> 10
N2 CSN -> 11

Oopsie.

:fearful: :blush:
It should be N2 CSN => 9

@jimmyFL , I am struggling with 2 nrf24l01 and one arduino ...can you help me with the code ?

@jimmyFL , I solved it ...thanks anyway... I'll post the code soon for others..

JimmyFL:
I would like to setup "full-duplex" communication between 2 arduino (2x Uno) with 4 NRF24L01 modules.

Why do you need 2 pairs of nRF24s for that? I suspect you misunderstand the capabilties of the nRF24.

How many bytes per second do you need to transfer in each direction?

...R
Simple nRF24L01+ Tutorial

Can i know how you did it??

Haider_Majeed:
Can i know how you did it??

Have you studied the examples in my Tutorial and tried them out?

...R

You can do it like me :slight_smile: and it works!

Use 4 diff pins for CE and SS,
MISO, MOSI and SCK are same for all NRF24

Define two different radio canal:

RF24 radio(CE_1, SS_1);
RF24 radio2(CE_2, SS_2);

And dont forget turn off inactive NRF before if you want comunicate with one NRF24 (use SS pins)

digitalWrite(SS_2, HIGH); // turn off radio2
radio.begin();
radio.setChannel(112);
radio.openReadingPipe(0,rAddress[0]);
radio.setPALevel(RF24_PA_HIGH);
radio.startListening();

digitalWrite(SS_1, HIGH); // turn off radio1
radio2.begin();
radio2.setChannel(118);
radio2.openReadingPipe(0,rAddress[5]);
radio2.setPALevel(RF24_PA_HIGH);

In main loop:

digitalWrite(SS_2, HIGH); // turn off radio2
if (radio.available(&pipeNum))
{
Serial.println(pipeNum);
...
}

digitalWrite(SS_1, HIGH); // turn off radio1
if (radio.available(&pipeNum))
{
Serial.println(pipeNum);
...
}

JimmyFL:
Hi,

I would like to setup "full-duplex" communication between 2 arduino (2x Uno) with 4 NRF24L01 modules.

One NRF24 as RX and the other one as TX (on both UNOs)

My idea: (example for one arduino, N1 & N2 are two NRF24L01)

N1 & N2 MISO -> 12
N1 & N2 MOSI -> 11 => N1 and N2 are sharing MISO/MOSI/SCK pins
N1 & N2 SCK -> 13

N1 CE -> 8
N1 CSN -> 7 => CE and CSN pins are not shared
N2 CE -> 10
N2 CSN -> 11 9

Of course address and channel are going to be different on modules connected to the same arduino

Is this the correct way to wire it? If not, what is the correct way to do it? (Is it even possible?)

Thank you :slight_smile:

You can go ahead and play with it, but will totally fail because the transmitted RF will swamp the receiver so it cannot hear anything while the transmitter is sending.

Paul

Paul_KD7HB:
You can go ahead and play with it,

Sorry to say you are responding to a 5-year old question :slight_smile:

...R

Robin2:
Sorry to say you are responding to a 5-year old question :slight_smile:

...R

Did it again, but someone else woke it up. the same answer still applies!

Thanks, Paul