IoT Module 1
IoT Module 1
The Internet of Things (IoT) is the network of physical devices such as vehicles, buildings and different
objects of everyday life equipped with microcontrollers, transceivers for digital communication, and
suitable protocol stacks that will make them able to collect and exchange data with one another and
with the users, becoming an integral part of the Internet. This network provides greater direct integration
of the physical world into computer-based systems, resulting in increased efficiency, accuracy and
financial benefit. The IoT is expected to improve the intelligence of cities, promote the interaction
between humans and the environment, and enhance reliability, resilience and efficiency, while reducing
costs and resource consumption. Home automation plays a major role, but the IoT also provides
opportunities for a wide range of industries, including manufacturing, building automation, automotive,
transportation, healthcare, agriculture and more.
Definition of IoT
The Internet of Things (IoT) is the network of physical objects that contain embedded technology to
communicate and sense or interact with the internal states or with the external environment in which
they are operating.
Gartner Research
A dynamic global network infrastructure with self-configuring capabilities based on standard and
interoperable communication protocols where physical and virtual "things" have identities, physical
attributes, and virtual personalities and use intelligent interfaces, and are seamlessly integrated into the
information network, often communicate data associated with users and their environments.
Characteristics of IoT
Dynamic & Self-Adapting: IOT devices and systems may have the capability to dynamically
adapt with the changing contexts and take actions based on their sensed environment.
In a surveillance system comprising of a number of surveillance cameras; the
surveillance cameras can adapt their modes (to normal or infra-red night modes) based
on whether it is day or night. Cameras could switch from lower resolution to higher
Interoperable Communication Protocols: IoT devices may need to work with a wide range
of other devices made with different technologies, sold by different vendors, and produced by
different companies.
Unique Identity: Each IoT device must have a unique identity in order to uniquely identify it
from other devices in the existing network. This can be accomplished using IP address
(IPv4/IPv6) or Personal Area Network (PAN) ID.
Stability. Even though technology will advance, our customers demand products that work
reliably, for a long time, and in a manner with which they are comfortable. Over the last 50
years’ automotive technology has drastically improved, but the driving experience, how we
drive, has remained almost constant.
Scalability. We already seen that in IoT system, billion and trillions of nodes/physical objects
are going to be attached, so scalability of existing IoT infrastructure is very much important. In
order to be effective and profitable, we need to develop systems that can scale.
Security: Because embedded systems are deployed in life-critical situations, and because the
quality of service affects our profits, we must protect the system from a determined adversary.
Integrated into Information Network: IoT devices are usually integrated into the information
network that allows them to communicate and exchange data with other devices and systems.
IoT devices can be dynamically discovered in the network, by other devices and/or the network,
and have the capability to describe themselves (and their characteristics) to other devices or
user applications. For example, a weather monitoring node can describe its monitoring
capabilities to another connected node so that they can communicate and exchange data.
Integration into the information network helps in making IoT systems "smarter" due to the
collective intelligence of the individual devices in collaboration with the infrastructure. Thus, the
data from a large number of connected weather monitoring IoT nodes can be aggregated and
analyzed to predict the weather.
The "Things" in IoT usually refers to IoT devices which have unique identities and can perform remote
sensing, actuating and monitoring capabilities. (A thing is an embedded system with inputs and outputs
performing a dedicated function.)
1. Controller/Processing Unit
2. Sensor
3. Actuator
4. Communication Module
5. Power management Module
1. Controller/Processing Unit:
A controller/processing unit consist of a CPU associated with a small storage unit including on-chip
Random Access Memory (RAM) and flash memory (ROM) and I/O interface. The processing unit is
responsible for performing tasks, processing data, and controlling the functionality of other components
of the IoT node. A simple controller model is shown in fig.2.
Figure 3. Interfacing of Sensor, Actuator and Communication Module with a Controller Unit
Analog Sensor:
o Analog Sensors produce a continuous output signal or voltage which is generally
proportional to the quantity being measured.
o Physical quantities such as Temperature, Speed, Pressure, Displacement, Strain etc.
are all analog quantities as they tend to be continuous in nature.
Digital Sensor:
o Digital Sensors produce discrete digital output signals or voltages that are a digital
representation of the quantity being measured. Digital sensors produce a binary output
signal in the form of a logic "1" or a logic "0", ("ON" or "OFF").
o Digital signal only produces discrete (non-continuous) values, which may be output as
a single "bit" (serial transmission), or by combining the bits to produce a single "byte"
output (parallel transmission).
Temperature Sensor
Humidity Sensor
Compass Sensor
Light Sensor
Sound Sensor
Pressure Sensor
Camera Sensor and so on.
4. Communication Module:
A IoT node connects with other nodes or to a network through the communication module. This
module is used to provide wired or wireless communication facility to the controller. For ex-
Ethernet, Wi-Fi, Bluetooth Low energy (BLE), ZigBee etc.
Embedded System
Note:
An IoT node/ smart object is also an Embedded system which is designed to perform a specific task.
Internet:
The network formed by the co-operative interconnection of a large number of computer
networks. Hence it is also called as Network of networks.
All devices over the internet communicates to each other using a standard protocol called as TCP/IP or
the Transmission Control Protocol/Internet Protocol.
* A protocol is a set of programs that governs some rules and conventions for communication between
network devices in a network.
TCP/IP functionality is divided into four layers, each of which include specific protocols. The layer are
as follows from bottom to top. The layers are depicted in figure 7.
The layer consists of protocols that operate only on a link -the network component that interconnects
nodes or hosts in the network. Some of the Link layer protocols are Ethernet, WiFi, WiMax, LR-WPAN,
cellular standards which are discussed as follows:
A. 802.3 – Ethernet
IEEE 802.3 is a collection of wired Ethernet standards for the link layer. For example,
802.3 is the standard for 10BASE5 Ethernet that uses coaxial cable.
802.3.i is the standard for 10BASE-T Ethernet over copper twisted-pair connection
802.3.j is the standard for 10BASE-F Ethernet over fiber optic connection
802.3ae is the standard for 10 Gbit/s Ethernet over fiber, and so on.
These standards provide data rates from 10 Mb/s to 40 Gb/s and higher.
C. 802.16 – WiMax
IEEE 802.16 is a collection of wireless broadband standards, including extensive descriptions for the
link layer (also called WiMax). WiMax standards provide data rates from 1.5 Mb/s to I Gb/s. The recent
update (802.16m) provides data rates of 100 Mbit/s for mobile stations and 1 Gbit/s for fixed stations.
D. 802.15.4- (LR-WPAN)
IEEE 802.15.4 is a collection of standards wireless personal area networks These standards form the
basis of specifications for high level communication protocols such as ZigBee. LR-WPAN standards
provide data rates from 40 Kb/s 250 Kb/s. These standards provide low-cost and low-speed
communication for power constrained devices.
The network layers are responsible for sending of IP datagrams from the source network to the
destination network. This layer performs the host addressing and packet routing. Host identification is
done using hierarchical IP addressing schemes such as IPv4 or IPv6.
A. IPv4
Internet Protocol version 4 (IPv4) is widely used in internet to identify the devices on a network. IPv4
uses a 32-bit address scheme that allows total of 232 or 4,294,967,296 addresses. As more and more
devices will be connected to the Internet, these addresses will get exhausted in next few years. So IPv4
has been succeeded by IPv6 in its range.
B. IPv6
Internet Protocol version 6 (IPv6) is the newest version of Internet protocol and successor to IPv4. IPv6
uses 128-bit address scheme that allows total of 2128 or 3.4 x 1038 addresses.
C. 6LoWPAN
6LoWPAN (IPv6 over Low Power Wireless Personal Area Networks) brings IP protocol to the low-power
devices which have limited processing capability. 6LoWPAN operates in the 2.4 GHz frequency range
and provides data transfer rates of 250 Kb/s. 6LoWPAN works with the 802.15.4 link layer protocol and
defines compression mechanisms for IPv6 datagrams over IEEE 802.15.4-based networks.
3. Transport Layer
The transport layer is responsible for maintaining end-to-end communications across the network. TCP
handles communications between hosts. The transport layer provides functions such as error control,
segmentation, flow control and congestion control. There are two protocols used in transport layer are
as follows:
A. Transmission Control Protocol (TCP)
B. User Datagram Protocol (UDP)
A. TCP
Transmission Control Protocol (TCP) is the most widely used transport layer protocol, that is used by
web browsers (along with HTTP, HTTPS application layer protocols), email programs (SMTP
application layer protocol) and file transfer (FTP).
TCP is a connection oriented and stateful protocol.
TCP ensures reliable transmission of packets.
TCP also provides error detection capability so that duplicate packets can be discarded and
lost packets are retransmitted.
The flow control capability of TCP ensures that rate at which the sender sends the data is not
too high for the receiver to process.
The congestion control capability is also provided by TCP
4. Application Layer
The application layer basically provides an Interface point for user applications. Some of the protocols
used in application layer protocols in the context of IoT are as follows:
A. Hypertext Transfer Protocol (HTTP)
B. Constrained Application Protocol (CoAP)
C. WebSocket
D. Message Queue Telemetry Transport (MQTT)
E. Extensible Messaging and Presence Protocol (XMPP)
F. Data Distribution Service (DDS)
G. Advanced Message Queuing Protocol (AMQP)
A. HTTP
Hypertext Transfer Protocol (HTTP) is the application layer protocol that forms the foundation of the
World Wide Web (WWW).
HTTP protocol follows a request-response model where a client sends requests to a server
using the HTTP commands.
HTTP is a stateless protocol and each HTTP request is independent of the other requests.
An HTTP client can be a browser or an application running on the client (e.g., an application
running on an 10T device, a mobile application or other software).
HTTP protocol uses Universal Resource Identifiers (URIs) to identify HTTP resources.
B. CoAP
Constrained Application Protocol (CoAP) is an application layer protocol for machine-to-machine (M2M)
applications.
Used for constrained environments with constrained devices and constrained networks.
Like HTTP, CoAP is a web transfer protocol and uses a request-response model.
It runs on top of UDP instead of TCP.
D. MQTT
Message Queue Telemetry Transport (MQTT) is a light-weight messaging protocol based on the
publish-subscribe model. MQTT uses a client-server architecture and it work as follows:
The central communication point is the MQTT broker, which is in charge of dispatching all
messages between the senders and the rightful receivers.
Each Publisher that publishes a message to the broker, includes a topic into the message.
Each client that wants to receive messages has to subscribes to a certain topic and the broker
delivers all messages with the matching topic to the subscriber.
Therefore, the subscriber and publisher don’t need to know each other IP address.
This architecture enables highly scalable solutions without dependencies between the data
producers and the data consumers.
MQTT is well suited for constrained environments where the devices have limited processing
and memory resources and the network bandwidth is low.
Real-world Applications: Facebook Messenger, Amazon Web Services, Microsoft Azure IoT and many
more.
F. DDS
Data Distribution Service (DDS) is a data-centric middleware standard for device-to-device or machine-
to-machine communication.
DDS uses a publish-subscribe mode.
Publishers (e.g. devices that generate data) create topics to which subscribers (e.g., devices
that want to consume data) can subscribe.
DDS provides quality-of-service (QoS) control and configurable reliability.
G. AMQP
Advanced Message Queuing Protocol (AMQP) is an open application layer protocol for
business messaging.
It supports both point-to-point and publisher/subscriber models, routing and queuing.
AMQP brokers receive messages from publishers and route them over connections to
consumers.
Publishers publish the messages to exchanges which then distribute message copies to
queues.
There are 4 communication protocol models are available for Internet of Things. These are as follows:
A. Request-Response Model
B. Publish-Subscriber Model
C. Push-Pull Model
D. Exclusive Pair Model
A. Request-Response Model
• Request-Response is a communication model in which the client sends requests to the server
and the server responds to the requests.
• When the server receives a request, it decides how to respond, fetches the data, retrieves
resource representations, prepares the response, and then sends the response to the client.
• Request-Response model is a stateless communication model and each request-response pair
is independent of others. Figure 10.1 shows the client-server interactions in the request-
response model.
B. Publish-Subscribe Model
• Publish-Subscribe is a communication model that involves publishers, brokers and
subscribers/consumers.
• Publishers are the source of data. Publishers send the data to the topics which are managed
by the broker. Publishers are not aware of the subscribers.
• Subscribers subscribe to the topics which are managed by the broker.
• When the broker receives data for a topic from the publisher, it sends the data to all the
subscribed consumers.
• Message Queue Telemetry Transport (MQTT) follow Publish-Subscribe model (refer MQTT
protocol mentions layer protocol section). Figure 10.2 shows the publisher-broker-subscribers
interactions in the publish-subscribe model.
Request to setup Connection
Response accepting the request
Message from Client to Server
Server Client
Message from Server to Client
Connection close request
Connection close response
IoT is enabled by several technologies including wireless sensor networks, cloud computing, big data
analytics, embedded systems and so on.
A Wireless Sensor Network (WSN) comprises of distributed devices with sensors which are used to
monitor the environmental and physical conditions. A WSN consist of a number of end-nodes and
routers and a coordinator.
End nodes have several sensors attached to them.
Routers are responsible for routing the data packets from end-nodes to the coordinator.
The coordinator collects the data from all the nodes. Coordinator also acts as a gateway that
connects the WSN to the Internet.
Some examples of WSNs used in IoT systems are as follows:
Weather monitoring systems use WSNs in which the nodes collect temperature, humidity and
other data, which is aggregated and analyzed.
Indoor air quality monitoring systems use WSNs to collect data on the indoor air quality and
concentration of various gases.
Soil moisture monitoring systems use WSNs to monitor soil moisture at various locations.
WSNs are enabled by wireless communication protocols such as IEEE 802.15.4. WSNs are self-
organizing networks. Since WSNs have large number of nodes, manual configuration for each node is
not possible. The self-organizing capability of WSN makes the network robust. In the event of failure of
some nodes or addition of new nodes to the network, the network can reconfigure itself.
B. Cloud Computing
The most basic category of cloud computing services. With IaaS, we can rent IT infrastructure such as
servers and virtual machines (VMs), storage, networks, operating systems from a cloud provider on a
pay-as-you-go basis. Hence Infrastructure as a service (IaaS) is an instant computing infrastructure,
provisioned and managed over the Internet. Quickly scale up and down with demand and pay only for
what you use.
Software-as-a-service (SaaS) is a method for delivering software applications over the Internet, on
demand and typically on a subscription basis. With SaaS, cloud providers host and manage the
software application and underlying infrastructure and handle any maintenance, like software upgrades
and security patching. Users connect to the application over the Internet, usually with a web browser
on their phone, tablet or PC.
Big data is defined as collections of data sets whose volume is so large that it is difficult to process
Some examples of big data generated by IoT systems are described as follows:
Sensor data generated by IoT systems such as weather monitoring stations.
Health and fitness data generated by IOT devices such as wearable fitness bands.
Data generated by IOT systems for location and tracking of vehicles and so on.
D. Embedded System
Note:
An IoT node/ smart object is also an Embedded system which is designed to perform a specific task.
Representational State Transfer (REST) is a set of architectural principles by which you can design
web services and web APIs that focus on a system’s resources and how resource states are addressed
and transferred. REST APIs follow the request-response communication model. The REST
architectural constraints apply to the components, connectors, and data elements, within a distributed
hypermedia system. Figure 11 shows the communication with REST APIs.
WebSocket APIs allow bidirectional, full duplex communication between clients and servers.
WebSocket APIs follow the exclusive pair communication model.
1. Resource: Resources are software components on the IoT device for accessing, processing, and
storing sensor information, or controlling actuators connected to the device. Resources also include
the software components that enable network access for the device.
2. Controller Service: Controller service is a native service that runs on the device and interacts with
the web services. Controller service sends data from the device to the web service and receives
commands from the application (via web services) for controlling the device.
3. Database: Database can be either local or in the cloud and stores the data generated by the IoT
device.
4. Web Service: Web services serve as a link between the IoT device, application, database and
analysis components. Web service can be either implemented using HTTP and REST principles
(REST service) or using WebSocket protocol (WebSocket service).
5. Analysis Component: The Analysis Component is responsible for analyzing the IoT data and
generate results in a form which are easy for the user to understand.
6. Application: IoT applications provide an interface that the users can use to control and monitor
various aspects of the IoT system. Applications also allow users to view the system status and view
the processed data.
IoT Levels-1
A level-1 IoT system has a single node/device that performs sensing and/or actuation, stores data,
performs analysis and hosts the application. Level-1 IoT systems are suitable for modeling low cost and
low-complexity solutions where the data involved is not big and the analysis requirements are not
computationally intensive.
IoT Level-2
A level-2 IoT system has a single node that performs sensing and/or actuation and local analysis. Data
is stored in the cloud and application is usually cloud based. Level-2 IoT systems are suitable for
solutions where the data involved is big, however, the primary analysis requirement is not
computationally intensive
The lower data rate of the ZigBee devices allows for better sensitivity and range, but of course offers
less throughput. The primary advantage of ZigBee lies in its ability to offer low power and extended
battery life.
IoT system needs some way to connect sensors/devices to the cloud so that data can be sent
back-and-forth between them (Figure17.2).
IoT gateways can be essential in making this connection possible.
Gateways act as communication bridges between IoT sensors/devices network and
the cloud server.
These are hardware device or a virtual software code which acts as a communication
bridge between IoT Sensor Network and Cloud Server.
Figure17.3 IoT Gateway used in home automation connecting local Non-IP Nodes to Internet
(IoT-architecture-with-Gateway)
IoT Level-6
A level-6 IoT system has multiple independent end nodes that perform sensing and/or actuation and
send data to the cloud. Data is stored in the cloud and application is cloud-based.
The analytics component analyzes the data and stores the results in the cloud database. The results
are visualized with the cloud-based application. The centralized controller is aware of the status of all
the end nodes and sends control commands to the nodes.
Out of many applications some of the potential uses of IoT are mentioned below:
SMART HEALTHCARE
Devices connect to hospitals, doctors and relatives to alert them of medical emergencies
and take preventive measures.
SMART VEHICLES
Vehicles self-diagnose themselves and alert owners about system failures.
SMART CITIES
City-wide infrastructure communicating amongst themselves for unified and synchronized
operations and information dissemination.
SMART DUST
Computers smaller than a grain of sand can be sprayed or injected almost anywhere to
measure chemicals in the soil or to diagnose problems in the human body.
Business/Manufacturing
Real-time analytics of supply chains and equipment, robotic machinery.
Healthcare
Portable health monitoring, electronic recordkeeping, pharmaceutical safeguards.
Retail
Inventory tracking, smartphone purchasing, anonymous analytics of consumer choices.
Security
Biometric and facial recognition locks, remote sensors.