100% found this document useful (1 vote)
609 views19 pages

IOT-UNIT-3 Material

The document provides an overview of IoT (Internet of Things) application development. It discusses key aspects like communication between devices, sensing and collecting data, actuation to enable devices to take actions, and software components/programming APIs to facilitate communication using protocols like MQTT, CoAP, ZigBee etc. It lists common sensors, actuators and example applications spanning various industries. Programming examples are given for Python, Node.js and Arduino to illustrate implementing communication using popular libraries.

Uploaded by

kavists20
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
100% found this document useful (1 vote)
609 views19 pages

IOT-UNIT-3 Material

The document provides an overview of IoT (Internet of Things) application development. It discusses key aspects like communication between devices, sensing and collecting data, actuation to enable devices to take actions, and software components/programming APIs to facilitate communication using protocols like MQTT, CoAP, ZigBee etc. It lists common sensors, actuators and example applications spanning various industries. Programming examples are given for Python, Node.js and Arduino to illustrate implementing communication using popular libraries.

Uploaded by

kavists20
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/ 19

Introduction To Internet Of Things

UNIT-3
IOT Application Development: IoT (Internet of Things) application
development involves creating software that enables devices to communicate
and share data with each other over the internet. These devices can range from
simple sensors to complex machinery, and they are typically embedded with
sensors, actuators, and communication modules. Here is a step-by-step guide
to IoT application development:

1. Purpose: Decide what you want your smart devices to do.

2. Tools: Choose the apps and services to help your devices talk to
each Other.
3.Devices: Pick the gadgets and sensors your smart system needs.
4. Communication: Make your devices speak the same language to
share info.
5. Sensors and Actions: Give devices the ability to sense things (like
temperature) and do tasks (like turning on lights).
6. Data Handling: Decide where the information your devices collect
will go.
7. Safety: Make sure only the right devices can connect, like putting
a lock on a door.
8. Control: Create an easy way for people to use and control the
smart system.
9. Testing: Check if everything works well together.
10.Implementation: Set up your smart system where you want to
use it.
11. Monitoring: Keep an eye on your system to ensure it keeps
working properly.

Communication:
1 .Communication in IoT means devices talking to each other to share
information.
2 .It's like a conversation where smart devices use a common
language or protocol.
3.This communication enables devices to work together and perform
tasks.
4.Devices might share data, like a temperature sensor telling a
thermostat the current temperature.
5.Think of it as giving your devices the ability to understand and
respond to each other's messages.
6.Common communication protocols include MQTT, CoAP, or HTTP in
the tech world.
7.It's crucial for devices to have a shared way of talking to coordinate
actions effectively.
8.Just like people need a shared language, devices need a common
method to communicate in IoT.
9.This communication is the backbone that makes your IoT system
function smoothly.

10.In a nutshell, in IoT application development, good


communication means making your devices work together
seamlessly.

IOT Applications:
IoT (Internet of Things) applications span a wide range of industries
and use cases. Here are some examples to give you an idea of the
diverse applications of IoT:
1.Smart Homes: Control lights, thermostats, and security cameras
remotely.
2.Industrial IoT (IoT): Monitor and optimize manufacturing processes.
3.Healthcare Monitoring: Use wearables and devices for remote
patient monitoring.
4.Smart Cities: Improve urban living with intelligent transportation
and waste management.
5.Agriculture: Employ IoT for precision farming and automated
irrigation.
6.Retail: Enhance inventory management and create personalized
shopping experiences.
7.Logistics and Supply Chain: Track goods during transportation and
optimize supply chains.
8.Environmental Monitoring: Use sensors to monitor air, water
quality, and weather conditions.
9.Energy Management: Implement smart grids and optimize energy
consumption.
10.Connected Vehicles: Enable vehicle-to-vehicle communication and
predictive maintenance.
11.Building Automation: Control and monitor lighting, HVAC, and
security for energy efficiency.
12.Wearable Technology: Track health and activity with fitness
trackers and smartwatches.
13.Smart Appliances: Integrate IoT into household appliances for
remote control.
14.Education: Implement smart classrooms with connected devices.
15.Asset Tracking: Track location and condition of assets like vehicles
and equipment.

Sensing:
1. What is Sensing: Sensing involves using sensors to gather
information from the surroundings or devices.
2. Types of Sensors: Sensors can measure various things, including
temperature, humidity, light, motion, and more.
3.Sensor Data: The information collected by sensors is called sensor
data. For example, a temperature sensor might provide the current
temperature.
4.Data Collection: Sensors continuously collect data, creating a
stream of information about the environment or a specific object.
5.Real-Time Monitoring: Sensor data is often used for real-time
monitoring, allowing quick responses to changes in the environment.
6.Examples in IoT: In a smart home, motion sensors can detect
movement to turn on lights. In agriculture, soil moisture sensors help
optimize irrigation.
7. Integration: Sensor data is integrated into the IoT system, where it
can be processed, analyzed, and used to make informed decisions.
8.Automation: Sensing is often tied to automation, where devices
can automatically respond to changes without human intervention.
9.Improving Efficiency: Sensing enables applications to gather
accurate and timely information, leading to more efficient and
effective operations.
10.Common Sensors: Examples of common sensors include
temperature sensors, humidity sensors, motion sensors, and light
sensors.

Actuation:
Actuation in IoT (Internet of Things) application development refers
to the capability of smart devices to perform actions or tasks based
on the information they receive from sensors. It involves turning
data-driven insights into physical changes or responses.
1.Actuation is Doing: In IoT, actuation means making smart devices
do things based on information they get.
2. Connecting Data to Action: It links what sensors detect (like
motion or temperature) to actions devices can take (like turning on
lights or adjusting settings).
3.Examples: If a sensor says it's dark, an actuator can turn on a light.
If it's hot, an actuator can start a fan.
4.Automation Magic: Actuation makes devices smart enough to act
on their own without you telling them every time. It's like a little
automation wizard.
5.Remote Control: You can also control these actions from your
phone, like locking doors or changing the thermostat.
6.Efficiency Boost: It helps devices respond quickly to changes,
making everything work more efficiently.
7. Think of it as: Sensors sense, actuation acts. Together, they create
a dance where devices respond to the world around them.
8.Full Circle Communication: It completes the talking circle in IoT—
devices not only listen (sense) but also talk back by doing things
(actuating).
9.Making Life Easier: Actuation is the secret sauce that makes your
smart devices not just smart but also really helpful in making life a bit
easier.
10.Bottom Line: Actuation turns the ideas your sensors pick up into
real actions, adding a touch of magic to your IoT world.

I/O Interface:
In IoT (Internet of Things) application development, the I/O
(Input/Output) interface is the means through which devices interact
with the external world—receiving inputs and providing outputs.
Here's a brief and simple overview:
1.Input and Output: I/O stands for Input and Output. It's like how
your devices take in information (input) and send out responses or
actions (output).
2.Device Communication: The I/O interface allows devices in the IoT
system to communicate with each other and with the external
environment.
3.Sensor Input: Sensors provide input, like temperature readings or
motion detection, through the I/O interface.
4.Actuator Output: Actuators, like motors or lights, receive
commands and produce output actions through the I/O interface.
5.Communication Protocols: I/O interfaces use communication
protocols to ensure that devices can understand and respond to each
other's signals effectively.
6. Bi-Directional Communication: It facilitates bi-directional
communication, meaning devices can both send and receive
information.
7. Integration: The I/O interface integrates with the broader IoT
system, connecting sensors, actuators, and other devices for
seamless operation.
8. Real-time Interaction: Enables real-time interaction, allowing
devices to respond promptly to changes in the environment or user
commands.
9.User Interaction: The I/O interface also plays a role in user
interaction, providing a way for people to input commands or receive
feedback from the IoT system.

Software Components- Programming API’s for


Communication Protocols-MQTT, ZigBee, CoAP, UDP,
TCP, Bluetooth.
Python:
MQTT:
Library: Paho-MQTT (Eclipse Paho)
Example:
python
import paho.mqtt.client as mqtt
client = mqtt.Client()
client.connect("broker.example.com", 1883, 60)
client.publish("topic", "Hello, MQTT!")
ZigBee:
Library: Zigpy
Example:
python
from zigpy import Device
from zigpy.zcl.clusters.general import OnOff
device = Device()
on_off_cluster = OnOff(device)
on_off_cluster.on()
CoAP:
Library: aiocoap
Example:
python
from aiocoap import Context, Message, GET
async def coap_request():
context = await Context.create_client_context()
request = Message(code=GET,
uri="coap://example.com/resource")
response = await context.request(request).response
print(response.payload)

asyncio.get_event_loop().run_until_complete(coap_request())
Node.js:
MQTT:
Library: MQTT.js
Example:
javascript
Copy code
const mqtt = require('mqtt');
const client = mqtt.connect('mqtt://broker.example.com');
client.on('connect', () => {
client.publish('topic', 'Hello, MQTT!');
});
ZigBee:
Library: zigbee-herdsman
Example:
javascript
const {Zigbee, Coord} = require('zigbee-herdsman');
const zigbee = new Zigbee();
const coord = new Coord(zigbee);
zigbee.on('nodeInterview', (dev) => {
dev.endpoints[1].on('command', (data, meta) => {
console.log(`Received command: ${data.type}`);
});
});
CoAP:
Library: coap
Example:
javascript
const coap = require('coap');
const req = coap.request('coap://example.com/resource');
req.on('response', (res) => {
console.log(res.payload.toString());
});
req.end();
Arduino:
MQTT:
Library: PubSubClient
Example:
cpp
#include <PubSubClient.h>
const char* broker = "broker.example.com";
const int port = 1883;
WiFiClient espClient;
PubSubClient client(espClient);

client.connect("ArduinoClient");
client.publish("topic", "Hello, MQTT!");
ZigBee:

Library: XBee-Arduino
Example:
cpp
#include <XBee.h>
XBee xbee = XBee();
ZBRxResponse response;
xbee.readPacket();
if (xbee.getResponse().isAvailable()) {
if (xbee.getResponse().getApiId() == ZB_RX_RESPONSE) {
xbee.getResponse().getZBRxResponse(response);
// Process ZigBee data
}
}
Bluetooth:
Library: ArduinoBLE
Example:
cpp
#include <ArduinoBLE.h>
BLEService customService("19B10000-E8F2-537E-4F6C-
D104768A1214");
BLECharacteristic customCharacteristic("19B10001-E8F2-537E-4F6C-
D104768A1214", BLERead | BLEWrite);

BLE.begin();
BLE.setLocalName("ArduinoDevice");

Bluetooth Smart Connectivity :


Bluetooth Smart, also known as Bluetooth Low Energy (BLE), is a
wireless communication technology designed for short-range
communication between devices. It was introduced as part of the
Bluetooth 4.0 specification to address the need for low-power
communication in various applications, particularly those involving
small, battery-operated devices.
Low Power Consumption: One of the primary advantages of
Bluetooth Smart is its low energy consumption. This makes it suitable
for devices powered by small batteries, such as fitness trackers,
smartwatches, and other wearable devices.
Short Range: Bluetooth Smart is intended for short-range
communication, typically within a range of about 10 meters or less.
This short-range capability is suitable for personal area networks
(PANs) and minimizes interference with other wireless technologies.
Communication Profiles: Bluetooth Smart devices use specific
profiles that define how they communicate with each other. These
profiles include the Generic Attribute Profile (GATT) and the Generic
Access Profile (GAP), among others. GATT, in particular, is widely used
for data exchange between devices.
Connection Modes: Bluetooth Smart devices operate in different
connection modes, including connected, advertising, and scanning
modes. In the advertising mode, devices broadcast information for
others to discover, while in the scanning mode, devices actively
search for nearby devices. The connected mode establishes a direct
connection between two devices.
Application Areas: Bluetooth Smart is commonly used in various
applications, including healthcare (for medical devices and health
monitoring), fitness (for activity trackers), smart home (for home
automation devices), and industrial IoT (for sensors and control
devices).
Compatibility: While Bluetooth Smart is energy-efficient, it's
important to note that not all devices support this technology.
Devices need to be specifically designed with Bluetooth Smart
compatibility to take advantage of its low-power features.
Security: Bluetooth Smart includes security features to protect data
transmission between devices. Encryption and authentication
mechanisms are implemented to ensure secure communication.
Interoperability: Bluetooth Smart devices can often be part of larger
ecosystems, working with smartphones, tablets, and other devices
that support Bluetooth connectivity. This interoperability enhances
the overall user experience.
In summary, Bluetooth Smart connectivity is a wireless technology
designed for low-power, short-range communication between
devices.

Bluetooth Key Versions:


Bluetooth Smart (or Bluetooth Low Energy, BLE) is generally
associated with Bluetooth versions starting from Bluetooth 4.0 and
onward. Bluetooth 4.0 introduced the Low Energy feature as a part of
the Bluetooth specification. Subsequent versions, such as Bluetooth
4.1, 4.2, 5.0, 5.1, and 5.2, have introduced improvements,
enhancements, and new features to Bluetooth technology in general,
including Bluetooth Smart.

Bluetooth 4.0:
Introduction of Bluetooth Smart (Bluetooth Low Energy) for low-
power, short-range communication.
Key profiles include Generic Attribute Profile (GATT) and Generic
Access Profile (GAP).

Bluetooth 4.1:
Improved coexistence with other wireless technologies.

Introduction of features like "atomic operations" for better efficiency.

Bluetooth 4.2:
Enhanced privacy and security features.
Increased data transfer rates.
Introduction of IPv6 support for Bluetooth Smart devices.

Bluetooth 5.0:
Significant improvements in speed, range, and data broadcasting
capacity.
Introduction of Bluetooth Mesh for extended networking capabilities.

Increased data transfer rates with 2 Mbps mode.

Bluetooth 5.1:
Introduction of direction finding features for precise location
services.
Enhanced advertising capabilities for more efficient device discovery.

Bluetooth 5.2:
Introduction of LE Isochronous Channels for improved audio quality.
Power control and power consumption optimizations.
Each new version of Bluetooth builds upon the previous ones,
introducing improvements in terms of power efficiency, data transfer
rates, security, and additional features.

Bluetooth Low Energy Protocol:


Bluetooth Low Energy (BLE) is a wireless communication protocol
designed for devices with limited power, like fitness trackers and
smartwatches. It allows devices to communicate over short distances
efficiently, making it ideal for applications where preserving battery
life is crucial. BLE devices can broadcast information, be discovered
by others, and establish low-power connections.
Here are key aspects of the Bluetooth Low Energy protocol:
1.Advertisement and Scanning:
Advertisement: BLE devices can broadcast information periodically to
make themselves discoverable.
Scanning: Other devices can actively scan for nearby BLE devices.
2.Connection Modes:
BLE devices operate in different connection modes, including
advertising, scanning, and connected modes.
In connected mode, a direct, low-latency connection is established
between devices.
3.Profiles and Services:
BLE uses the Generic Attribute Profile (GATT) to define a hierarchical
data structure for organizing data.
Services and characteristics in GATT define the functionality and data
structure exchanged between BLE devices.
4.Low Power Consumption:
One of the primary features of BLE is its low power consumption,
making it suitable for battery-powered devices.
Devices can operate in a low-power state and wake up only when
necessary.
5.Data Transfer:
BLE uses a client-server model for data transfer, where the server
contains data organized into services and characteristics, and the
client can read or write this data.
6.Security:
BLE incorporates security features to protect data transmission.
Pairing mechanisms, encryption, and authentication help secure
communication between devices.
7.Connections and MTU:
BLE supports multiple simultaneous connections between devices.
Maximum Transmission Unit (MTU) defines the maximum size of data
packets that can be exchanged during a connection.
Peripheral and Central Devices:

Low Energy Architecture:


The Bluetooth Low Energy (BLE) architecture in Bluetooth Smart
connectivity is designed for efficient and power-conserving
communication. Here's a brief overview:
1. Roles:
 Peripheral: Broadcasts data, often small devices like
sensors.
 Central: Actively scans, connects, and gathers data from
peripherals, typically smartphones or tablets.
2. GATT (Generic Attribute Profile):
 Hierarchy defining how data is structured and exchanged.
 Organized into services and characteristics, where services
group related data, and characteristics describe specific
data points.
3. Attributes and Handles:
 Unique identifiers for services, characteristics, and other
elements in GATT.
4. Advertising and Discovery:
 Advertising: Peripherals broadcast data to be discovered.
 Discovery: Central devices actively scan for nearby
peripherals.
5. Connection Establishment:
 Short-lived connections initiated when needed for data
exchange.
6. Security:
 Implements pairing, encryption, and authentication for
secure communication.
7. Low Power Modes:
 Devices can operate in low-power states, waking up only
as required.
 Essential for extending battery life, making BLE suitable
for battery-powered devices.
8. Profiles:
 Define how standard specifications (e.g., heart rate
monitoring) are implemented in GATT.
 Examples include the Heart Rate Profile or Proximity
Profile.
In essence, BLE architecture optimizes energy consumption, making it
ideal for small, battery-powered devices engaged in short-range
communication.

PSoC4 BLE architecture and component


overview:
The PSoC4 BLE (Bluetooth Low Energy) is a programmable system-on-
chip developed by Cypress Semiconductor. Here's a small overview of
its architecture and key components in the context of Bluetooth
Smart connectivity:
1.PSoC4 BLE Architecture:
PSoC 4 BLE integrates an ARM Cortex-M0 CPU, digital and analog
components, and a Bluetooth Low Energy radio.
The programmable nature of PSoC allows users to configure the
device to meet specific application requirements.
2.BLE Radio:
The BLE radio is a key component responsible for wireless
communication, enabling the device to connect and communicate
with other Bluetooth Smart devices.
3.ARM Cortex-M0 CPU:
The embedded ARM Cortex-M0 processor serves as the core for
executing user-programmed tasks and managing system operations.
4.BLE Stack:
The Bluetooth Low Energy protocol stack handles the communication
between PSoC 4 BLE and other BLE devices. It includes the Controller
and Host layers necessary for BLE functionality.
5.CapSense:
PSoC 4 BLE often incorporates Cypress's CapSense technology,
allowing touch and proximity sensing capabilities to be integrated
into the device.
6.Programmable Digital and Analog Blocks:
PSoC devices are known for their programmability. Users can
configure digital and analog blocks to implement custom functions
and interfaces tailored to the application's needs.
7.Peripheral Components:
PSoC 4 BLE includes various peripheral components such as UART,
I2C, SPI, timers, and GPIOs that enhance its versatility for different
applications.
8.Low Power Modes:
PSoC 4 BLE offers low-power modes, allowing the device to operate
efficiently and conserve energy when not actively communicating.
9.Configurable Components:
PSoC Creator, Cypress's integrated development environment, allows
users to configure and customize components through a graphical
interface, simplifying the design process.

I IoT means devices talking to each other to share informat**It's like a


conversation where smart devices use a common language or protocol.

You might also like