0% found this document useful (0 votes)
22 views18 pages

IoT Unit-V Question

Uploaded by

poojithkeerthi8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views18 pages

IoT Unit-V Question

Uploaded by

poojithkeerthi8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

COURSE CODE: 20EC0453 R20

SIDDARTH INSTITUTE OF ENGINEERING & TECHNOLOGY: PUTTUR

(AUTONOMOUS)
Siddharth Nagar, Narayanavanam Road – 517583
QUESTION BANK (DESCRIPTIVE)

Subject with Code: INTRODUCTION TO IoT (20EC0453)


Course& Branch: B.Tech & AGRI,CSE,CSM
Year & Sem: IV-B.Tech.& I-Sem. Regulation: R20

UNIT-V
CASE STUDIES ILLUSTRATING IOT DESIGN

1 a) Design a smart home automation system using IoT With mode REST service.
The system includes auto and manual modes.
In Auto mode, the system measures the light in a room and switches on the light when it gets dark.
In Manual mode, the system provides the option of manually and remotely switching on/off the light.
COURSE CODE: 20EC0453 R20
The system has two REST services (Mode and state) and a controller native home automation system.
The mode service is a RESTful web service that sets mode to auto or manual (PUT request), or retrieves
the current mode (GET request).
The mode is updated to/retrieved from the database.
The state service is a Restful web service that sets the light appliance state to on/off (PUT request), or
retrieves the current light state (GET request).
The state is updated to/retrieved from the status database.

Service specification for home automation IoT system- Mode service

1 b) Explain service specification for home automation system in state service.

# Models – models.py
from django.db import models
class Mode(models.Model):
name = models.CharField(max_length=50)
class State(models.Model):
name = models.CharField(max_length
COURSE CODE: 20EC0453 R20

Service specification for home automation IoT system- State service

2 a) Describe the service specifications for the Intrusion Detection system.


The purpose of the home intrusion detection system is to detect intrusions using sensors such as PIR
sensors and door sensors with raise alerts, if necessary.

Requirements:
• ESP12E Node MCU board
• Raspberry Pi
• PIR sensor
• Light dependent Resistor
• Laser pointer
• Web cam
• Buzzer
• Some wires
COURSE CODE: 20EC0453 R20

From the above process diagram, we can see that the process starts at the circle. The PIR motion sensor
which is shown in the rectangular box in the above figure, is placed in a room. It detects the motion in the
room. If there is a motion then an image is captured and an alert will be sent to the user. And also, it turns
on the buzzer. This decision (yes/no) to raise an alert is shown in the diamond box in the above figure.

2 b) Explain Domain model specifications for the Intrusion Detection system.


The domain model describes the main concepts, entities and objects in the domain. The domain includes
physical entities for rooms. The devices in system PIR and light dependent resistor are attached and
raspberry pi to which camera and buzzer are attached to send alerts.

• With the help of Light dependent resistor and PIR motion sensor, I am going to detect the motions
in the room.
• If a motion is detected, I intend to capture the image with the help of a web-Cam and store locally
• Now the alerts are sent to the user with the captured image.
• Also, I am using the buzzer which turns on in case of any intrusion.
COURSE CODE: 20EC0453 R20

3 a) Describe Process specifications for the Intrusion Detection system.


The process diagrams for home intrusion detection system are as shown below:
COURSE CODE: 20EC0453 R20
From the above process diagram, we can see that the process starts at the circle. The light dependent resistor
which is shown in the rectangular box in the above figure, is placed in a room which reads the light level.
Here I am going to use a Laser pointer and I am going to fix it to the Light dependent resistor on the board.
Now when the laser beam is breached, we can see that there is a gradual fall on light level value. If the light
level falls below the threshold value, an image is captured and an alert will be sent to the user. And also, it
turns on the buzzer. This decision (yes/no) to raise an alert is shown in the diamond box in the above figure.
3 b) Explain Information model specifications for the Intrusion Detection system.
The information model for the home intrusion detection system defines the attributes of room and door
virtual entities and their possible values.
The room virtual entity has an attribute ‘motion’ and the door virtual entity has an attribute ‘state’.

Information Model Specification

4 a) Implement the analytics component for the forest fire detection system.

IoT based forest fire detection systems use a number of monitoring nodes deployed at different locations in
a forest.
Each monitoring node collects measurements on ambient conditions (such as temperature and humidity) to
predict whether a fire has broken out.

The system is based on a Level-5 IoT deployment with multiple end nodes and one coordinator node.
The end nodes perform sensing and the coordinator node collects data from the end node and sends to the
cloud.
The end node includes a Raspberry Pi mini – computer and DHT-22 temperature and humidity sensor.
An XBee module is used for wireless communication between the end-node and the coordinator node.
COURSE CODE: 20EC0453 R20
#controller main function
Def runcontroller ():
Temperature, humidity=read_DHT22_sensor ()
Timestamp = str (datetime.datetime.utcnow())
Data = RouteID + “!”+ timestamp + “!”+
Temperature + “!” + humidity + “!”
Write_xbee(data)
While True:
runcontroller()
Time.sleep(10)

4 b) Write a python code for Raspberry pi to capture image by using pi camera.

import picamera
from time import sleep

#create object for PiCamera class


camera = picamera.PiCamera()
#set resolution
camera.resolution = (1024, 768)
camera.brightness = 60
camera.start_preview()
#add text on image
camera.annotate_text = 'Hi Pi User'
sleep(5)
#store image
camera.capture('image1.jpeg')
camera.stop_preview()

5 a) Explain functional and operational view specifications for Home Intrusion


detection system?

Functional view specification:

Devices: The computing device is Arduino and the sensor is PIR motion sensor. LED is used to indicate
detection of motion. Furthermore, camera module, buzzer, Raspberry PI can be used to enhance it
further.
Communication: For the scope of this project, it is a simple wifi-based communication. MQTT a
light-weight messaging protocol to publish data to the applications can be used when an application is
built.
Services: This project implements a web service to publish data.
COURSE CODE: 20EC0453 R20
Application: The application functional group provides an interface to the users to control and monitor
various aspects of the IOT system. Although it is out of scope for this project, an application can be
built to control the data and notifications.
Security: Security is a primary concern when it comes to internet-enabled devices and application. The
project uses a home network to transmit data. When the project is made larger with the implementation
of applications, authentication and authorization can be implemented.

Operational View Specification:

Operation view address how an actual system can be realized by using devices and technologies among
many options and making them communicate and operate in an efficient manner.
Devices options: Arduino, PIR Sensor, LED. Buzzer, Camera, Raspberry PI are needed for further
enhancement.
Communication options: network layer-IPV4, MQTT
Services options: Web Service.
Application options: It is out of scope for the project but as discussed earlier, Node-red web application
can be realized.
Security options: Two-phase authentication and authorization.
Device and Component Integration:
This section is all about integrating the devices and components. The devices and components used in
are Arduino, PIR sensor, and LED. Below is the picture of all these devices hooked together:
COURSE CODE: 20EC0453 R20

5 b) Write a python program for room and door REST services using serializes.

From myapp . models import Room, Door


From rest_framework import serializers

Class RoomSerializer (serializers.Hyperlinked ModelSerializer);


Class Meta;
Model = Room
Fields = (‘url’,’name’,’state’,’timestamp’,’pin’)
Class DoorSerializer (serializers.Hyperlinked ModelSerializer);
Class Meta;
Model = Door
Fields = (‘url’,’name’,’state’,’timestamp’,’pin’)

6 a) Explain the purpose of smart parking in cities?


Combining human innovation and advanced technology, smart parking is a strategy that smart cities can
use to increase parking efficiency and combat numerous issues. Smart parking will reduce fuel use because
the driver won’t be circling streets looking for a place to park because they’ll have an identified space.
Drivers will also save money and time with denser, easier parking. Technology that impacts smart parking
in cities isn’t about parking itself so much as distributing information to planning cities and their services.
While cameras, sensors, and wireless transference of data are vital to establishing such a solution, it’s the
data harvested and provided and how it’s used that makes for a solution. It really works in sending real-time
information to commuters and drivers to let them know where to find available parking.

Parking Issues

• Not enough parking spaces in a densely populated area.


• Poor use of available parking spaces.
• Time and gas used to find open parking spaces.
• Difficulty finding vehicles in large parking lots.
• Traffic congestion centered around poorly executed parking structures.
• Business parking spaces are taken by commuter parking.
• Inconvenient parking spaces.
• Poor parking price models.
• Proper handling of handicapped spaces.
• Unused private parking spaces.
• Environmental impact of excessive fuel use in seeking parking.
• Unclear parking policies.
COURSE CODE: 20EC0453 R20

6 b) Define process specification & domain model for smart parking IoT system.

Process Specification:
• IR sensors are placed at each parking space to detect if the parking space is vacant or not.
• A servo motor is placed to open the entry and exit gates when a car arrives at the gate.
• Based on the sensors data, total number of vacant parking spaces are calculated and displayed
on the display board.
• The vacant parking spaces information like space number and other information will be updated
in the mobile application every time a car enters and occupies a space or every time a car exits
and leaves a space.
COURSE CODE: 20EC0453 R20

7 a) Write a python program for REST service and smart parking using Django
from django.contrib import admin
from django.urls import path, include
from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token
from rest_framework_swagger.views import get_swagger_view

schema_view = get_swagger_view(title='Parking System API')

urlpatterns = [
path('admin/', admin.site.urls),
path('', include('ticketingapp.urls')),
path('api-auth/', include('rest_framework.urls')),
path('login', obtain_jwt_token),
path('refresh-token', refresh_jwt_token),
path('schema', schema_view),
]

7 b) Define Information model and controller service for smart parking IoT system

Service Specification

Type

· Native — Controller

· Web Service — MIT App Inventor

I/O

· IR sensors placed at each parking lot and at entry and exit gates

· The parking system gives information about the vacant parking slots

Endpoints

· Sensors (IR)

· Arduino

· Database

· Mobile application

Schedules

· Every time a car enters or exits the parking lot

Preconditions

· User should be aware of the mobile application.

· User should have internet access to the mobile application.


COURSE CODE: 20EC0453 R20

Effects

· User can view the vacant parking slots with slot number.

8 a) Design a weather monitoring IoT system using REST based?


Weather Monitoring System:

The purpose of the weather monitoring system is to collect data on environmental conditions such as
temperature, pressure, humidity and light in an area using multiple end nodes. The end nodes send the
data to the cloud where the data is aggregated and analyzed.

Figure shows the process specification for the weather monitoring system.

The process specification shows that the sensors are read after fixed intervals and the sensor
measurements are stored.
COURSE CODE: 20EC0453 R20
In this domain model the physical entity is the environment which is being monitored. There is a virtual
entity for the environment. Devices include temperature sensor, pressure sensor, humidity sensor, light
sensor and single-board minicomputer. Resources are software components which can be either on-
device or network-resources. Services include the controller service that monitors the temperature,
pressure deriving the services from the process specification and information model for the weather
monitoring system, humidity and light and sends the readings to the deriving the services from the
process specification and information model for the weather monitoring system.

Mapping functional Groups to operational view specifications for the weather monitoring system.

8 b) Design a weather monitoring IoT system using Web Socket based?


Weather monitoring plays an important role in human life, so the collection of information about the
temporal dynamics of weather changes is very important. In any industry during certain hazards it is
very important to monitor weather. The fundamental aim of this paper is to develop an embedded
system to design a weather monitoring system which enables the monitoring of weather parameters in
an industry. Such a system contains pair of sensors like temperature, Gas and humidity will be
monitored and LPC1768 microcontroller (ARM9). The data from the sensors are collected by the
microcontroller and also microcontroller sends the sensors data in to the LABVIEW by using the Serial
Communication and this module will keep the data in excel page & also we can get the SMS in the
mobile with the help of GSM module. The system uses a compact circuitry built around LPC1768
(ARM9) microcontroller Programs are developed in Embedded C using the IDE Keiluvision4. JTAG
is used for loading programs into Microcontroller
COURSE CODE: 20EC0453 R20

Block Diagram

Humidity Sensor: Humidity sensor works on the principle of relative humidity and gives the output in
the form of voltage. This analog voltage provides the information about the percentage relative
humidity present in the environment. A miniature sensor consisting of a RH sensitive material deposited
on a ceramic substrate.
Temperature Sensor: The LM35 is an integrated circuit sensor that can be used to measure
temperature with an electrical output proportional to the temperature (in oC). If the temperature is high
then the fan will on and vice versa.,
Applications:
1. Used in coal mine, bio gas manufacturing centers.
2. Used in power plant generation.
3. Agriculture field monitoring.
4. Home automation.
5. Industrial purpose

9 a) Implement the air pollution monitoring system using the Web Socket approach.
Air quality nowadays has been degraded to a large extent that it has become a necessary criterion for
us to monitor its quality. The quality of air has been affected by various factors like industrial emission,
vehicular transmission etc.
The Internet Of things is a term for various devices communicating with each other which was not
possible before since the different devices use different kind of data which has been overcome by the
use of single board computer (Raspberry Pi). Integration of IOT with Sensor nodes with the help of
Raspberry Pi for Air Quality Monitoring provides an effective way than the approaches that were
previously used. Sensor web node is proposed with commercial gas sensors for detecting the gases like
COURSE CODE: 20EC0453 R20
CO, CO2 etc to monitor both indoor and outdoor air quality. The results obtained through these sensors
are then evaluated by Ruby on Rails Server through web socket. The entire system is connected through
various connectors.
The sensors are connected to the Arduino Mega which acts as the interface. The Arduino Mega needs
a power source so that the sensors start working. The Raspberry Pi provides the power supply to the
Arduino Mega as well as the sensors. The Raspberry Pi can be connected to the power supply either
through a USB Cable or a charger. Once the power supply is given, the sensors start to detect data. The
data detected by the sensors is sent to the Arduino Mega, when the sensor specific code is run on it. We
can actually see the data coming through the serial monitor in the Arduino IDE. A UDP connection is
created between the Arduino and Raspberry Pi through a Ruby Code which is run on the Raspberry Pi.
Once the data reaches the Raspberry Pi, the only thing left out is to send the data to the web server
hosted by Ruby on Rai
9 b) Implementation of smart irrigation system.
Although water, in some parts of the world is as abundant as the air that we breathe, it is still a precious
resource in dry regions. Such regions must use it carefully and efficiently because of its scarcity.
However, the irrigation systems are still wasteful as they unnecessarily flood the farms. This results
into wastage of water and energy that is used for pumping the water. With the improvement of the
technological infrastructure, effective management of water usage and power consumption of irrigation
systems can be achieved. This can be done by enabling the irrigation system to identify specific areas
to irrigate. This smart irrigation system that uses environmental information to determine when and
where irrigation is required. The system is comprised of microcontroller, sensors and integration of
water pumps with the decision-making system. A truth table is developed to help the system determine
the necessity to irrigate based on the collected environment information. The sensors narrow down the
location that requires irrigation and the decision-making system activates sprinklers. In this fashion,
water is given to dry locations of the field, already damp locations are not irrigated and this results
efficient water use. Different parameters used, i.e. temperature, humidity and moisture, makes it
possible to adjust the system according to the needs of a particular location.
COURSE CODE: 20EC0453 R20

10 a) Design a smart lighting system using IoT device.

In the designed smart home lighting system, each component will transmit information to each other
using various technologies for common communication. The user will need a smart device that could
browse the web to access the system. Raspberry Pi will act as a host to both Web and Database servers.
It will both collect and send digital data over the USB serial cable to the Arduino microcontroller.
Principle scheme components:
1. User: authorized system user who controls available parameters for the lighting unit.
COURSE CODE: 20EC0453 R20
2. Network: local area network where system prototype is implemented.
3. Raspberry Pi single-board computer: device on which software is installed and programmed: web
server, database, software for communication between the single-board computer itself and the
microcontroller in the system. A USB port is used for physical communication between the controller
and computer.
4. Web Server: software to support the system and graphical user interface.
5. Database server: software to store information about the system, manageable lighting device
parameters, user login data.
6. Arduino microcontroller: SBM used to read inputs and turn them into output signals.
7. Lighting units: Various devices for lighting, in this case, 12 V LED strips.

10 b) Which sensors are used in weather monitoring system? Which IoT level is used
for weather monitoring system?

It is a system that involves in acquiring weather and environment data using advanced electronic sensors
and sending them to a web server via internet for real time weather monitoring and storage of data for
future analysis and study.

Types of sensors involved in weather monitoring:

We can find wide spectrum of electronic sensors involved in weather monitoring system depending on
the kind of application.

For example:

Farmers need to know the temperature, relative humidity, soil moisture, rain fall etc. to enhance their
crop production and the following type of sensors are utilized to obtain the data:

• Temperature sensor.
• Humidity / hygrometer sensor.
• Soil moisture sensor.
• Rain sensor etc.

For an airplane pilot he/she needs to know wind speed, wind direction, atmospheric pressure,
precipitation, visibility etc. before they take off and they use the following sensors:

• Barometric sensor – for measuring atmospheric pressure.


• Anemometer – for measuring wind speed.
• Rain sensor.
• Visibility sensor – for measuring visibility during snow, rain, storm etc.

In conclusion, the sensors used for monitoring weather depends on the type application we going to
deploy for.

Block diagram of IoT based weather monitoring system:


COURSE CODE: 20EC0453 R20

Block diagram – IoT based weather monitoring system

We are going to develop the weather monitoring system using the above illustrated blocks. The brain
of the project is an Arduino board and the surrounding blocks are digital and analog sensors for
acquiring local weather and environment data.

A generic ESP8266 is used for interfacing the circuit setup with internet via 2.4 GHz Wi-Fi band. The
ESP8266 sends the sensor data to a cloud server where the data gets updated in real time and also gets
stored for future analysis. We are utilizing a 16 x 2 LCD display to showcase the sensor data, so that
we can observe real-time data locally.

You might also like