Another Room Automation project

Hi,
I need some opinion about a project i have in my mind - Automating my room
What i have in my is, create some nodes (custom arduino pcb with NRF24L01) and connect each to different things like lamps, sockets, existing arduino rfid door lock, tv, etc.
And have a master node that sends/receives to each of those nodes, and is also able to communicate with the outside (internet) so i can use any android mobile to control my room.
My main question is how that master node(custom made pcb) would be and i thought of some different approaches:
Master node with ethernet shield and nrf24l01 chip together (dunno if thats possible) i know that nrf24l01 uses pins 9,10,11(MOSI),12(MISO),13 (SCK) could that be a problem using ethernet shield with it ?
Master node with nrf24l01 and connected to existing pc via serial connection (having a webserver at my pc, and send commands via serial to arduino)
Any other better solution?

Have you looked at the XBee stuff? Cost seems comparable, but the XBee seems allot more functional especially the series 2 stuff with mesh network ability.

Xbee is out of question... i can build a mesh network with nrf24 which price is like $2 per chip, xbee is a lot more expensive.
I just need opinion about how would be the master node, with ethernet shield and nrf24 chip or just the nrf24 chip and connected to computer (always on, of course) with webserver etc. Or if there's any better option to do it

afremont:
Have you looked at the XBee stuff? Cost seems comparable,

An XBee costs about ten times as much as an NRF24L01+.

I just got a quick cost estimate from Olimex' prototype boards and they ran in $20+ range which is what the XBee modules cost. I really think this is a case where you get what you pay for, especially if going with series 2 and a mesh network. Implementing your own self-healing mesh network is no trivial matter. And then there is transmission range.

Range is no problem for nrf24 since it's going to be a mesh network in a room.
I will make my own pcb's, not sending them.
Xbee module here in portugal is about 35€
NRF24l01 is about 2€
forget about xbee, that's not my point here.

The NRF24l01 looks interesting, but I don't think I've see anyone interface these with an arduino. Have you already gotten that part worked out already?

zoomkat:
The NRF24l01 looks interesting, but I don't think I've see anyone interface these with an arduino. Have you already gotten that part worked out already?

There are two commonly used NRF24l01+ libraries for point-to-point communication, and there's also a mesh network library for it.

Yes, there are some interesting examples out there.
One that i'm looking at is NRF24L01 arduino by maniacbug.

i know that nrf24l01 uses pins 9,10,11(MOSI),12(MISO),13 (SCK) could that be a problem using ethernet shield with it ?

This pin assignment depends only upon whatever shield you are using, and isn't absolutely
cast in concrete. You can always use something other than pins 9,10 for CS/whatever,
and then modify 2 lines in the software.

@ oric_dan , about pins 9 and 10 i know i can change them in the library file... my main question is if it'll be a problem when using nrf240 and ethernet shield and obviously how should i make the pcb so that i can just connected the ethernet shield above it.

Yeah, if you're going to make your own custom pcb with the NRF2401 on it, and want to
use the same pcb for mounting the ethernet shield, there may be some blockage of RF
transmissions, especially if the NRF2401 has a pcb antenna. However, that should only be a
problem for your host node, as I assume the remotes won't mount ethernet shields.

One solution is to mount the NRF2401 way out on the edge, similar to maniacbug's picture,
but that's pretty cumbersome for all your remote boards. I would say mount the NRF2401
inboard, and test the system. If the host node has problems, then use an extension cable
to move the NRF2401 a few inches away from the board.

Alternatively, you could just use a regular Arduino UNO board for the host, with ethernet
shield, and then mount an NRF2401 shield above the ethernet. 3 layers. Then, you can
design the remote pcbs however seems best for your app.

Might be time saving to get a second arduino to use the ethernet shield and connect it via serial to the arduino using the transceiver.

Only the master node would need ethernet connection, others are just like slaves with only nrf24 chip on it.
@ zoomkat i thought of that, but wouldnt that make the process of data slower ?
I think i'll just use my duemilanove, buy an ethernet shield and connect the nrf24 chip on it... if there isnt any problems with pins being used by both

after reading http://arduino.cc/en/Main/ArduinoBoardEthernet it says that pins 10, 11, 12 and 13 are used... dont know if this still happens with the ethernet shield http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=11_5&products_id=199, since there's no info about it... can someone tell me ?

EDIT: i found that Arduino uses digital pins 10, 11, 12, and 13 (SPI) to communicate with the W5100 on the ethernet shield...
so, this is a problem right ?

You can have multiple SPI devices connected to pins 11..13, you just need to manually
toggle different pins from pin 10 for the chip select.

Also, if you're only gonna be testing a device that uses CS other than pin 10, you still need
to configure pin 10 as OUTPUT, else the mega328 SPI peripheral will revert to slave mode.

I dont know if i followed exactly what you said. (english is not my main language)
So i can use my duemilanove with ethernet shield on top and also use nrf24l01 chip with no conflict between those two ?
didnt understand exactly what you mean by manually switching different pins from pin 10 :confused:

@ zoomkat i thought of that, but wouldnt that make the process of data slower ?

It might make it slower, but may not be the slowest part of your network or noticable from a human perception point of view.

Ok, may be i'll just connect my master node (custom pcb with nrf24l01 chip) to computer with ftdi cable and then it'll receive commands from serial via php page or something like that...it's not the best for sure, the best option would be connecting ethernet sield and nrf24 chip together, but i didnt understood how to do that.

You can use SPI pins 11..13 for more than 1 device, but you just have to use a
different chip-select pin for each different device, pin 10 for one and some other
pin for the others. So you have to make sure the nrf2401 shield uses a something
different from the ethernet board for chip-select.

And that is done by software only ?

i found this:

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. The Freetronics Ethernet Shield uses the W5100 chipset but includes a fix in hardware so it doesn't have that problem and will happily share the bus with other SPI devices.

source: Stacking Arduino Shields | Freetronics

So maybe there's a problem with ethernet shield, even if i can use another pin for CS (on the nrf24l01 chip), the ethernet shield wont let me use it :s