Arduino + Wiznet5001 ethernet shield + nRF24L01?

Hello,
Is it possible to use an Arduino with the Wiznet5001 ethernet shield AND the nRF24L01 2.4GHz wireless module?

I'm using this for a home automation project. The problem is the ethernet shield uses the SPI pins, as does the nRF24L01. Does the library for using the Wiznet and the nRF24L01 allow you to configure an address pin so you can have both modules connected to the SPI pins?

I'm using the nRF24L01 for serial wireless communication, similar to the ping/pong examples of its use. Alternatively, it would be a whole lot easier if I can use the nRF24L01 and connect it to the home wifi network. As far as I know, there is no library that will create a tcp/ip stack with the nRF24L01, correct? There is an Arduino wifi module, but it's super expensive.

arusr:
Does the library for using the Wiznet and the nRF24L01 allow you to configure an address pin so you can have both modules connected to the SPI pins?

A bit of both. SPI is a bus and can take several items. The Ethernet shield by its nature has a fixed select pin and it would be silly to try and change it. The NRF select could be anything that is spare. The analogue pins are usually fertile ground for this. Address pins are usually nominated in the programme.

You might consider using an Ethernet shield feeding a cheapo WiFi repeater. This is probably cheaper than a WiFi shield even if you don't already have an Ethernet shield. It is also easier to use and more reliable.

Thanks, I'll give it a try running the nRF24's on the same SPI buss.

I'm not quite sure what your intentions are. The NRFs are fine for a local; network, as you are already successfully doing, but I don't think they are up for connection to the standard WiFi network. In short, an Arduino serves as a base station for an NRF network which feeds to the WiFi network, by what ever means.

For some of the home automation systems, require at least one gateway Arduino to be on the home LAN. That I can accomplish with the ethernet shield. But I also want to add various sensor nodes. I'm hoping to be able to use the nRF24L01 for the sensor nodes, communicating with just the serial link (not full tcp/ip stack) to the gateway Arduino. So the gateway Arduino would also need to have both the Ethernet Shield and a nRF24L01.

It's all very preliminary so far, as I haven't really decided on what automation system to use. I started another thread here to try to narrow it down.

http://forum.arduino.cc/index.php?PHPSESSID=a7u1755e6rqa4n3o48fcjfjuk2&topic=225169.0

Nick_Pyner:
I'm not quite sure what your intentions are. The NRFs are fine for a local; network, as you are already successfully doing, but I don't think they are up for connection to the standard WiFi network. In short, an Arduino serves as a base station for an NRF network which feeds to the WiFi network, by what ever means.

arusr:
As far as I know, there is no library that will create a tcp/ip stack with the nRF24L01, correct?

Incorrect. The RFXduino library and gateway system does just that. (I've sent you a PM with more info.)

arusr:
So the gateway Arduino would also need to have both the Ethernet Shield and a nRF24L01.

Nick_Pyner:
In short, an Arduino serves as a base station for an NRF network which feeds to the WiFi network, by what ever means.

Yes. I'm saying what you're saying. It seems quite practical, and there will probably be something to that effect on the NRF thread Maniacbug etc. are running, which you are probably familiar with. It appears that what you want is pretty well what you already have. What is far from clear is how that Embedded Coolness stuff can meet your needs and justify the eye-watering cost.

Nick_Pyner:
What is far from clear is how that Embedded Coolness stuff can meet your needs and justify the eye-watering cost.

???

The whole point of the design of the RFXduino system is to make wifi connectivity per node very inexpensive by using nRF24L01+ modules. So what's the "eye-watering cost", or have I misunderstood what you're referring to here?

For starters arusr has the NRF24s up and running, and they were never really a problem in the first place. For seconds, he not unreasonably refers to Arduino WiFi shields as "super expensive", to wit: about $85. Further, it seems pretty clear that the whole deal can be fixed with a $15 Ethernet shield, which he may already have, and it was just a matter of understanding that the shield and NRF24 can share the SPI bus. Maybe it is me who is missing something, but the site you alluded to shows all the NRFs working to a gateway. So now is your chance to tell us all about the gateway, why anybody would need it - which is particularly unclear, and why anybody would pay $135 for it.

Nick_Pyner:
For starters arusr has the NRF24s up and running, and they were never really a problem in the first place. For seconds, he not unreasonably refers to Arduino WiFi shields as "super expensive", to wit: about $85. Further, it seems pretty clear that the whole deal can be fixed with a $15 Ethernet shield, which he may already have, and it was just a matter of understanding that the shield and NRF24 can share the SPI bus. Maybe it is me who is missing something, but the site you alluded to shows all the NRFs working to a gateway. So now is your chance to tell us all about the gateway, why anybody would need it - which is particularly unclear, and why anybody would pay $135 for it.

Nick,

Note that in my original post, I was simply responding to the question he posed regarding "is there a library that provides for TCP/IP across nRF24L10+ modules?" Which of course is exactly what the RFXduino gateway system does.

Since a single RFXduino gateway can service up to 255 Arduno nodes, the cost of wifi connectivity per node reduces very quickly as each node is deployed. You have to distribute the cost of the gateway across the number of nodes you are connecting.

Now, I agree, the system would be expensive if you were only connecting just one node, but once you get past (say) two, you are already ahead compared to something like a Wifi shield solution. So the system is aimed at people who have more than one project around the house they wish to connect to their ethernet LAN or the Internet. I have a bunch, and I am steadily adding more, and so it seemed reasonable to suspect that other people would have a similar need.

So, do the math. You can deploy a Uno-class dev board with a nRF14L01+ module for <$20 per node, all up. Or add a shield with a nRF24L10+ module on it for ~$10 to an existing Arduino compatible dev board you might want to use.

Further, the gateway system allows you to virtualise the RTC hardware and SD Card hardware, potentially reducing deployment costs further.

And the RFXduino gateway (which comprises a Raspberry Pi, the RFX daughterboard, a high power nRF24L01+ module, and the RFX SD Card) is available as a DIY kit for $60, if you have your own Raspberry Pi already, or you prefer to buy it yourself.

So most people (understandably) go for that option, as it works out $35 cheaper than the fully assembled kit if you don't want the pretty perspex case, or $20 cheaper if you do (assuming a Raspberry Pi model B is $40).

OK, so let do the math.

Example: 5 Wifi enabled Arduino projects.

How much? (Let's suppose a dev board costs $10.)

Arduino + Wifi card:

dev board cost+$85 * 5 = $95 * 5 = $475

RFXduino gateway system:

dev board cost+nRF24L01+ shield and module * 5 = $20 * 5 = $100

Add the cost of the nRF24L01+ gateway, at between $100-$135, RFXduino total cost is $200-$235.

So between $40 and $47 per node compared to $95 per node.

And further savings if you count the virtual RTC and virtual SD Card functionality.

And you can connect to secure servers (https/SSL/TLS) which is becoming increasingly important, and you can't do with a Wifi shield (or ethernet shield for that matter)!

And the price per node comes down further with every further node you add. At ten nodes you are $30-$34 per wifi connected node, which is not too eye-watering at all, I would think.

So when I claim "Simpler, more affordable, and even more powerful wireless Internet connectivity for all your Arduino projects!" -- I think I can back that up. :slight_smile:

So thanks for asking, and giving me my soapbox!

pico:

Nick_Pyner:
So now is your chance to tell us all about the gateway, why anybody would need it - which is particularly unclear, and why anybody would pay $135 for it.

Note that in my original post, I was simply responding to the question he posed regarding "is there a library that provides for TCP/IP across nRF24L10+ modules?" Which of course is exactly what the RFXduino gateway system does.

Since a single RFXduino gateway can service up to 255 Arduno nodes, the cost of wifi connectivity per node reduces very quickly as each node is deployed.

And the RFXduino gateway (which comprises a Raspberry Pi, the RFX daughterboard, a high power nRF24L01+ module, and the RFX SD Card) is available as a DIY kit for $60, if you have your own Raspberry Pi already, or you prefer to buy it yourself.

So when I claim "Simpler, more affordable, and even more powerful wireless Internet connectivity for all your Arduino projects!" -- I think I can back that up. :slight_smile:

A truly magnificent tome - but just rubbish, and it explains nothing.

The only reason why the RFX can serve up to 255 nodes is because it has the $11 high power NRF24 you have specifically referred to. You have singularly failed to explain the other $124. Said NRF24 does all the networking but neither knows nor cares what it is wired to and would be just as happy servicing the 255 nodes while connected to the Arduino + Ethernet shield which arusr already has and which is just as capable of connecting to the outside world as an RFX is. Meanwhile, at the other end of the radio links, the NRF24-equipped Aduinos are similarly and and blissfully eclectic.

I don't know why you are talking about WiFi, nobody else is - except, of course, the Embedded Coolness crowd - particularly as arusr already has NRFs up and running. Consequently, your maths are just smoke and mirrors. Further, this is an Arduino forum and I understand that arusr was asking if there was an an Arduino library "....that provides for TCP/IP across nRF24L10+ modules". This is a simple question, to which real answer is actually a simple "no", and only an RFX gateway salesman could claim that a RaspberryPi in a black box is an Arduino library and keep a straight face.

A more comprehensive answer to the question would be "No, but what you have in mind is still viable, your Ethernet shield and your NRF can live together, and you don't have to buy a WiFi shield".

Well, I've been looking into the RFXduino. You can buy what is essentially just the SD card, the RPi portion and the sketches for about $50. That's not bad considering the development that's gone into it - secure webserver, sensor node communications protocol, etc. I don't begrudge someone making a business out of it, and I don't think the price is out of line. I wish they had more videos and tutorials so I can get a better feel for how I might customize for my own use though.

More research into options is always needed. So much research, so little time :slight_smile:

Cheers, and thanks.

Nick_Pyner:
A truly magnificent tome - but just rubbish, and it explains nothing.

Well, obviously explained nothing to you, I'm sorry to see. But I tried. And I will try further.

Nick_Pyner:
The only reason why the RFX can serve up to 255 nodes is because it has the $11 high power NRF24 you have specifically referred to.

A nRF24L01+ module connected to a Raspberry Pi by itself does not broker TCP/IP connection to up to 255 Arduino nodes. Add the RFXduino protocol, and it will though.

Nick_Pyner:
You have singularly failed to explain the other $124.

Pricing is pretty transparent if you care to look. A Pi costs $40, the case $15, the BYO kit as described above is $60, and the additional assembly/packaging and postage costs for a fully assembled unit is $20.

Nick_Pyner:
I don't know why you are talking about WiFi, nobody else is -

Because wireless TCP/IP is what Wifi is, and he wanted to know if there was an Arduino library that did TCP/IP over nRF24L01+ radio links. Which there is -- with the RFX gateway system, you have to #include <Rfx_r3.h> into your sketch to give you capability to converts the nRF24L01+ to a full tream connection instead of just being a simple packet connection. It's analogous to implementing TCP over IP (UPD packets.)

Nick_Pyner:
except, of course, the Embedded Coolness crowd - particularly as arusr already has NRFs up and running. Consequently, your maths are just smoke and mirrors.

How so? it's a pretty straightforward calculation to figure out cost per node for wireless TCP/IP enabled Arduinos. If you think I've made a mistake or a bad assumption somewhere, do tell, and we can explore that.

It may or may not be a solution or approach that appeals to the OP, but the purpose of "doing the math" was to address your more general comments about relative costs.

And if he's got a bunch of nRF24L10+ enabled nodes, there's no reason in principle why he can't put them through the RFXduino gateway system (after compiling in the RFX libs to his sketches, of course), if that fits his ultimate HA goals better.

Nick_Pyner:
Further, this is an Arduino forum and I understand that arusr was asking if there was an an Arduino library "....that provides for TCP/IP across nRF24L10+ modules". This is a simple question, to which real answer is actually a simple "no",

If you mean "can the Arduino nodes speak TCP/IP directly to eachother, without going through the gateway", then fair enough, if that was the question, then the answer is "no".

But if that was the question, then the question really doesn't make a lot of sense, because why would you want to? The reason you do TCP/IP is to get onto ethernet/Internet. So TCP/IP directly between nodes as a protocol would simply be way overkill.

Nick_Pyner:
and only an RFX gateway salesman

And proud of it! :wink:

Nick_Pyner:
could claim that a RaspberryPi in a black box is an Arduino library and keep a straight face.

There is an Arduino library that compiles on each and every node that wants to connect to the gateway via an nRF14L01+ module. No library, no TCP/IP -- sorry. Then therre is a program running on the gateway (RPi) that handles brokering the connections from the nRF24L01+ to the outside world.

As for "black box", not sure what you're getting at here -- the source code is provided for both the Arduino-side library and the Raspberry-Pi side gateway programs (which is mostly C++, a bit of shell.) So the system is hackable and quite suitable for custom integrations (e.g., a guy in Sweden is using the gateway to integrate his HA system based on a product called "MLServer", which I hadn't heard of. But I told him if it speaks TCP/IP, it can be integrated. Which he's done.)

Licensing details are on the web site.

Nick_Pyner:
A more comprehensive answer to the question would be "No, but what you have in mind is still viable, your Ethernet shield and your NRF can live together, and you don't have to buy a WiFi shield".

Look Nick, obviously you are aggrieved somehow about the pricing of the RFX TCP/IP gateway system for Arduinos, and I'm sorry about that -- your comments suggest I may need to a better job of explaining things on the web site. But at the end of the day, no system is going to suit everyone, and the RFX gateway system is part of the diverse range of options out there. I get a few enquiries and sales from people here on the Arduino forums, and I'm pleased to report they are mostly satisfied customers -- I try. And if I see a comment like "As far as I know, there is no library that will create a tcp/ip stack with the nRF24L01, correct?" crop up in thread, I am going to be sorely pressed not to reply, as I hope you might understand.

pico:

Nick_Pyner:
and only an RFX gateway salesman

And proud of it! :wink:

Now we know............

arusr:
I wish they had more videos and tutorials so I can get a better feel for how I might customize for my own use though.

Noted, and a fair criticism. I have been trying to address this in part by putting a some complete demo projects up as example of what can be done and how you can do it (just posted the first of these recently). Videos would be good, but video production is not really my forte. No excuse not to have a go, though.

arusr:
More research into options is always needed. So much research, so little time :slight_smile:

Cheers, and thanks

Thanks for comments. Sorry about the thread hijack. BTW, the PM I sent you I put the info the format so you could include it in your "Home Automation Systems List - what's out there" thread.

Edit: I see you already have.

Nick_Pyner:

pico:

Nick_Pyner:
and only an RFX gateway salesman

And proud of it! :wink:

Now we know............

And also wrote the code, designed the hardware, and developed and maintain the web site. And proud of that too! (well, maybe the web site could be better.... but graphic design has never been a forte.)

So now we've got that all demystified... carry on. :wink:

I have been using the Embedded Coolness for about a month now, and I have to say it was well worth the money for me. I was up and running with a network of arduinos all with internet access in a short amount of time. This system allowed me a lot more time to focus on my project development instead of spending time on the comm infrastructure and internet connectivity. And, the stability has been great so far!

I have found a site that combines the Eithernet shield and a NRF24L01 board complete with connections, libraries and sketches

http://shanes.net/how-to-use-an-nrf24l01-rf24-with-an-arduino-ethernet-shield/

I have the setup running with the shield and the NRF board connected. I just have to get another NRF board setup

John