I am performing communication between two arduinos using the RF24 library (RF24: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver - thanks maniacbug!) and nrf24l01+ radios.
I am using an arduino Uno as TX and an arduino Leonardo as RX.
The communication between the arduinos is working fine, however, when I insert an Ethernet shield (Ethernet Shield V1.0 | Seeed Studio Wiki) in the arduino Uno, the messages cannot be sent anymore.
The nrf24l01 radio in the UNO is connected in the pins: 6,7,10,11,12 and 13.
I initalize the RF24 library like this:
RF24 radio(6,7);
I am not sure, but I think that the problem is related to the ICSP pins, which are used by both nrf24l01+ radios and the ethernet shield.
In order to try to avoid such problem, I started the RF24 library in the UNO using pins 6 and 7, which are not used by the ethernet shield. However, the problem still remains.
ps: the ethernet shield was not initialized in any moment.
Do you guys have any clue how to make RF24 library (using nrf24l01+ radios) work in the arduino UNO with ethernet shield?
Hi SurferTim... thank you so much for your hint, and sorry for the delay to answer the message.
I tried to do what you said, but the radios could not communicate between them yet.
As you said that I could have problems with the power supply, I plugged the 3.3v and GRD pins of the radio in another arduino just to use another power supply, but I still faced the same problem.
I cannot understand why even setting the port D10 and D4 to HIGH I could not have the radios working.
I have added a 10uf electrolytic across the 3.3v input to the nRF24l01, which cured my problem using those two devices together. It would work some but eventually would always quit. They just seem to be very delicate.
Hello! I have used these around 1 year no problems
Having following Arduino (clone) 1280 <--> NRF24L01:
51: MOSI
GND: GND
52: SCK
50: MISO
48: CE
49: CSN
3V: VCC
GND: GND
Pin6 is connected to 433Mhz transmitter
Pin22 has thermometers (2pcs)
w5100 network board is normally attached to default pins of 1280, not yet any other problems than this is slow...
But I have problems with 433Mhz receiver:
Pin5 is connected to 433Mhz receiver (not used but just connected, sometimes Arduino hangs), receiver is 5v.
Also tried to connect 433Mhz receiver to Pin2 (interrupt 0), but same not good results. So not using receiver currently,just transmitter
Edit: oh, I noticed now you are using UNO, not mega
I've found people saying that used the nrf24l01 radio + rf24 library with ethernet shield, but it is hard to believe, since I've been trying all suggestions but with no success.
The only thing that I have in mind now is that I can try another library other than the RF24 that does not use the ICSP pins.
I am not using the pin 4. Another user just suggested me to set pin 4 as HIGH in order to disable the SDcard of the shield. (by the way, my shield does not have sdcard embeeded)
I am using the pins 6 and 7 for CE and CSN pins.
I am sure I am not wiring the nrf14l01 incorrectly, because everything works ok when I do not plug the ethernet shield.
So, the scenario is the following:
When I have my arduino UNO only with the nrf24l01 connected in the ports 6, 7 (for CE and CSN), 11,12 and 13, everything works fine.
But when I plug the ethernet shield, the radio stops working.
In my tests, I did not change the sketch, so I do not initialize the ethernet shield, I just plug the shield... nothing else.
Do you used any trick to make the shield and the radios working together? (e.g., using some capacitor with the radio, or setting port 10 as HIGH).
"One little catch is with Ethernet shields based on the Wiznet W5100 chipset, which includes the official Ethernet shield and many third-party shields. The W5100 has a design flaw that causes it to maintain control of the SPI bus even when another device has been selected, making it very tricky to combine the official Ethernet shield with other shields that use SPI."
My next test needs to be using an official arduino ethernet shield. (currently, I am using the Seeed Studio Ethernet Shield v1.1.)
"One little catch is with Ethernet shields based on the Wiznet W5100 chipset, which includes the official Ethernet shield and many third-party shields. The W5100 has a design flaw that causes it to maintain control of the SPI bus even when another device has been selected, making it very tricky to combine the official Ethernet shield with other shields that use SPI."
That is not true. It works well with other SPI devices. I use it a lot with the SD card. The major problem is not disabling all SPI devices before starting the begin() functions for those devices.
currently, I am using the Seeed Studio Ethernet Shield v1.1.
Hi SuferTim, seems like you are the specialist
I have the same problems. Without the 5100 it works fine. Clear settings on the nRF24L01. Exactly as I set them.
If I plug in the ethernet card, that works fine. But the nRf24L01 sends out garbled output from its registers.
STATUS = 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0
RX_ADDR_P0-1 = 0x0000000080 0x1111112188
RX_ADDR_P2-5 = 0x00 0xff 0xff 0xff
TX_ADDR = 0xffffffffff
RX_PW_P0-6 = 0x00 0x00 0x00 0x80 0x00 0x00
EN_AA = 0x00
EN_RXADDR = 0xff
RF_CH = 0xff
RF_SETUP = 0x00
CONFIG = 0x00
DYNPD/FEATURE = 0x80 0x00
Data Rate = 1MBPS
Model = nRF24L01
CRC Length = 16 bits
PA Power = PA_MIN
Barry Emons demo
server is at 192.168.0.200
I measured the voltage on the 3.3V with my fluke and it showed an exact 3.3V. I I'll try a scope tomorrow. But it is strange.
Seems like I had to move the CSN pin to pin 53. I thought I could use any pin for CSN and CE. Put (on my Mega2560) CE on pin 40, and CSN on pin 53. and got it working.
Getting the right response etc.
So up to the next challenge connect up to 25 or more devices to 1 sender/receiver.
If you tried other pins for the CSN pin and it didn't work, then you move it to the default slave select pin for the Mega and it does work, that would appear to be a bug in the RF24 library. The CSN pin should work on about any digital pin. ??
edit: Let me change that earlier statement so it is correct.
"One little catch is with Ethernet RF24 shields based on the Wiznet W5100 RF24 chipset, which includes the official Ethernet shield and many third-party shields. The W5100 RF24 has a design library flaw that causes it to maintain control of the SPI bus even when another device has been selected, making it very tricky to combine the official Ethernet shield RF24 with other shields that use SPI."
Hi Tim
I still have to recheck with CSN on another pin. If so, it would certainly help. A software bug is easier to fix than a hardware one
In my current setup I have a mega2560 with the W5100 ethernet and a nRF24L01+ as motherstation. 2 Uno's each with a nRF24L01+. The all share the same address for reading and another for writing. In the message I send, there is a device ID so that the right device can respond and it works great
Now time to build an app in Appcelerator to replace the webbrowser