How to pick a wireless solution for your home automation project ?

IMG_7814More and more open-source projects in home automation these days are “connected” in some way. For example, you want to build a single wireless motion sensor based on Arduino. Or you want to build a full home automation system with many modules communicating together and with a central node. Or you just want a small temperature sensor that continuously send data on a web interface. It can be difficult to choose a wireless solution from all the modules that are available on the market. Indeed, many are easy to interface with Arduino: XBee, Bluetooth, radio, WiFi … the possibilities are huge. So how do you pick between these technologies for your project ? That’s what we are going to see in this article.

And I’ll start with an overview of the different solutions. For each of them, I will describe their features. I will also talk about their respective field of applications. Finally, I’ll tell you what ready-to-use solutions you can actually buy for your projects.

WiFi

If you are a frequent reader of this blog, you know for sure that I am using WiFi for several home automation projects. What I like about WiFi solutions is that you can directly interface them with your computer. It means that you don’t need any additional module or antenna like with XBee. Therefore, you can easily interface sensors and control them remotely, for example by building a simple web server running on your computer. This is for example what was done in the article about a WiFi-connected weather station. The server-side part is usually written in standard languages like HTML & PHP. This means it is then easy to transfer your code to a smaller device like the Raspberry Pi.

The other cool thing about WiFi is that you can connect a project directly to a web service like Xively, thus connecting your project to the Internet of Things. From there, you can monitor the temperature in your home easily, without having your computer acting as a central server: it’s all online. If you want to have more details on the actual implementation of such system, check out our Arduino & Xively tutorial using the CC3000 WiFi chip.

To actually use WiFi for a platform like Arduino, you have several solutions. You can use one of the ready-to-use Arduino solutions, like the Arduino WiFi shield. You can also use the Arduino Yun which is an all-in-one solution to connect your projects to the web. It even comes with a small Linux machine onboard.

I would personally recommend using a board based on the CC3000 WiFi chip because this small chip is quite easy to use & you will find a lot of tutorials using it on the web. You can of course build your own boards using this chip, but you can also find already assembled solutions like the Adafruit CC3000 breakout board.

I would therefore recommend using WiFi for applications where you plan to use lots of different wireless modules connected to a central server. But only in the case where power consumption is not the main issue. I also recommend it when you plan to send the data coming from your sensors to a web platform like Xively. Also make sure to consider the price factor. Even if the cost of WiFi-based solutions has gone down during the past years, these modules are still expensive compared to other wireless solutions.

315-434 MHz radios

That’s probably one of the cheapest wireless solution you can pick (you can find some transmitter/receiver pairs at around $4). These radio modules work around the 300-400 MHz frequency range, and are usually only transmitting data in one direction. They are quite sensible to noise as well, so you will need some kind of error-correction functions in your code.

On this blog you can find one example of a project using such radios to build a wireless motion sensor with Arduino. There are lots of brands selling transmitter/receiver pairs using this kind of technology, you can find one by following this link.

So if you want to build a simple, low power & cheap project, you can definitely use this kind of technology. However because this system is so simple it won’t work well if you try to interface several sensors using these radios.

ZigBee & XBee

The ZigBee protocol is also very popular in the home automation & Arduino space. ZigBee devices are low-power, and can transmit data over long distances using other devices as relays. These kind of configuration is called a mesh network. They usually operate in the 2.4 GHz frequency range. Compared to the cheap radios solution, they are much easier to use and provide a reliable communication between the different modules.

I mentioned XBee in the title because that’s the most common brand of radios that use ZigBee. These XBees are low-power modules that are easy to use with Arduino. Several manufacturers designed shields & interface boards so you can use these modules with Arduino. However, price can be an issue here, as each of these modules are usually in the $20 price range.

There are lots of different XBee modules, so if you want a complete in-depth review of the different XBees I recommend this excellent guide from SparkFun. For home automation applications, I used these simple XBee modules with an integrated antenna. To interface them with an Arduino board, you can use the XBee shield for Arduino by SparkFun, and the XBee explorer board to connect an XBee module to your computer. You can also buy a full XBee development kit that includes all these components. You can also read the book Building Wireless Sensor Networks: with ZigBee, XBee, Arduino, and Processing which is an excellent reference on the topic.

ZigBee and XBee modules are so popular because it allows you to build a complete home automation system with low-power modules. As a result, these modules can be powered by batteries and last for years! However, cost can be an issue as XBee boards are quite pricey.

Nordic nRF24L01+

Still on the 2.4 GHz radio solutions, I needed to mention the nRF24L01+ chip from Nordic. It is a low-power transceiver that can be interfaced with Arduino, it’s cheap (about $8 for a pair), and can transmit data reliably at up to 100 meters. I haven’t tried these modules myself yet, but it seems like an ideal solution for home automation purposes. If you tried these modules yourself, please share in the comments section !

You can find a pair of these modules for $8 on Amazon.

Bluetooth

Finally, I wanted to mention Bluetooth even if it’s not (yet !) used a lot for home automation applications. Bluetooth evolved a lot during the past years. It’s last evolution to date (Bluetooth 4.0 Low Energy) is low-power and has a huge bandwidth. It can cover your whole house wirelessly without problems. Like WiFi, one advantage of Bluetooth is that it doesn’t require to have external components to connect to your computer. Indeed, all modern laptops are equipped with Bluetooth.

Some of them like the Adafruit Bluefruit EZ-Link module also interface with the serial pins of your Arduino board. This means that you can directly see your Bluetooth module acting as a serial port on your Arduino IDE. And this allows you to upload a new sketch to your Arduino board wirelessly ! Let’s say you have many of these modules in your home. If you decide to update the sketch running on your Arduinos, you can do that without having to plug any cable!

To actually use Bluetooth in your projects, you have several options to choose from. I recommend using the Adafruit EZ-Link board because I know it works as I am using it for my projects, and there is a nice documentation about it on their website. There were also some Kickstarter projects like the BLEduino board that is an integrated Arduino + Bluetooth board.

So, which solution should I choose for my project?

We just saw it: there isn’t one-fits-all solution to make your home automation project communicate wirelessly. To summarise, you should use WiFi if you plan to connect your project directly to the web at some point, or if power consumption is not an issue in your project. If you’re concerned about power, you can use cheap radios for simple projects, and solutions like Xbee for larger home automation projects.

Finally, I definitely think we’ll see more and more projects using Bluetooth or the nRF24L01+ chip in the upcoming months, and of course also on this website! What about you ? Are you considering building a connected home automation project using open-source hardware ? Or you already have one based on the wireless technologies described in this article ? Please share in the comments section below !

15 replies
  1. markus
    markus says:

    Hi! I’m recently designing a project for my home, and I made myself the same question. I wanted to use wireless solution because of their versatility but I was really concerned about consumption and price. But the hardest drawback I’m considering is security, as the system won’t only contain sensors but door and window actuators. It’s sure I’m going to use wireless communication in some cases, but not for all project.
    Now I’m investigating for PowerLine solutions. What do you think about it? Have you tried anything on this? I’ve found something it can be interesting http://store.linksprite.com/narrow-band-powerline-communication-module-with-simple-mac/

    Reply
  2. realShadow
    realShadow says:

    Hi Marco,

    This is a great article. Thanks for that. But what about with cable connections? Could you please have a look at showing how to use LAN cables to connect to the home automation? I have the advantage that I could use cables to connect devices to my network.

    Thanks.

    realshadow

    Reply
  3. Jens Cramer
    Jens Cramer says:

    Hi! I’m using the nRF24L01+ as part of my home automation. They are very reliable and fast. On GitHub you can find a “RF24Network”-library from Manicbug which makes using these guys easy. If you are willing to buy from Hong Kong (over eBay) you can get 10 pieces of the nRF24 for under $ 15 incl. shipping.

    Reply
  4. Tim Stoddard
    Tim Stoddard says:

    I much prefer the Zigbee route… my DYI is monitoring plants, pool equipment, hot water heater overflow trays, freezer temperature, gate and door status using 11 xbee modules and a single Nanode (Arduino with built in ethernet). I wrote a program for the Nanode called ZENA (Zigbee Enabled Network Appliance) that self discovers and aqcuires data from all the xbee modules displaying it on an OLED display from 4DSystems and also posting it on xively.com (see website link). I then use other services to deliver alerts to my android phone from the data posted on xively. ZENA can handle up to 32 xbee modules. The features I like about this way is NO WIRES (the xbees can each sense up to 12 digital signals or 4 analog signals right at the module which can be battery powered) and the Zigbee mesh network self heals with no intervention needed. Series 2 Xbees can be had for $17 from various outlets so it’s not expensive at all.

    Reply
  5. Vincent Demay
    Vincent Demay says:

    Hi Marco,

    Thanks you for the article. it is really interesting.
    On my side I use both 433Mhz radio to manage existing radio devices from a Raspberry PI and wifi when power consumption is not the issue..
    I’m looking for a good solution to get wireless communication with really low power consumption to make system running on battery.I’ll give a try to nRF24L01 as you mentioned in your post but if you have any other clue, I’m interested in it :).
    I tried Sigfox which looks promising but it’s still in beta and available mainly in France for now.

    Anyway thanks for spending time writing on you blog!

    Reply
  6. frank
    frank says:

    What about Nordic nRF905? Has anyone tried those? Those are Sub 1 GHz, and are rather cheap (2 for $13 on Amazon), have all the advantages of the nRF24L01+, plus a much longer working range.

    I haven’t tried the nRF24L01+, but I’ve seen people claiming that, in practice, they only work for around 50-100 ft in open air.

    Reply
  7. Mike
    Mike says:

    Hi,

    Is there a way to do home automation with just your laptop, desktop and a cc3300 or someother means. Why do we need an arduino in between? I suppose the answer could be it is easier to program arduino than a laptop but I still wonder if there is a way to do home automation without arduino.

    Thanks,

    Mike

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">