Internet of Things (IoT) projects can be complex, as there are many decisions to make. For any IoT project, you need to acquire communication devices such as radios and gateways, connect those devices using one or more connection methods and protocols, and ensure the devices function as required. And there are many decisions to make along the way, including board design, antenna placement and interconnectivity with other devices. An IoT architecture is the end result of these decisions.
A typical IoT architecture is a combination of wireless devices, intelligent gateways, routers and cloud computing. In this blog, we will focus on the wireless protocols and connectivity choices you need to make in defining your strategy, and will touch on the physical components along the way.
Assessing Your IoT Architecture Requirements
Selecting the best IoT architecture for your new project involves an assessment of your connectivity needs, as well as an evaluation of the available technology, and of course the resources for pulling it all together. For many of the decisions you need to make, there isn't a wrong or right answer, but it's a matter of evaluating and choosing what fits best for your use case and the required product design features.
As an example, several wireless protocols can potentially work for communicating between devices, but they each have specific benefits and ideal use cases. The one that will work best for your deployment is dependent on your unique scenario. So it's important to fully understand your project and the available options.
At Digi, we ask many questions and review a range of options when we work with customers to help identify their IoT architecture needs. Here are some important considerations, at a high level, to help you get organized:
- IoT architecture functionality:
- Does your IoT architecture need to gather data, such as in a sensor network?
- Does it need to include monitoring and controls, such as in a SCADA network?
- How frequently will your devices need to send data?
- What is the distance between devices and gateways?
- How quickly must data be sent from end nodes to a gateway?
- Do you have strict timing requirements that must be met?
- How will your IoT devices connect to the cloud?
- Is power management a concern - for example in a large or remote network that would be costly or inefficient if batteries have to be frequently replaced?
- IoT device selection: time to market and "build vs. buy" considerations:
- You will need to select IoT devices such as radios and gateways that support the required functionality for your project.
- If timing is not essential, you may be able to build your solution from the ground up.
- If time-to-market is key, you would do better to start with pre-built and pre-certified wireless modules and potentially engage with supporting services.
- Managing your deployed devices:
- Determine whether you need a protocol that supports over-the-air (OTA) options in order to update firmware on all of your devices.
- If not, determine whether you can you afford to use a newer protocol that will likely have firmware upgrades to fix issues or enhance functionality.
- Without OTA firmware upgrades, it's important to account for the cost of performing hands-on, one-by-one upgrades or sending "truck rolls" to update units in the field.
All of these decisions will impact the overall planning, deployment and management of your project and ultimately affect the total cost of ownership. Let's take a closer look at some of these considerations.
Topology and Edge Computing Considerations
A key question many engineers ask when preparing to design their IoT network is: "What topology will work best for my application?" Some of the options include mesh networking protocols, such as Zigbee or DigiMesh, as well as point-to-point or point-to-multipoint. In some cases it is clear which topology makes the most sense based on the questions supplied earlier. In other cases, it can take additional research and testing.
In the following sections, we will look at some of the things to consider as you evaluate which is the right fit for your needs.
Network engineers often have experience with a particular topology and may assume it can be used in any setting, but sometimes another choice would be more optimal for a different use case. To determine whether a mesh networking topology is a good choice for your application, it is important to understand the pros and cons of this strategy.
A critical factor to analyze is your system's timing requirements. Mesh networking topologies route data from node to node across a network that is architected in a mesh. So the "hops" need to be accounted for due to added latency. Do you need the data back in 100 mS or can you live with once a second?
Ultimately you decide, but having options for different topologies can make the difference in the success of a wireless deployment. Your Digi team can support your evaluation of these trade-offs.
Features of mesh networking:
- Mesh networking has the advantage of supporting a high number of nodes in a network - in some cases up to a thousand depending on the architecture.
- Data intelligently finds its way from node to node to a gateway.
- If a node disappears in a network, the network will re-discover a new path to ensure data makes its way to the gateway.
- If a node is added to a network, once it's discovered, the network can route data through the added node.
- Mesh networking provides redundancy by allowing multiple paths from a node or device to a gateway and has the flexibility to adjust when conditions change.
- Sub-networks can also be established to segregate data from adjoining networks. This is an absolutely great feature when you have a dense network with thousands of nodes like a solar farm or smart lighting application, when latency is not a concern.
Mesh networks are available in standards, like Zigbee and also peer-to-peer networks like DigiMesh, and Digi supports both of these protocols.
Key differentiators between Zigbee and DigiMesh:
- Zigbee is typically found on the 2.4 GHz frequency whereas DigiMesh can operate on 2.4 GHz XBee modules as well as 900 MHz and 868 MHz XBee modules.
- Zigbee has end nodes, routers, and coordinators which represent the end devices, repeaters and gateways.
- DigiMesh is a peer-to-peer mesh network which also offers self-healing, dense network operation, battery-life extension via sleep modes, and easy setup and configuration.
To understand the tradeoffs and identify the right protocol for your use case, you can compare the pros and cons of Zigbee and DigiMesh in our related blog post. For a more in-depth understanding, see the Zigbee vs. DigiMesh white paper.
Point-to-Point or Point-to-Multipoint
Wireless point-to-point (PTP) and point-to-multipoint (PTMP) are topologies used for connectivity in a wide range of applications, such as use cases where you want to replace cables with wireless communication. These protocols communicate between two devices (point-to-point) or from one device to many (point-to-multipoint).
There are a few factors to consider, such as distance, timing and battery power that may indicate if a PTP network is needed versus a mesh network.
Here are some highlights of PTP and PTMP protocols:
- If you need a wireless link for several devices that are a mile or two away and you have good line of sight, PTP might be the easiest solution.
- PTP or PTMP can be efficient for battery-powered applications. Data can be sent when needed and then sleep modes can be enabled depending on your communication needs. It's not unheard of to have your batteries last a few years in PTP/PTMP type applications.
- By contrast, a mesh network adds latency and also is more power hungry since a mains powered router or repeater would be needed.
Therefore, if your network is fairly small and range is clear, PTP/PTMP have lots of advantages over a mesh network.
Another consideration with PTP and PTMP networks is that they're very simple and quick to set up. They work well with protocols that have tight timing requirements such as Modbus.
Direct Connectivity with Cellular, Wi-Fi and Bluetooth
In addition to the IoT architectures we have discussed, you can also directly connect devices to the cloud via Wi-Fi and cellular when circumstances warrant. There are pros and cons of each strategy.
Wi-Fi is probably the most ubiquitous protocol that exists. However, it's important to consider the availability of Internet at the customer site, as well as their security policies. Getting permission for your IoT devices to connect on someone's Wi-Fi network is not always a quick process. It may require additional security review, and in some cases just won't be possible based on a customer's corporate policies.
In residential applications, working with hundreds of different wireless access points and varying levels of customer skills with Wi-Fi can also be challenging.
Important considerations for cellular applications:
- With connectivity using cellular radios, you need to make sure you have access to a cellular network, which is commonly available in most urban settings, but may be a challenge in more rural areas.
- You will need to take data rates into consideration and make sure you're sending data to the cloud at the speeds required by your application. LTE-M and LTE Cat-1 protocols are perfect for most IoT applications that are sending data from sensors to the cloud.
- Activations, data plans, SIM management, and remote device management also need to be taken into account, as there are more moving parts involved in maintaining a cellular connection for IoT devices.
One example is working with a carrier like Verizon or AT&T. If you're a start-up company or just starting your first cellular IoT project, working directly with a carrier like Verizon or AT&T, might be frustrating at times. Working with an MVNO (mobile virtual network operator) can be more efficient and help you kick off your IoT project in a timely manner. Digi also offers plans, SIMs, and remote management tools (Digi Remote Manager®) to help get your project to market quickly.
Another IoT trend is having dual radio support on a module, like Digi's XBee 3 products. You have a main wireless protocol, such as LTE-M, Cat-1, Zigbee, or 802.15.4, along with a Bluetooth link built in for configuration and management.
Imagine walking up to a device that's in the field and instead of connecting cables to it in order to configure or troubleshoot, you use a Bluetooth link with an app on your mobile phone. This also makes commissioning devices a breeze compared to lugging around a computer and cables to do the configuration.
Wireless networks can be set up in a variety of topologies and configurations. For example, connecting remote sensors or devices via a wireless link to an intelligent gateway that has options to backhaul data via cellular, Wi-Fi, or Ethernet is proven and successful. Data is gathered from the remote device or sensor and then sent via a wireless link to an intelligent gateway. The gateway then "backhauls" the data to the cloud for analysis or control.
A "drop-in network" is the creation of a network specific for your application. In a SCADA or telemetry environment, a gateway is introduced that has backhaul capability as well as the ability to connect to remote RF nodes to send data back and forth.
In some drop-in networking applications, a cellular router connected to devices may be all that you need. One example is a kiosk or POS terminal at a retail store that uses cellular connectivity to process transactions.
Another advantage of a drop-in network is that you don't have to rely on or seek approval to join an existing network. Often getting permission to join a customer's Wi-Fi network can take more time than designing and deploying your own network. Creating a drop-in network gives you the flexibility to decide which topology works best between mesh, point-to-point and point-to-multipoint, and then gives you the ability to control all aspects of the network.
Mesh networks with thousands of nodes communicating frequently back to a gateway is great for applications like solar fields and street lighting. Using a long range 900 MHz radio in a PTP or PTMP application with a drop-in network topology can help you cover devices that are spread over large distances like in an oil field or in an agricultural setting.
Cellular-based Digi XBee 3 modules also allow you to bypass the traditional gateway topology by sending data directly from your device to the cloud, but it requires a data plan for each Digi XBee® 3 cellular modem implemented in the solution. Fortunately, data plan costs have dropped significantly over time and carriers are developing innovative cellular data plans like pooled or tiered cellular plans. Digi can partner with you to help determine the best solution for your application.
Intelligence at the edge is one of the latest IoT trends. Edge computing helps make a solution more efficient and reduces latency when sending data from a large amount of devices to the cloud. Instead of sending all your data up to the cloud for analysis and action, decisions and data processing can happen at the edge. This reduces traffic through the network and provides additional gains in performance.
Battery life is also a critical factor with remotely deployed sensors. The more you transmit data over the network, the more draw you will be placing on your battery. Therefore it is important to think through how often you need your devices to report, and customize your module connectivity for optimal performance.
Intelligence on the edge can help remote sensor nodes know when to send data based on conditional changes, thus reducing costly transmit current draw and in the case of cellular, data charges.
MicroPython on a Digi XBee module allows engineers to create the edge intelligence that allows for battery life optimization, among other things. For example, if a sensor reading is not changing, the edge device doesn't need to send data, and can conserve battery by staying in sleep mode.
Edge computing also allows the end devices to make conditional decisions instead of querying the gateway for commands, much like a child asking a parent constantly for permission to do something. To carry the analogy further, if you don't want the child to ask permission for everything, you can add some intelligence to the device to let it take care of non-critical processes.
Data ebbs and flows from devices to a gateway in many types of IoT applications. For example, when sensor data comes in and transfers to the cloud, intelligent gateways such as Digi XBee Industrial Gateway can aggregate data as well as act on specific sensor data, which helps to optimize communication with the cloud.
This intelligence is especially valuable when cellular backhaul is involved (i.e. data plans and costs with a carrier). Gateways with programmable languages, like Python, give users the ability to add some intelligence to the gateway to manage data more efficiently. Instead of just passing the data through the gateway via the backhaul protocol by default, you can optimize your solution via Python code. Doing so can help you avoid sending lots of data, decrease cellular data fees, and act quickly when thresholds are set to warn of you of specific events.
Having other backhaul communication options in a gateway such as Wi-Fi and Ethernet are also very useful for IoT applications. When a local network is available, the gateway can be connected to avoid cellular charges. However, when only cellular coverage is available having options for different carriers both domestic and international can make life easy when worldwide deployments are needed. Tools to manage deployed gateways for diagnostics and troubleshooting, as well as remote firmware upgrade capabilities are a must for IoT applications.
Security is another aspect of your IoT solution to consider as you evaluate the components of your IoT architecture. While packet encryption is the foundation for most embedded security systems, have you thought through secure boot, protecting hardware ports, authentication and secure connections?
Every IoT designer should consider the security measures available with their IoT device hardware and software, and evaluate security techniques at the beginning of the IoT project to mitigate risks and ensure success. For example, Digi XBee modules use secure sessions and integrate the Digi Trustfence® security framework.
Prototyping, Testing and Development Resources
While there is a lot to consider as you plan out your IoT architecture, fortunately there are resources to help you.
Development Kits for Prototyping and Testing
IoT development kits can be key for testing functionality. Typically development kits are lower-cost and contain all of the hardware needed to analyze different types of wireless networks. It's not uncommon to run tests through several different development kits to determine which one performs best for your application. The other great advantage of development kits is you can easily find them at distributors like Digi-Key or Mouser and can literally be testing in the lab a day after you order them.
IoT development kits make it easy for students, makers, and engineers to prototype a wireless IoT solution quickly and affordably.
IoT Development Tools
For developers who are designing applications with Digi XBee modules, Digi offers an award-winning tool suite: Digi XBee Tools. The suite includes hardware and software designed to help teams rapidly develop, build, deploy and manage IoT applications.
Digi also provides tutorials and videos to help developers to prototype and test their designs. See our blog post, Digi XBee Tutorials and Resources for Developing Wireless Applications, which provides a directory of these resources.
Supporting Services for Prototyping and Product Development
Utilizing services that specialize in prototyping, testing, and other aspects of IoT projects can quickly accelerate your project through the design phase, and even through development. For example, Digi Wireless Design Services provides a full breadth of support for IoT projects, from ideation to complete development and certification services.
While there is a lot you can do on your own, having a site survey done where you plan to deploy can help avoid issues that weren't anticipated in the lab. Most real world applications aren't in the most ideal RF conditions. Obstacles like buildings, walls, trees, and other structures can easily throw off a wireless network. A site survey can help you determine which antennas would be best (or if you need a custom antenna), what the noise floor (or potential sources of RF interference) looks like, and if there are any "gotchas" that you hadn't anticipated when developing your solution.
Combine a site survey with some training for your technicians who will be doing the installations and you'll be ahead of the game.
Other IoT Architecture Considerations
There are other aspects of the wireless portion of your IoT solution that also need to be taken into consideration. Some of them may seem trivial at first, but if they're not considered during the planning stages of your IoT project, a board spin or extra time for firmware updates might be needed.
Here are some of those considerations:
- Do you need GPS/GNSS service for the devices you're monitoring? And can GPS be with the cellular modem you've chosen or is it better to have a separate GPS modem on your board? (See our blog post, Geo IoT: Quickly and Easily Add GPS Location Services to Your IoT Application.)
- Do you want to deploy to one region, such as North America, or will your solution be used worldwide? This has implications for the product SKUs needed in your IoT device selection, as well as the required certifications and associated costs. (See our blog post, Going Global with Your Cellular Deployment.)
- Once devices are deployed in the field, what is your plan to manage firmware upgrades, remote diagnostics or troubleshooting? (See our blog post, What Is IoT Device Management?)
- Will your solution be exposed to high or low temperatures? If so, what parts of your solution will limit operation based on temperatures?
Working with the right partner and solution can help you ensure that your solution will be successful and show quick ROI. Digi is an end-to-end IoT solution provider, offering integrated hardware, software, tools, security solutions and services for prototyping, development and deployment.
A successful IoT deployment can take a good amount of research, planning, testing and often times some consulting and outsourcing. Take time to weigh choices and don't be afraid to test a few development kits before you commit to an IoT architecture. Taking the time to study and understand the alternatives at the beginning of your project can save you time, money, and headaches.
Digi can partner with you to identify the right protocols, RF hardware, software, and professional services. Contact us to start the conversation.