Io TQB
Io TQB
Module 1: (long Q)
1. Explain working of IoT and its components
Ans) : The Internet of Things (IoT) is a network of interconnected devices that can
communicate and exchange data with each other over the internet without human intervention.
1. Sensors and Actuators: Sensors are devices that collect data from the environment,
such as temperature, humidity, light, motion, etc. Actuators, on the other hand, are
devices that can control physical processes, such as turning on/off lights,
opening/closing valves, etc.
2. Connectivity: IoT devices need a way to connect to the internet to transmit and receive
data. This can be achieved through various means such as Wi-Fi, cellular networks,
Bluetooth, Zigbee, etc.
3. Networking: IoT devices communicate with each other and with central servers or cloud
platforms using standard networking protocols like TCP/IP, MQTT, CoAP, etc.
4. Security: Security is a critical aspect of IoT systems to ensure that data remains
confidential, devices are not compromised, and the system is protected against
cyber-attacks.
5. User Interface: IoT systems often have a user interface through which users can interact
with the devices, monitor their status, and control their behavior. This can be a mobile
app, web dashboard, or other types of interfaces.
6. Cloud Platform: Many IoT applications leverage cloud platforms for storing and
processing data. Cloud platforms provide scalable storage, computational power, and
analytics capabilities for handling large volumes of IoT data.
➔ Physical Devices and Controllers Layer: The first layer of the IoT Reference
Model is the physical devices and controllers layer. This layer is home to the
“things” in the Internet of Things, including the various endpoint devices and
sensors that send and receive information.
➔ Connectivity Layer: In the second layer of the IoT Reference Model, the focus is
on connectivity. The most important function of this IoT layer is the reliable and
timely transmission of data.
➔ Edge Computing Layer: Edge computing is the role of Layer 3. Edge computing is often
referred to as the “fog” layer
Mainly focuses on Data Analysis and Transformation.
➔ Edge of the IoT: The edge of the IoT is where the action is. It includes a wide array of
sensors, actuators, and devices—those system end-points that interact with and
communicate real-time data from smart products and services.
➔ Fog computing: Fog computing allows computing, decision-making and action-taking to
happen via IoT devices and only pushes relevant data to the cloud.
➔ IoT Cloud: An IoT cloud is a massive network that supports IoT devices and applications.
An IoT cloud also includes the services and standards necessary for connecting,
managing, and securing different IoT devices and applications.
1. Temperature Sensors:
● Type: Temperature sensors measure the temperature of their
surroundings.
● Examples: Thermistors, thermocouples, digital temperature sensors (e.g.,
DS18B20), infrared (IR) temperature sensors.
2. Humidity Sensors:
● Type: Humidity sensors measure the relative humidity of the air.
● Examples: Capacitive humidity sensors, resistive humidity sensors,
hygrometers.
3. Proximity Sensors:
● Type: Proximity sensors detect the presence or absence of objects in
close proximity to the sensor.
● Examples: Infrared (IR) proximity sensors, ultrasonic sensors, capacitive
proximity sensors, inductive proximity sensors.
4. Motion Sensors:
● Type: Motion sensors detect movement or changes in position.
● Examples: Passive Infrared (PIR) motion sensors, accelerometers,
gyroscopes, Doppler radar sensors.
5. Light Sensors:
● Type: Light sensors measure the intensity or brightness of ambient light.
● Examples: Photodiodes, phototransistors, light-dependent resistors
(LDRs), ambient light sensors.
6. Pressure Sensors:
● Type: Pressure sensors measure the pressure of gases or liquids.
● Examples: Piezoresistive pressure sensors, capacitive pressure sensors,
piezoelectric pressure sensors, strain gauge pressure sensors.
7. Gas Sensors:
● Type: Gas sensors detect the presence and concentration of specific
gasses in the environment.
● Examples: Carbon monoxide (CO) sensors, carbon dioxide (CO2) sensors,
methane (CH4) sensors, volatile organic compound (VOC) sensors.
8. Sound Sensors:
● Type: Sound sensors capture sound waves and measure sound intensity
or frequency.
● Examples: Microphones, piezoelectric sensors, ultrasonic sensors.
1. Electric Motors:
● Type: Electric motors convert electrical energy into mechanical motion.
● Examples: DC motors, stepper motors, servo motors, brushed motors,
brushless motors.
● Applications: Electric motors are used in various IoT applications for tasks
such as driving wheels in robotics, opening and closing valves, controlling
fans and pumps, and moving mechanical parts.
2. Solenoid Valves:
● Type: Solenoid valves control the flow of fluids or gases by opening or
closing a valve in response to an electrical signal.
● Examples: Electrically-operated solenoid valves, pneumatic solenoid
valves, hydraulic solenoid valves.
● Applications: Solenoid valves are used in IoT systems for applications
such as irrigation control, water distribution, gas regulation, and fluid
handling in industrial processes.
3. Relays:
● Type: Relays are electromechanical switches that control the flow of
electrical power to other devices.
● Examples: Electromechanical relays (EMRs), solid-state relays (SSRs).
● Applications: Relays are used in IoT applications for tasks such as turning
on/off lights, controlling heating or cooling systems, switching power
sources, and activating alarms or sirens.
4. Linear Actuators:
● Type: Linear actuators convert rotational motion into linear motion to
move objects along a straight path.
● Examples: Electric linear actuators, pneumatic linear actuators, hydraulic
linear actuators.
● Applications: Linear actuators are used in IoT systems for tasks such as
opening and closing doors, adjusting window blinds, extending/retracting
mechanical arms, and positioning objects in industrial automation.
5. Pneumatic Actuators:
● Type: Pneumatic actuators use compressed air to generate mechanical
motion.
● Examples: Pneumatic cylinders, pneumatic rotary actuators.
● Applications: Pneumatic actuators are used in IoT applications for tasks
such as actuating valves, moving conveyor belts, controlling pneumatic
grippers, and powering robotic arms.
4. Differentiate between sensor and actuators.
Ans):
5. Explain WSN
● Ans): Wireless Sensor Networks (WSNs) are a key component of the Internet of
Things (IoT) ecosystem.
● WSNs enable real-time data collection, processing, and transmission over
wireless communication networks. Here's an explanation of WSN in IoT:
➔ Sensor Nodes: WSNs comprise small, low-power sensor nodes equipped
with sensors, processing units, communication interfaces, and power
sources (usually batteries or energy harvesting modules).
➔ Communication: Sensor nodes communicate wirelessly with each other to
relay data to a central location or gateway node.
➔ Data Collection and Processing: Sensor nodes continuously collect data
from their environment using built-in sensors. The data can include
temperature, humidity, pressure, light intensity, sound levels, and more.
➔ Challenges: WSNs face challenges such as limited energy resources,
communication constraints (e.g., bandwidth, range, reliability), scalability
issues, data security and privacy concerns, and network deployment and
maintenance costs.
6. Explain the criteria for connecting smart object in IoT project(refer gcr)
7. List out the different constrained networks
➔ Low-Power Wide-Area Network (LPWAN)
➔ Wireless Sensor Networks (WSN)
➔ Bluetooth Low Energy (BLE)
➔ Zigbee
➔ 6LoWPAN (IPv6 over Low-Power Wireless Personal Area Network)
Ans) : Constrained devices in IoT refer to devices with limited resources such as
processing power, memory, and energy.
Module 3: (Long Q)
1. Explain the properties of a smart devices
➔ Ans): Security and Privacy: Smart devices implement security measures to
protect data, prevent unauthorized access, and ensure user privacy. This
includes encryption, authentication, access control, secure boot
mechanisms, and secure communication protocols.
➔ Remote Management and Updates: Smart devices can be remotely
managed, configured, and updated over the air (OTA) using firmware
updates or configuration changes.
➔ Interoperability
2. Illustrate about the the Arduino Uno board and its components
Ans): The Arduino Uno is one of the most popular development boards used in
IoT and embedded systems projects. It's based on the ATmega328
microcontroller and features a simple yet powerful design suitable for beginners
and advanced users alike. Let's explore its key components and their relevance in
IoT applications:
● USB Ports: Raspberry Pi boards feature multiple USB ports for connecting
peripherals such as keyboards, mice, storage devices, and USB-based sensors or
actuators in IoT projects.
● Ethernet Port: Many Raspberry Pi models include an Ethernet port for wired
network connectivity, allowing the board to communicate with other devices on a
local network or access the internet.
● HDMI Port: The HDMI port enables Raspberry Pi boards to connect to displays,
monitors, or TVs for visual output, making it easier to interact with graphical user
interfaces (GUIs) or display sensor data.
➔ Real-Time Clock (RTC): While not included by default, Raspberry Pi boards
can be equipped with external real-time clock (RTC) modules to maintain
accurate timekeeping even when the board is powered off.
While Raspberry Pi is
Arduino is based on
based on a
a microcontroller.
microprocessor.
While Raspberry Pi
It is designed to
computes data and
control the electrical
produces valuable
components
outputs, and controls
connected to the
components in a system
circuit board in a
based on the outcome of
system.
its computation.
Arduino boards have While Raspberry Pi
a simple hardware boards have a complex
and software architecture of hardware
structure. and software.
CPU architecture: 8
CPU architecture: 64 bit.
bit.
While Raspberry Pi is
It is cheaper in cost.
expensive.
It has a higher I/O While Raspberry Pi has a
current drive lower I/O current drive
strength. strength.
Explain the main services for cloud, how can it be used in IoT?
Ans): Cloud computing enables users to perform computing tasks using
services provided over the Internet. The use of the Internet of Things in
conjunction with cloud technologies has become a kind of catalyst: the
Internet of Things and cloud computing are now related to each other.
Benefits And Functions of IoT Cloud:
➔ IoT Cloud Computing provides many connectivity options, implying
large network access. People use a wide range of devices to gain
access to cloud computing resources: mobile devices, tablets,
laptops.
➔ Developers can use IoT cloud computing on-demand. In other words, it
Cloud computing encompasses the delivery of data to data centers over the
The cloud contains everything you need to build and deliver cloud
software, etc.
browser.
4. Public cloud –
5. Private cloud –
The same as a public cloud, but only one person has access here,
6. Hybrid cloud –
statement1
Statement2
Example: num = 0
print(num)
num += 1
Output: 0
➔ Break Statement:
● The break statement is used to exit a loop prematurely, regardless of the loop's
condition.
if num == 5:
break print(num)
Output:
➔ Continue Statement:
● The continue statement is used to skip the current iteration of a loop and
proceed to the next iteration.
if num == 2:
continue
print(num)
Output:
➔ Lists: Lists are ordered collections of items, where each item can be of any data
type (including other lists).
Example : fruits = ["apple", "banana", "cherry"]
➔ Tuples: Tuples are ordered collections of items similar to lists, but they are
immutable, meaning that once created, their elements cannot be changed
or modified.
point = (10, 20)
try:
statement1
statement2
...
except ExceptionType:
➔ Exception Types:
● Python defines several built-in exception types, such as TypeError, ValueError,
IOError, KeyError, etc., which correspond to specific error conditions.
try:
except ZeroDivisionError:
➔ Multiple Except Blocks: You can use multiple except blocks to handle different
types of exceptions separately.
try:
except ValueError:
except Exception as e:
➔ Finally Block: You can optionally include a finally block after the try-except
blocks.
try:
finally:
Module 5:
1. Explain the different types of the data analytics
Ans): In IoT (Internet of Things), data analytics plays a crucial role in extracting
valuable insights and actionable intelligence from the vast amounts of data
generated by connected devices. There are several types of data analytics
techniques used in IoT to analyze and interpret this data. Here are some of the
main types:
2. Descriptive Analytics:
a. Descriptive analytics focuses on summarizing historical data to describe
what has happened in the past. It involves simple statistical analysis and
visualization techniques to understand patterns, trends, and anomalies in
the data.
b. Example: Generating reports, dashboards, and charts to visualize sensor
data over time.
3. Diagnostic Analytics:
a. Diagnostic analytics aims to identify the root causes of past events or
anomalies by analyzing historical data in more detail.
b. Example: Investigating the reasons behind equipment failures or system
malfunctions by analyzing sensor data and maintenance records.
4. Predictive Analytics:
a. Predictive analytics uses statistical modeling and machine learning
algorithms to forecast future events or trends based on historical data
patterns.
b. Example: Building predictive maintenance models to predict equipment
failures before they occur based on sensor data and maintenance logs.
5. Prescriptive Analytics:
a. Prescriptive analytics goes beyond predictive analytics by recommending
specific actions or interventions to optimize outcomes.
b. Example: Recommending optimal routes for delivery vehicles based on
real-time traffic conditions, weather forecasts, and historical delivery data.
6. Real-time Analytics:
a. Real-time analytics involves analyzing data as it is generated in real-time
to derive immediate insights and take timely actions.
b. Example: Monitoring sensor data from industrial equipment to detect
anomalies or performance issues in real-time and trigger automatic alerts
or responses.
7. Edge Analytics:
a. Edge analytics refers to performing analytics and processing data directly
at the edge of the network, close to where data is generated, instead of
sending it to a centralized cloud or data center.
b. Example: Running machine learning algorithms on edge devices (e.g., IoT
gateways, edge servers) to analyze sensor data locally and send only
relevant insights to the cloud for further processing.
8. Explain the types of data classifications
Ans): In IoT (Internet of Things), data classifications refer to categorizing the data
generated by connected devices based on various attributes such as sensitivity,
importance, and usage. Data classification helps organizations manage and
prioritize data effectively, ensuring that appropriate security measures, storage
solutions, and access controls are applied. Here are some common types of data
classifications in IoT:
1. Sensitivity Classification:
a. Sensitivity classification categorizes data based on its level of sensitivity
or confidentiality. It helps identify which data requires higher levels of
protection and access control to prevent unauthorized disclosure or
misuse.
b. Example: Personal identifiable information (PII), financial data, health
records, and proprietary business information may be classified as
sensitive data.
2. Criticality Classification:
3. Retention Classification:
4. Usage Classification:
5. Access Classification:
12. Write a program to open and close gate, draw the circuit diagram for the same
Ans): #include <Servo.h>
int distance;
float duration;
float cm;
void setup()
pinMode(trigpin, OUTPUT);
pinMode(echopin, INPUT);
void loop()
digitalWrite(trigpin, LOW);
delay(2);
digitalWrite(trigpin, HIGH);
delayMicroseconds(10);
digitalWrite(trigpin, LOW);
cm = (duration/58.82);
distance = cm;
if(distance<60)
{
delay(3000);
else{
servoMain.write(0);
delay(50);