Professional Documents
Culture Documents
Cp4251 Internet of Things
Cp4251 Internet of Things
Cp4251 Internet of Things
Chennai)
27, Thayanur, Trichy – 620009
M.E. –AI&ML
ABC ANALYSIS
FIRST YEAR
A
S.NO REGISTER NO NAME
1 810721323001 G.DHIVYA DHARSHINI
2 810721323002 R.POOVIZHI
3 810721323003 B.GOKUL
CP4251 INTERNET OF THINGS LTPC
3024
COURSE OBJECTIVES:
To Understand the Architectural Overview of IoT
To Understand the IoT Reference Architecture and Real World Design Constraints
To Understand the various IoT levels
To understand the basics of cloud architectue
To gain experience in Raspberry PI and experiment simple IoT application on it
UNIT I INTRODUCTION :
Internet of Things- Domain Specific IoTs - IoT and M2M-Sensors for IoT Applications–
Structure of IoT– IoT Map Device- IoT System Management with NETCONF-YANG.
UNIT II IoT ARCHITECTURE, GENERATIONS AND PROTOCOLS :
IETF architecture for IoT - IoT reference architecture -First Generation – Description &
Characteristics–Advanced Generation – Description & Characteristics–Integrated IoT
Sensors –Description & Characteristics.
UNIT III IoT PROTOCOLS AND TECHNOLOGY :
SCADA and RFID Protocols - BACNet Protocol -Zigbee Architecture - 6LowPAN - CoAP –
Wireless Sensor Structure–Energy Storage Module–Power Management Module–RF
Module–Sensing Module.
UNIT IV CLOUD ARCHITECTURE BASICS:
The Cloud types; IaaS, PaaS, SaaS.- Development environments for service development;
Amazon, Azure, Google Appcloud platform in industry.
UNIT V IOT PROJECTS ON RASPBERRY PI
Building IOT with RASPBERRY PI- Creating the sensor project - Preparing Raspberry Pi –
Clayster libraries – Hardware Interacting with the hardware - Interfacing the hardware-
Internal representation of sensor values - Persisting data - External representation of sensor
values - Exporting sensor data.
SUGGESTED ACTIVITIES:
1. Develop an application for LED Blink and Pattern using arduino or Raspberry Pi
2. Develop an application for LED Pattern with Push Button Control using arduino
or Raspberry Pi
3. Develop an application for LM35 Temperature Sensor to display temperature values
usingarduino or Raspberry Pi
4. Develop an application for Forest fire detection end node using Raspberry Pi device
andsensor
5. Develop an application for home intrusion detection web application
6. Develop an application for Smart parking application using python and Django for web
application
COURSE OUTCOMES:
CO1: Understand the various concept of the IoT and their technologies
CO2: Develop the IoT application using different hardware platforms
CO3: Implement the various IoT Protocols
CO4: Understand the basic principles of cloud computing
CO5: Develop and deploy the IoT application into cloud environment
(Approved by AICTE and Affiliated to Anna University, Chennai)
27, Thayanur, Trichy - 620009
UNIT I INTRODUCTION
Mode of Course Actua
Planned
S.No. Topics Teachin Reference outcom l date Remarks
Date
g e
1 Internet of Things
2 Domain Specific IoTs
IoT and M2M-Sensors for IoT
3
Applications
Structure of
4
IoT
5 IoT Map Device-
IoT System Management with
6
NETCONF-YANG
Total No. of Hours prescribed per Unit by Anna
University
Total No. of Hours Required as per Lesson Plan
Signature of Faculty Signature of HOD
UNIT II IoT ARCHITECTURE, GENERATIONS AND PROTOCOLS
7 IETF architecture for IoT
8 IoT reference architecture
9 First Generation
Description &
10
Characteristics
11 Advanced Generation
12 Description & Characteristics
13 Integrated IoT Sensors
14 Description & Characteristics
Total No. of Hours prescribed per Unit by
Anna University
Total No. of Hours Required as per Lesson Plan
Signature of Faculty Signature of HOD
UNIT III IoT PROTOCOLS AND TECHNOLOGY
15 SCADA and RFID Protocols
BACNet Protocol -Zigbee
16
Architecture
17 6LowPAN
18 CoAP
19 Wireless Sensor Structure
20 Energy Storage Module0
21 Power Management Module
22 RF Module
23 Sensing Module
Total No. of Hours prescribed per Unit by Anna
University
Total No. of Hours Required as per Lesson Plan
Signature of Faculty Signature of HOD
UNIT IV CLOUD ARCHITECTURE BASICS
The Cloud types; IaaS, PaaS,
24
SaaS.
Development environments for
service development; Amazon,
25
Azure, Google Appcloud
platform in industry
Total No. of Hours prescribed per Unit by Anna
University
Total No. of Hours Required as per Lesson Plan
Signature of Faculty Signature of HOD
UNIT V IOT PROJECTS ON RASPBERRY PI
Building IOT with
26
RASPBERRY PI-
27 Creating the sensor project
28 Preparing Raspberry Pi
29 Clayster libraries
Hardware Interacting with the
30
hardware
31 Interfacing the hardware-
Internal representation
32
of sensor values
33 Persisting data
External representation of sensor
34
values
35 Exporting sensor data
Total No. of Hours prescribed per Unit by Anna
University
Total No. of Hours Required as per Lesson Plan
Signature of Faculty Signature of HOD
Total No. of Hours prescribed by Anna University for Completion of the Course
Total No. of Hours Required as per Lesson Plan to complete the Course
No. of Hours Required for covering Content Beyond Syllabus
Total No. of Lecture Hours for Completion of the Course 50
Name:
Prepared by Sign
Designation: Assistant Professor
Name: J. SURESH
Approved by Sign
Designation: Head of the Department
IMPORTANT TWO MARK QUESTIONS
2) Explain Raspberry Pi
Raspberry Pi is a computer which is capable of doing all the
operations like a conventional computer. It has other features such as
onboard WiFi, GPIO pins, and Bluetooth in order to communicate
with external things.
Smoke sensor
Temperature sensors
Pressure sensor
Motion detection sensors
Gas sensor
Proximity sensor
IR sensors
1. Sensors:
Sensors in WSN are used to capture the environmental variables
and which is used for data acquisition. Sensor signals are
converted into electrical signals.
2. Radio Nodes:
It is used to receive the data produced by the Sensors and sends it
to the WLAN access point. It consists of a microcontroller,
transceiver, external memory, and power source.
3. WLAN Access Point:
It receives the data which is sent by the Radio nodes wirelessly,
generally through the internet.
4. Evaluation Software:
The data received by the WLAN Access Point is processed by a
software called as Evaluation Software for presenting the report to
the users for further processing of the data which can be used for
processing, analysis, storage, and mining of the data.
Military Applications
Health Applications
Environmental Applications
Home Applications
Commercial Applications
Area monitoring
Health care monitoring
Environmental/Earth sensings
Air pollution monitoring
Forest fire detection
Landslide detection
Water quality monitoring
Industrial monitoring
The memory card slot is used for inserting an SD card that acts as the
hardware of Raspberry Pi. The USB port, HDMI port, and the
audio/video port help us connect with a monitor, TV or any other
device. This is how Raspberry Pi is capable of working anytime and
anywhere. The processor gives the correct speed for running our
computer programs all the time.
Instructions to students:
RBT
Q.No. Questions Marks CO Cognitive
Level
Explain the generic M2M System Solution with a neat
a) 10 CO1 L3
diagram
1.
Summarize the Megatrends, Capabilities and implications of
b) 10 CO1 L2
IoT.
OR
Explain various trend in Information and communication
a) 10 CO1 L3
technologies and its impact on IoT.
Explain the potential and benefits of an IoT oriented
2.
approach over M2M by considering a Health band as the real
b) 10 CO1 L3
world use case example. Compare the main characteristics of
M2M and IoT.
******
INTERNET of THINGS
Instructions to students:
Answer FIVE FULL questions.
RBT
Q.No. Questions Marks CO Cognitive
Level
a) Write a summary of cellular M2M market situation. 10 CO1 L3
1.
b) Explain the various emerging IoT applications. 10 CO1 L3
OR
Explain various trend in Information and communication
a) 10 CO1 L3
technologies and its impact on IoT.
Explain the potential and benefits of an IoT oriented
2.
approach over M2M by considering a Health band as the real
b) 10 CO1 L3
world use case example. Compare the Main characteristics of
M2M and IoT.
******
IOT MATERIAL
(FULL UNIT)
UNIT-I INTRODUCTION
IOT:
IoT comprises things that have unique identities and are connected to internet. By 2020 there will be
a total of 50 billion devices /things connected to internet. IoT is not limited to just connecting things
to the internet but also allow things to communicate and exchange data.
Definition: A dynamic global n/w infrastructure with self configuring capabilities based on standard
and interoperable communication protocols where physical and virtual ―things‖ have identities,
physical attributes and virtual personalities and use intelligent interfaces, and are seamlessly
integrated into information n/w, often communicate data associated with users and their
environments.
Characteristics: 1) Dynamic & Self Adapting: IoT devices and systems may have the capability to
dynamically adapt with the changing contexts and take actions based on their operating conditions,
user‗s context or sensed environment. Eg: the surveillance system is adapting itself based on context
and changing conditions.
2) Self Configuring: allowing a large number of devices to work together to provide certain
functionality.
4) Unique Identity: Each IoT device has a unique identity and a unique identifier (IP address).
5) Integrated into Information Network: that allow them to communicate and exchange data with
other devices and systems.
Applications of IoT:
a) Smart Lighting: helps in saving energy by adapting the lighting to the ambient conditions and
switching on/off or diming the light when needed.
b) Smart Appliances: make the management easier and also provide status information to the
users remotely.
c) Intrusion Detection: use security cameras and sensors(PIR sensors and door sensors) to detect
intrusion and raise alerts. Alerts can be in the form of SMS or email sent to the user.
d) Smoke/Gas Detectors: Smoke detectors are installed in homes and buildings to detect smoke
that is typically an early sign of fire. Alerts raised by smoke detectors can be in the form of
signals to a fire alarm system. Gas detectors can detect the presence of harmful gases such as CO,
LPGetc.,
2) Cities:
a) Smart Parking: make the search for parking space easier and convenient for drivers. Smart
parking are powered by IoT systems that detect the no. of empty parking slots and send
information over internet to smart application backends.
b) Smart Lighting: for roads, parks and buildings can help in saving energy.
c) Smart Roads: Equipped with sensors can provide information on driving condition, travel time
estimating and alert in case of poor driving conditions, traffic condition and accidents.
d) Structural Health Monitoring: uses a network of sensors to monitor the vibration levels in the
structures such as bridges and buildings.
e) Surveillance: The video feeds from surveillance cameras can be aggregated in cloud based
scalable storage solution.
f) Emergency Response: IoT systems for fire detection, gas and water leakage detection can help
in generating alerts and minimizing their effects on the critical infrastructures.
3) Environment:
a) Weather Monitoring: Systems collect data from a no. of sensors attached and send the data to
cloud based applications and storage back ends. The data collected in cloud can then be analyzed
and visualized by cloud based applications.
b) Air Pollution Monitoring: System can monitor emission of harmful gases(CO2, CO, NO, NO2
etc.,) by factories and automobiles using gaseous and meteorological sensors. The collected data
can be analyzed to make informed decisions on pollutions control approaches.
c) Noise Pollution Monitoring: Due to growing urban development, noise levels in cities have
increased and even become alarmingly high in some cities. IoT based noise pollution monitoring
systems use a no. of noise monitoring systems that are deployed at different places in a city. The
data on noise levels from the station is collected on servers or in the cloud. The collected data is
then aggregated to generate noise maps.
d) Forest Fire Detection: Forest fire can cause damage to natural resources, property and human
life. Early detection of forest fire can help in minimizing damage.
e) River Flood Detection: River floods can cause damage to natural and human resources and
human life. Early warnings of floods can be given by monitoring the water level and flow rate.
IoT based river flood monitoring system uses a no. of sensor nodes that monitor the water level
and flow rate sensors.
4) Energy:
a) Smart Grids: is a data communication network integrated with the electrical grids that collects
and analyze data captured in near-real-time about power transmission, distribution and
consumption. Smart grid technology provides predictive information and recommendations to
utilities, their suppliers, and their customers on how best to manage power. By using IoT based
sensing and measurement technologies, the health of equipment and integrity of the grid can be
evaluated.
b) Renewable Energy Systems: IoT based systems integrated with the transformers at the point of
interconnection measure the electrical variables and how much power is fed into the grid. For
wind energy systems, closed-loop controls can be used to regulate the voltage at point of
interconnection which coordinate wind turbine outputs and provides power support.
5) Retail:
a) Inventory Management: IoT systems enable remote monitoring of inventory using data
collected by RFIDreaders.
c) Smart Vending Machines: Sensors in a smart vending machines monitors its operations and
send the data to cloud which can be used for predictive maintenance.
6) Logistics:
a) Route generation & scheduling: IoT based system backed by cloud can provide first response
to the route generation queries and can be scaled upto serve a large transportation network.
c) Shipment Monitoring: IoT based shipment monitoring systems use sensors such as temp,
humidity, to monitor the conditions and send data to cloud, where it can be analyzed to detect
foods poilage.
d) Remote Vehicle Diagnostics: Systems use on-board IoT devices for collecting data on Vehicle
operations(speed, RPMetc.,) and status of various vehicle subsystems.
7) Agriculture:
8) Industry:
b) Wearable Electronics.
M2M:
Machine-to-Machine (M2M) refers to networking of machines(or devices) for the purpose of
remote monitoring and control and data exchange.
IoT and M2M are often used interchangeably. Fig. Shows the end-to-end architecture of M2M
systems comprises of M2M area networks, communication networks and application domain.
An M2M area network comprises of machines( or M2M nodes) which have embedded network
modules for sensing, actuation and communicating various communication protocols can be used for
M2M LAN such as ZigBee, Bluetooth, M-bus, Wireless M-Bus etc., These protocols provide
connectivity between M2M nodes within an M2M area network.
The communication network provides connectivity to remote M2M area networks. The
communication network provides connectivity to remote M2M area network. The communication
network can use either wired or wireless network(IP based). While the M2M are networks use
either properietorary or non-IP based communication protocols, the communication network uses
IP-based network. Since non-IP based protocols are used within M2M area network, the M2M
nodes within one network cannot communicate with nodes in an external network.
To enable the communication between remote M2M are network, M2M gateways are used.
Fig. Shows a block diagram of an M2M gateway. The communication between M2M nodes and the
M2M gateway is based on the communication protocols which are naive to the M2M are network.
M2M gateway performs protocol translations to enable Ip-connectivity for M2M are networks.
M2M gateway acts as a proxy performing translations from/to native protocols to/from Internet
Protocol(IP). With an M2M gateway, each mode in an M2M area network appears as a virtualized
node for external M2M area networks.
1) Communication Protocols:
Commonly uses M2M protocols include ZigBee, Bluetooth, ModBus, M-Bus, Wireless M-Bus
tec., In IoT uses HTTP, CoAP, WebSocket , MQTT ,XMPP ,DDS ,AMQP etc.,
The data in IoT is collected in the cloud (can be public, private or hybrid cloud).
5) Applications
M2M data is collected in point solutions and can be accessed by on-premises applications such
as diagnosis applications, service management applications, and on- premisis enterprise
applications.
IoT data is collected in the cloud and can be accessed by cloud applications such as analytics
applications, enterprise applications, remote diagnosis and management applications, etc.
IoT Sensor :
Sensors are designed to respond to specific types of conditions in the physical world, and then
generate a signal (usually electrical) that can represent the magnitude of the condition being
monitored. Those conditions may be light, heat, sound, distance, pressure, or some other more
specific situation, such as the presence or absence of a gas or liquid. The common IoT sensors that
will be employed include:
Temperature sensors
Pressure sensors
Motion sensors
Level sensors
Image sensors
Proximity sensors
Water quality sensors
Chemical sensors
Gas sensors
Smoke sensors
Infrared (IR) sensors
Acceleration sensors
Gyroscopic sensors
Humidity sensors
Optical sensors
Temperature sensors: Temperature sensors detect the temperature of the air or a physical object and
concert that temperature level into an electrical signal that can be calibrated accurately reflect the
measured temperature. These sensors could monitor the temperature of the soil to help with
agricultural output or the temperature of a bearing operating in a critical piece of equipment to sense
when it might be overheating or nearing the point of failure.
Pressure sensors: Pressure sensors measure the pressure or force per unit area applied to the sensor
and can detect things such as atmospheric pressure, the pressure of a stored gas or liquid in a sealed
system such as tank or pressure vessel, or the weight of an object.
Motion sensors: Motion sensors or detectors can sense the movement of a physical object by using
any one of several technologies, including passive infrared (PIR), microwave detection, or ultrasonic,
which uses sound to detect objects. These sensors can be used in security and intrusion detection
systems, but can also be used to automate the control of doors, sinks, air conditioning and heating, or
other systems.
Level sensors: Level sensors translate the level of a liquid relative to a benchmark normal value into a
signal. Fuel gauges display the level of fuel in a vehicle’s tank, as an example, which provides a
continuous level reading. There are also point level sensors, which are a go-no/go or digital
representation of the level of the liquid. Some automobiles have a light that illuminates when the fuel
level tank is very close to empty, acting as an alarm that warns the driver that fuel is about to run out
completely.
Image sensors: Image sensors function to capture images to be digitally stored for processing.
License plate readers are an example, as well as facial recognition systems. Automated production
lines can use image sensors to detect issues with quality such as how well a surface is painted after
leaving the spray booth.
Proximity sensors: Proximity sensors can detect the presence or absence of objects that approach the
sensor through a variety of different technology designs. These approaches include:
Inductive technologies which are useful for the detection of metal objects
Capacitive technologies, which function on the basis of objects having a different dielectric
constant than that of air
Photoelectric technologies, which rely on a beam of light to illuminate and reflect back from
an object, or
Ultrasonic technologies, which use a sound signal to detect an object nearing the sensor
Water quality sensors: The importance of water to human beings on earth not only for drinking but as
a key ingredient needed in many production processes dictates the need to be able to sense and
measure parameters around water quality. Some examples of what is sensed and monitored include:
Chemical sensors: Chemical sensors are designed to detect the presence of specific chemical
substances which may have inadvertently leaked from their containers into spaces that are occupied
by personnel and are useful in controlling industrial process conditions.
Gas sensors: Related to chemical sensors, gas sensors are tuned to detect the presence of
combustible, toxic, or flammable gas in the vicinity of the sensor. Examples of specific gases that can
be detected include:
Bromine (Br2)
Carbon Monoxide (CO)
Chlorine (Cl2)
Chlorine Dioxide (ClO2)
Ethylene (C2H4)
Ethylene Oxide (C2H4O)
Formaldehyde (HCHO)
Hydrazine(s):
(H2NNH2, CH3NHNH2, [CH3]2NNH2)
Hydrogen (H2)
Hydrogen Bromide (HBr)
Hydrogen Chloride HCl)
Hydrogen Cyanide (HCN)
Hydrogen Peroxide (H2O2)
Hydrogen Sulfide (H2S)
Nitric Oxide (NO)
Nitrogen Dioxide (NO2)
Ozone (O3)
Peracetic Acid (C2H4O3)
Propylene Oxide (C3H6O)
Sulfur Dioxide (SO2)
Smoke sensors: Smoke sensors or detectors pick up the presence of smoke conditions which could be
an indication of a fire typically using optical sensors (photoelectric detection) or ionization detection.
Infrared (IR) sensors: Infrared sensor technologies detect infrared radiation that is emitted by
objects. Non-contact thermometers make use of these types of sensors as a way of measuring the
temperature of an object without having to directly place a probe or sensor on that object. They find
use in analyzing the heat signature of electronics and detecting blood flow or blood pressure in
patients.
Acceleration sensors: While motion sensors detect movement of an object, acceleration sensors, or
accelerometers as they are also known, detect the rate of change of velocity of an object. This change
may be due to a free-fall condition, a sudden vibration that is causing movement with speed changes,
or rotational motion (a directional change). One of several technologies that are employed in
acceleration sensors include:
Gyroscopic sensors: Gyroscopes or gyroscopic sensors are used to measure the rotation of an object
and determine the rate of its movement called the angular velocity, using a 3-axis system. These
sensors enable the determination of the object’s orientation without having to visibly observe it.
Humidity sensors: Humidity sensors can detect the relative humidity of the air or other gas, which is
a measure of the amount of water vapor contained in that gas. Controlling environmental conditions is
critical in the production processes of materials and humidity sensors enable readings to be taken and
changes made to mitigate increasing or decreasing levels. A common application is in HVAC systems
to maintain desired comfort levels.
Optical sensors: Optical sensors respond to light that is reflected off of an object and generate a
corresponding electrical signal for use in detecting or measuring a condition. These sensors work by
either sensing the interruption of a beam of light or its reflection caused by the presence of the object.
The types of optical sensors include:
Through-beam sensors (which detect objects by the interruption of a light beam as the object
crosses the path between a transmitter and remote receiver)
Retro-reflective sensors (which combine transmitter and receiver into a single unit and use a
separate reflective surface to bounce the light back to the device)
Diffuse reflection sensors (which operate similarly to retro-reflective sensors except that the
object being detected serves as the reflective surface)
IoT Structure
IoT is a network of tiny innovations like the sensors which can be attached to possibly anything
available and then make them communicate with the cloud server without any human interaction. So,
the question is how to make this happen? Well the answer is to attach a sensor to a Raspberry Pi
device about which we will be discussing in the coming sections. Raspberry Pi device with the
installed EdgeX agent helps the users to acquire, store, process, and take actions any kind of data from
the device to the cloud server.
Figure 1 : Communication between sensors, gateway, and cloud server
Sensors - Tiny innovations that can be attached to anything and then with some additional help, can
be made to communicate with the internet. Sensors play a pivotal role in the IoT infrastructure.
Gateway device - A gateway device is nothing but a piece of hardware bridging the gap between the
sensors and the IoT platform. This guide details about a Raspberry Pi device which is integrated with
EdgeX agent to help the sensors communicate the data to the cloud server.
EdgeX agent - A revolutionary agent by WebNMS IoT that makes the devices IoT enabled and help
them to seamlessly discover, acquire, and process immense data smoothly.
Cloud Server - A virtual but logical server that is built, hosted and delivered through cloud
computing platform and can be accessed remotely.
Sensors are deployed at the remote location so that they can detect any changes in the environment
and notify the user for the occurred changes. These changes are then captured and pushed to the cloud
server. Multi-purpose EdgeX agent bridges the gap between the sensors installed at the remote
location and the cloud server. The agent when pushed to the gateway device ensures that the
communication establishes between the sensors and the cloud server.
Sensors are made to communicate with the cloud server with the help of the EgdeX agent that is
integrated with the Raspberry pi device. Data is collected, translated, and then transferred to the cloud
server from the sensors via the Raspberry Pi device.
The IETF is an open standards organization supervised by the Internet Society's Internet Architecture
Board (IAB). However, prior to 1993, the IETF was supported by the United States federal
government.
The Internet of Things (IoT) is the network of physical objects or "things" embedded with electronics,
software, sensors, actuators, and connectivity to enable objects to exchange data with the
manufacturer, operator, and/or other connected devices.
The Internet of Things refers to a system with devices that are often constrained in communication
and computation capabilities, now becoming more commonly connected to the Internet or at least to
an IP network, and to various services that are built on top of the capabilities these devices jointly
provide. It is expected that this development will usher in more machine-to-machine communication
using the Internet with no human user actively involved.
• Devices
• Device manager
First generation:
Cloud computing and ubiquitous networks are ground-breaking advancement ensuring that
large computing power and storage capacity become more affordable and accessible to
businesses and researchers. The ability to collect, transmit and store large volumes of data has
fueled the exponential growth of the first generation of IoT scenarios. Data from IoT devices
is streamed to cloud platforms for processing and studying machine learning for decision
making - trend analysis, optimization or preventive measures based on predictions. These IoT
scenarios are constrained by challenges like - ability to provide real-time responses, ability to
be continuously connected to a network or the inefficiency of transferring every sensor
reading to the cloud.
Infusion of compute and storage capability on the IoT edge devices itself is driving the next
generation of IoT scenarios. Edge or near edge processing enables near real-time analysis and
responses, pre-processing of data resulting in reduced data payload and asynchronous mode
of data transfer (store and forward). But, being disconnected from a secure network for long
intervals of time invites security risks and raises concern on data integrity. This paper
explores validation and security offered by blockchain to help overcome the data security
challenge in IoT.
UNIT-4
CLOUD ARCHITECTURE BASICS
Windows Azure
Google App Engine
Cloud Foundry
Amazon Web Services
As the previous diagram suggests, we have the first column as OPS, which stands for operations. That
means the bare minimum requirement for any typical server. When we are going with a server to buy,
we should consider the preceding features before buying.
It includes Application, Data, Runtime, Framework, Operating System,
Server, Disk, and Network Stack.
When we move to the cloud and decide to go with IaaS—in this case, we are not bothered about the
server, disk, and network stack. Thus, the headache of handling hardware part is no more with us.
That’s why it is called Infrastructure as a Service.
Now if we think of PaaS, we should not be worried about runtime, framework, and operating system
along with the components in IaaS. Things that we need to focus on are only application and data.
And the last deployment model is SaaS—Software as a Service. In this model, we are not concerned
about literally anything. The only thing that we need to work on is the code and just a look at the bill.
It’s that simple!
Our Google Cloud Platform Tutorial contains the basic and advanced concepts of Google Cloud
Platform. This tutorial is designed to help both beginners and professionals.
This tutorial gives you an introduction to Google Cloud Platform along with a wide range of topics
such as why use Google Cloud Platform, Benefits of Google Cloud Platform, Key features of
Google Cloud Platform, Google Cloud Platform Services, Creating a Free Tier Account and VM
Instance on Google Cloud Platform, etc.
Before we start learning Google Cloud Platform, let's understand about 'Cloud Computing' first:
Cloud computing is defined as the services offered through remote servers on the internet. These
services might include database storage, applications, compute power and other IT resources over the
pay-as-you-go pricing approach. The remote server allows users to save, modify, or process data on
the internet or cloud-based platform instead of storing it on a local server or their devices.
Cloud computing is evolving due to fast performance, better manageability, and less maintenance. It
helps organizations to minimize the number of resources and overall infrastructure costs.
Additionally, it helps IT teams better focus on the important applications, services, and processes and
achieve the company's goals.
Typically, the cloud-computing providers offer their services according to the following three
standard models:
o Platform as a Service (PaaS)
o Software as a Service (SaaS)
o Infrastructure as a Service (IaaS)
Google Cloud Platform (GCP) is a suite of cloud computing services provided by Google. It is a
public cloud computing platform consisting of a variety of services like compute, storage, networking,
application development, Big Data, and more, which run on the same cloud infrastructure that Google
uses internally for its end-user products, such as Google Search, Photos, Gmail and YouTube, etc.
The services of GCP can be accessed by software developers, cloud administrators and IT
professionals over the Internet or through a dedicated network connection.
Google Cloud Platform is known as one of the leading cloud providers in the IT field. The services
and features can be easily accessed and used by the software developers and users with little technical
knowledge. Google has been on top amongst its competitors, offering the highly scalable and most
reliable platform for building, testing and deploying the applications in the real-time environment.
Apart from this, GCP was announced as the leading cloud platform in the Gartner's IaaS Magic
Quadrant in 2018. Gartner is one of the leading research and advisory company. Gartner organized a
campaign where Google Cloud Platform was compared with other cloud providers, and GCP was
selected as one of the top three providers in the market.
Most companies use data centers because of the availability of cost forecasting, hardware certainty,
and advanced control. However, they lack the necessary features to run and maintain resources in the
data center. GCP, on the other side, is a fully-featured cloud platform that includes:
o Capacity: Sufficient resources for easy scaling whenever required. Also, effective
management of those resources for optimum performance.
o Security: Multi-level security options to protect resources, such as assets, network and OS -
components.
o Network Infrastructure: Number of physical, logistical, and human-resource-related
components, such as wiring, routers, switches, firewalls, load balancers, etc.
o Support: Skilled professionals for installation, maintenance, and support.
o Bandwidth: Suitable amount of bandwidth for peak load.
o Facilities: Other infrastructure components, including physical equipment and power
resources.
Therefore, Google Cloud Platform is a viable option for businesses, especially when the businesses
require an extensive catalog of services with global recognition.
Some of the main benefits of Google Cloud Platform are explained below:
Best Pricing: Google enables users to get Google Cloud hosting at the cheapest rates. The hosting
plans are not only cheaper than other hosting platforms but also offer better features than others. GCP
provides a pay-as-you-go option to the users where users can pay separately only for the services and
resources they want to use.
Work from Anywhere: Once the account is configured on GCP, it can be accessed from anywhere.
That means that the user can use GCP across different devices from different places. It is possible
because Google provides web-based applications that allow users to have complete access to GCP.
Private Network: Google has its own network that enables users to have more control over GCP
functions. Due to this, users achieve smooth performance and increased efficiency over the network.
Scalable: Users are getting a more scalable platform over the private network. Because Google uses
fiber-optic cables to extend its network range, it is likely to have more scalability. Google is always
working to scale its network because there can be any amount of traffic at any time.
Security: There is a high number of security professionals working at Google. They always keep
trying to secure the network and protect the data stored on servers. Additionally, Google uses an
algorithm that encrypts all the data on the Cloud platform. This gives assurance to the users that their
data is completely safe and secure from unauthorized sources.
Redundant Backup: Google always keeps backup of user's data with built-in redundant backup
integration. In case a user has lost the stored data, it's not a big problem. Google always has a copy of
the users' data unless the data is deleted forcefully. This adds data integrity, reliability and durability
with GCP.
When a file is uploaded on the Google cloud, the unique metadata is inserted into a file. It helps identify the different files
automatically to the main file, also called a master file. GCP further updates all the downloaded files using metadata to main
Suppose that MS Office is implemented on Cloud to enable several people to work together. The primary aim of using cl
plugin for the MS Office suite. This will allow several people to edit a document at the same time. The owner can assign acc
Once users are assigned as an editor, they can use and edit the document's cloud copy as desired. The combined, edited cop
document given to different users. However, any of the authorized users' changes will be visible on all the copies of docum
appropriate changes to keep.
Google provides a considerable number of services with several unique features. That is the reason why Google Cloud Platf
o Compute Services
o Networking
o Storage Services
o Big Data
o Security and Identity Management
o Management Tools
o Cloud AI
o IoT (Internet of Things)
Let's understand each of these services in details:
Compute Services
Networking
Storage Services
Big Data
GCP includes the following services related to Security and Identity management:
o Cloud Data Loss Prevention API: It is mainly designed to manage sensitive data. It helps users manage sensitiv
sensitive data.
o Cloud IAM: It stands for Cloud Identity and Access Management. It is a framework that contains rules and policie
Management (IdM).
Management Tools
Cloud AI
Cloud IoT Core: It is one of the fully managed core services. It allows users to connect, control, and ingest data from vario
visualize IoT data in real-time.
Cloud IoT Edge: The Edge computing service brings memory and other computing-power resources near to the location w
There are several advantages of using Google Cloud Platform, such as:
o Google Cloud Offers Quick and Easy Collaboration: Multiple users can access the data and simultaneously contr
o Higher Productivity with Continuous Development: Google is always working on adding new features and fu
services.
o Less Disruption with Adopting New Features: Instead of pushing huge disruptive updates of changes, Google pro
o Least or Minimal Data is stored on Vulnerable Devices: Google does not store data on local devices unless a use
o Users can access Google Cloud from Anywhere: The best thing is that a user can easily access the information sto
o Google provides Maximum Security with its Robust Structure: Google hires leading security professionals to pr
o Users have Full Control over their Data: Users gain full control over services and the data stored in Google Cloud
o Google provides Higher Uptime and Reliability: Google uses several resources to provide higher and reliable
secondary center without interruption visible to users.
To start using Google Cloud Platform, we are first required to create an account GCP. Here, we will create a free tier acc
credit to spend over the next 90 days after the date of account creation. Google offers all the core services of GCP with a fre
However, users must have a credit card to start a free tier account. Google asks for the credit card details to make sure tha
$300 free credit. The amount will only be charged when we will be upgrading our free account to a paid account manually.
Let's start with the steps of creating a free tier account on Google Cloud Platform:
Step 2: On the next screen, we need to click on 'Get started for free', as shown below:
Step 3: Next, we are required to login to the Google Account. We can use the 'create an account' button if we don't have an
Step 4: Once we have logged in, we will get to the following screen:
Here, we must select the Country, agree to the Terms of Service, and then click on the 'CONTINUE' button.
Step 5: On the next screen, we have to enter some necessary details such as name and address details. Also, we have to e
button 'START MY FREE TRIAL' from the bottom of the page:
Step 6: Google asks for the confirmation to use the credit card for the small deduction to ensure that the card information is
Step 7: On the next screen, we must click on the 'GO TO CONSOLE' button:
After clicking on the 'GO TO CONSOLE' button, we will be redirected to the Dashboard that includes a summary of GCP s
When it comes to pricing, Google Cloud Platform is the cheapest solution in the market. GCP is not only low on price but al
When comparing GCP with other leading competitors, it has more benefits over them. Google provides its users a massive 6
o 15% rightsizing recommendation
o 21% list price differences
o 24% of sustained usage discounts
No Hidden Charges: There are no hidden charges behind the GCP pricing. Google's pricing structure is straightforward and
Pay-as-you-go: Google offers its customer 'use now, pay later' option. So, users will have to pay only for those services whi
No Termination Fee: Users are free to stop using Google services whenever they want, and there will not have to pay any t
Like Google cloud platform, AWS and Azure are the other popular cloud-based platforms. However, there are differences a
Having a piece of in-depth knowledge in the Google Cloud Platform is very useful as per job purposes. However, an expe
more effective but will also open a variety of job opportunities.
There are many job-opportunities with GCP. Some popular job-roles are listed below:
o Technical Lead Manager
o Sales Engineer
o Technical Solutions Engineer
o Account Executive
o Technical Program Manager
o Cloud Software Engineer
o Data Center Software Engineer
o Solutions Architect
o Strategic Customer Engineer
Prerequisite
There is no special prerequisite for this GCP Tutorial. All you need is continuous learning and practicing with the tools. Ho
software and tools will be beneficial and put you at an advantage. We have designed this tutorial to help you learn all the co
Audience
Our Google Cloud Platform Tutorial is designed to help beginners and professionals.
Problem
We assure you that you will not find any difficulty while learning through our Google Cloud Platform Tutorial. But if you fi
UNIT-5
IOT PROJECTS ON RASPBERRY PI
Learn IoT creating a sensor project with Raspberry Pi and sensors
IOT, RASPBERRY PI, TUTORIAL
Learn how to create a sensor project in this guest post by Peter Wahr, an IoT expert.
The development of a Raspberry Pi sensor project is broken down into six steps. Here’s a
simple overview:
1. Firstly, you will set up the basic structure of a console application.
2. Then, you will configure the hardware and learn to sample sensor values and maintain
a useful historical record.
3. After adding HTTP server capabilities and other useful web resources to the project,
you will publish the sensor values collected on the internet.
4. You will then handle the persistence of sampled data in the sensor, so it can resume
after outages or software updates.
5. The next step will teach you how to add a security layer requiring user authentication
to access sensitive information on top of the application.
6. In the last step, you will learn how to overcome one of the major obstacles in the
request/response pattern used by HTTP, that is, how to send events from the server to
the client.
This tutorial, however, will focus only on the first two steps; to know more, you can refer to
the book, Learning Internet of Things.
Preparing Raspberry Pi for sensor project
To configure Raspberry Pi, refer to http://www.raspberrypi.org/help/faqs/#buyingWhere.
In this tutorial, you will see the use of Raspberry Pi Model B with the following:
An SD card with the Raspbian operating system installed
A configured network access, including Wi-Fi, if used
User accounts, passwords, access rights, time zones, and so on, all configured correctly
The sensor project will be developed on a remote PC using C#, as it’s a modern
programming language that allows complete flexibility with IoT. It also allows you to
interchange code between Windows, Linux, Macintosh, Android, and iOS platforms.
Once a project is compiled, executable files are deployed to the corresponding Raspberry Pi
and then executed. Since the code runs on .NET, any language out of a large number of CLI-
compatible languages can be used.
Tip
Development tools for C# can be downloaded for free from http://xamarin.com/.
To prepare Raspberry for the execution of the .NET code, you need to install Mono, which
contains the Common Language Runtime for .NET that will help you run the .NET code on
Raspberry. This can be done by executing the following commands in a terminal window in
Raspberry Pi:
[bash] $ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install mono-complete
[/bash]
Your device is now ready to run the .NET code.
Hardware: Sensor used in Raspberry Pi IoT project
The sensor prototype will measure three things: light, temperature, and motion. To
summarize, here is a brief description of the components:
The light sensor is a simple ZX-LDR analog sensor that will connect to a four-channel
analog-to-digital converter (Digilent Pmod AD2). This is then connected to an I2C bus
that will connect to the standard GPIO pins for I2C. Note that The I2C bus permits
communication with multiple circuits using synchronous communication, employing a
Serial Clock Line (SCL) and Serial Data Line (SDA) pin. This is a common way to
communicate with integrated circuits.
The temperature sensor (Texas Instruments TMP102) connects directly to the same I2C
bus.
The SCL and SDA pins on the I2C bus use recommended pull-up resistors to ensure
they are in a high state when nobody actively pulls them down.
The infrared motion detector (Parallax PIR sensor) is a digital input that can be
connected to GPIO 22.
Four LEDs will also be added to the board. One of these is green and is connected to
GPIO 23. This will show when the application is running. The second one is yellow
and is connected to GPIO 24. This will show when measurements are done. The third
one is yellow and is connected to GPIO 18. This will show when an HTTP activity is
performed. The last one is red and is connected to GPIO 25. This will show when a
communication error occurs.
The pins that control the LEDs are first connected to 160 Ω resistors before they are
connected to the LEDs, and then to ground. All the hardware of the prototype board is
powered by the 3.3 V source provided by Raspberry Pi. A 160 Ω resistor connected in
series between the pin and ground ensures that the LED emits a bright light.
Tip
For an introduction to GPIO on Raspberry Pi, please refer
to http://www.raspberrypi.org/documentation/usage/gpio/.
Two guides on GPIO pins can be found at http://elinux.org/RPi_Low-level_peripherals.
For more information, refer to http://pi.gadgetoid.com/pinout.
The following figure shows a circuit diagram of the prototype board:
6LoWPAN stands for IPv6 over Low-power Wireless Personal Area Networks. It is a
standard protocol for realizing IPv6 communication on wireless networks composed of low-
power wireless modules. 6LoWPAN specification contains packet compression and other
optimization mechanisms to enable the efficient transmission of IPv6 packets on a network
with limited power resources and reliability, which makes efficient IPv6 communication over
low-power wireless networks possible.
Various low-power wireless networks have been proposed and implemented before
6LoWPAN, but currently, 6LoWPAN is regarded as one of the preferred protocols to realize
the Internet of Things (IoT). This is because 6LoWPAN communication based on IPv6
allows once closed low-power wireless networks to interface with the global network, the
Internet, and implement more advanced intelligent services that were not possible in the past.
Let us take the future smart house architecture that UC Technology aims to realize, for
example (the figure below).
Optimized control of a smart house requires the information to be collected from various
sensors. The control system consolidates the information to recognize the real-world context
then gives appropriate optimized feedback to the real-world environment using actuators.
Management of a smart house by executing control logic on the reliable cloud server
infrastructure is cost-effective from the viewpoint of high scalability, usability, and low
maintenance cost. To realize such a control framework, 6LoWPAN‘s conformance to the
Internet protocol plays an important role.
Currently, 6LoWPAN is published as a series of standard specifications, including RFC6282.
Related specifications also have been discussed actively and are being standardized one by
one.
UC Technology provides development tools including 6LoWPAN.
For more information, please visit “6LoWPAN Development Tool” and “IoT-Engine
Development Kit.”
The CoAP is an application layer and web-based protocol designed for constrained devices
like sensors. Sensors have a small memory and limited processing power. The CoAP [12] is
similar to the HyperText Transport Protocol (HTTP) protocol. CoAP is used as the
Representative State Transfer (REST) architecture. CoAP is demonstrated with a layered
architecture in Fig. 10.
The transfer of data between two communicating devices is efficient and reliable in CoAP.
CoAP is used to move the data, which is collected by a sensor node, to the other networking
devices. The CoAP uses two sublayers called the Request/Response Layer and Messaging
Layer. CoAP can handle four kinds of messages: Confirmation (CON), Non-Confirmation
(NON), Acknowledgement (ACK), and Reset. The CON and ACA provide the exchange of
messages for reliable communication. The layered level architecture and a comparison of the
layered protocol stack and CoAP protocol stack are given in Fig. 10.