IOT unit II

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Unit II

Developing IoT
IoT platform and design methodology –
Designing IoT systems can be a complex and challenging task as these systems involve interactions between
various components. A wide range of choices are available for each component. IoT designers often tend to
design the system keeping specific products in mind.

We will look at a generic design methodology which is independent of specific product, service or
programming language. IoT systems designed with this methodology will have reduced design time, testing
time, maintenance time, complexity and better interoperability.

Purpuse and requirements specification


First step is to define the purpose and requirements of the system. In this step, the system purpose, behavior
and requirements are captured. Requirements can be:

• Data collection requirements


• Data analysis requirements
• System management requirements
• Security requirements
• User interface requirements

For home automation system the purpose and requirements specification is as follows:

A home automation system that allows controlling the lights remotely using
Purpose
a web application

Home automation system should support two modes: auto and manual
Auto: System measures the light level in the room and switches on the light
Behavior when it is dark
Manual: Allows remotely switching lights on and off

System
System should provide remote monitoring and control functions
Management

Data
System should perform local analysis of the data
Analysis

Application
Application should be deployed locally, but should be accessible remotely
Deployment

Security Should provide basic security like user authentication


Process specification
The use cases of the IoT system are formally described based on or derived from the purpose and
requirements specifications. The process specification for home automation system is as shown below.

Domain model specification


The domain model describes the main concepts, entities and objects in the domain of the IoT system to be
designed. Domain model defines the attributes of the objects and relationships between objects. The domain
model is independent of any specific technology or platform.

Using domain model, system designers can get an understanding of the IoT domain for which the system is
to be designed. The entities, objects and concepts defined in the domain model of home automation system
include the following:

• The physical identifiable objects in the environment


Physical
Entity • IoT system provides information about the physical entity (using sensors) or performs
actuation upon the physical entity
Virtual • Virtual entity is a representation of the physical entity in the digital world
Entity • For every physical entity there is a virtual entity

• Devices provide a medium for interaction between physical and virtual entities
Device
• Devices are used to gather information from or perform actuation on physical entities

• Resources are software components which can be either on-device or network-resources


• On-device resources are hosted on the device and provide sensing or actuation (eg:
Resource operating system)

• Network-resources include software components that are available on the network (eg:
database)

• Services provide an interface for interacting with the physical entity


Service
• Services access resources to perform operations on physical entities

The domain model specification diagram for home automation system is as shown in the below figure.
Information model specification
Information model defines the structure of all the information in the IoT system. Does not describe how the
information is stored and represented. To define the information model, we first list the virtual entities. Later
more details like attributes and relationships are added. The information model specification for home
automation system is as shown below:

Service specification
The services provided by the application are:

• The sensor reading is read from the PIR sensor.


• The Arduino is triggered when motion is detected.
• The laptop/computer hosts the python program that sends an email notification to the homeowner.
• The owner uses an app to control the notifications.

Other services I am visioning:


• Data is stored in the database and the cloud.
• Data is accessible via web services.

Fig: Services Specification View

The big picture of the services offered by the Home watch system is shown above. The PIR sensor detects
motion and the Arduino is triggered. LED blinks as the indication of the detection of motion. The python
program running on Laptop/Desktop send an email to the homeowner.

This can be upgraded with additional devices such as using Raspberry PI as a computing device and Node-
Red to communicate the message between cloud and the sensor. Camera module can be used to capture an
image when the motion is detected and the image can be sent via email. A web service can be built to
provide data for analysis and an app for homeowners to control the notifications.

Functional view specification


Fig: Functional View

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.

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 components integration


The devices and components used in my project are Esp32 with pulse sensor.

Connection Setup:

• Take Pulse sensor and connect the pink wire to A0 of Esp32.


• Red wire to the 3V
• Black wire to GND as show in above figure

Application development
IoT app development refers to creating software applications that leverage the Internet of Things (IoT)
technology to enhance functionality and user experience for IoT devices

How to develop an IoT application in 5 steps

Now that you have all the prerequisites in place, let’s take another look at the IoT architecture and see what
needs to be done for each of the layers:
Step 1: Define the requirements for the application

An important step in developing an IoT application is to define the goal and scope of your app. This entails
you getting to the bare bones of your objective. Decide what you want to achieve once the app is live. The
goals may include:
• Tracking movement or location in real-time, allowing users to see where their devices are throughout
the day (e.g., EVs owned by a delivery chain)

• Monitoring temperature or humidity levels, which could help you manage heating/cooling systems
(e.g., hospitals)

• Using sensors to detect harmful gases such as carbon monoxide, methane, and hydrogen sulfide at
industrial plants (e.g., refineries)

Step 2: Choosing the right hardware

The type of hardware depends on your project requirements. It could be sensors, GPS trackers, or even
wearables. But it is important to pick devices that are reliable and relevant to your project.

Step 3: Find the right connectivity protocols

There are several network protocols that you can use like WiFi, 2G, 5G, Bluetooth, LoRa, NB-IoT, or
Zigbee. Depending on your devices and the availability of resources, you need to pick the right channels for
connectivity.

Step 4: Ensure the firmware is well-equipped

Firmware, or device-side software, are the technical terms for the program that runs your hardware. It is
essential to ensure that your firmware is well equipped, or else you could experience data loss, and end up
spending a lot more on data storage and transmission than necessary. Ensure that your firmware has the
following capabilities

Step 5: Pick the right cloud platform

The right IoT platform will hand you the necessary tools to create an application that serves your purpose. In
order to choose an IoT platform that works for you, you need to look for the following:
• Uptime

• Data security

• Debugging
• Feature stability

• Security

• Migration capabilities

• Connectivity, and

• Scalability

You might also like