Sunday, June 28, 2020

IoT Technology Stack

There are many components required to build a complete Internet of Things (IoT) solution. Each component plays a role from connecting a “thing” which generates data to building a front-end application for end users. The IoT solution could be as simple as a light switch at home, or a complex project in a factory with thousands of sensors in an assembly line.

In this lesson, we’ll discuss the technology that we find in an IoT technology stack. We also discuss different architecture models that attempt to standardize IoT and we’ll talk a bit about the impact of IoT on our networks. iot-technology-stack.mp4

IoT Technology Stack

The IoT technology stack covers all required technologies from connecting an IoT device, to producing data, to an actual purpose. This can be a challenge because there are many different technologies, standards, and protocols that have to work together.

Iot Stack Overview

In general, an IoT stack consists of four items:

  • Devices (things)
  • Gateways
  • IoT platforms
  • Applications

We’ll take a closer look at the specific IoT items: devices, gateways, and IoT platforms.

IoT Devices

Devices (or things) come in many forms and shapes. When people think about IoT and devices, they usually think about “smart devices” like:

  • Smart light bulbs (Philips Hue)
  • Wearables (Apple Watch)
  • Activity trackers (Fitbit)
  • Smart thermostats (Google Nest Learning Thermostat)
  • Smart doorbell (Nest Hello Doorbell)

IoT however, also consists of devices that aren’t always visible like transducers. A transducer is a device that converts energy from one form to another. There are two types:

  • Sensors
  • Actuators

Let’s look at some examples.

Sensors

A sensor is a device that detects or measures a specific physical quantity and converts it into another form, usually electrical pulses. Sensors have been in use for decades and are an essential IoT component. This is where our data is captured. Here are some examples of common sensors used in IoT:

  • Temperature sensor
  • Vibration sensor
  • Acoustic sensor
  • Pressure sensor
  • Humidity sensor
  • Occupancy sensor
  • Proximity sensor
  • Gyroscopes
  • Image sensor
  • Acoustic sensor
  • Light sensor
  • Accelerometers
  • Magnetometers

Here is an example of a sensor:

Tmp36 Temperature Sensor

Above you see the TMP36 analog temperature sensor which can detect a temperature between -40 and +125 Celsius. You can be a proud owner for about $1-2.

Actuators

An actuator is a device that receives a signal and sets something in motion to act upon or within an environment. Usually, the actuator uses force to turn something on or off. For example, an actuator that sits on your radiator to open or close the valve. Like sensors, we have used actuators for decades before IoT. Here are some examples:

  • Thermal actuator: uses a heat source to generate motion.
  • Electric actuator: uses a power source like a battery to generate motion.
  • Hydrolic actuator: uses liquid to generate motion.
  • Pneumatic: uses compressed air to generate motion.

Here is an example of an actuator:

Tado Radiator Valve

Above, you see the Tado radiator thermostat which can control your radiator.

Computing power

An IoT device needs some intelligence. For example, the TMP36 analog temperature sensor I showed you can sense the temperature but it has to be connected to something that powers it and that can read the data.  You could connect a sensor like this to the GPIO pins of a Raspberry Pi.

The Raspberry Pi is still a bulky device.  Another option is a microcontroller. For example, an ESP from EspressIf. Here is a picture of my ESP32 which is connected to a hardware button:

Esp32 Breadboard Button

Other devices like the Tado radiator thermostat have integrated the actuator and micro-controller in a single package.

Communication

The intelligence in a device can vary. There are three communication options:

  • Unidirectional: For example, a temperature sensor collects the current temperature and sends the temperature value to a management device for analysis.
  • Local: For example, a thermostat collects current the temperature and then turns on an airconditioning device.
  • Bidirectional: For example, a thermostat collects the current temperature and sends the temperature value to a management device for analysis. The management device then sends a signal to the thermostat to turn on an airconditioning device.

Device Selection

When you want to select a device for your IoT solution, here are some criteria to consider:

  • Mobility: is the device physically attached to an object or wearable?
  • Power: is the device powered by a battery? If so, how long does the battery last?
  • Processing power: how much processing power is required or does your device offer?
  • Data transmission:  how often and how much data does the device transmit?
  • Connection: how do you connect the device? Wired or wireless? Does the technology offer enough bandwidth for your required data transmission?
  • Density: how many devices are required in the area to capture all data? Could you transmit data through a mesh network?

IoT Gateways

Somehow, we need to connect our devices to the outside world. That’s what gateways are for. As the name implies, the gateway is the device that sits between an IoT device and an IoT platform.

Gateways have an important role in IoT and are available in many different shapes and forms. There are hardware and software gateways. Some of the roles they can be responsible for are:

  • Connectivity: devices can be connected in different ways. A gateway supports multiple connection methods so that all devices can be connected.
  • Protocol translation: there are many different protocols we can use in IoT. A gateway can translate between different protocols.
  • Data aggregation and pre-processing: the gateway can collect data from all sensors and aggregate or pre-process the data before sending it to an IoT platform.
  • Encryption: encrypt and decrypt data from devices.
  • Management: the management and onboarding of devices.
  • Remote control: allow remote control to devices.

An example of an IoT gateway is the gateway from The Things Network.

The Things Network is a project from The Netherlands. They attempt to build a global open LoRaWAN network that is suitable for IoT. LoRaWAN offers a wireless range of up to 10 kilometers ( 6 miles), low power (battery powered), and low bandwidth.

You can connect the gateway to the Internet with WiFi or Ethernet and it can serve up to 10.000 nodes that connect through LoRaWAN.

IoT Platforms

There are hundreds of IoT platforms and it’s difficult to compare them. The problem is that nobody agrees on what exactly an IoT platform is. It can mean different things to different people.

In a nutshell, the IoT platform is where our devices connect to and where we combine our data with applications and services. IoT platforms typically offer some form of device management and data visualization. The IoT platform is the middleman between the data we collect from our devices and applications for our end users.

There are dozens of different IoT platform types and some IoT platforms belong to multiple types. I’ll give you an overview of four common platform types:

  • Network Connectivity
  • Cloud
  • End-to-end
  • Analytics

Network Connectivity

Network Connectivity IoT platforms focus on the networking part. They are also known as network provider platforms. They provide software and hardware to get your devices online. Examples are vendors like AT&T, Verizon, and Vodafone.

Cloud

Cloud providers also offer IoT platforms. One advantage of a cloud provider is scalability. Your platform can grow from one device to thousands of devices. Once you have your data in the cloud, you can use all of the cloud provider’s services. Examples are Amazon AWS, Google Cloud, and Microsoft Azure.

If you are interested, I have an example where I connect an ESP32 to AWS IoT.

End-to-end

There are IoT platforms that offer an end-to-end solution. They have the devices, gateways, hardware, software, and everything else to build a complete IoT solution. An example is Particle.

Analytics

Some IoT platforms specialize in data management and analytics. For example, Thingspeak visualizes and analyses data with MATLAB.

IoT Architecture Models

IoT is like the Wild West and similar to the first computer networks where we had different network protocols like IPX/SPX, NetBEUI, and TCP/IP.

IoT networks must support a range of devices and a variety of protocols. The hardware refresh cycle is also longer compared to IT systems. When new IT systems are installed, usually the older systems are replaced. This is not always the case with IoT.  When new IoT systems are installed, it’s likely that older IoT systems remain in place.

This can be challenging. Connecting thousands of devices with different hardware, software, and protocols. Making it all work while keeping things secure. All the data that our devices produce must be managed, processed, transferred, and stored.

Standardization can help here. It ensures interoperability and reduces the security risk by using security standards.

There are different IoT architecture models / reference models that attempt to standardize and help with the building blocks required for an IoT system. Here are two examples:

  • OneM2M
  • IoT World Forum (IoTWF) Architecture

OneM2M is a global organization that creates architecture, requirements, API specifications, security standards and interoperability for machine-to-machine (M2M) and IoT.

The Internet of Things World Forum (IoTWF) is an exclusive industry event, hosted by Cisco.  IoTWF created a seven layer architectural reference model in 2014:

  • Physical devices and controllers (layer 1): this layer contains our devices (things).
  • Connectivity (layer 2): this layer provides connectivity for our devices.
  • Edge (fog) computing (layer 3): this layer provides functions for edge and fog computing.
  • Data accumulation (layer 4): this layer supports data storage which allows analysis at a later time.
  • Data abstraction (layer 5): this layer is responsible for data rendering and storage.
  • Application (layer 6): on this layer we analyze and interpret information.
  • Collaboration and processes (layer 7): this layer is responsible for providing people the right data, with the right analysis, at the right time.

Data Transportation and Computation

Enterprise networks use a hierarchical network structure with a core, distribution, and access layer. The data center (or servers when you have a smaller network) is connected to the core layer. Most of the traffic remains at the core layer. There isn’t a lot of traffic in the access layer.

With IoT networks, it’s different. IoT networks can be very large with thousands of devices on the access layer. Almost all data is generated on the access layer. The network must be able to scale appropriately to handle all data from our devices.

For example, imagine we have a large IoT network with 500.000 devices on the access layer. Each device transmits 20KB of data every 10 seconds.

This results in 500000 * 20KB / 10 = 1000000 KB (1 GB) per second. That’s 3600 GB per hour. You need to think about how much bandwidth your access layer and its uplinks support.

Not all traffic has to go to the upper layers. We can aggregate traffic. This is something we explain in the edge and fog computing section.

Conclusion

In this lesson, you learned about items that make up an IoT technology stack, the architecture models, and the impact IoT has on your network:

  • IoT devices are not just the “smart” devices like activity trackers, smart watches, connected cars, etc.
  • Many devices are sensors and actuators. We have used these for decades but now we connect them thanks to IoT.
  • Sensors and actuators are transducers. A transducer is a device that converts energy from one form to another.
    • A sensor detects or measures a physical quantity and converts it into another form, usually electric pulses. An example is a temperature sensor.
    • An actuator receives a signal and sets something in motion. For example, an actuator on your radiator that opens or closes a valve.
  • Gateways sit in between our IoT devices and IoT platform. They have many roles, including translation between different protocols.
  • The IoT platform is where we connect our devices to and where we combine data with applications and services for end users.
    • There are many different IoT platforms and types. The term “IoT platform” can mean different things to different people.
  • There are organizations that attempt to create architectures for IoT:
    • OneM2M.
    • IoT World Forum (IoTWF) Architecture.
  • IoT networks have different requirements than enterprise IT networks.
    • IoT networks produce most of the data on the access layer.
    • There are many devices.
    • A single device doesn’t produce much traffic but thousands of devices do produce a lot of traffic.

I hope you enjoyed this lesson. If you have any questions, please leave a comment.

No comments:

Post a Comment