How to choose between Zigbee and BLE mesh for your IoT application?

by Sep 10, 2019Communication Protocols

Internet of Things related products and use cases play a key role in our lives now a days. It is further proliferating at a rapid pace across industries and verticals. With all this happening, there is a need of making decentralized, short or medium range and sometimes crowded networks of nodes which collects and sends data over internet for further processing and receive commands from the end users over the internet. Since the amount of data exchanged is not huge therefore it is assumed that mesh technology could be used to solve some of the problems caused due to traditional point to point, star or hub network topology. In the mesh topology, all or few nodes become routers and in addition to consuming the data, they also take responsibility to share data with their neighbors. This makes a network of routers as well as end nodes making the network operation more decentralized. There is no single point of failure in the network, hence it is much more reliable. A well-designed routing mechanism and acknowledgement driven approach makes this kind of network quite dynamic, scalable and reliable.

Another advantage of meshing is that it reduces power consumption as transmission range for nodes is smaller. It reduces cost as single gateway can be used to collect data from multiple nodes spread across larger area.

BLE and Zigbee are the 2 most popular PAN (Personal Area Network) technologies for mesh topology-based use cases. Zigbee is based on IEEE 802.15.4 standard, while BLE is maintained by Bluetooth SIG.

Often, decision makers get into a lot of debate to choose one out of these for their products as both have their edges and pitfalls. In this article, an effort has been made to help decision makers choose out of these two awesome technologies. Below study is based on BLE 4.0 based mesh. Latest BLE standard 5.0 claims to have much improved stack but most of the systems still use BLE 4.0 or 4.2 based mesh stack.

Difference in mesh routing mechanisms

For smaller networks, both perform similar but as the network grows Zigbee tends to perform better due to its more advanced routing.

BLE uses flooding approach with some intelligence to route mesh packets. This is called managed flood approach. It is called managed because not all nodes relay the packet but only those which are on mains supply (not battery operated) will act as relay nodes. This mechanism works great when networks are smaller. BLE assumes that in most typical use cases, all end nodes will be requiring the same command such as “turn lights ON” at any instance. And, cases where only one end node is expecting the command is going to occur less often. Considering lighting is one of the most prominent use cases of IoT, this approach gives very good performance.

Zigbee face challenges when nodes are mobile as there will be lot of exchange of routing protocol messages to update route tables which may cause network congestion.

Since Zigbee nodes have less latency for larger packets, it can encapsulate higher layer headers and commands while providing good performance. It can be used in combination with unicast & broadcast to create localized effect. In this mechanism, a dynamically chosen proxy node may receive (form the source) command packets for multiple surrounding nodes as unicast and then broadcast it to nodes in proximity to create localized sound or color effects. This approach is utilized in Hue Entertainment feature provided in Philips Hue products. BLE gives higher latency when larger than 12 packets size is sent across the link due to segmentation and reassembly performed at higher layers. Therefore, it may be difficult to get same performance as compared to Zigbee.

Radio Frequency

Both, Zigbee and BLE mesh work primarily in 2.4 GHz frequency band which is already crowded due to multiple other technologies’ presence in the same band. Zigbee, however supports other frequency bands (784 MHz in China, 868 MHz in Europe, 914 MHz in USA and Australia) also in some part of the world. Since 2.4 GHz is comparatively a crowded band, it can be a good choice to use Zigbee in lower frequency bands wherever it is allowed. Hence, Zigbee provides more flexibility from frequency band selection perspective in certain jurisdictions.

Performance

Data rate

BLE 4.2 standard rate is 1Mbps. Zigbee is based on 802.15.4 which limits data rate up to 250Kbps. Thus, BLE has faster data rate compared to Zigbee. However, in most IOT applications, it does not make much of a difference as amount of data is very limited.

Range

Node to node range calculations are dependent on multiple factors such as transmit power, operational frequency, receiver sensitivity, Antenna etc. However, Zigbee (at 2.4GHz) generally is found to provide better range than BLE.

Latency

BLE works best for smaller size packets (i.e. less than 12 bytes). For smaller size (less than 12 bytes), its comparable to Zigbee but as packets size starts increasing BLE higher layers do the fragmentation and cause latency to increase.

MTU size (maximum transfer unit at link layer or physical limitation of the link) is an important criterion to estimate performance of the overall system. Smaller MTU size will have performance degrade if higher layer protocols or apps are meant to use larger packets. For example, one IPv6 header may translate to multiple mac layer packets if MTU size of mac layer is smaller than the standard IPv6 packets. This causes latency in the network. BLE has smaller MTU size comparatively so it adds more latency for larger packets. Therefore, it is important to consider application layer and higher layer protocols’ needs before closing on the mesh technology for your system.

Power consumption

Power consumption for Zigbee and BLE is comparable. Additionally, routed mesh mechanism adopted in Zigbee makes it slightly more power efficient.

Cost

BLE mesh has bigger eco system and uses the same BLE chipset used in other applications, therefore high scale production of BLE chipsets pulls down the cost of IC compared to Zigbee.

Need of gateway device for Zigbee further increases the cost of overall system. BLE based systems can provide limited functionality (everything except full-fledged internet connectivity) without gateway as well. So, if we consider SW cost as negligible for both, BLE scores higher. In addition, licensing of Zigbee is more expensive and complex than BLE.

Complexity

Zigbee has smaller protocol stack but its routing is more complex to manage. In contrast BLE has overall more complex stack but routing is simple.

Security

Both are inherently secure. Both provide options for authentication and data encryption.

Ecosystem

Zigbee has better gateway and network provider ecosystem compared to BLE. Samsung Smart things, Philips Hue are few of the most prominent home networking systems which use Zigbee as primary technology for home networking. There are also service providers such as Deutsche Telekom, Comcast which provide Zigbee network ecosystem.

Form application layer support perspective, BLE is good for lighting specific use cases but lags for other use cases. Zigbee stack has good support for other use cases as well such as door locks, HVAC etc. However, BLE has support for beaconing which means nodes could also be used for asset tracking in addition to their main use case. This allows an additional feature out of the mesh network which can be really useful.

Zigbee mesh lacks stable stack implementation in most of the popular OS platforms such as Android, OS X etc. BLE is part of most of the popular OSes such as Android, OS X, Windows etc. already. Therefore, adopting Zigbee on a new OS platform will require more time and effort in comparison to BLE mesh.

IPv6 adoption

IPv6 is going to rule the internet in near future as IPv4 addresses are depleting quickly. There is a need and effort to make every device on the internet to support IPv6 addresses so that all upper layer applications could easily be run across IoT networks. BLE has more latency for larger packets, which implies that Ipv6 over BLE will have lower performance than in Zigbee due to segmentation and reassembly overheads.

Problems with Zigbee that BLE solves

To utilize full IOT capability of mesh-based networks, it is important that nodes are connected to the internet. In both BLE and Zigbee based systems, for controlling and monitoring device nodes over internet, we’d need to have an edge gateway device which translates BLE or Zigbee packets into IP network packets and vice versa.

However, locally, Zigbee nodes can also be controlled using Zigbee remotes, but remote controls provide less user-friendly control compared to a smart phone. In contrast, smartphones are ubiquitous devices and most of them have BLE built-in. BLE mesh is an SW stack so existing devices could be easily topped up with firmware and installable mobile applications can be used to control BLE nodes directly without the use of any gateway for temporary connectivity.

Therefore, for applications that do not have edge gateways, BLE provides a more user-friendly and rich experience. For cloud connectivity, smartphones could be used as a temporary gateway device if users are physically present in the vicinity of BLE mesh network. But, for full-fledged IoT connectivity and control over the internet (or cloud), there is a gateway required in both BLE and Zigbee based systems.

Problems with BLE that Zigbee solves

For highly congested and large networks, Zigbee is more suited due to its full-fledged routing approach.

Conclusion

We can objectively see from the above description that BLE and Zigbee RF performances are comparable, but more advanced routing adopted by Zigbee makes it irreplaceable when it comes to large networks.

With its simpler routing mechanism, BLE is more suitable for mobile nodes as Zigbee routing protocol causes more network overhead for maintaining route tables for highly mobile nodes. Therefore, it is important to consider the use case before choosing any of these technologies.

Lower hardware cost, stable protocol stacks in popular OS implementations and smartphone control are few of the advantages BLE has over Zigbee. Zigbee has a bigger ecosystem in home networking, industrial IOT (IIOT) systems at present due to its early entry into this market segment. However, BLE mesh being a software-based solution on top of existing BLE stack can quickly catch up in the near future.

It will be interesting to see how quickly BLE mesh leverage the ecosystem it already has and compete in the world of mesh technology-based IOT systems which is already captured by Zigbee.

Creating a multiplication Skill in Alexa using python

Written By Rahul Yadav

RELATED POSTS

How to use a GSM/GPRS Module as an IoT device?

How to use a GSM/GPRS Module as an IoT device?

The convergence of physical objects and the digital world is known as IoT. IoT stands for the Internet of Things. It has been a trending field in the world of technology. In addition, the IoT describes the network of physical objects known as “things” that are...

Longwave Wireless Communication

Longwave Wireless Communication

Longwave wireless communication acts as a foundation for a Low power Wide Area Network. Mostly low energy is consumed in these types of networks. The reason is that most sensors are used for extracting data. These data are used for transmitting in long-range...

Architecture of a Bluetooth IoT Application

Architecture of a Bluetooth IoT Application

What is Bluetooth? To understand the architecture of Bluetooth first lets understand what actually Bluetooth is. Bluetooth is a radio-wave technology that is mainly designed to enable wireless communications over short distances. The frequency of these waves ranges...

Most Commonly Used Web Frameworks

Most Commonly Used Web Frameworks

Web Frameworks are software frameworks that are designed to help create Web apps, Web APIs and other resources. Web Frameworks help us solve two of the major hurdles of developing web apps - templates and routing. Now that we know what web frameworks are, lets get...

Communication between XBee modules

Communication between XBee modules

The wireless networking device, XBee is a user friendly, popular and is a technology worth knowing about. It can transmit and receive data wirelessly, and thus can be used for many IoT applications. As the popularity of the XBee module has grown massively, there are...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....