0
Offline
Jr. Member
Karma: 0
Posts: 99
Arduino rocks
|
 |
« on: February 17, 2013, 10:45:40 am » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
texas
Offline
God Member
Karma: 26
Posts: 835
old, but not dead
|
 |
« Reply #1 on: February 17, 2013, 11:06:36 am » |
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.
|
|
|
|
|
Logged
|
Experience, it's what you get when you were expecting something else.
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 99
Arduino rocks
|
 |
« Reply #2 on: February 17, 2013, 11:17:09 am » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Milton Keynes UK
Offline
Tesla Member
Karma: 88
Posts: 6287
-
|
 |
« Reply #3 on: February 17, 2013, 11:29:27 am » |
Have you looked at the XBee stuff? Cost seems comparable,
An XBee costs about ten times as much as an NRF24L01+.
|
|
|
|
|
Logged
|
|
|
|
|
texas
Offline
God Member
Karma: 26
Posts: 835
old, but not dead
|
 |
« Reply #4 on: February 17, 2013, 12:13:44 pm » |
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.
|
|
|
|
|
Logged
|
Experience, it's what you get when you were expecting something else.
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 99
Arduino rocks
|
 |
« Reply #5 on: February 17, 2013, 12:20:51 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 50
Posts: 6532
Arduino rocks
|
 |
« Reply #6 on: February 17, 2013, 12:54:40 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Milton Keynes UK
Offline
Tesla Member
Karma: 88
Posts: 6287
-
|
 |
« Reply #7 on: February 17, 2013, 01:10:23 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 99
Arduino rocks
|
 |
« Reply #8 on: February 17, 2013, 01:10:53 pm » |
Yes, there are some interesting examples out there. One that i'm looking at is NRF24L01 arduino by maniacbug.
|
|
|
|
|
Logged
|
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 78
Posts: 2090
|
 |
« Reply #9 on: February 17, 2013, 01:11:22 pm » |
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.
|
|
|
|
|
Logged
|
Murphy's Corollary: the "real" problem is usually what they don't tell you about, which leads to endless second-guessing. m
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 99
Arduino rocks
|
 |
« Reply #10 on: February 17, 2013, 01:13:53 pm » |
@ 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.
|
|
|
|
|
Logged
|
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 78
Posts: 2090
|
 |
« Reply #11 on: February 17, 2013, 01:30:50 pm » |
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.
|
|
|
|
|
Logged
|
Murphy's Corollary: the "real" problem is usually what they don't tell you about, which leads to endless second-guessing. m
|
|
|
|
0
Offline
Tesla Member
Karma: 50
Posts: 6532
Arduino rocks
|
 |
« Reply #12 on: February 17, 2013, 01:31:18 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 99
Arduino rocks
|
 |
« Reply #13 on: February 17, 2013, 01:47:03 pm » |
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 ?
|
|
|
|
« Last Edit: February 17, 2013, 01:51:40 pm by Carlcox89 »
|
Logged
|
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 78
Posts: 2090
|
 |
« Reply #14 on: February 17, 2013, 02:06:53 pm » |
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.
|
|
|
|
|
Logged
|
Murphy's Corollary: the "real" problem is usually what they don't tell you about, which leads to endless second-guessing. m
|
|
|
|
|