While IoT systems come in many different architectures, most include the following components:
When we talk about IoT devices, we are usually describing things like environmental sensors, connected appliances, vehicle trackers, or even assembly line machines. While an IoT device is arguably any electronic device that can communicate with the Internet, we usually don’t mean mobile phones or general use computers.
Typically, we’re focused on devices with a narrower purpose, such as controlling the lights in your home or tracking tank levels for manufacturing chemicals. As an example, the following graphic shows the connectivity between an industrial tank sensor using a Digi XBee® radio module, communicating with a gateway that houses a Digi ConnectCore® System on Module (SOM).
Many of these devices weren’t originally created with Internet capabilities and must be modified with after-market solutions to become connected. However, IoT capabilities are increasingly being designed right into new devices, where they can greatly lower costs and improve functionality.
While IoT devices vary depending on the need they were created to fill, some fundamental components are almost always included. For example:
All these components will be housed in some type of enclosure, often quite a small one. Depending on the environment, this enclosure may need to be sealed and watertight, or it may be heavily vented to manage heat. Because IoT devices are often deployed in very large quantities, getting the cost right is critical. Every penny counts when those pennies get multiplied into the millions.
Every IoT device needs to communicate. Some devices only send information; many others both send and receive. While some communications with peer devices are direct, remote communications will often need to pass through a gateway to get to their destination. No matter where the device’s messages need to go, every journey begins with a first step.
The following graphic illustrates one model for wireless communications, and how each “node” in the wireless network plays a defined role. As you can see in this example, which is called a “star network,” a smart wireless module coordinates communications out to devices acting as routers and they move the communications out to end devices.
The scenario changes for different combinations of wireless devices and protocols. In the following diagram, you can see how networks can be built to behave in various ways with the use of different wireless protocols. The best protocol depends on a number of factors, such as the distance between communication nodes on the network.
The first step or “hop” in IoT communication will either be wired or wireless. Wired connections may use a simple serial protocol, though most frequently a networking system like Ethernet will be employed, allowing “direct” Internet protocol (TCP/IP) connections to a network server or cloud application. Messages passing over the Internet are routed through many different devices, however as IoT architects, we can safely abstract this process away. Wired connections are fast and reliable, however frequently it is too expensive or impractical to run physical cabling. Naturally for anything mobile, wires are out of the question.
Wireless communications for IoT almost always happen over radio, and there are hundreds of radio protocols out there to choose from. Several are quite popular. Here’s a high-level overview of some popular communication protocols:
Computer networking frameworks are typically structured in virtual layers. The lowest layer deals with the physical part, wires or radio waves. Next are the layers that coordinate how messages are formed, addressed, routed and confirmed. These middle layers are fascinating but beyond the scope of this discussion.
The highest layer manages the useful content, typically referred to as the “application, as shown in the illustration of the "OSI networking model.” OSI stands for Open Systems Interconnection, and the model is a conceptual framewok describing the components or layers of a network's functions.
The application layer is where the real work of IoT gets done, and it can happen in many different ways. Having a standard way to communicate about particular jobs is incredibly helpful when devices from many different manufacturers need to cooperate to get work done. Some wireless protocols standardize messaging about common tasks like lighting control, security or audio streaming.
Zigbee, Bluetooth and Z-Wave all include application protocols that provide a standard language so that, for example, a light switch made by one company can turn on three different lamps all made by other companies.
Other application protocols are more generic. MQTT and CoAP are both very lightweight application protocols that standardize communications between different devices without restricting messaging to particular tasks. Because they are lightweight, they consume very little bandwidth and therefore very little power, making them ideal for battery-operated devices.
Devices with more power and bandwidth may use RESTful communications via HTTP — the protocol behind the web. This widely implemented framework is task-agnostic too, but because it wasn’t designed with extreme efficiency in mind, it can quickly exhaust both the batteries and bandwidth of a small IoT device and should be implemented with caution.
Compare Zigbee and Bluetooth — and what they do best.
When a device isn’t capable of running Internet Protocol (TCP/IP) directly, it will typically pass its messages to another device called a gateway. This gateway will process and forward messages to and from the Internet.
Gateways help IoT devices stay small, battery-operated and inexpensive, because they typically handle multiple devices as a local base station. For example, here are some real-life scenarios:
This “multi-hop” gateway process allows devices with limited capabilities to connect with far-off locations, often using a sequence of different protocols to get the job done. Gateways generally use application protocols such as MQTT, REST or CoAP to connect with a network server or cloud application that is typically housed in some remotely-located data center.
Most IoT communications are initially accepted and handled by some type of network server. Certain protocols require this to complete low-level work like de-duplication of redundant messages and conversion of special protocol formats. Even when a protocol does not require additional processing, it is endlessly helpful to have a system that not only manages communications but can configure, secure and report on the devices themselves.
Digi Remote Manager® is a leader in this role, focused on providing the best cloud experience for users of Digi’s modules, gateways and routers. Other services like AWS and Azure offer IoT data processing with some more generic device management, and these systems can collaborate together to provide custom solutions.
Once the network server has done its work, data is typically exchanged with a cloud application that will finish turning the IoT data into useful information, offer it to human users and store it for subsequent analysis. Cloud applications often run alongside other network services on platforms like AWS or Azure. They are commonly created using languages like Node.js, Python or Java, and tied to a SQL or NoSQL database that can manage the avalanche of data coming from fleets of IoT devices.
A big data center isn’t a requirement for every system. Even a small hobby computer like Raspberry Pi can do most of what the cloud giants offer, albeit at a definitely limited scale. A living network has many inter-related components at work ensuring that data is delivered where it needs to go, when it needs to get there.
Even with all of this technology in place, human interaction is always required. So a critical task for cloud servers is providing the user interface that brings people into the loop.
User interfaces are the last step in the IoT communications chain. They are also the first step in the chain for commands that will flow through the system for one or more IoT devices to execute. There are many types of user interface and an IoT solution often supports more than one.
Humans may interact with the system through a web site, smartphone mobile app, special desktop application, or indirectly through an API integration with business services like Salesforce. Not all interactions happen remotely. Some IoT devices are designed to support direct access and configuration, whether it’s through an onboard touchscreen or even just some switches. Whatever the method, the user interface is where the rubber meets the road. It’s where people unlock the full value of their IoT systems and the information they create.
Here's a simple example of a home automation system that uses all of these components. A homeowner wants to control their dining room lamp using a local switch, and also be able to flip the lights on and off remotely. They select a system that includes a battery-powered IoT wall switch. It communicates directly with lamps using the Zigbee wireless protocol.
This protocol includes a specially designed language for lighting. Since Zigbee is a low-bandwidth protocol that doesn't use much power, it is also limited in range. Therefore, for remote access, the system comes with a small gateway. The gateway translates the Zigbee messages to the MQTT application protocol and passes it to a network and cloud server that runs the home automation system application. That cloud application communicates back to a mobile app used by the homeowner. Whether right there in their home, or on a totally different continent, they can see the current state of their dining room light and instantly control it.
You can learn more about Zigbee on the Zigbee Mesh Networking page. Zigbee is one of the many protocols supported by Digi XBee radio modules. Digi produces a full line of radio modules, IoT development kits, gateways, cellular routers and remote IoT management. When you are ready to design your own system, Digi offers Wireless Design Services that can help you make the right choices to ensure IoT communications success.
If you need more help, Digi’s got you covered. Contact us!