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)...
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.
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 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:
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.
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.
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.
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.
^^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!
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.
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.