Sensors in Iot-1
Sensors in Iot-1
Sensors in Iot-1
A PROJECT REPORT
Submitted by
AAKASH T 953020114001
SURESH K 953020114032
IN
MECHANICAL ENGINEERING
MAY – 2024
ANNA UNIVERSITY: CHENNAI 600 025
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
Our special thanks to all the faculty members for their guidance
and inspiring us in all our endeavors. Last but not the least we thank our
parents and our friends for their moral support, constant encouragement
and enormous patience for the timely completion of the project.
iii
ABSTRACT
iv
TABLE OF CONTENTS
CHAPTER TITLE PAGE NO
ACKNOWLEDGEMENT Ⅲ
ABSTRACT Ⅳ
TABLE OF CONTENTS ⅴ
1 INTRODUCTION
1.1. IOT 1
1.2. DESIGNING THE CONNECTIVITY 4
MODULE
1.3. ESPRESSIF NODE MCU MODULE V1.0 4
1.4. INTRODUCTION TO ARDUINO 5
PLATFORM AND PROGRAMMING
1.5. SOFTWARE DETAILS 6
2 LITERATURE REVIEW
2.1. BASIC OF INTERNET OF THINGS 10
2.2. HISTORY OF IOT 11
2.3. ARCHITECTURE 12
2.3.1. NETWORK LAYER 12
2.3.2. APPLICATION LAYER 12
2.3.3. PERCEPTION LAYER 12
2.3.4. TRANSPORT LAYER 13
2.3.5. PROCESSING LAYER 13
2.3.6. APPLICATION LAYER 13
2.3.7. BUSINESS LAYER 13
2.4. TECHNOLOGIES 13
2.4.1. RADIO FREQUENCY IDENTIFICATION 14
(RFID)
2.4.2. NEAR FIELD COMMUNICATION (NFC) 15
2.4.3. MACHINE TO MACHINE 16
v
COMMUNICATION (MTOM)
2.4.4. VEHICLE TO VEHICLE 17
COMMUNICATION (VTOV)
3 SYSTEM ARCHITECTURE
3.1. ARDUINO ARCHITECTURE 20
3.2. PROGRAMMING 21
3.3. BASIC FUNCTIONS OF ARDUINO 21
TECHNOLOGY
3.4. IOT SYSTEM FUNCTIONAL VIEW 22
3.5. DATA COLLECTION 22
3.6. DATA PROCESSING 22
3.7. ACTING 23
3.8. IOT SYSTEM: INFRASTRUCTURE 24
OVERVIEW
3.9. DATA ACQUISITION AND EDGE 25
COMPONENTS
3.10. COMMUNICATION LAYER 26
3.11. CLOUD 27
3.12. EDGE NODE FUNCTIONALITY 28
3.13. IOT SYSTEM CLOUD COMPONENTS 29
3.14. CONTROL PLANE: SECURITY AND 30
MANAGEMENT
3.15. IOT SYSTEM SECURITY 30
3.16. IOT SYSTEM MANAGEMENT 32
3.17. IMPLEMENTATION CONSIDERATIONS 33
3.18. STRUCTURE OF IOT INFORMATION 34
MODEL
vi
3.19. OBJECT TYPE 35
3.20. PROPERTIES, ATTRIBUTES 35
3.21. INTERACTIONS 36
3.22. LINKS 36
3.23. METADATA HANDLING 37
4 HARDWARE IMPLEMENTATION
4.1. CREATING THE PROJECT IN BLYNK APP 38
4.2. CODE ANALYSIS AND FINAL 39
CONNECTION
4.3. HARDWARE DETAILS 39
4.4. CONTROL WITH BLYNK APP 40
4.5. LED BLINKING 40
4.6. LED PATTERN WITH PUSH BUTTON 41
CONTROL ARDUINO
4.7. DISPLAYING HELLO WORLD MESSAGE 42
IN LCD
4.8. RC SERVO POSITION CONTROL 43
4.9. TEMPERATURE MEASUREMENT USING 44
LM35 THERMISTOR IC
4.10. DISTANCE MEASUREMENT USING 45
ULTRASONIC SENSOR
4.11. IR SENSOR ANALOG INPUT WITH 46
ARDUINO
4.12. EXPLORE DIFFERENT COMMUNICATION 47
METHODS WITH IOT DEVICE
vii
5.3. M2M DEVICE PLATFORM 50
5.4. M2M USER PLATFORM 51
5.5. M2M APPLICATION PLATFORM 51
5.6. M2M ACCESS PLATFORM 52
5.7. INTEROPERABILITY IN INTERNET OF 52
THINGS
5.8. NEED OF INTEROPERABILITY 52
5.9. TYPES OF INTEROPERABILITY 53
5.10. SYNTACTIC INTEROPERABILITY FOR 54
DEVICE INTERACTION
5.11. SEMANTIC INTEROPERABILITY FOR 54
DEVICE INTERACTION
5.12. DEVICE INTEROPERABILITY 54
5.13. APPLICATIONS OF M2M 55
5.14. KEY FEATURES OF M2M 56
COMMUNICATION
5.15. TECHNICAL ASPECTS OF M2M 57
COMMUNICATION
5.16. CASE STUDIES AND REAL-WORLD 58
EXAMPLES
6 CONCLUSION 61
viii
LIST OF FIGURES
ix
4.3 LED PATTERN 41
4.4 PUSH BUTTON 42
4.5 DISPLAY OUTPUT 43
4.6 RC SERVO CONTROL 43
4.7 TEMPERATURE SENSOR 44
4.8 ULTRASONIC SENSOR 45
4.9 INFRARED SENSOR 46
4.10 WI-FI COMMUNICATION 47
4.11 WI-FI WITH BLUETOOTH MODULE 48
5.1 M2M SERVICE PLATFORM 50
x
CHAPTER 1
INTRODUCTION
1.1. IOT
Today the Internet has become ubiquitous, has touched almost every
corner of the globe, and is affecting human life in unimaginable ways.
• We are now entering an era of even more pervasive connectivity where
a very wide variety of appliances will be connected to the web.
• One year after the past edition of the Cluster book 2012 it can be clearly
stated that the Internet of Things (IoT) has reached many different players and
gained further recognition. Out of the potential Internet of Things application
areas, Smart Cities (and regions), Smart Car and mobility, Smart Home and
assisted living, Smart Industries, Public safety, Energy & environmental
protection, Agriculture and Tourism as part of a future IoT Ecosystem have
acquired high attention.
1. The Internet of Things as simply an interaction between the physical and digital
worlds. The digital world interacts with the physical world using a plethora of
sensors and actuators.
1
2. Another is the Internet of Things is defined as a paradigm in which computing
and networking capabilities are embedded in any kind of conceivable object.
• We use these capabilities to query the state of the object and to change its state
if possible.
• In common parlance, the Internet of Things refers to a new kind of world where
almost all the devices and appliances that we use are connected to a network.
• We can use them collaboratively to achieve complex tasks that require a high
degree of intelligence.
• For this intelligence and interconnection, IoT devices are equipped with
embedded sensors, actuators, processors, and transceivers.
• IoT is not a single technology; rather it is an agglomeration of various
technologies that work together in tandem.
• Sensors and actuators are devices, which help in interacting with the physical
environment.
• The data collected by the sensors has to be stored and processed intelligently in
order to derive useful inferences from it.
• Note that we broadly define the term sensor; a mobile phone or even a
microwave oven can count as a sensor as long as it provides inputs about its
current state (internal state + environment).
• An actuator is a device that is used to effect a change in the environment such
as the temperature controller of an air conditioner.
• The storage and processing capabilities of an IoT object are also restricted by
the resources available, which are often very constrained due to limitations of
size, energy, power, and computational capability.
• As a results the main research challenge is to ensure that we get the right kind
of data at the desired level of accuracy.
2
The Internet of Things (IoT) is no longer a technology of the future.
Smart cities, connected industries and smart households have indeed ushered in
an era where machines can communicate. The beauty of this technology lies in
the fact that the complex backend structure of systems is represented to the end-
user in the simplest possible form. This requires profound design know-how.
The IoT can be designed at different scales for different uses. It can start
from our homes with simple lighting or appliance control, and expand into the
realm of factories and industries with automated machines and central
management systems—called connected factories. It has scaled up to entire cities
with smart parking, smart metering, waste management, fire control, traffic
management and any similar functions involved.
3
1.2. DESIGNING THE CONNECTIVITY MODULE
4
Figure 1.3 Node MCU Connection
5
It is cheap
➢ It comes with an open supply hardware feature that permits users to
develop their own kit
➢ The software of the Arduino is well-suited with all kinds of in operation
systems like Linux, Windows, and Macintosh, etc.
➢ For beginners also it is very simple to use.
PROGRAMMING STRUCTURE
6
EDIT
SKETCH
7
TOOLS
HELP
8
COMPILE & UPLOAD PROGRAMS
9
CHAPTER 2
2. LITERATURE REVIEW
2.1. BASIC OF INTERNET OF THINGS
Internet of Things can be defined as the collection of two terms: one is
Internet, which is defined as networks of networks which can connect billions
of users with some standard internet protocols. Internet connect several
different sectors and department while using different technologies. Several
devices like mobile, personal systems and business organizations are
connected to Internet. The second term is Thing, this term is basically mean to
these devices or objects which turn into intelligent objects. More over this it is
also a part of all objects of this real world. If we want to define IOT then we
cannot define it precisely and concisely but Vermes an et al. The digital world
interacts with the physical world using a plethora of sensors and actuators.
10
IoT can also be defined as “An open and comprehensive network of intelligent
objects that have the capacity to auto-organize, share information, data and
resources, reacting and acting in face of situations and changes in the
environment.
2.2. HISTORY OF IOT
11
2.3. ARCHITECTURE
Implementation of IoT concept is basically depends on its architecture.
In the initial phase of research 3 layers architecture was introduced, which have
three layers the perception, network and application layers.
12
2.3.4. TRANSPORT LAYER
Takes the data from the perception layer and pass this data to the next
layer which is processing layer and vice versa. This will done with the help of
networks like LAN, wireless technology, 3G, 4G, LTE, RFID etc.
2.4. TECHNOLOGIES
There are various technologies which are used to define IOT, but the four main
technologies are as follows:
13
1. Radio Frequency Identification (RFID)
2. Near Field Communication (NFC)
3. Machine to Machine Communication (MtoM)
4. Vehicle to Vehicle Communication (VtoV)
APPLICATION
RFID has a very limited use only for identification and tracking. As
we know that it works on frequency and within a limited range. So it can work
for such applications like smart grocery, smart cabinet, smart fridge, smart
appliances, smart currency etc. In these scenarios there is a tag on product and
a reader to scan the tag. In a grocery shop we put tags on the products and
when the product passes through that reader, the reader will catch it.
ISSUES
There are several issues with RFID. It works on specific range of
frequencies; if these frequencies differ at different places then it will create a
14
problem in reading a tag at different locations. It is also difficult to read more
than one tag simultaneously. There are methods to overcome this problem but
very costly. Tags have to be implemented on the product and all the tags are
different and unique, which includes some cost. The inclusion of cost is not
comfortable all the time when comparing and concerning with the cost of
product.
15
ISSUES
These devices will work on a very small range, so this is one of the major
issues. Two devices of two different manufacturers can create some
compatibility issue in their communication. Due to this reason a monopoly may
exist in market.
16
2.4.4. VEHICLE TO VEHICLE COMMUNICATION (VTOV)
In this technology the objects are vehicles, which can communicate with
another vehicle or the sensors around them. the main aspect of concern here is,
there is no proper method to define the protocols because the object is moving
and communicating with another moving object or with the sensors on the
roadside. so we are not able to define any routing protocol. this communication
can work for a long distance and make an efficient communication among
objects. this technology was designed primarily with the aims of traffic control,
safety and accident avoidance.
APPLICATION
Smart cars are the application of m2m, a car which is driverless or a car
which have sensors and sense the speed of the nearby car who is getting slow
uncertainly. so the car can also be slow down to avoid accident.
ISSUES
The main concern of v2v is the loss of connectivity when any other object
comes in between the communicating devices. if they are not in a proper distance
and proper line of sight then they will not be able to continue in connected state.
17
Figure 2.3 IOT Applications
After doing the literature survey some major issues are observed, like
the interrupted connectivity among devices effecting the communication. Also
there is compatibility issue in devices.
18
CHAPTER 3
3. SYSTEM ARCHITECTURE
19
Arduino board is a one type of micro controller based kit. The first Arduino
technology was developed in the year 2005 by David and Massimo Banzi. The
designers thought to provide easy and low cost board for students, hobbyists and
professionals to build devices. But, 7lakhs boards were in user’s hands in the year
2013. Arduino technology is used in many operating devices like communication
or controlling.
The pin configuration of the Arduino Uno board is shown in the above.
It consists of 14-digital pins. Wherein 6 pins are used as pulse width modulation
and 6, a USB connection, a power jack, a 16MHz crystal oscillator, a reset button,
and an ICSP header. Arduino board can be powered either from the personal
computer through a USB or external source like a battery or an adaptor.
3.1. ARDUINO ARCHITECTURE
20
3.2. PROGRAMMING
➢ Digital read pin reads the digital value of the given pin.
➢ Digital write pin is used to write the digital value of the given pin.
➢ Pin mode pin is used to set the pin to I/O mode.
➢ Analog read pin reads and returns the value.
➢ Analog write pin writes the value of the pin.
➢ Serial. Begins pin sets the beginning of serial communication by
setting the rate of bit.
21
3.4. IOT SYSTEM FUNCTIONAL VIEW
The primary purpose of an IoT system is to collect real-world status data
and make them available to services and applications that create insights and act
upon them by affecting the physical system under observation in some way.
Implementation of those functions requires an infrastructure to run them and
control functions to keep the IoT system secure and operational.
It highlights three key steps in IoT data and control flows (1) data
collection, (2) processing, and (3) acting upon the world based on the outcomes.
Collected data quantify the state of the physical world and various types of
processing provide insights and determine the nature of actions to be undertaken
when appropriate.
This general description is applicable to almost any automated control
system. Some of the differences made possible by IoT systems include the broad
scope and variety of potential data sources, global reach by virtue of Internet
connectivity.
22
retrieved by an application, they are often referred to as data in motion and data
at rest. Data-acquisition modules usually perform the preliminary analysis and
filtering to determine what to do with each particular data item or stream. Based
on data values, source and system processing rules in effect, data may be routed
directly to applications, stored, or discarded.
3.7. ACTING
Acting upon insights and predictions is the output and the ultimate
purpose of deploying IoT systems. Actions can take different forms, from the
simple remote actuation operator commands in response to status indications on
the system dashboard, to automated guidance of control points that proactively
manages conditions in a smart building in a manner that maximizes user comfort
and optimizes energy efficiency. Actions can be implemented as direct actuation
or indirectly, in the form of advice to system operators or optimizations resulting
in adjustments to operational settings of the system, such as a building or a
23
manufacturing process. They can also include identification of causes of failures
and anomalous conditions followed by direct or indirect execution of the
appropriate remediation actions. Insights and resulting actions can operate in
rather complex systems and domains such as smart buildings that can have tens
of thousands of sensor and actuation points. With the addition of interoperable
data formats and Internet connectivity, the scope of data aggregation in IoT
systems can grow to potentially any level - from a single-building domain to
multi-domain systems such as smart cities and regions. In theory, one could
aggregate behavioral and energy efficiency data from all IoT managed buildings
in a large region and use it to improve AI and train ML algorithms for their
optimization. In turn, those results could be applied to a vast range of buildings or
even globally, and continuously improved with influx of new data and analysis
of the results of previous actions.
24
Figure 3.4 Major IoT System Components
Large IoT installations can be complex distributed systems with a variety of
components and multiple levels of hierarchy.
A more detailed structural and hierarchical view of an IoT system and
some of its key components is depicted in Figure. Edge components are depicted
towards the bottom, communications layer mostly in the middle, and upper levels
of system hierarchy ending with the cloud are shown on top.
Three major activities that need to be mapped to the infrastructure of an IoT
system may be summarized as:
➢ Data acquisition: conversion to digital and pre-processing
➢ Communication: data and metadata serialization and transport
➢ Data processing, storage, and aggregation: repeated at multiple stages in the
system hierarchy, progressively increasing scale
Edge components include sensors, smart things, gateways and fog nodes. The
communication layer provides connectivity among system components that they
can use for horizontal peer-to-peer interactions within a level of system hierarchy
or for cross-level communication towards the Internet and the cloud.
25
sensors are connected and dependent upon for wide-area connectivity and
optional additional services. Their basic role, as the name implies, is to provide
connectivity between locally connected sensors and the Internet.
26
In practice, communication is carried at the behest of software agents
that implement the relevant functions and services at the sending and the receiving
party. If both parties reside on the same network or are at the comparable levels
in system hierarchy, this communication is referred to as peer-to-peer (P2P). P2P
communications are sometimes also referred to as machine-to-machine (M2M)
communications. In general, all communications between IoT devices themselves
as well as with the applications and services are of the M2M type, so we use the
term P2P to depict peer level communications, which are shown as horizontal
paths in Figure 3, as opposed to the edge to cloud which would follow the more
vertical paths.
3.11. CLOUD
IoT data from multiple end points, gateways, and even domains are
aggregated in the cloud and funneled to the system-wide applications and
services. Streaming and archived data are made available to authorized
applications and services via APIs and queries. Cloud implementations generally
provide the top-end data aggregations, and the server, storage and connectivity
infrastructure to execute services and applications that use them.
IoT data coming to the cloud may be processed in-flight as they arrive, stored for
subsequent processing, or both. System-level rules and policies in effect
determine how individual data should be processed.
The cloud portion of an IoT system also provides integration and
interfacing opportunity with other enterprise systems, such as Online Transaction
Processing (OLTP) systems for commerce and billing, Enterprise Resource
Planning (ERP) systems for holistic business insights and management, and
Customer Relationship Management (CRM) systems for customer support.
Highlights two important interface layers in an IoT system, notably the
data and metadata APIs between the edge components and the cloud, and the
data-retrieval APIs for live streams and stored data used by the applications and
27
services executing in the cloud. In general, APIs should enable applications to
query, search, and access data and metadata of interest, as well as issue actuation
commands. Formalizing the types of interactions and data formats that they
support is not only a good design practice, it also provides the foundation for
modularity and interoperability in the implementation of IoT systems.
3.12. EDGE NODE FUNCTIONALITY
IoT edge node and thing implementations provide a wide spectrum of
functionality, from the minimalistic data acquisition and transfer in integrated
sensors, to sophisticated data processing, storage and analytics in high-end
gateways and fog nodes. To simplify the exposition, we describe edge functions
using IoT gateway as the representative node and description vehicle given that
it can embody all of those functions and perform them on behalf of multiple
endpoints in its care.
An IoT gateway links sensors and things at the edge with higher levels of
system processing hierarchy and the cloud. It is commonly a point where Internet
connectivity is achieved. The gateway is also a security boundary between things
with varying levels of security and the secured IoT processing IT infrastructure.
By virtue of its placement and function, an IoT gateway can also be an interface
and a boundary between production- and process-level Operational Technology
(OT), such as PLCs, and the IoT Information Technology (IT) part where most of
the advanced data processing and storage takes place.
As its name implies, the basic and traditional function of an IoT gateway
is to act as a communications bridge between sensors and actuators at one end
and the Internet and cloud on the other. This requires incorporation of appropriate
hardware interfaces and processing logic for sensor data acquisition and actuation
as well as protocol-converter engines for “south” side wired or wireless
communication links that it may support. On the “north” side, it means hardware
interfaces for the types of uplinks that are supported, ranging from Wi-Fi and
Ethernet to long-haul communications such as telco lines with the appropriate
28
modem circuitry. Uplink communication is usually Internet compatible at some
point, so gateways and smart things need to include the appropriate protocol
stacks for TCP/IP and HTTP often with support for transport-layer security, TLS.
29
This section describes cloud components that provide the IoT system
functionality. They can operate in public or private clouds as an overlay over
the “standard” cloud services such as virtualized compute and storage. This
section covers core IoT functions involved in managing and processing data
and control flows between the edge on one end and their delivery to cloud
services and applications on the other end. Operational details of cloud
applications and services - such as analytics, AI, and visualization – are not
covered as they are beyond the scope of this document.
30
Otherwise, like in any other complex IT system, security needs to
be designed to maintain system confidentiality, integrity, and availability [9].
An IoT system security design usually starts with risk assessment and threat
analysis that determine the levels and influence the type of techniques and
methods to be implemented for its defense. Security design and
implementation includes both static (built in) and dynamic (operational at
runtime) components and activities.
31
3.16. IOT SYSTEM MANAGEMENT
The management portion of the control plane is basically in charge of
shepherding an IoT system by keeping its components functional and their
software and firmware up to date. The management system is typically
implemented as a collection of individual management agents installed on
system nodes that communicate with the central management console. Its
primary functions are: (1) provisioning of nodes, (2) registration and
discovery, (3) firmware and software updates, (4) monitoring and
management.
One of the key management system functions is to maintain a registry of
system nodes. A registry can be a form of database that identifies the known and
therefore authorized nodes. It can also perform additional services, such as act as
a directory for node discovery, and to provide storage of node access and security
credentials. Nodes not recorded in the registry should not be allowed to
participate in IoT system operation. Nodes removed from the system should be
deleted or marked as such in the registry.
The process of adding new nodes to the system is often referred to as
commissioning and one of its key functions is the node provisioning necessary to
complete the task. A new node needs to be assigned a unique system identifier
and/or a name by which it can be referred to, addressed, and its reports tagged.
Before a node becomes active and during its operation, the management
system is in charge of updating its firmware and software. During normal
operation, the management system continually monitors nodes for operational and
configuration errors in order to take appropriate remedial actions when necessary.
These may be affected through agent-supported administration and
policy-based mechanisms via tools such as remote access and configuration.
32
3.17. IMPLEMENTATION CONSIDERATIONS
System designers and developers have to make a number of technical
decisions when implementing IoT solutions for specific applications. This
process starts with a definition of the purpose and intended benefit of the IoT
system which in turn dictates choices of what to measure and the number and
types of sensors to be installed for the purpose. Location and properties of the
target installation area influence decisions on the type and topology of networks
needed to connect them. End node design involves decisions such as the
placement and capacity of hardware and functionality of software. Hardware
spectrum of options covers a wide range from embedded microcontrollers to fully
functional desktop or server CPUs with memory management and hardware
support for virtualization, coupled with optional hardware assists for security, such
as TPM and TEE, and performance accelerators such as GPUs, FPGAs and
ASICs. The software spectrum of applications and runtime support can range
from embedded firmware, all the way to hypervisors running multiple virtual
machines with multiple containers. Special design provisions may need to be
made in quite common cases where the equipment needs to be able to operate in
harsh environments and in unattended modes with no human operators.
In the cloud, design choices include the ingestion capacity and
corresponding tools, message routing rules and processing or a pub/sub system
such as MQTT, event processing and stream analytics subsystems, sensor
database for archival storage, such as one of NoSQL types, visualization
dashboard and command/control console, ML and AI tools and whatever
application choices may be relevant for the vertical application domain that the
IoT system is supposed to serve. JSON and XML are commonly used for the data
serialization of payloads. A data or information model needs to be adopted or
defined for semantic annotation and machine-level interoperability between
senders and receivers.
33
3.18. STRUCTURE OF IOT INFORMATION MODEL
Software objects that represent and model IoT things are often structured
in ways that follow the common practices and terminology in object-oriented
(OO) programming. They are also referred to by other names, such as thing
descriptions and smart objects. Since objects are modeling real-world things,
there are some implied semantics defined by the intrinsic physical nature of the
thing that is being modeled. For example, a temperature sensor is commonly
understood to measure temperature of something based on its characteristics and
placement, such as the ambient air temperature or water temperature in a
heating/cooling pipe.
Element Description
Object Type Physical thing being modeled (device)
Properties, Object attributes, data, metadata
Attributes
Interactions Ways to interact with object, actions, events
Links To other objects, compositions, and collections
IoT data models may specify only object types and properties of modeled things
and leave out the definition of interactions and links.
3.19. OBJECT TYPE
Within each specification, names of thing abstractions indicate the type
of the physical thing or the phenomenon that is being modeled. This field is
labeled as Object Type in Table 1 and is often modeled in object-oriented systems
as a class. Object and class types directly correspond to the specific real-world
things that are modeled by the specification. They can include a variety of sensors
and devices, such as temperature, humidity, thermostat, refrigerator, security
camera, current drawn, metered units (kwh, gals or liters) and many others. It is
customary to use a single object-class definition representing a category of
34
physical devices or things, such as a temperature sensor, and to create specific
object instances of that class for each individual physical instantiation of a thing
in a particular IOT system.
35
3.21. INTERACTIONS
Some information models define the types of interactions that a modeled
object supports. These can include interfaces and methods that implementations
may support, such as the types of requests and responses for reading data and for
issuing actuation commands. They can also include designations of protocols and
formalisms, usually is, to interact with the thing. Device supported is usually
include retrieval of attributes and values, such as sensor readings and metadata.
They may also include ways to request machine-readable descriptions of the
thing, its object type and characteristics, or to activate the built-in methods that
operate on the object's internal structures and outputs, including actuations. Many
specifications also define events, which are generally asynchronous signals
emitted by the device to indicate some change of state under observation.
3.22. LINKS
Some sort of linking mechanism or representation is often included in IoT
information models, primarily as a mechanism to point to items of interest or to
form groupings of related objects. Groupings of interest may be formed to
facilitate coordinated behaviors of multiple devices, such as home-automation
things. They may also be used to reflect structural properties of the physical
connections between devices as installed and configured in the field that may be
of interest to applications, such as indicating which HVAC zone a temperature
sensor and an air-handling unit belong to.Composition via linking may also be
used to describe composite objects that include some more primitive basic types
already defined in the specification. For example, a smart thermostat object type
may be constructed as a composition of a temperature sensor, set point for
temperature regulation and scheduling, and actuators of the heating and cooling
systems.
36
3.23. METADATA HANDLING
Metadata, also called tags, are used in IoT systems to provide contextual
semantics of where and how data are gathered. They can annotate data to make it
more useful for a variety of post-processing services and applications, such as
analytics and device/asset management. Metadata annotations can provide
enriched contextual information in the form of additional attributes of a thing's
functionality, geographic location, manufacturer, serial number, and the like.
Standardized information and data models often specify some metadata as object
properties or attributes. These are typically inherent properties of the things being
modeled, such as the units of measure used by a temperature sensor when
reporting its readings. Some IoT applications may benefit from or even require
additional metadata, such as on the structural relationships among things that are
determined later in the system lifecycle, e.g. at installation time. Those can be
provided as carefully defined and consistently named additional attributes and
tags.
For example, additional metadata may indicate that an air temperature
sensor in a specific room is part of an HVAC zone whose ambient conditions are
regulated by a named air-handling unit. This kind of information can be consumed
by an application to programmatically determine which HVAC components to
actuate in order to reduce or increase ambient temperature as dictated by the
associated thermostat schedule or a user request.
37
CHAPTER 4
4. HARDWARE IMPLEMENTATION
Download the blynk app from google play store (link has been already
given). Open it and you have to make an account there. After that click on "new
project". Now you have to click "choose device" and you will be asked to select
required hardware, you will choose "arduino uno" and in "connection type" you have
to select "usb". You have to give a project name also. Then you click on "create"
your project is now created and blynk will send an authorization token to your mail
which you have to put in the arduino code. Then you will get a free space where you
have to add buttons, graphs etc. You will get all these from the widget box. In this
project as we are operating only one appliance so we will add only one button. After
clicking on "button" the icon will be added in the free space. You can place the
button anywhere on the screen. Then you have to click on the button to customize it.
You have to give a name there and you have to select whether you are using digital
or analog a virtual pin. You also have to mention the pin no. As in this project we
are using d13 i.e. Digital pin 13.
38
4.2. CODE ANALYSIS AND FINAL CONNECTION:
After downloading the zip files you have to unzip it and copy the contents
of the files (libraries and folders) to the sketchbook-folder of the Arduino IDE. To
check whether the blynk library has been added or not restart the Arduino IDE and
check in the library section, if you see "Blynk" it means that blynk library has been
successfully added.
Just copy the code (already provided) or you can get the code
from Examples-->Blynk-->Boards_USB_Serials-->Arduino_Serial_USB. In
both cases the only change you have to make is that copy the authorization code sent
to your mail to Arduino code. A black screen will appear on the screen. Then you
have to copy the path of "scripts" folder. In my case it is "My
Documents\Arduino\libraries\Blynk\scripts" and paste it on the black screen and
place enter. The file is "blynk-ser.bat -c COM4".. Now come back to the command
prompt part and press "enter" thrice. This will connect you to Blynk Server.
39
➢ It is cheap
➢ It comes with an open supply hardware feature that permits users to develop
their own kit
➢ The software of the Arduino is well-suited with all kinds of in operation
systems like Linux, Windows, and Macintosh, etc.
➢ It also comes with open supply software system feature that permits tough
software system developers to use the Arduino code to merge with the
prevailing programing language libraries and may be extended and changed.
➢ For beginners also it is very simple to use.
Now open blynk app from your mobile and open the project you have
created. If your system is connected to Blynk server then you will see 'Online' in
your mobile otherwise you will see 'Offline'. Now click on the button to On or Off
the appliance. If it is not working then check whether the system is connected to the
blynk server.
41
Figure 4.4 Push Button
Usually each push button switch has two pairs of contacts. Each pair of
contacts consists of a NO contact and a NC contact. When the button is pressed, the
two pairs of contacts act simultaneously, the NC contact is disconnected, and the NO
contact is closed.
A 'push to make' switch allows electricity to flow between its two contacts
when held in. When the button is released, the circuit is broken. This type of switch
is also known as a normally open no switches. (Examples doorbell, computer case
power switch, calculator buttons, individual keys on a keyboard)
A 'push to break' switch does the opposite, i.e. when the button is not
pressed, electricity can flow, but when it is pressed the circuit is broken. This type
of switch is also known as a normally closed nc switches. (Examples: Fridge Light
Switch, Alarm Switches in Fail-Safe circuits)
42
Figure 4.5 Display Output
RC servo motor can be used to set the position of the shaft of the servo
motor to 0 to 180 degrees. 50 Hz frequency pulses (Period 20msec) with pulse width
(0.5 to 2.5msec) positions the servo between 0 degrees and 180 degrees. There is a
built-in servo library in sketch software. It is used by writing #include Servo. Has
the first line in the Arduino program. In this experiment, potentiometer is used to
output 0-5V analog voltage.
43
The analog voltage is read in A0 pin using analog Read function. It converts
the 0-5V analog voltage to 10bit digital outputs (10bit resolution) and digital output
with decimal value 0-1023. This read value is sent out from the Arduino as pwm
signal in pin D9. The 0-1023 value is changed to the output of 0-255. If the analog
converted value is 1023, then the output will have full on time pulse width 255. If
the analog converted value is 500, then the output will have on time pulse width of
(1023/255) x 500. Since the pulses are continuous, the average output will be dc
voltage depending upon the analog voltage input.
44
In the temperature functional module we developed, we use the LM34 series of
temperature sensors. The LM34 series are precision integrated-circuit temperature
sensors, whose output voltage is linearly proportional to the Fahrenheit temperature.
The LM34 thus has an advantage over linear temperature sensors calibrated in
degrees Kelvin, as the user is not required to subtract a large constant voltage from
its output to obtain convenient Fahrenheit scaling.
The LM34 does not require any external calibration or trimming to provide
typical accuracies of ±1.2°F at room temperature and ±11.2°F over a full -50 to
+300°F temperature range. The LM34 is rated to operate over a -50° to +300°F
temperature range.
45
Ultrasonic sensor HC-SR04 sensor is used. A burst of ultrasonic waves is
transmitted. It hits the object and return back in the form of echo. Time difference
of outgoing waves and returning echo is proportional to twice the distance travelled.
HC – SR04 has 4 pins. 2 pins are +5V and Gnd. There are Triggering and Echo
signal pins. Connect trigger signal pin to A4 analog pin and echo signal pin to A5
analog pin of Arduino
46
4.12. EXPLORE DIFFERENT COMMUNICATION METHODS WITH IOT
DEVICE
Node MCU is a low-cost open source IOT platform. And it’s used to
communicate sensors data with the cloud platform. It initially
included fireware which runs on the ESP8266 Wi-Fi SoC from Espressif Systems,
and hardware which was based on the ESP-12 module. Later support for
the ESP32 32-bit MCU was added. Both the firmware and prototyping board designs
are open source.
The firmware uses the Lua scripting language. The firmware is based on
the eLua project, and built on the Espressif Non-OS SDK for ESP8266. It uses many
open source projects, such as lua-cjson[9] and SPIFFS. Due to resource constraints,
users need to select the modules relevant for their project and build a firmware
tailored to their needs. Support for the 32-bit ESP32 has also been implemented.
47
/O index ESP8266 pin
0 [*] GPIO16
1 GPIO5
2 GPIO4
3 GPIO0
4 GPIO2
5 GPIO14
6 GPIO12
7 GPIO13
8 GPIO15
9 GPIO3
10 GPIO1
11 GPIO9
12 GPIO10
48
CHAPTER 5
The device provider is basically the owner of these devices. M2M area
49
network sends the data from M2M devices, through gateway to the internet which is
handled by the internet service provider. Restfully architecture acts as an interface
between the device provider and the internet service provider. Restfully architecture
is used in low resource environment. From the ISP the reaches the platform provider.
The platform provider takes care of device management, user management, data
analytics and user access is the data is then through a RESTful architecture which
takes care of the business model to the service providers and users.
50
➢ Manages device profiles, such as location, device type, address, and
description.
➢ Provides authentication and authorization key management functionalities.
➢ Monitors the status of devices and M2M area networks, and controls them
based on their status.
51
5.6. M2M ACCESS PLATFORM
52
• Different programming languages used in computing systems and
websites such as JavaScript, JAVA, C, C++, Visual Basic, PHP,
and Python
• Different hardware platforms such as Crossbow, NI, etc.
• Different operating systems
• As an example, for sensor node: TinyOS, SOS, Mantis OS,
RETOS, and mostly vendor specific OS
• As an example, for personal computer: Windows, Mac, Unix, and
Ubuntu
• Different databases: DB2, MySQL, Oracle, PostgreSQL, SQLite,
SQL Server, and Sybase
• Different data representations
• Different control models
• Syntactic or semantic interpretations
53
5.10. SYNTACTIC INTEROPERABILITY FOR DEVICE INTERACTION:
➢ The interoperability between devices and device user in term of message
formats
➢ The message format from a device to a user is understandable for the user’s
computer
➢ On the other hand, the message format from the user to the device is
executable by the device
54
• UMB-A converts physical devices into virtually abstracted one, as
described by Universal Device Template (UDT)
• UDT consists of a Global Device ID, Global Function ID, Global
Action ID, Global Event ID, and Global Parameters
• UMB Adaptors translate the local middleware’s message into global
metadata’s message
• The major role of the UMB Core is routing the universal metadata
message to the destination or any other UMB Adaptors by the
Middleware Routing Table (MRT)
A. SECURITY
• M2M is used for fleet management, order tracking, and asset monitoring.
• Examples: GPS trackers in delivery trucks, real-time package tracking, and
supply chain optimization.
C. PAYMENT
• M2M devices monitor vital signs, support the elderly, and enable
telemedicine.
• Examples: Wearable health trackers, remote patient monitoring, and
emergency alerts.
E. REMOTE MAINTENANCE/CONTROL
A. LOW MOBILITY
B. TIME-CONTROLLED
C. TIME TOLERANT
D. PACKET SWITCHED
56
E. ONLINE SMALL DATA TRANSMISSIONS
F. MONITORING
H. LOCATION-SPECIFIC TRIGGER
57
SECURITY CHALLENGES
SMART GRIDS
FLEET MANAGEMENT
58
HEALTHCARE
➢ Wearable health devices (e.g., heart rate monitors) transmit data to healthcare
providers.
➢ Remote patient monitoring improves patient outcomes and reduces hospital
visits.
INDUSTRIAL AUTOMATION
ENCRYPTION:
AUTHENTICATION:
ACCESS CONTROL:
59
➢ Fine-grained access permissions restrict specific actions (read, write,
execute) based on roles or device identities.
➢ Access control lists (ACLs) help manage permissions effectively.
SECURE BOOTSTRAPPING:
PHYSICAL SECURITY:
PRIVACY CONSIDERATIONS:
60
CHAPTER 6
CONCLUSION
KEY COMPONENTS:
MICROCONTROLLERS:
Heart of embedded systems, handling computation and I/O.
SENSORS:
Gather environmental data (temperature, humidity, light, etc.).
ACTUATORS:
Perform actions based on sensor inputs (e.g., turning on a fan).
61
COMMUNICATION PROTOCOLS:
MQTT, CoAP, and HTTP/HTTPS
It enable M2M communication.
Choosing the right protocol depends on factors like power consumption, data size,
and security.
SECURITY MEASURES:
Encryption, authentication, and access control protect data integrity.
Regular security updates are crucial to stay ahead of vulnerabilities.
REAL-WORLD APPLICATIONS:
SMART HOMES:
Embedded IoT devices control lighting, heating, and security.
INDUSTRIAL AUTOMATION:
Predictive maintenance, process control, and energy efficiency.
HEALTHCARE:
Wearable health trackers, remote patient monitoring.
CHALLENGES AHEAD:
SCALABILITY:
Handling millions of connected devices efficiently.
INTEROPERABILITY:
Ensuring devices from different manufacturers can communicate seamlessly.
In conclusion, embedded IoT empowers us to create smarter, more connected
environments. As technology evolves, let’s continue innovating and building a
better-connected world!
62
63