F-IoT - Unit-1
F-IoT - Unit-1
Presented By:
G. Kiran Kumari
Assistant Professor
Department of ECE
Anurag College of Engineering
Syllabus
UNIT – I
Introduction to Internet of Things, Characteristics of IoT,
Physical design of IoT, Functional blocks of IoT, Sensing,
Actuation, Basics of Networking, Communication
Protocols, Sensor Networks.
UNIT – II
Machine-to-Machine Communications, Difference
between IoT and M2M, Interoperability in IoT,
Introduction to Arduino Programming, Integration of
Sensors and Actuators with Arduino.
UNIT – III
Introduction to Python programming, Introduction to
Raspberry Pi, Interfacing Raspberry Pi with basic
peripherals, Implementation of IoT with Raspberry Pi
UNIT - V
Cloud Computing, Sensor-Cloud, Smart Cities and
Smart Homes, Connected Vehicles, Smart Grid,
Industrial IoT, Case Study: Agriculture, Healthcare,
Activity Monitoring.
REFERENCE BOOKS:
1. Vijay Madisetti, Arshdeep Bahga, “Internet of Things: A
Hands-On Approach”
2. Waltenegus Dargie,Christian Poellabauer, "Fundamentals of
Wireless Sensor Networks: Theory and Practice"
3. Beginning Sensor networks with Arduino and Raspberry Pi –
Charles Bell, Apress, 2013
4
Anurag College of Engineering
Course Objectives:
UNIT – I
Cities:
• Smart parking systems that provide status updates on
available slots, smart lighting that helps in saving energy,
smart roads that provide information on driving
conditions and structural health monitoring systems.
Energy Systems:
• Smart grids, grid integration of renewable energy
sources and prognostic health management systems.
Retail Domain:
• Inventory management, smart payments and smart
vending machines.
Anurag College of Engineering 12
Agriculture:
• Smart irrigation systems that help in saving water
while enhancing productivity and green house control
systems.
Industrial Applications:
• Machine diagnosis and prognosis systems that help in
predicting faults and determining the cause of faults and
indoor air quality systems.
2) Self Configuring:
Allowing a large number of devices to work
together to provide certain functionality.
4) Unique Identity:
Each IoT device has a unique identity and a unique
identifier (IP address).
1) Things in IoT
2) IoT Protocols
28
Anurag College of Engineering
802.15.4 – LR-WPAN
29
Anurag College of Engineering
2G/3G/4G- Mobile Communication
• There are different generations of mobile
communication standards.
✓ Second generation (2G- including GSM and
CDMA)
✓ Third generation (3G- including UMTS and
CDMA 2000)
✓ Fourth generation (4G- including LTE).
• IoT devices based on these standards can
communicate over cellular networks.
• Data rates for these standards range from 9.6 Kb/s
(for 2G) to up to 100 Mb/s (for 4G).
Anurag College of Engineering 30
Network/ Internet Layer
• 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.
• Datagrams contains source and destination addresses
which are used to route them from the source to
destination across multiple networks.
• Host identification is done using IP addressing schemes
such as IPv4 or IPv6.
• IP protocols establish connections on packet networks but
do not guarantee delivery of packets
• The protocols of this layer are IPv4, IPv6, 6LoWPAN. 31
Anurag College of Engineering
IPv4- Internet Protocol version 4:
• Internet Protocol version4 is used to identify the devices
on a network using a hierarchical addressing scheme.
• It uses a 32-bit address scheme and allows total of 232
addresses.
36
Anurag College of Engineering
Application Layer
• Application layer protocols define how the
applications interface with lower layer protocols to send
data over the network.
• The application data in files is encoded by the application
layer protocol and encapsulated in the transport layer
Protocol which provides connection or transaction
oriented communication over the network.
• The protocols in this layer enable process-to-process
connections using ports.
• Port numbers are used for application addressing.
Eg. Port 80 for HTTP.
• The protocols of this layer are HTTP, CoAP, WebSocket,
MQTT, XMPP, DSS, AnuragAMQP.
College of Engineering
37
Hypertext Transfer Protocol (HTTP):
39
Anurag College of Engineering
WebSocket:
40
Anurag College of Engineering
Message Queue Telemetry Transport (MQTT):
41
Anurag College of Engineering
Extensible Messaging and Presence Protocol
(XMPP) :
• Extensible Message and Presence Protocol for real time
communication and streaming XML data between
network entities.
• XMPP powers wide range of applications including
messaging, presence, data syndication, gaming, multi-
party chat, voice/video calls.
• It allows sending small chunks of XML data from one
network entity to another in near real-time.
• It is a decentralized protocol and uses client-server
architecture.
• It supports both client-to-server and server-to-server
communication paths.
• In IoT, XMPP allows real-time communication between
IoT devices.
42
Anurag College of Engineering
Data Distribution Service (DSS):
43
Anurag College of Engineering
Advanced Message Queuing Protocol(AMQP):
• Advanced Message Queuing Protocol is an open
application layer protocol for business messaging.
• It supports both point-to-point and publish-subscribe
models.
• AMQP brokers receive messages from publishers
(devices or applications that generate data) and route them
over connections to consumers (applications that process
data).
• Publishers publish the messages to exchanges which then
distribute message copies to queues.
• Messages are either delivered by the broker to the
consumers which have subscribed to the queues or the
consumers can pull the messages from the queues.
44
Anurag College of Engineering
LOGICAL DESIGN of IoT
Communication:
The communication block handles the communication for
the IoT system.
Services:
An IoT system uses various types of IoT services such as
services for device monitoring, device control services,
data publishing services and services for device
discovery.
47
Anurag College of Engineering
.
Management:
Management functional block provides various functions
to govern the IoT system.
Security:
Security functional block secures the IoT system by
providing functions such as authentication, authorization,
message and content integrity and data security.
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 or analyze the processed data.
48
Anurag College of Engineering
IoT Communication Models
59
Anurag College of Engineering
REST Based Communication APIs (cont’d)
• The REST architectural constraints:
Fig. shows communication between client server with
REST APIs.
66
Anurag College of Engineering
WebSocket Based Communication APIs
(cont’d)
88
Anurag College of Engineering
Star Topology
• In this type of topology all the computers are connected
to a single hub through a cable.
• This hub is the central node (is known as Server) and all
others nodes are connected to the central node .
89
Anurag College of Engineering
The central hub which connects nodes are
of four types:-
1. Hub or repeater
2. Switch or bridge
3. Router or gateway
4. Computer
3. Easy to troubleshoot.
2. Expensive to use.
4. It is easy to understand.
100
Anurag College of Engineering
Hybrid Topology
• It is two different types of topologies which is a mixture
of two or more topologies.
• For example, if in an office in one department ring
topology is used and in another star topology is used,
connecting these topologies will result in Hybrid Topology
(ring topology and star topology).
Features of Hybrid Topology
1. It is a combination of two topologies
2. Inherits the advantages and disadvantages of the
topologies included
101
Anurag College of Engineering
Ring Topology Star Topology
• Active Hub:- These are the hubs which have their own
power supply and can clean, boost and relay the signal
along with the network. It serves both as a repeater as
well as wiring center. These are used to extend the
maximum distance between nodes.
• Passive Hub :- These are the hubs which collect wiring
from nodes and power supply from active hub. These
hubs relay signals onto the network without cleaning
and boosting them and can’t be used to extend the
distance between nodes.
114
Anurag College of Engineering,
LAN- Local Area Network
• LAN or Local Area Network connects network devices
in such a way that personal computer and workstations
can share data, tools and programs.
• The group of computers and devices are connected
together by a switch, or stack of switches, using a
private addressing scheme as defined by the TCP/IP
protocol.
• Private addresses are unique in relation to other
computers on the local network. Routers are found at the
boundary of a LAN, connecting them to the larger
WAN.
121
Anurag College of Engineering
WAN-Wide Area Network
• Types of WAN:
1. Switched WAN
2. Point-to-Point WAN.
• WAN is difficult to design and maintain. Similar to a
MAN, the fault tolerance of a WAN is less and there is
more congestion in the network.
• A Communication medium used for WAN is PSTN
(Public Switched Telephone Network) or Satellite Link.
• Due to long distance transmission, the noise and error
tend to be more in WAN.
122
Anurag College of Engineering
Point- to- Point WAN
CSU- Channel Service Unit
124
Anurag College of Engineering
WAN-Wide Area Network
• WAN’s data rate is slow about a 10th LAN’s speed, since
it involves increased distance and increased number of
servers and terminals etc.
• Speeds of WAN ranges from few kilobits per second
(Kbps) to megabits per second (Mbps).
• Propagation delay is one of the biggest problems faced
here.
• Devices used for transmission of data through WAN are:
Optic wires, Microwaves and Satellites.
• Example of a Switched WAN is the asynchronous transfer
mode (ATM) network and Point-to-Point WAN is dial-up
line that connects a home computer to the Internet. 125
Anurag College of Engineering
Interconnection of Networks:
Internetwork
• If two or more networks are connected, they become an
internetwork, or internet.
134
Anurag College of Engineering
802.15.4 – LR-WPAN
135
Anurag College of Engineering
2G/3G/4G- Mobile Communication
• There are different generations of mobile
communication standards.
✓ Second generation (2G- including GSM and
CDMA)
✓ Third generation (3G- including UMTS and
CDMA 2000)
✓ Fourth generation (4G- including LTE).
• IoT devices based on these standards can
communicate over cellular networks.
• Data rates for these standards range from 9.6 Kb/s
(for 2G) to up to 100 Mb/s (for 4G).
Anurag College of Engineering 136
Network/ Internet Layer
• 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.
• Datagrams contains source and destination addresses
which are used to route them from the source to
destination across multiple networks.
• Host identification is done using IP addressing schemes
such as IPv4 or IPv6.
• IP protocols establish connections on packet networks but
do not guarantee delivery of packets
• The protocols of this layer are IPv4, IPv6, 6LoWPAN. 137
Anurag College of Engineering
IPv4- Internet Protocol version 4:
• Internet Protocol version4 is used to identify the devices
on a network using a hierarchical addressing scheme.
• It uses a 32-bit address scheme and allows total of 232
addresses.
142
Anurag College of Engineering
Application Layer
• Application layer protocols define how the
applications interface with lower layer protocols to send
data over the network.
• The application data in files is encoded by the application
layer protocol and encapsulated in the transport layer
Protocol which provides connection or transaction
oriented communication over the network.
• The protocols in this layer enable process-to-process
connections using ports.
• Port numbers are used for application addressing.
Eg. Port 80 for HTTP.
• The protocols of this layer are HTTP, CoAP, WebSocket,
MQTT, XMPP, DSS, AnuragAMQP.
College of Engineering
143
Hypertext Transfer Protocol (HTTP):
145
Anurag College of Engineering
WebSocket:
146
Anurag College of Engineering
Message Queue Telemetry Transport (MQTT):
147
Anurag College of Engineering
Extensible Messaging and Presence Protocol
(XMPP) :
• Extensible Message and Presence Protocol for real time
communication and streaming XML data between
network entities.
• XMPP powers wide range of applications including
messaging, presence, data syndication, gaming, multi-
party chat, voice/video calls.
• It allows sending small chunks of XML data from one
network entity to another in near real-time.
• It is a decentralized protocol and uses client-server
architecture.
• It supports both client-to-server and server-to-server
communication paths.
• In IoT, XMPP allows real-time communication between
IoT devices.
148
Anurag College of Engineering
Data Distribution Service (DSS):
149
Anurag College of Engineering
Advanced Message Queuing Protocol(AMQP):
• Advanced Message Queuing Protocol is an open
application layer protocol for business messaging.
• It supports both point-to-point and publish-subscribe
models.
• AMQP brokers receive messages from publishers
(devices or applications that generate data) and route them
over connections to consumers (applications that process
data).
• Publishers publish the messages to exchanges which then
distribute message copies to queues.
• Messages are either delivered by the broker to the
consumers which have subscribed to the queues or the
consumers can pull the messages from the queues.
150
Anurag College of Engineering
Sensor Networks
• A sensor network connects numerous sensor nodes that
can detect information such as heat, pressure, and
motion.
• With the rapid development of sensors, sensor networks
are a vital part of the internet of things (IoT) and the
modern world.
• We can build a simple sensor network from easily
procured, low-cost hardware.
• We need some sensors and a microcontroller or computer
with input/output capabilities.
• Sensor networks play a prominent part in the IOT.
Anurag College of Engineering 151
Sensor Networks
• Sensor networks are everywhere (sensors are in
our phones, workplaces, vehicles, and the environment).
• A sensor network comprises a group of small, powered
devices, and a wireless or wired networked infrastructure.
• They record conditions in any number of environments
including industrial facilities, farms, and hospitals.
• The sensor network connects to the internet or computer
networks to transfer data for analysis and use.
• Sensor network nodes cooperatively sense and control the
environment.
• They enable interaction between persons or computers
and the surrounding environment.
Anurag College of Engineering 152
Examples of Sensor Networks
• Automotive
• Environmental monitoring
• Atmospheric monitoring
• Security system
• Surveillance system
153
Anurag College of Engineering
Automotive:
• Almost every modern automobile has a network of
sophisticated sensors that monitor the performance of
the engine and its subsystems.
• Some cars have additional sensors for monitoring
external air temperature, tyre pressure, and even
proximity to objects and other vehicles.
• Sensors in automobiles has begun to spill over into
related machinery such as motorcycles, boats, and
even the venerable farm tractor.
160
Anurag College of Engineering
• Most sensors are discrete components that take
voltage in and produce either digital or analog data.
They require another component to read the data and send it to
the pond-monitoring control system.
• The microcontroller or microprocessor for reading data from
one or more sensors and sending it to another system for
processing.
• The Arduino is an excellent platform for reading data from
one or more sensors and sending it to another system for
processing. Some enterprising Arduino enthusiasts have built
monitoring systems using only a single Arduino and multiple
sensors.
• Eg. The pond-monitoring system is a computer with an
Arduino attached to it so that we can record, view, or access
the data remotely. We now have the sensors connected to an
Arduino (called a sensor node) and the pond-monitoring
system connected to another Arduino (called the aggregator
node).
161
Anurag College of Engineering
• How to get the data from the sensor node to the
aggregate node. There are many ways to get two
Arduino to communicate or share data,- wired or
wireless.
• Wired communication in this case can be via an
Ethernet shield or a wireless fidelity (Wi-Fi) shield
fitted to each Arduino.
163
Anurag College of Engineering
Wired Networks :
• Wired networks can take several forms.
• All involve some form of hardware designed to permit
electrical signals to be sent from one device to another
via a wire or cable.
• Thus, sensor networks that employ wired communication
must also add network hardware to the nodes in the
network.
• We can use Arduino with an Ethernet shield to connect
the sensor node(s) to the aggregate or data-collection
nodes.
• If our sensors were hosted with Raspberry Pi computers,
we already have the necessary hardware to connect two
Raspberry Pi computers—they all have RJ-45 LAN
ports.
Anurag College of Engineering 164
Wireless Networks :
168
Anurag College of Engineering
Basic Sensor Nodes: