I am working on home automation project. A network consists of one master device and many (maybe 10-20) slave devices, all communicating via these RF modules. I am using arduino in slave devices. Master will be based on raspberry Pi (most probably). Slave nodes can be sensors or switches(to control household electronics). To and fro communication will include data such as : a) Turn off bulb 1, b) Turn on TV, c) Set the bulb brightness to 34%, d) Temperature reading is 23 degree Celsius etc.

From security point of view, imagine there are similar other networks in the range and one network must not interfere with another. As such, I need to implement some sort of authentication whenever each data transfer takes place between master <---> slave. What logic do you suggest for this process?

There can be cases when data has not been received successfully by the receiving end. In such cases, I am planning to use some sort of checksum and acknowledgement system. If acknowledgement is not received, data will be resend in time intervals of 1s, 5s, 10s, 30s, 30s. If these 5 resends fail, the slave/master will be considered as unavailable/powered down. Your opinions/suggestions on this?

Slave arduino will be busy controlling appliances/sensors connected to it (real busy when controlling appliances). As such, it won't have much time for communication. Less time required for communication == Awesome. How much time do you think the arduino will take to complete one such data transfer?

Another solution I could think of was using two arduinos connected via i2c in each slave module. One arduino will be busy controlling the lights/sensors. Other one will take care of RF communication. If it receives some valuable info which was meant for this particular module, it will transfer the same to the other one using i2c bus. Is this a feasible backup plan?

Am I doing wrong by selecting RF modules for this purpose? Should I switch to Zigbees?

Thanks guys for reading. Any constructive suggestions from your side will be very helpful.

  • Got any example code ? Then i can throw it on my arduinos and try it out. Feb 25 '15 at 14:35
  • There is existing mesh network software for Arduinos. What you are tryingto do is doable but tends to be reinventing te wheel - which has its place :-). Feb 25 '15 at 15:40
  • Those are pretty "dump" rf-devices. You'd have to do the entire protocol, and error correction yourself. I'd suggest going with NRF24L01. I've no experience with zigbee (too expensive in my oppinion)
    – Gerben
    Feb 25 '15 at 16:21
  • @Magic-Mouse - Sorry, no code yet. I am still to decide what to use. I did some research and I think I should use NRF24L01 as suggested by Gerben Feb 25 '15 at 18:43
  • @Gerben - Thanks a lot dude! I did some research and I feel that NRF24L01 is way better than what I was planning to use. Feb 25 '15 at 18:45

The NRF24s are great, but limited to communication only.

Digi's XBee 2mW module has got great indoor range, but more to the point it's got 8 I/O lines and 6 10-bit ADCs on board. It's also built for mesh networks (or you can get star-network equivalents) and has security encryption to boot. This means that, for some of your nodes, you don't need any other hardware to have a fully functioning control point (not including relays and sensors of course), so you can ditch having arduinos at every node.

They're so easy to use, very low power, and have plenty of support and documentation available online.

Do it!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.