Theory Merged
Theory Merged
Introduction to IoT
Held at
NPTEL
BACHELOR OF TECHNOLOGY
degree
in
By
Aman Ruhela
(2000820100019)
Fiza Zehra
(2000820100047)
Session: 2022-23
iv
ABSTRACT
12 weeks.
In the 1st week they mainly focused on the basics of Internet of things
and sensors. Also, they taught us what are the features of internet of
things.Now, the 2nd week was about the ‘Basic IoT Networkings’
MQTT, e.t.c. In the 4th week we dive into the topic ‘UAV Networks’.
things “. In the 6th week we learn about the “Python Language and
models.
In the 9th week we were taught about the sensor cloud, fog
taught about the smart cities and smart homes, connected vehicles.
In the 11th week we were taught about the smart grid, industrial
project. Lastly after too much research we made the hardware and
ACKNOWLEDGEMENT
through the NPTEL, by the course instructor Dr. Sudip Mishra was
under the guidance of our Asst Profs CSE Dept. Mr. Sanjeev Gupta
& Mr. Anurag Malik. Lastly, we would like to thank the almighty
TABLE OF CONTENT
CHAPTER 1
WEEKS
1.1 - Week 1:
1.1.1- IoT: Internet technology connecting devices, machines and tools to the
internet by means of wireless technologies. Over 9 billion ‘Things’ connected to
the Internet, as of now. ‘Things’ connected to the Internet are projected to cross 20
billion in the near future. Unification of technologies such as low-power embedded
systems, cloud computing, big-data, machine learning, and
networking.
1.1.2- Characteristic
Efficient, scalable and associated architecture.
Unambiguous naming and addressing.
Abundance of sleeping nodes, mobile and non-IP devices.
Intermittent connectivity.
1.1.4- Sensors
A sensor detects (senses) changes in the ambient conditions or in the state of
another device or a system, and forwards or processes this information in a certain
manner. They perform some input functions by sensing or feeling the physical
changes in characteristics of a system in response to a stimuli.
Temperature, Speed, Pressure, Displacement, Strain etc. are all analog quantities as
they tend to be continuous in nature.
Digital Sensors: It produce discrete digital output signals or voltages that are a
digital representation of the quantity being measured. Digital sensors produce a
binary output signal in the form of a logic “1” or a logic “0”, (“ON” or “OFF”).
Digital signal only produces discrete (non‐continuous) values, which may be output
as a single “bit” (serial transmission), or by combining the bits to produce a single
“byte” output (parallel transmission).
2. Pneumatic
3. Electrical
4. Thermal/ Magnetic
5. Mechanical
10
1.2 - Week 2:
1.2.1- 6LoWPAN: Low‐power Wireless Personal Area Networks over IPv6.
Allows for the smallest devices with limited processing ability to transmit
information wirelessly using an Internet protocol. Allows low‐power devices to
connect to the Internet. Created by the Internet Engineering Task Force (IETF) ‐
RFC 5933 and RFC 4919.
1.2.2- Characteristic
Allows IEEE 802.15.4 radios to carry 128‐bit addresses of Internet
Protocol version 6 (IPv6).
Header compression and address translation techniques allow the IEEE
802.15.4 radios to access the Internet.
IPv6 packets compressed and reformatted to fit the IEEE 802.15.4 packet
format.
Uses include IoT, Smart grid, and M2M applications.
1.2.4- MQTT
Message Queue Telemetry Transport is ISO standard (ISO/IEC PRF 20922). It is a
publish‐subscribe‐based lightweight messaging protocol for use in conjunction
with the TCP/IP protocol. MQTT was introduced by IBM in 1999 and standardized
by OASIS in 2013. Designed to provide connectivity (mostly embedded) between
applications and middle‐wares on one side and networks and communications on
the other side.
2. Disconnect
3. Subscribe
4. Unsubscribe
5. Publish
1.2.6- CoAP:
2. Non-Confirmable
3. Piggyback
4. Separate
1.2.8- XMPP:
1.3 - Week 3:
1- HART & Wireless HART: It is the latest release of Highway Addressable
Remote Transducer (HART) Protocol. HART standard was developed for
networked smart field devices. The wireless protocol makes the implementation of
HART cheaper and easier HART encompasses the greatest number of field devices
incorporated in any field network.
1.3.2- Layers
1.3.3- Bluetooth
Derived from AODV and extended for use in IoT. Basic operations of LOADng
includes the bluetooth wireless technology is a short-range communications
technology. Intended for replacing cables connecting portable units Maintains high
levels of security. Bluetooth technology is based on Ad‐hoc technology also known
as Ad‐hoc Piconets. Generation of Route Replies (RREPs) upon receipt of an
RREQ by the indicated destination, and unicast hop‐by‐hop forwarding of these
RREPs towards the originator.
2. Paging
3. Connection
13
1.3.6- L2CAP
The Logical Link Control and Adaptation Protocol (L2CAP). Layered over the
Baseband Protocol and resides in the data link layer. Used to multiplex multiple
logical connections between two devices. Provides connection‐oriented and
connectionless data services to upper layer protocols.
Provides:
1.3.7- ZWave
1.3.8- Features:
Flexibility
Support for multiple protocols
Use of open standards
Support for multiple applications
Reliability (error detection, channel hopping)
Determinism (TDMA, QoS support)
14
1.4 - Week 4:
1.4.1- Sensor Networks – Part III: It is the latest release of Highway
Addressable Remote Transducer (HART) Protocol. HART standard was developed
for networked smart field devices. The wireless protocol makes the implementation
of HART cheaper and easier. HART encompasses the greatest number of field
devices incorporated in any field network.
When an intruder enters into the field through the boundary (perimeter)of the field,
the PIR sensor detects the object.The ultrasonic sensor senses the distance at which
the object is located. Derived from AODV and extended for use in IoT. Basic
operations of LOADng includes the bluetooth wireless technology is a short-range
communications technology. Intended for replacing cables connecting portable
units Maintains high levels of security. Bluetooth technology is based on Ad‐hoc
technology also known as Ad‐hoc Piconets. Generation of Route Replies (RREPs)
upon receipt of an RREQ by the indicated destination, and unicast hop‐by‐hop
forwarding of these RREPs towards the originator.
2. Self-Heal
3. Self-Configure
15
1.5 - Week 5:
1.5.1- Interoperability in Internet of Things: Interoperability is a
characteristic of a product or system, whose interfaces are completely understood,
to work with other products or systems, present or future, in either implementation
or access, without any restrictions.It is the latest release of Highway Addressable
Remote Transducer (HART) Protocol. HART standard was developed for
networked smart field devices. The wireless protocol makes the implementation of
HART cheaper and easier. HART encompasses the greatest number of field devices
incorporated in any field network.
1.5.3- Arduino
Requirement:
Arduino controller board, USB connector,
Bread board, LED, 1.4Kohm resistor,
connecting wires, Arduino IDE
Connect the LED to the Arduino using the
Bread board and the connecting wires
Connect the Arduino board to the PC using the USB connector
Select the board type and port
Write the sketch in the editor, verify and upload.
void setup() {
pinMode(12, OUTPUT); // set the pin mode
}
void loop() {
digitalWrite(12, HIGH); // Turn on the LED
delay(1000);
digitalWrite(12, LOW); //Turn of the LED
delay(1000);
17
1.6 - Week 6:
1.6.1- Python:
Python is a versatile language which is easy to script and easy to read. It doesn’t
support strict rules for syntax. Its installation comes with integrated development
environment for programming. It supports interfacing with wide ranging hardware
platforms. With open-source nature, it forms a strong backbone to build large
Python IDE is a free and open source software that is used to write codes,
integrate several modules and libraries. It is available for installation into
PC with Windows, Linux and Mac.
Examples: Spyder, PyCharm, etc.
Numbers
String
x = ‘This is Python’
List
Tuple
Dictionary
d = {1:‘item','k':2}
18
The Python programming language has become more and more popular in handling
data analysis and processing because of its certain unique advantages. It’s easy to
read and maintain. pandas, with a rich library of functions and methods packaged
in it, is a fast, flexible and easy to use data analysis and manipulation tool built on
top of Python. It is one of the big boosters to make Python an efficient and powerful
data analysis environment.
pandas is memory-based. It does a great job when the to-be-manipulated data can
fit into the memory. It is inconvenient, even unable, to deal with big data, which
can’t be wholly loaded into the memory. Large files, however, like those containing
data imported from the database or downloaded from the web, are common in real-
world businesses. We need to have ways to manage them. How? That’s what I’d
By “big data” here, I am not talking about the TB or PB level data that requires
distributed processing. I mean the GB level file data that can’t fit into the normal
PC memory but can be held on disk. This is the more common type of big file
processing scenario.
1.7.1. Aggregation
A simple aggregation is to traverse values in the target column and to perform
calculation according to the specified aggregate operation, such as the sum
operation that adds up traversed values; the count operation that records the number
of traversed values; and the mean operation that adds up and counts the traversed
values and then divides the sum by the number.
19
1.7.2. Filtering
Similar to the aggregation, pandas will divide a big file into multiple chunks (n),
filter each data chunk and concatenate the filtering results.
1.7.3. Sorting
4. Maintain a list of k elements (k is the number of chunks) into which a row of data
in each temporary file is put;
5. Sort records in the list by the sorting field (same as the sort direction in step 2);
6. Write the record with smallest (in ascending order) or largest (in descending
order) value to the result file;
8. Repeat step 6, 7 until all records are written to the result file.
20
1.8 - Week 8:
1.8.1- Interoperability in Internet of Things:
1.8.4- Approaches:
ODIN
Ubi – Flow
Mobi – Flow
21
1.9 - Week 9:
1.9.1- Introduction to Openstack
Versions:
1.9.2- Components
1. Nova
2. Glance
3. Swift
4. Neutron
5. Clinder
6. Heat
7. Ceilometer
8. Keystone
Contain sensor nodes which sense some physical phenomena from the
environment
Transmit the sensed data (through wireless communication) to a centralized
unit, commonly known as Sink node
22
The communication between Sink node and other sensor nodes in the
network may be single/multi‐hop
Sink node further process data
1.9.4- Approaches:
Benefit
“We consider a WSN ‐based target tracking application, in which a WSN owner
refuses to share the sensed information with an external body, even in exchange of
money. Consequently, any organization that wishes to detect intrusion within a
particular zone has to deploy its own WSN. This leads to a long‐term investment
due to costly network setup and maintenance overheads. However, in a sensor‐
cloud environment, the same organization can use the same tracking application
and still get the service without actually owning the WSN”.
23
An urban system
Uses Information & Communication Technology (ICT)
Makes infrastructure more interactive, accessible and efficient.
Need for Smart Cities arose due to-
Rapidly growing urban population
Fast depleting natural resources
Changes in environment and climate.
1.10.2- Applications
1. Smart Economy
2. Smart Governance
3. Smart People
4. Smart Mobility
5. Smart Environment
6. Smart Living
Smart Vehicles
Assistance to drivers during bad weather or low-visibility.
Detection of bad driving patterns or driving under the influence of
substances.
Auto alert generation during crashes.
Self diagnostics.
Smart Health
Low cost, portable, at-home medical diagnosis kits.
Remote check-ups and diagnosis.
On-body sensors for effortless and accurate health monitoring.
Pollution and Calamity Monitoring
24
1. Data Collection
2. Data Transmission
3. Data Storage
4. Data Processing
1. Consumer Participation
2. Real‐time monitoring of consumption
3. Control of smart appliances
4. Building Automation
5. Real‐time Pricing
6. Distributed Generation
7. Integration of renewable energy resources
8. Integration of micro‐grid
9. Power System Efficiency
10. Power Monitoring
11. Asset Management and optimal utilizations
12. Distribution Automation and Protection
13. Power Quality
14. Self‐Healing
15. Frequency Monitoring and Control
16. Load Forecasting
17. Anticipation of Disturbances
Smart homes use emerging smart grid technologies to save energy, seek out the
lowest rates, and contribute to the smooth and efficient functioning of our
electric grid. The interactive relationship between the grid operators, utilities,
and consumers helps in proper functioning of smart grid technologies.
Computerized controls in smart homes helps to minimize energy use at times
when the power grid is under stress from high demand, or even to shift some of
their power use to times when power is available at a lower cost, i.e., from on‐
peak hours to off‐peak volume of data is produced periodically in a smart city
environment. Challenges include making the available/ incoming large data
volume precise and accurate. Quality of data precision and accuracy affects the
quality of decision making in IoT-enabled smart cities. Data fusion enables
optimum utilization of massive data gathered from multiple sources, and across
multiple platforms.
27
“Data analytics (DA) is the process of examining data sets in order to draw
conclusions about the information they contain, increasingly with the aid of
specialized systems and software. Data analytics technologies and techniques
are widely used in commercial industries to enable organizations to make more
informed business decisions and by scientists and researchers to verify or
disprove scientific models, theories and hypotheses.”Smart homes use
emerging smart grid technologies to save energy, seek out the lowest rates, and
contribute to the smooth and efficient functioning of our data.
1. Qualitative Analysis
2. Quantitative Analysis
CHAPTER 2
2.1.1- Introduction:
The Internet of things (IoT) describes physical objects (or groups of such objects)
with sensors processing ability, software and other technologies that connect and
exchange data with other devices and systems over the internet or other
communications networks [3].
The Internet of things has been considered a misnomer because devices do not need
to be connected to the public internet, they only need to be connected to a network
and be individually addressable
Today, Radars are used to detect and track aircraft, spacecraft, and ships at sea as
well as insects and birds in the atmosphere; measure the speed of automobiles; map
the surface of the earth from space; and measure properties of the atmosphere and
oceans.
But here we are going to implement a system for the small households like for
lockers security in shops, houses, etc. It will be cost effective for local people using
the ultrasonic sensor, motor, Arduino, buzzer, and processing software [1].
2.1.2- Objective:
To develop a system for small households, like for lockers safety, in shops, houses,
etc. So that it will be time saving, easy to use as well as cost effective for local
people using the ultrasonic sensor, motor, Arduino, buzzer, and Arduino ide,
processing software.
2.1.3- Methodology:
A radar system will respond quickly when it finds nearby objects using ultrasonic
sensor. Whenever an object is detected, the buzzer will be applied in order to tell
that there is something in the range of the system. This system will provide the
angle & distance of the objects. This system will provide visualization.
30
By connecting the Ultrasonic sensor with servo motor in order to rotate, with the
help of Arduino & Processing 4, we will be able to check if there is object in front
of the sensor or not.
Processing is a flexible software sketchbook and a language for visual arts.
Since 2001, Processing has promoted software literacy within the visual arts and
visual literacy within technology [2].
There are tens of thousands of students, artists, designers, researchers, and
hobbyists who use Processing for learning and prototyping.
• Arduino
• Arduino IDE
• Ultrasonic Sensor
• Motor
• Buzzer
• Processing 4
The applied system can be deployed over a server in order to control it remotely
and send the alerts to the control room if there is object in the close range.
31
CHAPTER 3
Source Code
#include <Servo.h>.
long duration;
int distance;
Servo myServo; // Creates a servo object for controlling the servo motor
void setup() {
Serial.begin(9600);
void loop() {
for(int i=15;i<=165;i++){
myServo.write(i);
delay(30);
33
Serial.print(","); // Sends addition character right next to the previous value needed
Serial.print("."); // Sends addition character right next to the previous value needed
for(int i=165;i>15;i--){
myServo.write(i);
delay(30);
distance = calculateDistance();
Serial.print(i);
Serial.print(",");
Serial.print(distance);
Serial.print(".");
int calculateDistance(){
34
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH); // Reads the echoPin, returns the sound wave
distance= duration*0.034/2;
return distance;
}
35
CHAPTER 4
Conclusion
CHAPTER 5
REFERENCES
[1]. https://www.arduino.cc
[2]. https://processing.org/reference/libraries
[3]. https://en.wikipedia.org/wiki/Internet_of_things
16
17