Ethernet and nRF24LO1+ Working together?

I'm trying to get together a project that will take weather data (humid, temp, light) from different areas of my house inside and out. I have no real conflict with the nodes ( 4 in total). They will simply be ATmega328 with only what I need broken out to read the three sensors and talk with the nRF24 radio (very much like the one shown here only with two additional sensors).

I want the nodes to all talk to one parent UNO, which will have a nRF24 radio, data log with a ds1307 RTC and SD (cs on pin 4) and post the last received sensor data to the web.

Will there be a conflict with the radio and the ethernet?

The ethernet is going to use DP10 (SS), DP11 (MOSI), DP12 (MISO), DP13 (SCK)...

The radio uses CE=DP8, CSN=DP7, SCK=13, MOSI=11, MISO=12.
http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo

I know that there is some talk about the nRF24 radio and ethernet in a few threads but there does not seem to be much info if someone got this to work.

Thanks in advance.

-Rob

I have that working, using ENC28J60. The only tricky piece is the SPI bus parameters. RF24 sets them to MSBFIRST, MODE0, SPI_CLOCK_DIV4 every time you interact with the radio. If the Ethernet library needs different parameters, and doesn't set them itself, there could be problems. I've been meaning to tune RF24 to be nicer about the SPI bus parameters, and happy to do it now if you run into problems.

I'll have to look into what the ethernet needs. I was going to use the standard library for the ethernet and I'm not sure what the call out.

maniacbug,

Where did you get the board for the sensor node project? I noticed that you said it was $1.00, did you have them made?

I was going to use an IC based proto pcb a local electronics store carries but yours looks much smaller and professional.

I checked all of the cpp and h files associated with the ethernet lib including the w5100 files. I did not see any pin assignments. So if I understand the problem, The nRF24 is going to reassign the SPI pins each time it's called and because the ethernet does not reassign them for itself, it will not work. I thought that the wiznet was special because some of the software functionality was encoded in to the hardware, no?

RobDrizzle:
Where did you get the board for the sensor node project? I noticed that you said it was $1.00, did you have them made?

Can you be more specific? Which board?

Oh do you mean the board referenced on Getting Started with nRF24L01+ on Arduino? It's from iTeadStudio. There's a link right to it in the post! Double Side ProtoBoard 5cm * 7cm

RobDrizzle:
I checked all of the cpp and h files associated with the ethernet lib including the w5100 files. I did not see any pin assignments. So if I understand the problem, The nRF24 is going to reassign the SPI pins each time it's called and because the ethernet does not reassign them for itself, it will not work. I thought that the wiznet was special because some of the software functionality was encoded in to the hardware, no?

No no, RF24 does not change any pin assignments. It alters the SPI parameters. They are named in my earlier post.

It's true that the wiznet has the TCP/IP stack in hardware, which makes it much easier to use, but that fact is not relevant for what we're talking about here. You should just try it. Like I said, I have a fix in mind anyway, if there are problems.

maniacbug:

RobDrizzle:
Where did you get the board for the sensor node project? I noticed that you said it was $1.00, did you have them made?

Can you be more specific? Which board?

Oh do you mean the board referenced on Getting Started with nRF24L01+ on Arduino? It's from iTeadStudio. There's a link right to it in the post! Double Side ProtoBoard 5cm * 7cm

Sorry about the confusion, I was asking about the PCB for this project.

I am very interested in making a project like this for myself, only with 3 nodes and a base rather than your army of nodes. Once I get the boards built, I may be bugging you for more details. :wink:

RobDrizzle:
Sorry about the confusion, I was asking about the PCB for this project.

Low-Power Wireless Sensor Node | maniacbug

I am very interested in making a project like this for myself, only with 3 nodes and a base rather than your army of nodes. Once I get the boards built, I may be bugging you for more details. :wink:

Ah, yes... I had that PCB made using iTeadStudio's PCB service. They will make 10 copies of a design that size for about $10. The PCB I designed myself. You are welcome to use it or modify it, just please be sure to abide by the terms of the CC BY-NC-SA license.

Good luck!

^^Thank you for this and rest assured that I will be respectful of your hard work and effort!!

I was able to download your board file and get it to spit out some gerber files. This is my first time using eagle and the blasted drill layer would not line up!!! After some reading and tinkering I got it to work, it ended up being that the "pos coordinates" check box in the cam processing was buggering everything up.

I would like to take this a step further and report humidity also. You were keen enough to break out a few extra inputs so I don't think I will need to change the board. I am also going to run the node with 2 AAA batteries rather than the coin cell to increase longevity and because the project box enclosure that I will be using will have enough space.

maniacbug:
I have that working, using ENC28J60. The only tricky piece is the SPI bus parameters. RF24 sets them to MSBFIRST, MODE0, SPI_CLOCK_DIV4 every time you interact with the radio. If the Ethernet library needs different parameters, and doesn't set them itself, there could be problems. I've been meaning to tune RF24 to be nicer about the SPI bus parameters, and happy to do it now if you run into problems.

Hi!

I have tried everything I can, and finally find this. But, I have no idea how to use this information to make these work together.
ENC28J60 works fine, but when RF-module is called, that's it.
Running out of hope with this combination....

Any hints, where to look for more knowledge? Thanks!

Cheers,
Kari

maniacbug:
I have that working, using ENC28J60. The only tricky piece is the SPI bus parameters.

I am looking at doing more or less the same thing as RobDrizzle but I have been obliged to put off my foray into NRF24. Is this a (potential) problem with the W5100 Ethernet too? I didn't realise there could be a conflict.

nRF24L01 works fine with Ethernet Shield with W5100, but using that instead on small ENC28J60-module would be... cheating...?
:wink:

I made this http://www.instructables.com/id/A-credit-card-sized-Ethernet-Arduino-compatable-co/ and I want to use it too.

Well, someday I will understand the problem better, googling googling googling...

Cheers,
Kari

Works beatifully, at least one direction!

I tried this, added it before and after calling nRF;

void SwitchRfEth()
{
  //Switch ethernet's CS pin state
  digitalWrite(10, !digitalRead(10));
  //Switch radio's CS pin state
  digitalWrite(8, !digitalRead(8));
}

Thanks!!!

Cheers,
Kari

GaryP:
nRF24L01 works fine with Ethernet Shield with W5100, but using that instead on small ENC28J60-module would be... cheating...?
:wink:

God I hope not. I don't want to be changing horses at this stage...

what is the end of this story, still not working and I face the same problem. How could the producer think to make two devices using same SPI in a world of open hardware arduino thinking maybe that we will never use together. How we do this to work together?

I participated in this old thread but I never pursued the NRF. I nonetheless think it was much ado about nothing. More than one item can share the SPI bus, that is what makes the SDPI bus a bus. Drizzle already had separate pins for the device selection, so whatever problem there was, was somewhere else, and any reference to the ENC28J60 was just a red herring.