In the previous tutorial, a brief introduction of Internet of things was presented. The importance, challenges, applications and trends in IOT were discussed. Now, equipped with basic understanding of IOT, it’s time to investigate the building blocks of IOT. IOT is developed as a package with integration of various technologies. Each technology has its own principle role within the IOT system. In this tutorial, the basic building blocks of IOT and their place in an IOT infrastructure will be examined.
IOT allows things in the physical world (IOT devices/objects) to interact with the virtual world (cloud services, platforms and applications) through a communication network enabling exchange and sharing of context aware information with each other. So, any IOT system is built from the physical world, virtual world and a communication network. These three are broadly the basic blocks of an IOT system. So, an IOT system can be precisely represented by the following block diagram –
Internet of Things illustrated in simple blocks
In order to have an aerial view of the infrastructure of an IOT ecosystem, it is important to understand the following terminology –
1) Things – In context to Internet of things, any object of the physical world or the information world that has a unique identity and can be integrated in a communication network is called ‘Thing’. The Things can be physical things as well as virtual things. The physical things are generally referred to ‘(IOT) devices’. The concept of things in IOT is a bit different to concept of devices too. While things can be virtual or physical things, when the term devices is used, it refers to physical equipments that can communicate in a network and may be equipped with sensors, actuators, processors, memory and/or controllers. While things can also be virtual things like cloud service solutions. Such virtual things are software applications, APIs or application solutions that exchange and process data in their own authority. Since such applications too, have their unique identity or identification keys, they are counted as things. The virtual things can also be informational representation of physical things like thing shadows in Amazon Web Services. A simple example of physical things can be a temperature sensor. A temperature sensor can be connected to a communication network through a controller and it may be collecting and sharing dynamic information about the real time temperature of the environment.
2) Physical World – So, there can be both physical things as well as virtual things in an IOT system. The physical world in an IOT system refers to the collection of physical things or devices. The physical things or devices are built around controllers or processors comprising IOT boards. The IOT boards have a sitting microcontroller or microprocessor along with limited memory resource and one or more communication interfaces. They have general purpose input/output pins through which they interface with one or more sensors, actuators or communication channels. So, these physical things are capable of sensing, collecting, storing, sharing and processing information and may be capable of operating one or more actuators to impact in the real world.
3) Virtual World – In IOT systems, virtual world refers to the collection of virtual things. These virtual things are generally web, cloud or mobile applications, APIs or application platforms. The virtual world or the collection of virtual things have prime role in data logging, data mining and analytics in an IOT system. The data from physical things is shared to the software applications (Web or Cloud services) where it is stored, analyzed and processed to derive useful insights or obtain information needed to operate actuators.
4) Communication Network – In IOT, communication network is link that allows interaction between the physical world and the virtual world. Practically, it is a wide area network or internet network that allows IOT boards loaded with sensors and actuators to communicate with web or cloud servers or allow them to communicate with each other. It is no different than typical internet network implemented through multiple layers (Physical, Link, Network, Transport and Application Layers). At each layer there are various communication protocols to facilitate secure and efficient data exchange. The data transmitted through various layers is exchanged between the physical world (IOT boards loaded with sensors and actuators) and the virtual world (web or cloud services and applications) with each data transfer or exchange having a specific purpose or insight.
At physical or link layer, some of popular communication protocols used are LR-WPAN, 6LoWPAN, Bluetooth/LE, 802.15.4, LTE, GPRS, CDMA, NFC, Zigbee, 802.11 Wi-Fi, WIRELESSHART, Zwave, Sigfox, DASH7, LoRaWAN, Thread, INSTEON etc. The most common network layer protocols are IPv4 and IPv6. Some of the common transport layer protocols include TCP, UDP, DTLS and TLS. Some of the popular application layer protocols are DDS, MQTT, REST, CoAP, LLAP, XMPP, SSI, AMQP, XMPP-IOT and MQTT-SN.
Architecture of an IOT System –
The different organizations and service providers define, implement and recognize IOT architecture in different ways. However, the basic architecture of an IOT system remains same underneath every implementation and business model. The basic architecture of an IOT system can be understood from a four-layer model as follow –
1) IOT devices and Gateways
2) Communication Network
3) Cloud or Server
4) IOT application
The data is generated, transported, processed and converted to useful insights by an IOT system. The basic architecture of an IOT system can be represented by the following block diagram –
IOT System Architecture
1) IOT devices – Any device or equipment counts as an IOT device if it satisfies the following requirements –
a) It is capable of communicating with other devices and connect with an internet network. It must have hardware interfaces and firmware or operating system which can set up communication with other devices or connect to an internet network.
b) It must be equipped with sensors and/or actuators. The sensors may be collecting static or dynamic information from the physical world. The information or data collected by the sensor should be shared or exchanged with a server or cloud. The device may also have actuators to act upon or according to the processed data or insights sent back by the cloud or server.
c) The device must have a controller or processor to capture data, memory to store it (often temporarily) and firmware or operating system to process captured data or data received from the server or cloud.
Most of the IOT devices are built using standard IOT boards. These boards can be microcontroller boards or daughter boards (single board computers). Some of the popular IOT boards include Arduino, Raspberry Pi, Beagle Bone, CubieBoard, Pinnocio, Banana Pi and many others. The boards come with microcontroller or processor integrated with on-board memory (RAM and ROM), digital and analog GPIO (general purpose input output) pins and various communication channels (like USB, I2C, SPI, TWI, Ethernet). These boards can be stacked with other boards or sensors and actuators to form an IOT device (physical device).
The IOT devices can also be built by augmenting network interfaces, RF or Cellular transceivers with popular microcontrollers or processors. Such IOT devices are custom built for mission critical applications. Some of the leading microcontroller manufacturers include Texas Instruments (TI), ARM, Freescale, Intel, Microchip Technology, Atmel and Broadcom.
Based on the hardware design and capabilities, the IOT devices can be broadly categorized as follow –
1) General Devices
2) Sensing and Actuating Devices
General Devices – A general device is that device under IOT application domain which has embedded processing and communication capabilities. A general device can process some information and can connect to a communication network through wired or wireless interfaces. Basically, these devices only collect data and insights from a cloud or server and operate or perform data processing accordingly. For example, web controlled industrial machines or home appliances can be considered as general IOT devices.
Sensing and Actuating Devices – The sensing and actuating devices are equipped with sensors and actuators that enable them to interact and impact the real world. The sensors collect information pertaining to real physical quantities like temperature, humidity, light intensity, force, density etc and pass it to the on-board controller/processor. The controller or processor store the information (temporarily) and pass it on to the communication network. Through various layers of communication network, it is received at the cloud or server. The cloud process information and send back useful insights to operate actuators.
Role of Gateways
The IOT device may setup communication with other devices through a gateway or without a gateway. The gateways are basically required for protocol conversion. Suppose, an IOT device can send and receive data through Zigbee interface and so will communicate through Zigbee protocol. The communication network may be able to receive and send data through TCP-IP protocol. In such case, there will require a gateway which could convert data coming through the device using Zigbee protocol to data transmission through TCP-IP protocol and data coming from cloud or server through TCP-IP protocol to Zigbee protocol for reception by the IOT device. Since the communication network and the on-board network of the IOT device are different, the gateway act as a two-way bridge between the two networks.
The gateway collects and extract the (sensor) data as per the device protocol, wrap and format it according to the protocol the communication network be operating at and push data to the communication network for transmission to the cloud or server. Same way, it receives and extract data, insights or information from the cloud or server, wrap and format it according to the network protocol utilized by the on-device network and push the cloud processed data to the IOT device.
So, a gateway may be required in either of the two scenarios –
1) When the IOT device and the communication network may be operating at different protocols. Often, these protocols may be at different network layers. Like from the example above, the Zigbee is a physical layer protocol while the TCP-IP is a transport layer protocol. A wireless sensor network is another example of device to network communication through gateways.
2) One IOT device may need to communicate with another IOT device operating at different protocol. For example, a bluetooth device may communicate with other BLE devices over the air using a gateway.
So, the gateways provide indirect way of communication between device and cloud or one device and another device. In case of device to device communication, the IOT endpoints (individual IOT devices) may be co-located and communicating at different physical or link layer protocols (RF protocols like Bluetooth, Wi-Fi, Zigbee, Bluetooth-LE) through a gateway. Such a gateway is called edge gateway.
IOT Communication through Gateway
Communication without Gateway
An IOT device can also connect to a cloud or other IOT device directly. In such case, the device and the communication network or the devices communicating with each other must be sharing and exchanging data using same protocol. So, there would be no need of protocol conversion and so any gateway. Usually, such device to device or device to network communication is possible through application layer protocols like Message Queuing Telemetry Transport (MQTT), Constrained Application Protocol (CoAP), Data Distribution Service (DDS), Advanced Message Queuing Protocol (AMQP), and Extensible Messaging and Presence Protocol (XMPP). For example, one ESP8266 IOT board can directly communicate with another ESP8266 board directly using MQTT protocol. MQTT is an application layer protocol.
IOT Communication without Gateway
The IOT devices (IOT boards) may have a firmware, operating system or real time operating system to process data, perform messaging and communication, manage data storage and manage actuator operations. Some of the popular IOT operating systems are Embedded Linux, TinyOS, Snappy Ubuntu Core, Contiki, FreeRTOS, Mantis, ARM’s mbedOS, RIOT OS, Windows 10, Nucleus RTOS, eCOS, SAFE ROTS, Android Things, Green Hills Integrity, WindRiver VxWorks and BrilloOS.
2) Communication Network – The communication network is generally the typical internet network having different layers (Physical, Link, Network, Transport and Application) and communication protocols operating at different layers.
3) Cloud/Server – The cloud or server is the edge of the IOT system. A cloud stores data collected from different and myriad of IOT devices and perform data mining and analytics to derive useful insights from it. It is also responsible for managing the connected devices and networks, manage device to device communications and implement IOT applications by operating and synchronizing different IOT devices and communication between together. The cloud may also communicate with other private and public cloud services to enable an IOT application.
4) IOT Application – The processing, mining and analysis of the data at the cloud is done by the IOT application. The IOT application is the piece of software at the cloud server which extracts data, manipulate it to derive useful insights and manage to securely push insights to the target IOT devices. For example, an IOT application designed for home automation might process data from sensors and send commands from the cloud to operate home appliances.
In the next tutorial, different IOT communication protocols used at different layers of the communication network will be examined.
Filed Under: Articles