Internet of Things &
Applications
Chapter 2: Domain Specific IOT and M2M
Dr. Ankur Changela
CE Department
Outline
● Introduction
● Home Automation
● Cities
● Environment
● Energy
● Retail
● Logistics
● Agriculture
● Industry
● Health & Lifestyle
Introduction –Applications of IoT
Home Automation
Home Automation (2/2)
•Smart Lighting
•Control lighting by remotely (mobile or web applications)
•Smart Appliances
•Provide status information to the users remotely
•Intrusion Detection
•Use security cameras and sensors (PIR sensors and door sensors)
•Detect intrusions and raise alerts
•The alerts form: an SMS or an email sent to the user
•Smoke/Gas Detectors
•Use optical detection, ionization, or air sampling techniques to detect the smoke
•Gas detectors can detect harmful gases
•Carbon monoxide (CO)
•Liquid petroleum gas (LPG)
•Raise alerts to the user or local fire safety department
● Photoresistors (LDR)
• A high resistance Semiconductor material called cadmium sulfide cells,
highly sensitive to visible and near-infrared light
Photodiodes & Photo Transistors
Gas Sensor
● A gas detector is a device that detects the presence of gases in an area, often as part of a
safety system.
The MQ-2 smoke sensor is sensitive to smoke and to the
MQ-2 Gas Sensor following flammable gases:
• LPG
• Butane
• Propane
• Methane
• Alcohol
• Hydrogen
• The resistance of the sensor is different depending on the type of the gas.
• The smoke sensor has a built-in potentiometer that allows you to adjust the sensor sensitivity according to how
accurate you want to detect gas.
• The voltage that the sensor outputs changes accordingly to the smoke/gas level that exists in the atmosphere.
PIR Sensor
● D203S Analog Outdoor Human Motion PIR Sensor
Passive infrared (PIR) sensors use a pair of pyroelectric sensors to detect heat energy in the surrounding
environment. These two sensors sit beside each other, and when the signal differential between the two
sensors changes (if a person enters the room, for example), the sensor will engage
S18-L262B-2 Digital SMD Passive Infrared
PIR Sensor
PIR Motion Sensor Detector Module HC-SR501
1. Detection Angle: <140°
Time of Flight (ToF) Range Finder Sensor –
VL6180
Fingerprint Sensor
Finger Print Sensor Module - R307
R307 fingerprint module is a fingerprint sensor with a TTL UART interface for
direct connections to microcontroller UART or to PC through MAX232 / USB-
Serial adapter.
1.Operating voltage (v): 4.2 ~ 6 VDC
2.Current consumption: ≤75mA
3.Verification Speed: 0.2 sec
4.Scanning Speed: 0.3 sec
5.Character file size: 256 bytes
6.Template size: 512 bytes
Cities (2/2)
•Smart Parking
•Detect the number of empty parking slots
•Send the information over the internet and accessed by smartphones
•Smart Roads
•Provide information on driving conditions, traffic congestions, accidents
•Alert for poor driving conditions
•Structural Health Monitoring
•Monitor the vibration levels in the structures (bridges and buildings)
•Advance warning for imminent failure of the structure
•Surveillance
•Use the large number of distributed and internet connected video surveillance cameras
•Aggregate the video in cloud-based scalable storage solutions
•Emergency Response
•Used for critical infrastructure monitoring
•Detect adverse events
Vibration Sensor
PHUA3015: Vibration sensor A piezoelectric sensor is a
device that uses the piezoelectric effect to measure changes
in pressure, acceleration, temperature, strain, or force by
converting them to an electrical charge.
Environment
Environment (2/2)
• Weather Monitoring
1. Collect data from several sensors (temperature, humidity, pressure, etc.)
2. Send the data to cloud-based applications and storage back-ends
•Air Pollution Monitoring
•Monitor emission of harmful gases (CO2, CO, NO, NO2,etc.)
•Factories and automobiles use gaseous and meteorological sensors
•Integration with a single-chip microcontroller, several air pollution sensors, GPRS-modem
•Noise Pollution Monitoring
•Use a number of noise monitoring stations
•Generate noise maps from data collected
•Forest Fire Detection
•Use a number of monitoring nodes deployed at different locations in a forests
•Use temperature, humidity, light levels, etc.
•Provide early warning of potential forest fire
•Estimates the scale and intensity
•River Floods Detection
•Monitoring the water level (using ultrasonic sensors) and flow rate (using the flow velocity sensors)
•Raise alerts when rapid increase in water level and flow rate is detected
Temperature, Humidity and pressure sensor
BME680 - Temperature, Humidity, Pressure and Gas Sensor
Possible use cases:
• Personal air quality tracker
• Air quality mapping
• Air quality inside cars & public transport
• Enhanced context awareness
• Accurate step & calorie tracker
• Quick GPS-fix & improved navigation
• Indicator of too high / low humidity
• Air quality & well-being indicator
• Sleep / recovery tracker
• Weather trend
• Stair counter
• Floor level detection
Parameter Technical data
Package dimensions 8-Pin LGA with metal
3.0 x 3.0 x 0.93 mm³
Operation range (full accuracy) Pressure: 300...1100 hPa
Humidity 0…100%
Temperature: -40…85°C
Supply voltage VDDIO 1.2 ... 3.6 V
Supply voltage VDD 1.71 ... 3.6 V
Interface I²C and SPI
Average current consumption 2.1 µA at 1 Hz humidity and temperature
(1Hz data refresh rate)) 3.1 µA at 1 Hz pressure and temperature
Average current consumption in sleep mode 3.7 µA at 1 Hz humidity, pressure and temperature
0.09‒12 mA for p/h/T/gas depending on operation mode
Gas sensor
Response time (τ 33-63%) < 1 s (for new sensors)
Sensor-to-sensor deviation +/- 15% +/- 15
Power consumption < 0.1 mA in ultra-low power mode
Output data processing direct output of IAQ: Index for Air Quality
Humidity sensor
Response time (τ0-63%) 8s
Accuracy tolerance ± 3 % relative humidity
Hysteresis ≤ 1.5 % relative humidity
Pressure sensor
RMS Noise 0.12 Pa (equiv. to 1.7 cm)
Sensitivity Error ± 0.25 % (equiv. to 1 m at 400 m height change)
Temperature coefficient offset ±1.3 Pa/K (equiv. to ±10.9 cm at 1°C temperature change)
DHT11, DHT22 Temperature and Humidity sensor
The DHT sensors are made of two parts, a capacitive humidity sensor and
a thermistor. There is also a very basic chip inside that does some analog to digital
conversion and spits out a digital signal with the temperature and humidity.
DHT11
• Ultra low cost
• 3 to 5V power and I/O
• 2.5mA max current use during conversion (while requesting data)
• Good for 20-80% humidity readings with 5% accuracy
• Good for 0-50°C temperature readings ±2°C accuracy
• No more than 1 Hz sampling rate (once every second)
• Body size 15.5mm x 12mm x 5.5mm
• 4 pins with 0.1" spacing
DHT22 / AM2302 (Wired version)
• Low cost
• 3 to 5V power and I/O
• 2.5mA max current use during conversion (while requesting data)
• Good for 0-100% humidity readings with 2-5% accuracy
• Good for -40 to 80°C temperature readings ±0.5°C accuracy
• No more than 0.5 Hz sampling rate (once every 2 seconds)
• Body size 15.1mm x 25mm x 7.7mm
• 4 pins with 0.1" spacing
Sound Sensors
Specification of Sound Sensor Module:-
• Operating voltage 3.3V-5V
• Outputs digital switching output (high and low level 0 and 1
• Operating current (Vcc=5V): 4-8mA
• Microphone sensitivity (1Khz): 52-48dB
• Microphone Impedance: 2.2KΩ
• Microphone Frequency: 16-20Khz
• Microphone S/N ratio: 54dB
• Signal output indication
• Single channel signal output
• Outputs low level and the signal light when there is sound
Camera Sensor
Specifications:-
• Photosensitive Array: 640 x 480.
• IO Voltage: 2.5V to 3.0V.
• Operating Power: 60mW/15fpsVGAYUV.
• Sleeping Mode: <20μA.
• Operating Temperature: -30 to 70 deg C.
• Output Format: YUV/YCbCr4:2:2 RGB565/555/444 GRB4:2:2
Raw RGB Data (8 digit).
• Lens Size: 1/6″.
• Vision Angle: 25 degree.
• Max. Frame Rate: 30fps VGA.
Energy
•Smart Grids
•Collect data regarding electricity generation, consumption, storage (conversion of energy into other
forms), distribution, equipment health data
•Control the consumption of electricity
•Remotely switch off supply
•Renewable Energy Systems
•Measure the electrical variables
•Measure how much the power is fed into the grid
Agriculture
Agriculture
•Smart Irrigation
•Use sensors to determine the amount of moisture in the soil
•Release the flow of water
•Using predefined moisture levels
•Water Scheduling
•Green House Control
•Automatically control the climatological conditions inside a green house
•Using several sensors to monitor
•Using actuation devices to control
•Valves for releasing water and switches for controlling fans
•Maintenance of agricultural production
Soil Moisture Sensor
Specifications:-
• Operating voltage: 3.3V~5V
• Dual output mode,analog output more accurate
• A fixed bolt hole for easy installation
• With power indicator (red) and digital switching output
indicator (green)
• Having LM393 comparator chip, stable
• Panel PCB Dimension: Approx.3cm x 1.5cm
• Soil Probe Dimension: Approx. 6cm x 3cm
• Cable Length: Approx.21cm
• VCC: 3.3V-5V
• GND: GND
• DO: digital output interface(0 and 1)
• AO: analog output interface
Water flow sensor
When water flows through the valve it rotates the rotor. By this, the change
can be observed in the speed of the motor. This change is calculated as
output as a pulse signal by the hall effect sensor. Thus, the rate of flow of
water can be measured.
Industry
•Machine Diagnosis
•Sensors in machine monitor the operating conditions
•For example: temperature & vibration levels
•Collecting and analyzing massive scale machine sensor data
•For reliability analysis and fault prediction in machines
•Indoor Air Quality Monitoring
•Use various gas sensors
•To monitor the harmful and toxic gases (CO, NO, NO2, etc.)
•Measure the environmental parameters to determine the indoor air quality
•Temperature, humidity, gaseous pollutants, aerosol
Health & Lifestyle
•Health & Fitness Monitoring
•Collect the health-care data
•Using some sensors: body temperature, heart rate, movement (with accelerometers), etc.
•Various forms : belts and wrist-bands
•Wearable electronic
•Assists the daily activities
•Smart watch
•Smart shoes
•Smart wristbands
Flex Sensor
Features
- Angle Displacement Measurement
- Bends and Flexes physically with motion device
- Possible Uses
- Robotics
- Gaming (Virtual Motion)
- Medical Devices
- Computer Peripherals
- Musical Instruments
- Physical Therapy
- Simple Construction
- Low Profile
Voltage-controlling sensors
● Some sensors control voltage directly
Accelerometer: Gyro: Passive infrared sensor:
Reports acceleration Reports angular velocity in 3 detects motion
in 3 axes axes
31
Actuators
32
Actuators
● Devices that cause something to happen in the physical world
● Outputs of the devices
○ Visual: LED, LCD, monitor
○ Audio: buzzer, speaker
○ Motion: motors, valve, pump
○ Tactile: heating, cooling
33
On-off actuation
● The only control is power
● Even complicated actuators can be controlled via power
○ LED, buzzer, monitor
● Does not use the full potential of the actuator
● On-off control may be all that is necessary
○ Lights in a classroom
34
Current limits
● Watch out for current limits
● LED can only handle 20mA
○ Be sure to use an appropriate resistor
● Arduino can only supply 40mA
○ Cannot drive a motor that requires 10A
○ May need to use alternate power supply
○ Arduino can control access to power without providing power directly
35
Analog voltage
control
36
Analog voltage control
● Many actuators need an analog voltage for complete control
○ DC motor speed controlled by voltage
○ LED brightness controlled by voltage
○ Heating element temperature controlled by voltage
● Arduino cannot generate analog outputs
37
Digital to analog converter (DAC)
● DAC will convert digital number to an analog voltage
● Most microprocessors do not have a DAC
● Can buy one and attach it, but may be costly
38
Pulse width
modulation
39
Pulse width modulation
● Duty cycle is the percent of time the pulse is HIGH
● Increasing duty-cycle increases perceived voltage
40
analogWrite()
● Generates a square wave on a pin, 490Hz
● First argument is the pin number
● Second argument is the pulse width
○ 0 is 0% duty cycle
○ 255 is 100% duty cycle
● Pin number must be a PWM pin
○ Marked on the Arduino with the “~” symbol
● Example:
analogWrite(3,128); will output 2.5V approximately on pin3
41
M2M
● Very Important concept
● Main goal of IOT/M2M is autonomous system
● No Human Intervention
● Example:
○ Robotics in smart home automation
○ Autonomous cars
● Earlier Version: SCADA (Supervisory control and data acquisition) system
Example: Emergency services on highways
M2M
● The term often used synonymously with IoT is Machine - to -
Machine (M2M).
● Though IoT and M2M are often used interchangeably , these
terms are evolved from different background.
● Machine-to-Machine (M2M) refers to networking of machines (or
devices) for the purpose of remote monitoring and control and
data exchange.
M2M System Architecture
M2M System Architecture
• An M2M area network comprises of machines (or M2M nodes) which have embedded
hardware modules for sensing, actuation and communication.
• Various communication protocols can be used for M2M local area networks such as ZigBee,
Bluetooh, ModBus, M-Bus, Wirless M-Bus, Power Line Communication (PLC), 6LoWPAN,
IEEE 802.15.4, etc.
• The communication network provides connectivity to remote M2M area networks.
• The communication network can use either wired or wireless networks (IP- based).
• While the M2M area networks use either proprietary or non-IP based communication
protocols, the communication network uses IP-based networks.
M2M gateway
● Since non-IP based protocols are used within M2M area networks, the M2M nodes within
one network cannot communicate with nodes in an external network.
● To enable the communication between remote M2M area networks, M2M gateways are
used.
Difference between IoT and M2M
● Communication Protocols
○ M2M and IoT can differ in how the communication between the machines or devices happens.
○ M2M uses either proprietary or non-IP based communication protocols for communication
within the M2M area networks.
● Machines in M2M vs Things in IoT
○ The "Things" in IoT refers to physical objects that have unique identifiers and can sense and
communicate with their external environment (and user applications) or their internal physical
states.
○ M2M systems, in contrast to IoT, typically have homogeneous machine types within an M2M
area network.
Difference between IoT and M2M
● Hardware vs Software Emphasis
○ While the emphasis of M2M is more on hardware with embedded modules, the emphasis of IoT
is more on software.
● Data Collection & Analysis
○ M2M data is collected in point solutions and often in on-premises storage infrastructure.
○ In contrast to M2M, the data in IoT is collected in the cloud (can be public, private or hybrid
cloud).
Difference between IoT and M2M
● Applications
○ M2M data is collected in point solutions and can be accessed by on-premises applications such
as diagnosis applications, service management applications, and on- premises enterprise
applications.
○ IoT data is collected in the cloud and can be accessed by cloud applications such as analytics
applications, enterprise applications, remote diagnosis and management applications, etc
Communication in IoT vs M2M
Software Defined Networking
● Software-Defined Networking (SDN) is a networking architecture that separates the
control plane from the data plane and centralizes the network controller.
Data plane refers to all the functions and processes that forward
packets/frames from one interface to another. Control plane refers to
all the functions and processes that determine which path to use
Routing protocols are examples..
Conventional Network Architecture
• Figure shows the conventional
network architecture.
• Built with switches / routers
• N/W devices in conventional N/W are
getting exceedingly complex with
increasing number of distributed
protocols being implemented as their
proprietary hardware and interfaces.
• In conventional n/w control plane and
data plane are coupled.
• Control plane is the part of the n/w
that carries the signaling and routing
message traffic while the data plane
is the part of the n/w that carries the
payload data traffic.
Limitations of the conventional n/w architecture
● Complex Network Devices
○ More Protocols , Increasing Link Speed and reliability
● Management Overhead
● Multiple network devices, Upgradation
● Limited Scalability
SDN Architecture
SDN Layer
SDN Architecture
Key elements of SDN
● Centralized Network Controller
○ With decoupled control and data planes and centralized network controller, the network
administrators can rapidly configure the network.
● Programmable Open APIs
○ SDN architecture supports programmable open APIs for interface between the SDN application
and control layers
● Standard Communication Interface (OpenFlow)
○ SDN architecture uses a standard communication interface between the control and
infrastructure layers OpenFlow, which is defined by the Open Networking Foundation (ONF) is
the broadly accepted SDN protocol for the Southbound interface.
NFV
● Network Function Virtualization (NFV) is a technology that leverages virtualization
to consolidate the heterogeneous network devices onto industry standard high
volume servers, switches and storage.
● NFV is complementary to SDN as NFV can provide the infrastructure on which
SDN can run.
NFV Architecture
Key elements of NFV
● Virtualized Network Function (VNF):
○ VNF is a software implementation of a network function which is capable of running over the
NFV Infrastructure (NFVI).
● NFV Infrastructure (NFVI):
○ NFVI includes compute, network and storage resources that are virtualized.
● NFV Management and Orchestration:
○ NFV Management and Orchestration focuses on all virtualization-specific management tasks
and covers the orchestration and life-cycle management of physical and/or software resources
that support the infrastructure virtualization, and the life-cycle management of VNFs.
NFV Use Case
● NFV can be used to virtualize the Home Gateway. The NFV infrastructure in the
cloud hosts a virtualized Home Gateway. The virtualized gateway provides private
IP addresses to the devices in the home. The virtualized gateway also connects to
network services such as VoIP and IPTV.
Home n/w architecture with virtualized home gateway
Conventional home n/w architecture
● The analog input gives us a value between 0 and 1023, 0 being no voltage and 1023 being
5V. To figure out what this voltage converts to in degrees Celsius we will need to first find the
percentage of 5V on the input. This can be done by dividing the sensor Input by 1024.
● As we know from the datasheet, the sensor will output 0 – 1.75V over a range of 175 degrees
(-50° to 125°) so that means every 0.01V equals 1 degree. We will need to convert the
percentage of input to voltage by multiplying by 5V.
● Since we are not measuring 0° – 175° we will need to shift the output value so that the
minimum reading of -50° equals a voltage reading of 0. We do this by subtracting 0.5 from
the output voltage. Our new value now ranges from -0.5 to 1.25 (which looks remarkably
similar to our temperature range!)
● To convert from millivolts to degrees Celsius we will need to multiply by 100.
CODE
PIR Sensor
Ultrasonic Sensor
Temperature Sensor Interfacing
pinMode(2, OUTPUT)
digitalWrite(2, HIGH)
Serial.begin(9600)
digitalRead(2)
analogRead(A2)
Temperature Sensor Interfacing with Arduino
The sensor can measure a fairly wide range of temperature (-50°C to
125°C), is fairly precise (0.1°C resolution)
Switch Interface