IoT Notes (4)
IoT Notes (4)
IoT Notes (4)
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.
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.
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.
Business Layer
Application Layer
Processing Layer
Transport Layer
Perception Layer
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)
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).
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
-----------------------------------------------------------------------------------------------------------------------------
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
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
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.
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.
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.
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
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.
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.
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:
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.
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
Control unit of the Arduino is from the The control unit of Raspberry Pi is
2.
At mega family. from the ARM family.
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
14. It has higher current drive strength. It has lower current drive strength.
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.
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.
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.