IoT Notes (4)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

IoT Notes

Unit -1
IOT and its characteristics.
 A network of interconnected devices that communicate and exchange data with each other
and with centralized systems through the internet.
 Devices can range from everyday household items to industrial machinery.
 It enables devices to collect, share, and act on data autonomously, enhancing efficiency and
decision-making.

Characteristics of IoT:
1. Connectivity: IoT devices can connect to the internet and share data with each other.
2. Sensors: They use sensors to collect information like temperature, light, or motion.
3. Automation: Devices can perform tasks automatically, without human help.
4. Real-time data: IoT devices give real-time data and updates.
5. Remote control: You can control IoT devices from anywhere using your phone or computer.
6. Scalability: IoT systems can easily add more devices to the network.
7. Smart decisions: Devices use the data they collect to make smart decisions, improving
efficiency.

Advantages:
 It helps in minimizing the human efforts in using the devices.
 It saves essential assets like time, electricity, etc.
 The resource is very efficiently used in IoT.

Disadvantages:
 Some privacy concerns can raise the IoT Devices.
 It is more dependent on the Internet which may lead to malware attacks.
 As most of the work is performed by machines, it can lead to reducing jobs for humans.

Examples:
IoT devices are of various kinds like home devices, network devices, security devices, smart home
devices, etc.

Security and Privacy threats in IoT devices.


1. Hacking: Attackers can break into devices and take control.
2. Weak passwords: Using easy passwords makes it simple for hackers to access devices.
3. Data leaks: Sensitive data from devices can be stolen or exposed.
4. Unsecured networks: Connecting IoT devices to weak Wi-Fi networks increases the risk of
attacks.
5. Malware: Harmful software can infect devices and cause them to malfunction.
6. Outdated software: Devices with old software are more vulnerable to attacks.
7. Eavesdropping: Hackers can listen to or capture private data sent between devices.

Solutions to this:
1. Strong passwords: Use long, unique passwords for each device and change them regularly.
2. Encryption: Ensure all data sent between devices is encrypted to keep it safe from hackers.
3. Secure networks: Connect devices to strong, password-protected Wi-Fi and avoid public
networks.
4. Regular updates: Always update device software to the latest version to fix security gaps.
5. Use firewalls: Install a firewall to block unauthorized access to your IoT network.
6. Monitor devices: Regularly check for unusual activity on devices and networks.
7. Disable unused features: Turn off features or services on the device you don't need to
reduce vulnerabilities.

Difference between IoT and WoT


Aspect IoT (Internet of Things) WoT (Web of Things)
Connects physical devices to the Uses web technologies to control and interact
Concept internet to share data. with IoT devices.
Uses different protocols like MQTT, Uses standard web protocols like HTTP, REST
Technology CoAP for device communication. APIs.
Focuses on connecting devices to the Focuses on using web standards for device
Focus internet. control and interaction.
Smart thermostat controlled via a Smart light controlled via a web browser or
Example mobile app. web app.
Requires custom solutions for different Easier integration with web apps due to
Integration devices. common web standards.
Typically controlled via specialized
Accessibility apps or services. Accessible through any web browser or app.

Applications of IoT.
1. Smart Homes
 Example: Devices like smart thermostats, lighting, and security cameras.
 Function: Control home appliances and monitor security remotely through smartphones.
2. Wearable Devices
 Example: Fitness trackers, smartwatches.
 Function: Monitor health data like heart rate, steps, and sleep patterns in real-time.
3. Smart Cities
 Example: Smart streetlights, waste management, traffic monitoring.
 Function: Improve urban infrastructure by managing traffic, reducing energy use, and
efficiently handling waste.
4. Healthcare
 Example: Remote patient monitoring, smart pills, connected medical devices.
 Function: Track patients' health conditions, send data to doctors, and improve patient care
with real-time monitoring.
5. Industrial IoT (IIoT)
 Example: Machine sensors in factories.
 Function: Monitor machines and processes in industries to improve efficiency, prevent
breakdowns, and enhance safety.
6. Agriculture
 Example: Smart irrigation systems, soil sensors, weather monitoring.
 Function: Optimize farming by tracking soil conditions, automating irrigation, and monitoring
weather to increase crop yields.
7. Smart Cars
 Example: Connected vehicles, self-driving cars.
 Function: Help cars communicate with each other, monitor road conditions, assist with
driving, and improve safety.

IoT reference architecture

Business Layer

Application Layer

Processing Layer

Transport Layer

Perception Layer

Here’s the 5-layer IoT architecture explained in simple words:


1. Perception Layer
 Function: Detects and collects data from the environment using sensors and devices.
 Example: Sensors measuring temperature, humidity, or motion.
2. Transport Layer
 Function: Transmits the collected data from devices to the processing systems via networks
like Wi-Fi, Bluetooth, or cellular.
 Example: Sending data from a smart home device to the cloud over Wi-Fi.
3. Processing Layer
 Function: Stores, processes, and analyzes the collected data, often in cloud servers or data
centers.
 Example: Analyzing weather data in a cloud platform to make predictions.
4. Application Layer
 Function: Provides specific services and applications based on the processed data, like
smart home apps or industrial control systems.
 Example: A smartphone app controlling home lighting based on sensor data.
5. Business Layer
 Function: Manages the overall IoT system, including business logic, data analysis, and
decision-making.
 Example: A dashboard showing trends or insights from IoT data for business managers.

Levels of IoT or Conceptual Framework of IoT


An lot system comprises of the following components:
 Device: An IoT device allows identification, remote sensing, actuating, and remote
monitoring capabilities.
 Resource: Resources are software components on the lot device for accessing,
processing, and storing sensor information, or controlling actuators connected to the
device.
 Controller Service: The Controller service sends data from the device to the web service
and receives commands from the application for controlling the device.
 Web Service: Web services serve as a link between the lot device, application, database,
and analysis components.
 Analysis Component: The Analysis Component is responsible for analyzing the lot data
and generating results in a form which are easy for the user to understand.
 Application: loT applications provide an interface that the users can use to control and
monitor various aspects of the applications.
Physical and Logical Design of IoT
The Physical design of IoT deals with the individual devices connected to the IoT network and
the protocols used to create a functional IoT environment.

Node Devices
Node devices are used to build a connection, process data, and provide interfaces, and storage,
in an IoT system. Let us understand which device is used for which function in an iot system:
 Connectivity: USB hosts and ETHERNET
 Processor: Processors like CPU
 Audio/Video Interfaces: System interfaces like HDMI and RCA
 Input/Output interface: Devices like UART, SPI, CAN
 Storage Interfaces: SD, MMC, and SDIO
 Controlling of activity: Devices like DDR and GPU
IoT Protocols: IoT communication protocols establish between a node device and a server
over the internet by sending commands to an IoT device and receiving data from an IoT device.

Some protocols are: HTTP, WebSocket, XMPP, MQTT, DDS, and AMQP protocols, TCP,
Transport layer protocols

Layer

 Network Layer
 Link Layer
 Ethernet
 Wi-Fi

Logical Design

It is the actual design of the IoT system. It illustrates the assembling and configuration of the
components i.e. computers, sensors, and actuators.
The logical design of IoT is composed of:
1. IoT functional blocks
The functional blocks of IoT systems provide sensing, identification, actuation, management, and
communication capabilities to the IoT ecosystem.
They are – Devices, Communication, Services, Management, Security, Application.
2. IoT Communication Models
The communication models of IoT are used for communicating between the system and the server.
The types of IoT communication models are – Request Response Model, Publisher-Subscriber
Model, Push-Pull Model, Exclusive Pair.
3. IoT communication API
There are two types of communication APIs –
 REST-based communication APIs
 Web Socket-Based Communication APIs

Difference between the physical design of IoT & logical design of IOT
Machine to Machine (M2M)

 This is commonly known as Machine-to-machine communication.


 It is a concept where two or more than two machines communicate with each other without
human interaction using a wired or wireless mechanism.
 M2M is a technology that helps the devices to connect between devices without using the
internet.
 M2M is also named as Machine Type Communication (MTC) in 3GPP ( 3rd Generation
Partnership Project).
 M2M is communication could carried over mobile networks, for ex- GSM-GPRS, CDMA
EVDO Networks .
 In M2M communication, the role of mobile networks is largely confined to server as a
transport networks.
Advantages:

 M2M allows for automated monitoring and management of processes.


 M2M enables businesses to provide better customer service.
 M2M solutions are scalable.

Disadvantages:
 Highly skilled staff is required to maintain and manage it.
 May lead to privacy and security concerns.
 Increase in number of devices may lead to network congestion problems.
Application:
smart home meters, vehicle telemetry services, asset tracking, wearable technologies, and
automated supply chain management (SCM).

IPv4 and IPv6


 IPv4 addresses consist of two things: the network address and the host address.
 It stands for Internet Protocol version four.
 IPv4 addresses are 32-bit integers that must be expressed in Decimal Notation.
 It is represented by 4 numbers separated by dots in the range of 0-255, which have to be
converted to 0 and 1, to be understood by Computers.
IPv4 Address Format
IPv4 Address Format is a 32-bit Address that comprises binary digits separated by a dot (.).

Drawback of IPv4
 IPv4 has a limited number of addresses.
 IPv4 often requires manual configuration or DHCP to assign addresses.
 The IPv4 header is more complex, which can slow down data processing and routing.
 IPv4 does not have built-in security features

 IPv6 is based on IPv4 and stands for Internet Protocol version 6.


 IPv6 is written as a group of 8 hexadecimal numbers separated by colon (:).
 It can be written as 128 bits of 0s and 1s.
IPv6 Address Format
IPv6 Address Format is a 128-bit IP Address, which is written in a group of 8 hexadecimal numbers
separated by colon (:).

Benefits of IPv6 over IPv4


 IPv6 has a greater address space.
 IPv6 has some improved security which is built in with it.
 IPv6 has a simpler and more effective header Structure.
 IPv6 has increased and better support for Mobile Devices.

IoT Protocol Stack


The IoT protocol stack can be mapped to the seven-layer OSI model, which is widely used to
understand and design network architectures.
Each layer in the IoT protocol stack has specific roles and protocols that ensure efficient and
reliable communication between IoT devices and systems.
1. Physical Layer
Function: It handles the transmission of raw data between devices and physical transmission
media, converting digital information into electrical, radio, or optical signals.
Protocols/Technologies:
 Wi-Fi:
 Bluetooth:
 ZigBee:
 LTE:
 NB-IoT:
 LoRaWAN:
2. Data Link Layer
Function: It handles error detection and correction, flow control, and the establishment and
termination of connections between devices.
Protocols/Technologies:
 Ethernet:
 PPP (Point-to-Point Protocol):
 IEEE 802.15.4:
3. Network Layer
Function: It handles logical addressing, traffic directing, and congestion control.
Protocols/Technologies:
 IP (Internet Protocol):
 RPL (Routing Protocol for Low-Power and Lossy Networks):
 6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks):
4. Transport Layer
Function: It manages error correction, flow control, and data segmentation and reassembly.
Protocols/Technologies:
 TCP (Transmission Control Protocol):
 UDP (User Datagram Protocol):
5. Session Layer
Function: The session layer manages sessions or connections between applications.
Protocols/Technologies:
 MQTT (Message Queuing Telemetry Transport):
 CoAP (Constrained Application Protocol):
 AMQP (Advanced Message Queuing Protocol):
 XMPP (Extensible Messaging and Presence Protocol):
6. Presentation Layer
Function: This layer translates data between the application layer and the network.
Protocols/Technologies:
 JSON (JavaScript Object Notation)
 XML (eXtensible Markup Language):
 Data Encryption Standards:
7. Application Layer
Function: The application layer provides network services directly to end-user applications.
Protocols/Technologies:
 HTTP (HyperText Transfer Protocol):
 MQTT:
 CoAP:
 DDS (Data Distribution Service):
 OPC UA (OPC Unified Architecture):

-----------------------------------------------------------------------------------------------------------------------------

Unit -2
What is sensor, sensor node, Features of sensor.
A sensor is a device that detects and measures physical properties from the environment and
converts this information into an electrical signal that can be interpreted by other devices or
systems.
A sensor node is a small device that collects data from its surroundings using sensors.
Features:
 Sensitivity: The ability of a sensor to detect small changes in the measured quantity.
 Resolution: The smallest change in the measured quantity that can be detected by the
sensor.
 Accuracy: How close the sensor's measurement is to the actual value of the quantity being
measured.
 Precision: The consistency of sensor measurements over repeated tests.
 Range: The span of values that the sensor can measure.
 Response Time: The time it takes for the sensor to react to a change in the measured
quantity.
 Linearity: How well the sensor’s output corresponds to the linear change in the measured
quantity.
Classification of Sensor

Sensor

Based
Based
on
on
data
output
type
Digita
Analog Scalar Vector
l
Sensor Sensor Sensor
Sensor

Difference between analog and digital sensors

Aspect Analog Sensors Digital Sensors

Output Signal Continuous voltage or current Discrete binary signal (0s and 1s)
signal
Signal Range Provides a continuous range of Provides discrete values within a range
values
Aspect Analog Sensors Digital Sensors

Accuracy Can have lower accuracy due to Generally higher accuracy


noise
Noise Immunity More susceptible to noise Better noise immunity
interference
Signal May require external Built-in or external conditioning may be
Conditioning conditioning present
Resolution Limited by the resolution of ADC Limited by the number of bits in ADC
Integration Can be more challenging to Easier integration with digital systems
integrate
Compatibility Compatibility with older systems Compatibility with modern systems
Communication Direct analog output Digital output through interfaces like
UART, SPI, I2C, etc.
Application Temperature sensors, pressure Digital cameras, motion sensors,
Examples sensors, light sensors proximity sensors, accelerometers

Scalar Sensor and Vector Sensor

Aspect Scalar Sensor Vector Sensor


Quantity It is scalar quantity It is vector quantity
Measured quantity It has only magnitude It has both magnitude and
direction.
Output signal Its output is single scalar value Its output is multiple values.
Representation It is represented by a single It is represented by multiple
number. values.
Physical property It describes magnitude of the It describes both magnitude
phenomenon. and direction of the
phenomenon.
Definition It is type of sensor which It is type of sensor which
produces output signal or produces output signal or
voltage which is directly voltage which is directly
proportional to the magnitude proportional to the magnitude,
of the quantity to be measured. direction or orientation of the
quantity to be measured.
Example Temperature sensor, light Velocity sensor, image sensor,
sensor, pressure sensor etc. acceleration sensor etc.

Different types of sensors and their respective applications


Temperature Sensors
 Function: Measure the temperature of the environment or an object.
 Application: Used in weather stations, HVAC systems, and refrigerators to monitor
temperature.
2. Humidity Sensors
 Function: Detect and measure the amount of moisture in the air.
 Application: Used in climate control, greenhouses, and HVAC systems to measure moisture
in the air.
3. Light Sensors
 Function: Measure the intensity of light in the environment.
 Application: Used in smart lighting systems, cameras, and smartphones to adjust brightness
based on light levels.
4. Motion Sensors
 Function: Detect movement within a specified area.
 Application: Used in security systems, automatic doors, and gaming devices to detect
movement.
5. Pressure Sensors
 Function: Measure the force applied by a fluid (liquid or gas) in each area.
 Application: Used in weather forecasting, car tire monitoring, and industrial equipment to
measure pressure changes.
6. Gas Sensors
 Function: Detect the presence and concentration of specific gases in the air.
 Application: Used in air quality monitoring, industrial safety, and home appliances to detect
harmful gases like carbon monoxide.
7. Proximity Sensors
 Function: Detect the presence or absence of an object within a certain range without
physical contact.
 Application: Used in smartphones, cars, and automatic faucets to detect the presence of
objects nearby without physical contact.
8. Accelerometers
 Function: Measure acceleration forces acting on the device.
 Application: Used in smartphones, fitness trackers, and vehicles to measure acceleration
and tilt.
9. Sound Sensors
 Function: Detect sound levels and vibrations in the environment.
 Application: Used in smart home devices and security systems to detect sound levels and
patterns.
10. Water Quality Sensors
 Function: Measure various parameters of water quality, such as pH, temperature, turbidity,
and dissolved oxygen.
 Application: Used in aquariums, swimming pools, and environmental monitoring to test
water conditions like pH and turbidity.

Actuators and their types


 An actuator is a device that converts electrical energy into mechanical motion or force.
 It performs physical actions based on the signals received from a control system.
 The primary objective of the actuators is to cause the mechanical output such as mechanical
force or motion based on controlled input.
Energy Actuator
Mechanical Force or
Device
Motion
Input Signal

Actuator Types:
Hydraulic Actuators:
 It is type of actuator which uses the hydraulic power to perform the mechanical operations.
 It is actuated by the cylinders or the fluid motors.
Advantages:
 It can generate large force.
 It is used in welding, big machineries making the task easy.
Disadvantages:
 It is expensive.
 Hydraulic fluid leak can loss its efficiency.
Applications: Hydraulic motors, Hydraulic Cylinders.
Pneumatic Actuators:
 This are the actuators which uses the energy formed by the vacuums and compressed air
and convert it into linear or rotatory motion.
Advantages:
 It has less cost.
 It can work under extreme temperatures.
Disadvantages:
 Loss of pressure can reduce its efficiency.
 Highly skilled staff are required to maintain and manage it.
Applications: Pneumatic Motors.
Electrical Actuators:
 It uses electrical energy.
 It is actuated by the electrical motors which convert electrical energy into the mechanical
force.
Advantages:
 It has low noise.
 It has no fluid leakage.
Disadvantages:
 It is expensive.
 It depends a lot on environmental conditions.
Applications: DC motors, stepper motors, servo motors.
Thermal/Magnetic Actuators:
 These are actuators which use the thermal or magnetic energy to convert into mechanical
form.
 Shape memory alloys or magnetic shape memory alloys are used by this actuator.
Advantages:
 It has a simple design.
 It provides fast response.
Disadvantages:
 It consumes a lot of energy.
 Provides limited precision in some applications.
Applications: Piezo motors
Mechanical Actuators:
 It uses the rotatory motion to convert into linear motion using the threaded screw.
 It perform linear motion through mechanisms using lead screws, belts or gears.
Advantages:
 It gives high precision.
 It can handle heavy loads.
Disadvantages:
 It has limited support.
 Friction and wear can cause issues.
Applications: Robotics, machinery.
Soft Actuators:
 This actuators are characterized by their flexibility, compliance, and deformation of shape.
 This is a device which changes the shape of object in response to stimuli.
 The stimuli can be thermal, mechanical, magnetic, or electrical.
Advantages:
 It is flexible.
 It supports human robot interaction.
Disadvantages:
 It is expensive.
 It is complex in nature.
 Applications: Soft robotics, wearable technology.
Types:
 Pneumatic Actuators: Use air pressure to create motion.
 Hydraulic Actuators: Use fluid pressure for movement.
 Electric Soft Actuators: Use electricity to bend or stretch materials.

Sensor Node and its components


A sensor node is made up of four basic components:
i. Sensing Unit :
 It is usually composed of two subunits: sensors and Analog-to-Digital convertors (ADC’s).
 Analog signals produced by sensors based on observed phenomenon are converted to
digital signals by ADC, and then fed into processing unit.
ii. Processing Unit :
 It manages the procedures that make the sensor node collaborate with other nodes to carry
out assigned sensing tasks.
 It is generally associated with a small storage unit.
iii. Transceiver:
 It connects the node to the network.
iv. Power Unit:
 Since wireless sensor networks focus more on power conservation than ‘Quality of Service
(QoS)’, it is one of the most important components of a sensing node.
 Power units may be supported by power scavenging units such as solar cells.
 A sensor node can only be equipped with limited power source. (<0.5 Ah, 1.2 V)
There are some other sub-units that are application dependent:
i. Location finding system:
 It is commonly required because most of the sensor network routing techniques and sensing
tasks require knowledge of location with high accuracy.
ii. Mobilizer:
 It may sometimes be needed to move sensor nodes when it is required to carry out assigned
tasks.

Sensor Resolution: A Detailed Explanation


 Sensor resolution refers to the smallest change in a physical quantity that a sensor can
reliably detect and represent.
 It determines the fineness or granularity of the measurements a sensor can capture, which
directly affects the accuracy and usability of the data.
 More is the resolution of sensor, more accurate is its precision.
 Sensor’s accuracy does not depend on its resolution.
1. Types of Sensor Resolution
a. Spatial Resolution
 Definition: The ability of a sensor to detect small features or objects within its sensing area.
 Example: A camera with a resolution of 1920x1080 pixels can distinguish fine details in an
image better than a 640x480 pixel camera.
b. Temporal Resolution
 Definition: The frequency at which a sensor takes measurements over time.
 Example: A temperature sensor that records data every second has a higher temporal
resolution than one that records every minute.
c. Amplitude Resolution
 Definition: The smallest detectable change in the magnitude of the measured signal, often
determined by the sensor's analog-to-digital converter (ADC).
 Example: A 12-bit ADC provides 21212 (4096) discrete levels, allowing finer measurement
granularity than an 8-bit ADC with 256 levels.
d. Spectral Resolution
 Definition: Applicable in sensors like spectrometers; it refers to the ability to distinguish
between different wavelengths or frequencies.
 Example: A spectrometer with high spectral resolution can separate closely spaced
wavelengths of light.
2. Factors Affecting Sensor Resolution
 The quality of the sensing element.
 Noise can mask small changes in the signal, reducing the effective resolution of the sensor.
 Temperature, humidity, vibrations, or electromagnetic interference can degrade sensor
performance and resolution.
 Poor calibration or drift over time may reduce the effective resolution.
5. Examples of Sensor Resolutions
a. Camera Sensors: 8 MP camera, Thermal cameras
b. Distance Sensors: Ultrasonic sensors, LIDAR
c. Weather Sensors: Thermometers, Barometers

Features of sensor resolution:

 Resolution is expressed in terms of bits.


 In digital sensors, a resolution of 8-bit allows 256 level whereas 12-bit allows 4096 level.
 Resolution not just affects the measurement precision but also impact data processing and
storage equipment.
 It is influenced by factors such as noise, signal conditioning techniques, and characteristics
of ADC converter.

Unit -3
IoT and its components
 A network of interconnected devices that communicate and exchange data with each other
and with centralized systems through the internet.
 Devices can range from everyday household items to industrial machinery.
 It enables devices to collect, share, and act on data autonomously, enhancing efficiency and
decision-making.
Major Components of IOT:
These are explained as following below.
1. Things or Device
These are fitted with sensors and actuators. Sensors collect data from the environment and
give to gateway whereas actuators performs the action (as directed after processing of
data).
2. Gateway
The sensors give data to Gateway and here some kind of pre-processing of data is even
done. It also acts as a level of security for the network and for the transmitted data.
3. Cloud
The data after being collected is uploaded to cloud. Cloud in simple terms is basically a set of
servers connected to internet 24*7.
4. Analytics
The data after being received in the cloud processing is done . Various algorithms are
applied here for proper analysis of data (techniques like Machine Learning etc are even
applied).
5. User Interface
User end application where user can monitor or control the data.
Real Life example of IoT
 Nowadays, many people wear smartwatches which is none other than an IoT device. It
contains an accelerometer that measures the number of steps taken, detects hand
movements, etc.
 Using (GPS), these devices can determine your location and compute the distances traveled.
 There are many IoT devices which are now making your home smart.

Network Function Visualization


The term “Network Functions Virtualization” (NFV) refers to the use of virtual machines in place of
physical network appliances.
Need of NFV:
With the help of NFV, it becomes possible to separate communication services from specialized
hardware like routers and firewalls.
This eliminates the need for buying new hardware and network operations can offer new services
on demand.
Architecture of NFV:
1. Virtualization layer: This layer provides the virtualization environment that enables multiple
VNFs to run on the same physical infrastructure
2. Virtual network functions (VNFs): These are the software-based network functions that
perform specific network tasks, such as routing, switching, firewalling, load balancing, and
encryption.
3. NFV infrastructure (NFVI): This is the physical infrastructure that provides the computing,
storage, and networking resources needed to support the VNFs.
4. Management and orchestration (MANO): This component provides the management and
orchestration functions needed to deploy, monitor, and manage the VNFs running on the
NFVI

Benefits of NFV:
 Reduces the need for expensive hardware.
 Easily adapts to growing network demands.
 Allows quick changes to network configurations.
Disadvantages of NFV:
 May not match the speed and efficiency of dedicated hardware.
 Highly skilled staff is required to manage and setup it.
 Relies on software and virtual machine stability.

IEEE 802.15.4 Technology


IEEE 802.15.4 is a low-cost, low-data-rate wireless access technology for devices that are operated
or work on batteries.
Features of IEEE 802.15.4:
 Designed for devices with limited power.
 Supports data rates of 20 kbps, 40 kbps, 250 kbps.
 Effective for distances up to 10-20 meters
 Provides encryption for secure data transmission.
Architecture of IEEE 802.15.4:
a. Physical Layer (PHY):
 Handles actual data transmission and reception over the wireless medium.
b. Medium Access Control (MAC) Layer:
 Manages access to the shared communication channel.
c. Network Layer (Optional in 802.15.4):
 Not defined by IEEE 802.15.4 but often implemented by higher-level protocols (e.g., Zigbee,
Thread).
 Responsible for routing, addressing, and message forwarding.
d. Application Layer (Implemented by Protocols):
 Facilitates interaction between the network and user applications.
 Protocols like Zigbee, 6LoWPAN, or Thread define application-specific behaviors.
Advantages of IEEE 802.15.4:
 cheap cost
 long battery life,
 Quick installation
 simple
 extensible protocol stack
Disadvantages of IEEE 802.15.4:
 IEEE 802.15.4 causes interference and multipath fading.
 doesn’t employ a frequency-hopping approach.
 unbounded latency
 interference susceptibility
Applications of IEEE 802.15.4:
 Wireless sensor networks in the industry
 Building and home automation
 Remote controllers and interacting toys
 Automotive networks
Zigbee and its types
 ZigBee is a Personal Area Network task group with low-rate task group 4.
 It is a technology of home networking.
 ZigBee is a technological standard created for controlling and sensing the network.
 It is based on IEEE 802.15.4 and was created by the Zigbee Alliance.
Types of ZigBee Devices:
 Zigbee Coordinator Device: It communicates with routers. This device is used for connecting
the devices.
 Zigbee Router: It is used for passing the data between devices.
 Zigbee End Device: It is the device that is going to be controlled.

Architecture of Zigbee:
Zigbee architecture is a combination of 6 layers.
1. Application Layer
2. Application Interface Layer
3. Security Layer
4. Network Layer
5. Medium Access Control Layer
6. Physical Layer
Advantages of Zigbee:
 Designed for low power consumption.
 Use in smart home
 Easy implementation
Disadvantages of Zigbee:
 more vulnerable to hacking and other security threats.
 Zigbee has a relatively short range
 Zigbee is designed for low-data-rate applications.
Zigbee Applications:
 Home Automation
 Industrial Control Systems
 meter reading system
 light control system

Media Access Control


 MAC is a series of rules through which devices can transfer data among them in a network.
 When a device is connected to a network, it obtains a unique MAC address.
 The MAC address, also known as the hardware address.

Characteristics of MAC
The total length MAC address in byte is 6 (or 48 bits).
The MAC address is globally unique, this lets identify each device within the network.
The left 24 bits (3 bytes) of the address is termed as Organizationally Unique Identifier (OUI)
number.
The right 24 bits (3 bytes) of the address is termed as Network Interface Controller Specific
(NICS).
Advantages of MAC
 Devices can connect to the network without extra attachment costs.

 Routers and switches can allow or block devices based on policies for permitted or non-
permitted equipment.
 Each device on the same network has a unique MAC address, making it easy to identify and
troubleshoot issues.
Disadvantages of MAC:
 An attacker can gain network access by repeatedly changing their MAC address to a
permitted one.
 MAC addresses can be easily faked, allowing attackers to impersonate permitted devices.
Applications of MAC
Home Automation, Industrial Automation, Healthcare Devices etc.

Identity Management in IoT


Radio Frequency Identification
 RFID (Radio Frequency Identification) is a technology that uses electromagnetic fields to
automatically identify and track tags attached to objects.
 It is a method that is used to track or identify an object by radio transmission over the web.

Advantages of RFID
 Reduces manual intervention, minimizing errors and increasing operational efficiency.
 Provides precise tracking and data collection.
 Enables real-time monitoring and decision-making.
Disadvantages of RFID
 It takes longer to program RFID Devices.
 RFID intercepted easily even it is Encrypted.
 Active RFID can be costlier due to battery.
Application of RFID
Inventory Management, Supply Chain Management, Healthcare.

Wireless Sensor Network


BLUETOOTH
1. Bluetooth is used for short-range wireless voice and data communication.
2. Bluetooth simply follows the principle of transmitting and receiving data using radio waves.
Key Features of Bluetooth
 The transmission capacity of Bluetooth is 720 kbps.
 Bluetooth is a wireless device.
 Bluetooth is a Low-cost and short-distance radio communications standard.
 Bluetooth is robust and flexible.
 The basic architecture unit of Bluetooth is a piconet.
Architecture of Bluetooth
The architecture of Bluetooth defines two types of networks:
Piconet: Piconet is a type of Bluetooth network that contains one primary node called the master
node and seven active secondary nodes called slave nodes. The communication between the
primary and secondary nodes can be one-to-one or one-to-many.
Scatternet: It is formed by using various piconets. This kind of node can receive a message from
a master in one piconet and deliver the message to its slave in the other piconet where it is acting
as a master.
Advantages of Bluetooth
 It is a low-cost and easy-to-use device.
 It can also penetrate through walls.
 It creates an Ad-hoc connection immediately without any wires.
 It is used for voice and data transfer.
Disadvantages of Bluetooth
 It can be hacked and hence, less secure.
 It has a slow data transfer rate of 3 Mbps.
 Bluetooth communication does not support routing.
Applications
1. It can be used in wireless headsets, wireless PANs, and LANs.
2. It can connect a digital camera wirelessly to a mobile phone.
3. It can transfer data in terms of videos, songs, photographs, or files from one cell phone to
another cell phone or computer.
4. It is used in the sectors of Medical healthcare, sports and fitness, Military.

Near Field Communication


Near Field Communication (NFC) is a short-range wireless technology that enables
communication between two electronic devices over a distance of 4 centimeters (1.6 inches) or
less.
Types of NFC
 Passive NFC devices: These near-field communication devices include tags and other
small transmitters that can send information to other NFC devices without the need for a
power source of their own.

 Active NFC devices: These near-field communication devices can do both things i.e. send
and receive data. They can communicate with each other as well as with passive devices.
Benefits of NFC
 NFC allows seamless payments and other transactions.
 It provides secure access for students and employees within their premises.
 NFC doesn’t require search and pair procedures like Bluetooth.
Limitations of NFC
 NFC operates within shorter distances (about 10-20 cm).
 It offers very low data transfer rates.
 Companies find it expensive.
Applications of NFC
 Data Transfer: You can share small amounts of data (such as contacts, URLs, or files)
between NFC-enabled devices.
 Access Control: NFC tags can grant access to buildings, public transport, or events.
 Smart Pairing: NFC simplifies pairing Bluetooth devices by tapping them together.
 Smart Posters and Tags: NFC tags embedded in posters, products, or advertisements can
provide additional information when tapped.
Unit-4
MQTT Protocol
 It stands for Message Queuing Telemetry Transport.
 MQTT, is a communications protocol designed for Internet of Things devices with extremely
high latency and restricted low bandwidth.
 Message Queuing Telemetry Transport is a perfect protocol for machine-to-machine (M2M)
communication since it is designed specifically for low-bandwidth, high-latency settings.
MQTT Architecture
 Message: The message is the data that is carried out by the protocol across the network for
the application.
 Client: In MQTT, the subscriber and publisher are the two roles of a client. The clients
subscribe to the topics to publish and receive messages. Client performs two operations-
o Publish: When the client sends the data to the server, then we call this operation as a
publish.
o Subscribe: When the client receives the data from the server, then we call this
operation a subscription.
 Server: The device or a program that allows the client to publish the messages and subscribe
to the messages.
 TOPIC: The label provided to the message is checked against the subscription known by the
server is known as TOPIC.
Characteristics of MQTT
 It is a machine-to-machine protocol, i.e., it provides communication between the
devices.
 It does not require that both the client and the server establish a connection at the same
time.
 It is designed as a simple and lightweight messaging protocol
Advantages of MQTT
 Data transmission is quick, efficient and lightweight.
 Minimizes power consumption.
 Prompt and effective message delivery
Disadvantages of MQTT
 MQTT has slower send cycles.
 MQTT lacks encryption.
 Building an internationally scalable MQTT network is challenging
Applications
MQTT IoT use cases include fire detectors, theft tracking, location monitoring, sensors, engine
status.

MQTT-SN Protocol
MQTT-SN (Message Queuing Telemetry Transport for Sensor Networks) is a lightweight
messaging protocol designed specifically for devices with limited resources, such as sensors, in
wireless networks. It simplifies communication for the Internet of Things (IoT).
Architecture of MQTT-SN
1. Clients:
 Devices like sensors or actuators that send or receive messages.
2. Gateways:
 Act as a bridge between MQTT-SN clients and MQTT servers (brokers).
 Translate MQTT-SN messages into MQTT format and vice versa.
3. Broker (Server):
 Handles message publishing and delivery.
 Ensure clients receive messages they subscribe to.
4. Topics:
 Messages are categorized under topics (e.g., "temperature/sensor1").
 Clients can subscribe to or publish messages under specific topics.
Characteristics of MQTT-SN
 Designed for devices with limited battery and processing power.
 Minimizes data transmission to save bandwidth.
 Allows devices to conserve power during inactive periods.
 Uses shorter numeric IDs for topics.
Merits of MQTT-SN
 Ideal for battery-powered devices.
 Works well over Zigbee, Bluetooth, and other wireless sensor networks.
 I can handle many devices in large IoT systems.
Demerits of MQTT-SN
 Needs a gateway to connect with an MQTT broker, adding complexity.
 It is complex to setup.
 It does not provides us strong security measures.
Applications for MQTT-SN
 Smart Homes:
 Industrial IoT:
 Healthcare Devices:
 Environmental Monitoring:
 Agriculture:

Constrained Application Protocol (CoAP)


 The Constrained Application Protocol (CoAP) is a special web transfer protocol that
operates with constrained nodes and networks.
 It is a web-based protocol that resembles HTTP. It is also based on the request-response
model.
CoAP Features
 Lightweight and Simple
 RESTful Architecture
 UDP-Based
 Asynchronous Communication
 Low Header Overhead
Applications of CoAP
Real Time Monitoring in Grid, Defense utilities, Aircraft utilities.

AMQP
 AMQP is an acronym used for the Advanced Message Queuing Protocol.
 It is a protocol that is used for communication between applications.
 It is a lightweight protocol that supports the applications for data transfer.
 This protocol is used for its scalability and modularity with the technologies.

Components of AMQP
 Exchanges: The exchange is responsible for fetching messages and properly arranging
them in the appropriate queue
 Channel: A channel is a multiplexed virtual connection between AMQP peers that is built
into an existing connection.
 Message Queue: It is a unique entity that connects messages to their resources or points.
 Binding: Bindings are a set of predetermined instructions for queuing and exchanging. It
manages message transmission and delivery.
 Virtual Host: Vhost is a platform that provides isolation capabilities within the broker.
Multiple vhosts may be functional at the same time, depending on the users and their
access rights.
Layers of AMQP
 Function Layer: The function layer handles basic file transfer transactions, message
queues, access, and control streaming.
 Transport layer: Framing content data representation and error management.
Advantages Of AMQP Protocol
 It employs QoS to ensure the secure transmission of critical data.
 It facilitates peer-to-peer communication.
 It provides users with secure connections using SSL protocols
Disadvantages of AMQP Protocol
 AMQP can be complex and challenging to understand.
 AMQP is very heavy and can't be used in smaller or lower-powered IoT devices.
 AMQP is not user friendly, unlike HTTP.
Applications
 Enterprise Messaging
 E-Commerce Platforms
 IoT Systems

Unit-5
Arduino
Components of Arduino
1. USB: can be used for both power and communication with the IDE
2. Barrel Jack: used for power supply
3. Voltage Regulator: regulates and stabilizes the input and output voltages
4. Crystal Oscillator: keeps track of time and regulates processor frequency
5. Reset Pin: can be used to reset the Arduino Uno
6. 3.3V pin: can be used as a 3.3V output
7. 5V pin: can be used as a 5V output
8. GND pin: can be used to ground the circuit
9. Vin pin: can be used to supply power to the board
10. Analog pins(A0-A5): can be used to read analog signals to the board
11. Microcontroller(ATMega328): the processing and logical unit of the board
12. ICSP pin: a programming header on the board also called SPI
13. Power indicator LED: indicates the power status of the board
14. RX and TX LEDs: receive(RX) and transmit(TX) LEDs, blink when sending or receiving
serial data respectively
15. Digital I/O pins: 14 pins capable of reading and outputting digital signals; 6 of these pins
are also capable of PWM
16. AREF pins: can be used to set an external reference voltage as the upper limit for the
analog pins
17. Reset button: can be used to reset the board Advantages:
 It is easy to use.
 It is open source.
 It is platform independent.
Disadvantages:
 It has limited memory and
processing power.
 It has no debugger for checking.
 Does not provide data storage
facility.

simple steps to connect an Arduino to a PC:


1. Download and install the Arduino software from Arduino's official website.
2. Use a USB cable to connect the Arduino board to your PC.
3. Open the Arduino IDE and go to Tools > Board to select your Arduino model.
4. Under Tools > Port, choose the COM port to which the Arduino is connected.
5. Write or load a program in the IDE and click the Upload button to send it to the Arduino.
6. The onboard LED (usually on pin 13) should blink if the connection and upload are
successful.

Arduino board and its features:


 It is open source both in terms of hardware and software.
 It can perform serial communication with the computer using USB.
 It only needs 5V to power up.
 It can work with Digital and Analog signals, sensors, and Actuators.
 The recommended input voltage is 7-12V, while the operating voltage is 5V for most
Arduino boards.

Raspberry Pi
 Raspberry pi is the name of the “credit card-sized computer board” developed by the
Raspberry pi foundation, based in the U.K.
 The Raspberry Pi is a series of powerful, small single-board computers.

Architecture:

 Processor: It is the heart of the Raspberry Pi which controls the operations of all the
connected devices and handles all the required computations.
 HDMI: High Definition Multimedia Interface is used for transmitting video or digital audio
data to a computer monitor or to digital TV.
 GPIO ports: General Purpose Input Output ports are available on Raspberry Pi which
allows the user to interface various I/P devices.
 Audio output: An audio connector is available for connecting audio output devices such as
headphones and speakers.
 USB ports: This is a common port available for various peripherals such as a mouse,
keyboard, or any other I/P device.
 SD card: An SD card with an operating system installed is required for booting the device.
 Ethernet: The ethernet connector allows access to the wired network, it is available only on
the model B of Raspberry Pi.
 Power supply: A micro USB power connector is available onto which a 5V power supply
can be connected.
 Camera module: Camera Serial Interface (CSI) connects the Broadcom processor to the
Pi camera.
 Display: DSI provides a high-resolution display interface that is specifically used for
sending video data.

Advantages: Disadvantages:
It is energy efficient. It is time consuming.
It is user friendly. It is not compatible with other devices.
It acts as a small web server. It is not useful for bigger businesses.
Difference between Arduino and Raspberry pi
S
No. Arduino Raspberry Pi

In the year 2005, the classrooms of


In the year 2012, Eben Upton first
the Interactive Design Institute in
1. introduced the Raspberry Pi device in
Ivrea, Italy, first introduced the
February.
Arduino board.

Control unit of the Arduino is from the The control unit of Raspberry Pi is
2.
At mega family. from the ARM family.

Arduino is based on a While Raspberry Pi is based on a


3.
microcontroller. microprocessor.

While Raspberry Pi computes data


It is designed to control the electrical and produces valuable outputs, and
4. components connected to the circuit controls components in a system
board in a system. based on the outcome of its
computation.

While Raspberry Pi boards have a


Arduino boards have a simple
5. complex architecture of hardware and
hardware and software structure.
software.

6. CPU architecture: 8 bit. CPU architecture: 64 bit.

While Raspberry Pi requires more


7. It uses very little RAM, 2 kB.
RAM, 1 GB.

It clocks at a processing speed of 16 While Raspberry Pi clocks a


8.
MHz processing speed of 1.4 GHz.

9. It is cheaper in cost. While Raspberry Pi is expensive.

It has a higher I/O current drive While Raspberry Pi has a lower I/O
10.
strength. current drive strength.
S
No. Arduino Raspberry Pi

While it consumes about 700 MW of


11. It consumes about 200 MW of power.
power.

12. Its logic level is 5V. Its logic level is 3V.

It has inbuilt Ethernet port and WiFi


13. It does not have internet support.
support.

14. It has higher current drive strength. It has lower current drive strength.

Some of the applications of Arduino Some of the applications of Raspberry


15. are traffic light countdown timer , Pi are Stop motion cameras , Robot
Weighing machines , etc. Controllers , Game Servers.

Operating systems are required in Operating System is required in


16.
Arduino. Raspberry Pi.

17. Two tiny cores Arduino with 32 MHz Single core and 700 MHz

Big Data
 Big data is a combination of structured, semi-structured and unstructured data that
organizations collect, analyze and mine for information and insights.
 It's used in machine learning projects, predictive modeling and other advanced analytics
applications.
Big data is often characterized by the 5 V's:
Importance:
Companies use big data in their systems:
 to improve operational efficiency,
 provide better customer service,
 create personalized marketing campaigns,
 and take other actions that can increase revenue and profits.
Advantages:
Disadvantages:
 It helps us to make wise decisions.
 Highly skilled staff is required.
 It also reduces cost of storing data.
 Helps in detecting the frauds.  It is difficult to handle.
 Helps us to boost productivity.  It is complex in nature.

Data Storage in IoT


 In lot (Internet of Things) applications data storage plays a crucial role in managing the
large volumes of data generated by sensors, devices, and systems.
 Hot, warm, and cold storage are terms used to categorize data based on its access
frequency, latency requirements, and cost considerations.
1. Hot Storage:
 Hot storage is designed for data that requires frequent access and low latency.
 It is typically used for real-time processing, immediate analytics, and serving data to
applications and users.
 Hot storage systems are optimized for high performance and responsiveness.
 Examples of data stored in hot storage include current sensor readings, real-time
telemetry data, and recent events or alerts.

2. Warm Storage:
 Warm storage is used for data that is accessed less frequently than hot data but still
requires relatively fast access times.
 It serves as an intermediate layer between hot and cold storage, providing a balance
between performance and cost.
 Warm storage systems may use slower storage media.
 Warm storage is suitable for applications where historical data analysis, trend analysis, and
periodic reporting are important, such as predictive maintenance, optimization, and
forecasting.
3. Cold Storage:
 Cold storage is optimized for long-term retention of data that is accessed infrequently or not
at all.
 It is typically used for archiving, backup, compliance, and regulatory purposes where data
needs to be retained for extended periods.
 Data stored in cold storage includes historical archives, raw sensor data, log backups that
are rarely accessed.
 Cold storage is suitable for applications where data retention requirements immediate
access to data is not critical, such as regulatory compliance, long-term analytics.

SOAP
 Simple Object Access Protocol (SOAP) is a network protocol for exchanging structured
data between nodes.
 It uses XML format to transfer messages.
 It works on top of application layer protocols like HTTP and SMTP for notations and
transmission.
Diagram of SOAP message

SOAP Building Block SOAP Envelope: Envelope is used to define the start and end
of the SOAP message. It contains the details of the SOAP
message.
SOAP Header: It is an optional element in which the header
contains the credentials information such as authorization,
authentication, etc. is used during the processing of a SOAP
message.
SOAP Body: It is an important element of the SOAP message
Advantages: that contains request and response information in the XML
 SOAP is a lightweight data interchange protocol.
format.
 It is platform independent.
SOAP Fault: The SOAP Fault element is an optional element
 It provides a high level of security.
Disadvantages: used to display an error message encountered during the
 It is less flexible. transmission of a SOAP message.
 It is complex in nature.
 It is harder to implement.

REST and RESTful API


 REST API stands for Representational State Transfer Application Programming
Interface.
 It's a way for two systems like a website and a database to communicate with each
other using the HTTP protocol.
What is REST?
 REST is a set of rules or guidelines for building APIs.
 These rules make sure APIs are simple, fast, and easy to use.
 REST is built on six key principles:
Client-Server Architecture:
 The client (e.g., a browser or mobile app) and server (e.g., a database) are separate. They
only talk to each other through requests and responses.
Stateless:
 The server doesn’t remember anything about the client between requests. Each request is
treated like a new request.
Cacheable:
 Responses from the server can be saved on the client side to avoid making the same
request again and again. This improves performance.
Uniform Interface:
 REST APIs follow standard rules to make them easy to understand and use.
Layered System:
 REST APIs can have multiple layers between the client and server. Each layer is
independent.
Code on Demand:
 Sometimes, the server can send executable code to the client to run. This is optional and
rarely used.

Architectural Design:

Restful API
 A RESTful API is just an API that follows the rules of REST.
 If an API uses the six principles mentioned above, it is called RESTful.
How Does a REST API Work?
 The client sends a request to the server.
 The server reads the request, performs the required action and prepares a response.
 The server sends a response back to the client.
 The response includes Header, body and status code.
Common HTTP Methods in REST API:
Advantages:
 REST uses HTTP, which is widely used.
 It is simple to understand and easy to implement.
 It can be used with any of the programming languages.
 It can handle large number of requests.
Formats used in REST APIs:
REST APIs typically send and receive data in the following formats:
1. JSON (most common): {"id": 1, "name": "John"}
2. XML (less common): <user><id>1</id><name>John</name></user>
Example of REST API
Let's say you are using a RESTful API to manage books in a library.
1. Get All Books (GET):
 Request: GET /books
 Response: [{"id": 1, "title": "Book A"}, {"id": 2, "title": "Book B"}]
2. Add a New Book (POST):
 Request: POST /books
 Body: {"title": "Book C"}
 Response: {"id": 3, "title": "Book C"}
3. Update a Book (PUT):
 Request: PUT /books/3
 Body: {"title": "Updated Book C"}
 Response: {"id": 3, "title": "Updated Book C"}
4. Delete a Book (DELETE):
 Request: DELETE /books/3
 Response: {"message": "Book deleted"}

Web Sockets
 WebSocket is a bidirectional communication protocol.
 It can send the data from the client to the server or from the server to the client by
reusing the established connection channel.
 The connection is kept alive until terminated by either the client or the server.
 Unlike HTTP which starts from ws:// or wss://.
Architecture:
Architecture of WebSocket
WebSocket architecture has three main components:
1. Client:
 The client is usually a web browser or an app. It initiates the connection and
sends/receives data.
2. Server:
 The server is responsible for handling WebSocket connections and processing the
messages sent by the client.
3. Protocol:
 WebSocket use the ws:// (or secure wss://) protocol instead of the
traditional http:// or https://.
 It ensures efficient, two-way communication over a single connection.
How Do WebSocket Work?
 A client (e.g., your browser) sends an HTTP request to the server to "upgrade" the
connection to a WebSocket.
 After the connection is established, the client and server can exchange messages
freely.
 Either the client or the server can close the connection when they no longer need it.
How it is different from HTTP?
HTTP – In this client make a request to server and then server sends the response of request
to client. Since here both client and server perform different actions therefore it is different
from web socket. It is only a one-way communication.
Example- loading a page, submitting a form.
Merits:
 It is fast.
 Lightweighted.
 It allows real time communication between clients and server.
 Supports binary data.
Demerits:
 It is complex in nature.
 It is expensive.
 It does not provide us with strong security measures.

Cloud for IoT


 Cloud computing- Cloud computing is a technology that allows us to use computing
services such as storage, processing and software over the internet without need of owning
the physical hardware.
 IoT – A network of interconnected devices that communicate and exchange data with each
other and with centralized systems through the internet.
 The combination of cloud computing and IoT is known as cloud for iot.
 AWS, IBM Cloud, GCP, Microsoft Azure etc are examples of service providers for cloud for
iot.
 Cloud for iot enables us to connect iot devices to the cloud services over the internet.
How IoT and Cloud Work Together
 Devices like smart thermostats, sensors, or connected cars collect data.
 These devices send the data to the cloud.
 The cloud processes and stores the data.
 IoT devices and the cloud communicate through the internet using protocols like MQTT,
HTTP, or CoAP.
 Based on the processed data, the cloud can: Send commands back to the IoT device.
Components of Cloud for IoT
 IoT devices – Sensors, actuators, and other devices collect data.
 IoT gateway – acts as bridge between iot devices and the cloud.
 Cloud Infrastructure – It includes storage, processing and applications.
 Communication protocols- it includes MQTT, HTTP, CoAP etc.
 User applications- Users interact with iot devices through apps or dashboards hosted in
cloud.
Merits Demerits
 Pay only for resources which you use.  It is complex in nature.
 Provides strong security measures.  It is expensive.
 It allows easy device management.  Highly skilled is required to maintain
and manage it.

Applications – Healthcare, smart agriculture, industrial iot, smart cities.

You might also like