Part B&C - Cat3

You might also like

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

PART-B & C

Q.NO QUESTIONS
1 List and describe different categories of IoT tools.
 IoT development means combining hardware parts and software
programs in such a way that the final product could monitor specific
values, collect and transfer data, analyze given data and cause the
physical device to act correspondingly.
 Moreover, the Internet of Things has already been transformed into
an industry in its own right, so the need for reliable and
comprehensive developer toolkits has also increased.
 IoT development tools needed to create complex applications are
represented by IoT hardware devices (boards, SoM, SoC, sensors,
gateways, trackers, and more), IoT app development platforms, IoT
operating systems (e.g., Embedded Linux) and programming
languages

The 15 most popular tools currently used for IoT projects are  Arduino 
Flutter  Kinoma  Tessel  M2MLabs Mainspring  Raspberry Pi OS 
Node-RED  Eclipse IoT  SiteWhere  DeviceHive  Home Assistant 
OpenRemote  ThingsBoard  MilesightDeviceHub  Zetta

1. Arduino :
 Arduino is the leading company on the IoT market that
produces electronic devices and software for them. Arduino
hardware offerings include microcontroller boards, modules,
shields and kits.
 Hardware specifications are suitable for creating various
projects, such as robotics and home automation.
 Software products are represented by: Arduino IDE — an
open-source prototyping platform, which can be used to
easily write code compatible with any Arduino board.
 Arduino Cloud — a single platform that enables the wireless
communication of IoT devices, as well as their remote control
and data collection.
 IoT Cloud Remote — an application for creating dashboards
to control cloud-connected devices.
 Web Editor — an application for coding from a browser.
2. Raspberry Pi OS :
Raspberry Pi OS, formerly known as Raspbian, is the official
operating system for the Raspberry Pi hardware. A 32-bit version is
available currently, with a 64-bit version in active development. This
is a free, Debian-based system. Raspberry includes basic programs
and utilities to make the hardware run, but it also compiles
thousands of packages and pre-compiled software for easy
installation.
3. Node-RED:
Node-RED is a free programming tool based on Node.js and
designed to integrate distributed IoT hardware and software
systems and automate their interaction. It works primarily in Linux
environments but can be installed on Android and Windows as well
(you’ll only need a Linux subsystem for WIndows). Node-RED offers
out-of-the-box repositories, interfaces for connecting to MQTT,
logic sets and format parsers, as well as the ability to write custom
components.
4. Eclipse IoT:
A wide range of open-source projects for IoT development is
gathered under the Eclipse umbrella. They include software
development platforms, frameworks, services, standards, tools for
building digital twins, fog computing and edge computing solutions,
and many more. Eclipse IoT projects focus on working with the Lua
programming language, which is considered a good fit for Internet
of Things projects.
2 Implement the analytics component for the forest fire
detection system.
Forest Fire Detection:
A big problem for countries with large forest areas is forest fires.
A fire monitoring service does the following tasks:
1. Uses OTP features for programmable WSNs and gateways
2. Measures and monitors the T, RH, CO, CO2 and infrared
light (fire generated) intensity in real time at preset
intervals
3. Each WSN uploads the program and preset measured
intervals of t1 (say, 300 s) each and the preset measured
intervals of t2 (say, on 1 or 5 s) on sensed parameters
values exceeding thresholds can instantaneously trigger
the fire-alarm algorithm
4. Configures the data-adaptation layers with calibration
parameters
5. Communicates the WSN messages at the preset intervals
to the access point associated for specific network area
6. Communicates alerts, triggers, messages and data at data-
adaptation layer using an uploaded program at associated
gateway
7. Uploads connectivity programs for gateways
8. Runs at the data-adaptation layer the faulty or inaccessible
sensors at periodic intervals
9. Integrates data with the node locations found from
mapping with node IDs, compute, and activate the alarms
using an algorithm, input-sensed and calibrated
coefficients
10. Processes the layer data and data base information, and
communicates instantaneously to nearest mobiles and
fire-fighting services near the access point gateway
11. Updates the database and communicates to a cloud
platform, such as Nimbits, my.openHAB, TCUP, AWS or
Bluemix platform
12. Modifies the preset measured intervals to t2 on activation
of the fire alarm after value changes above the configured
threshold values
13. Uses analytics to evaluate reliability index of the
preset, threshold and configuration values and need to
update alarm-algorithm and if needs improvement then
upload new algorithms
14. Uses analytics to generate and communicate
topological maps for the currently fire-infected forest area
and reachability maps for fire-fighting service equipment’s
Sensors play a vital role in forest-fire monitoring.
15. The application has tenth ranking among 50 sensor-
applications for a smarter world.
Figure shows a data-flow diagram and domain architecture
reference model for the monitoring service.

3 Discuss about the architecture and pin diagram of Raspberry Pi with


neat sketch.
Raspberry Pi is developed by Raspberry Pi Foundation in the United
Kingdom. The Raspberry Pi is a series of powerful, small single-
board computers.
Raspberry Pi is launched in 2012 and there have been several iterations
and variations released since then.
The original device had a single-core Processor speed of device ranges
from 700 MHz to 1.2 GHz and a memory range from
256 MB to 1 GB RAM.
To store the operating system and program memory Secure Digital (SD)
cards are used. Raspbian OS which is a Linux operating system is
recommended OS by Raspberry Pi Foundation.

Memory:

The raspberry pi model Aboard is designed with 256MB of SDRAM and


model B is designed with 51MB. The RAM memory is available more than
256MB or 512MB

CPU (Central Processing Unit)


The Central processing unit is the brain of the raspberry pi board and that
is responsible for carrying out the instructions of the computer through
logical and mathematics

GPU (Graphics Processing Unit)

The GPU is a specialized chip in the raspberry pi board and that is designed
to speed up the operation of image calculations. This board designed with
a Broadcom video core IV and it supports OpenGL

Ethernet Port

The Ethernet port of the raspberry pi is the main gateway for


communicating with additional devices. The raspberry pi Ethernet port is
used to plug your home router to access the internet.

GPIO Pins

The general purpose input & output pins are used in the raspberry pi to
associate with the other electronic boards. These pins can accept input &
output commands based on programming raspberry pi. The raspberry pi
affords digital GPIO pins.

XBee Socket

The XBee socket is used in raspberry pi board for the wireless


communication purpose.

Power Source Connector

The power source cable is a small switch, which is placed on side of the
shield. The main purpose of the power source connector is to enable an
external power source.

UART
The Universal Asynchronous Receiver/ Transmitter is a serial input &
output port. That can be used to transfer the serial data in the form of
text and it is useful for converting the debugging code

4 Write a python program for room and door REST services using
serializes.
# import datetime object
from datetime import datetime
# create a class
class Comment(object):
def __init__(self, email, content, created = None):
self.email = email
self.content = content
self.created = created or datetime.now()
# create a object
comment = Comment(email ='leila@example.com', content
='foo bar')

5 Explain development of IoT application. Discuss the steps for


design.

Steps to Develop IOT Based Application


Step 1: Identify the Purpose and Requirements of the
Application
Step 2: Choose the Right IoT Platform
Step 3: Select Compatible and Reliable Hardware
Step 4: Develop the device side Code
Step 5: Design the Back-End
Step 6: Create the User Interface
Step 7: Test the Application
Step 8: Deploy the Application

Developing applications through IoT tools


Here are some top-class IoT development tools that can be
applied by both developers and for all those who want to pursue
IoT as a hobby.
1. Eclipse IoT:
As an IoT developer, if you are intended to build IoT devices,
Cloud platforms, and Gateways, then Eclipse IoT can be your top
chance. Acknowledged as a collaboration of numerous
companies and individuals who are striving towards the
development and demonstration of IoT open technologies,
Eclipse IoT can make all your IoT desires come true. Empowering
you to improve, promote and adopt open source IoT
technologies, Eclipse IoT is an instrument that can assist you to
gain technical expertise. Just look into the huge
assembly of services and outlines delivered by the Eclipse team
and you are all incorporated.
2. Node-RED: Node-RED is an uncomplicated open-source
visualization tool for the combination of devices for the Internet
of Things. The tool, developed by IBM’s Emerging Technology
department, enables you to link, hardware, an API or online
service. Node-RED renders a user-friendly interface for
developers to connect devices efficiently and swiftly. Node-RED
is developed on node.js, a server-side JavaScript platform
exclusively used in IoT projects and also can be operated in the
cloud. Node-RED could be applied, for example, for the creation
of a chat application using the Bluemix environment, the IBM
cloud platform to develop, manage and execute applications of
all kinds.
3. Arduino: If you are looking to build a computer that can sense
and execute a better command over the real world when
associated with your normal stand-alone computer, the Arduino
can be your smart choice. Offering a comprehensive mixture of
IoT hardware and software, Arduino is an open-source
prototyping and simple-to-use IoT platform. Arduino runs
through a set of hardware stipulations that can be implemented
to interactive electronics. The software of Arduino appears in
the form of the Arduino programming language and Integrated
Development Environment (IDE).
4. Tessel 2: This is a hardware provider that can be utilized to
build fundamental IoT solutions and prototypes. Tessel 2 lends a
helping hand through its copious sensors and modules. This is a
board which can handle up to a dozen modules including the
RFID, camera, GPS and the accelerometer. All those Java
developers who are expert with Node.JS can utilize this device as
Tessel can be processed using Node.JS. This way, Tessel can be
managed to churn out a host of server and hardware firmware
IoT solutions. Marked as a robust IoT platform, you can leverage
all the libraries of Node.JS to reveal a host of devices; within a
concern of minutes. It occurs with two processors, the Tessel
hardware makes use of a 580MHz MediaTek MT7620n and
48MHz Atmel SAMD21 coprocessor. While one can be utilized to
run your firmware applications at an accelerated speed, the
other gains its use in executing better input/output control and
the efficient administration of power.
6 What is home automation? Explain three levels of home
automation.
Home Automation is a system that allows users to control
various appliances of varying kinds and also makes controlling
of home appliances easier and saves energy. Nowadays, home
automation is used more and more. On the other hand, it
provides increased comfort especially when everyone is busy
with their work. Home automation installed in houses does not
only increase comfort but also allows centralized control of
heating, ventilation, air-condition, and lighting. Hence, they
contribute to an overall cost reduction and also useful in energy
saving which is certainly the main problem today.
In present years, wireless systems like Wi-Fi, Bluetooth have
become more and more common in home networking.
Home Automation Components: At the most initial level, home
automation systems are made up of three elements-
1. A smart device.
2. A hub.
3. A connected application.
While some other home automation systems work with just
two elements which include a single device that works with the
help of an app on mobile or a tablet or a system that includes a
hands-free hub that controls home automation system while
most of the systems work using all the above three
components.
1. Smart Devices: These are the real powerhouse of any home
automation system. These are the main parts that actually
implement the whole system commands. Examples of the smart
devices which can be added to any home automation to
complete the whole system are as follows:
 Access Control

 Security Devices: This includes security cameras, smart

locks.
 Home Appliances: Smart refrigerators, washing machines,
dishwashers, and ovens already exist.
 Smaller Appliances: As automatic coffee pots and electric

kettle have been also around for a while too


 Climate Controls: Climate control system with energy

management systems
 Smart Thermostats.

 Entertainment Pieces: Entertainment includes smart TVs,

wireless speakers, and film projectors


 Health Care Devices: Smart humidifiers and smart scales are

two common examples of health care devices.


 Lighting Controls: They include dimmers, light bulbs, light

strips, and switches, etc.


A high-speed internet plays an important role in smooth
connectivity and also plays an important reliable performance
between Wi-Fi-enabled devices.
2. Smart Hubs: The hub is the controlling center of the home
automation system. It is the piece that connects your individual
devices and helps them talk to one another.
3. Mobile Apps: The mobile application provides an interface
between the user and the system. It gives you the ability to
control or monitor your smart devices remotely. They can be
easily downloaded with the help of a provided application on
mobile and provide access control of the system, power
controls, timer access, and many more things.

How Home Automation Works?


Home automation works with the help of a network of devices
that are connected to the Internet through different
communication systems like Wi-Fi, Bluetooth, ZigBee, and
others. Through these devices can be managed remotely
through controllers through an app. Many of these IoT devices
have sensors that monitor changes in motion, temperature, and
light so the user can gain information about the device’s
surroundings.
Three steps are followed in Home automation as follows:
1. Monitoring: This means keeping the control of the system
using an app on a device remotely.
2. Control: This means that the system can be controlled
remotely from anywhere through the app by the user.
3. Automation: Automation means making almost all devices
automatic for making it a better system.
7 Write a program to interface IR sensor with Arduino and Raspberry Pi
ARDUINO CODE
const int irSensorPin = 2;

void setup() {
// Initialize Serial communication
Serial.begin(9600);

// Initialize the IR sensor pin as an INPUT


pinMode(irSensorPin, INPUT);
}

void loop() {
// Read the IR sensor value
int sensorValue = digitalRead(irSensorPin);
// Check if an obstacle is detected
if (sensorValue == LOW)
{
// Obstacle detected
Serial.println("Obstacle detected!");
}
else {
// No obstacle detected
Serial.println("No obstacle detected.");
}
}

Raspberry Pi Code
import RPi.GPIO as GPIO
import time
sensor=3
GPIO.setmode(GPIO.BOARD)
GPIO.setup(sensor,GPIO.PIN)
print “IR sensor detected”
print “”
Try:
While True:
If GPIO.input(sensor):
print(“object not detected”)
While GPIO.input(Sensor):
time.sleep(0.2)
Else:
print(“object detected”)
Except KeyboardInterrupt:
GPIO.cleanup()
8 Implement smart irrigation system using REST architecture and
sensors.

Smart irrigation deploys sensors for moisture. A smart irrigation


monitoring service does the following tasks:
 Sensors for moisture and actuators for watering channels are used in
smart irrigation.
 Uses soil moisture sensors with a sensor circuitry board with each one
installed at certain depth in the fields.
 Uses an array of actuators (solenoid valves) which are placed along the
water channels and that control deficiencies in moisture levels above
thresholds during a given crop period.
 Uses sensors placed at three depths for monitoring of moisture in fruit
plants such as grapes or mango, and monitors evapotranspiration
(evaporation and transpiration)
 Measures and monitors actual absorption and irrigation water needs
 Each sensor board is in a waterproof cover and communicates to an
access point using ZigBee protocol. An array of sensor circuits forms an
Access point receives the data and transfers it to an associated gateway.
Data adapts at the gateway and then communicates to a cloud platform
using LPWAN
 The cloud platform may be deployed such as Nimbits, my.openHAB,
AWS or Bluemix.
 Analytics at the platform analyses the moisture data and communicates
to the actuators of water irrigation channels as per the water needs and
past historical data
 Measurements at the sensors are at preset intervals and actuators
activate at analysed required values of the intervals.
 The platform uploads the programs to sensors and actuators circuitry
and sets preset measurement intervals of T1 (say, 24 hour) each and the
preset actuation interval of t2 (say, on 120 hour)
 Sensed moisture values when exceed preset thresholds then trigger the
alarm
 An algorithm uploads and updates the programs for the gateways and
nodes.
 Runs at the data-adaptation layer and finds the faulty or inaccessible
moisture sensors at periodic intervals
 Open source SDK and IDE are used for prototyping the monitoring
system.

You might also like