IoT Unit wise Notes
IoT Unit wise Notes
The goal of IoT is to extend to internet connectivity from standard devices like
computer, mobile, tablet to relatively dumb devices like a toaster.
IoT makes virtually everything “smart,” by improving aspects of our life with the
power of data collection, AI algorithm, and networks. The thing in IoT can also
be a person with a diabetes monitor implant, an animal with tracking devices,
etc.
Characteristics of IoT:
Internet of Things (IoT) technology has a wide variety of applications and use of
Internet of Things is growing so faster. Depending upon different application
areas of Internet of Things, it works accordingly as per it has been
designed/developed.
2. Network Layer –
Internet/Network gateways, Data Acquisition System (DAS) are present in
this layer. DAS performs data aggregation and conversion function
(Collecting data and aggregating data then converting analog data of
sensors to digital data etc). Advanced gateways which mainly opens up
connection between Sensor networks and Internet also performs many
basic gateway functionalities like malware protection, and filtering also
sometimes decision making based on inputted data and data management
services, etc.
4. Application Layer –
This is last layer of 4 stages of IoT architecture. Data centres or cloud is
management stage of data where data is managed and is used by end-user
applications like agriculture, health care, aerospace, farming, defence, etc.
Physical Design of IoT refers to IoT Devices and IoT Protocols. Things are Node
device which have unique identities and can perform remote sensing,
actuating and monitoring capabilities. IoT Protocols helps Communication
established between things and cloud based server over the Internet.
Things
Basically Things refers to IoT Devices which have unique identities and can
perform remote sensing, actuating and monitoring capabilities. Things are is
main part of IoT Application. IoT Devices can be various type, Sensing Devices,
Smart Watches, Smart Electronics appliances, Wearable Sensors, Automobiles,
and industrial machines. These devices generate data in some forms or the
other which when processed by data analytics systems leads to useful
information to guide further actions locally or remotely.
Connectivity
Devices like USB host and ETHERNET are used for connectivity between the
devices and server.
Processor
A processor like a CPU and other units are used to process the data. these data
are further used to improve the decision quality of an IoT system.
Audio/Video Interfaces
An interface like HDMI and RCA devices is used to record audio and videos in a
system.
Input/Output interface
To giving input and output signals to sensors, and actuators we use things like
UART, SPI, CAN, etc.
Storage Interfaces
Things like SD, MMC, SDIO are used to store the data generated from an IoT
device.
Other things like DDR, GPU are used to control the activity of an IoT system.
IoT Protocols:
These protocols are used to establish communication between a node device
and server over the internet. It helps to send commands to an IoT device and
receive data from an IoT device over the internet. These protocols are managed
by network layers like application, transport, network, and link layer.
WebSocket
This protocol enables two-way communication between a client and a host that
can be run on an untrusted code in a controlled environment. this protocol is
commonly used by web browsers.
MQTT
It is a machine-to-machine connectivity protocol that was designed as a
publish/subscribe messaging transport. and it is used for remote locations
where a small code footprint is required.
Transport Layer
This layer is used to control the flow of data segments and handle the error
control. also, these layer protocols provide end-to-end message transfer
capability independent of the underlying network.
TCP
The transmission control protocol is a protocol that defines how to establish and
maintain a network that can exchange data in a proper manner using the
internet protocol.
UDP
a user datagram protocol is a part of internet protocol called the connectionless
protocol. this protocol not required to establish the connection to transfer data.
Network Layer
This layer is used to send datagrams from the source network to the destination
network. we use IPv4 and IPv6 protocols as a host identification that transfers
data in packets.
IPv4
This is a protocol address that is a unique and numerical label assigned to each
device connected with the network. an IP address performs two main functions
host and location addressing. IPv4 is an IP address that is 32 bit long.
IPv6
It is a successor of IPv4 that uses 128 bits for an IP address. it is developed by
the IETF task force to deal with the long-anticipated problems.
Link Layer
Link-layer protocols are used to send data over the network's physical layer. it
also determines how the packets are coded and signaled by the devices.
Ethernet
It is a set of technologies and protocols that are used primarily in LANs. it defines
the physical layer and the medium access control for wired ethernet networks.
WiFi
It is a set of LAN protocols and specifies the set of media access control and
physical layer protocols for implementing wireless local area networks.
Application
It is an interface that provides a control system that use by users to view the
status and analyze of system.
Management
This functional block provides various functions that are used to manage an IoT
system.
Services
This functional block provides some services like monitoring and controlling a
device and publishing and deleting the data and restore the system.
Communication
This block handles the communication between the client and cloud-based
server and sends/receives the data using protocols.
Security
This block is used to secure an IoT system using some functions like
authorization, data security, authentication, 2 step verification, etc.
Device
These devices are used to provide sensing and monitoring control functions that
collect the data from the outer environment.
This model is a communication model in which a client sends the request for
data to the server and the server responds according to the request. When a
server receives a request it fetches the data, retrieves the resources and
prepares the response, and then sends the data back to the client.
In simple terms, we can say that in the request-response model server send the
response of equivalent on the request of the client. In this model, HTTP works
as a request-response protocol between a client and server.
Example
When we search a query on a browser then the browser submits an HTTP
request to the server and then the server returns a response to the browser
(client).
Publish-Subscribe Communication Model
Example
On the website many times we subscribed to their newsletters using our email
address. these email addresses managed by some third-party services and when
a new article published on the website it directly sends to the broker and then
the broker send these new data or post to all the subscribers.
These APIs like REST and WebSocket are used to communicate between the
server and system in IoT.
REST-based communication APIs
Representational state transfer (REST) API uses a set of architectural principles
that used to design web services. These APIs focus on the systems' resources
that how resource states are transferred using the request-response
communication model. This API uses some architectural constraints.
Client-server
Here the client is not aware of the storage of data because it is concerned about
the server and similarly the server should not be concerned about the user
interface because it is a concern of the client. And this separation is needed for
independent development and updating of server and client. No matter how the
client is using the response of the server and no matter how the server is using
the request of the client.
Stateless
It means each request from the client to the server must contain all the
necessary information to understand by the server. Because if the server can't
understand the request of the client then it can't fetch the request data in a
proper manner.
Cacheable
In response, if the cache constraints are given then a client can reuse that
response in a later request. it improves the efficiency and scalability of the
system without loading the extra data.
A RESTful web APIs is implemented using HTTP and REST principles.
this type of API reduces the traffic and latency of data and makes sure that each
time when we request new data it cannot terminate the request.
UNIT 2 IOT AND M2M
IoT and M2M 1
Machine-to-machine, or M2M, is a broad label that can be used to describe any technology
that enables networked devices to exchange information and perform actions without the
manual assistance of humans. Artificial intelligence (AI) and machine learning (ML) facilitate
the communication between systems, allowing them to make their own autonomous choices.
M2M technology was first adopted in manufacturing and industrial settings, where other
technologies, such as SCADA and remote monitoring, helped remotely manage and control
data from equipment. M2M has since found applications in other sectors, such as healthcare,
business and insurance. M2M is also the foundation for the internet of things (IoT).
The main components of an M2M system include sensors, RFID, a Wi-Fi or cellular
communications link, and autonomic computing software programmed to help a network
device interpret data and make decisions. These M2M applications translate the data, which
can trigger preprogramed, automated actions.
The Internet and improved standards for wireless technology have expanded the role of
telemetry from pure science, engineering and manufacturing to everyday use in products
such as heating units, electric meters and internet-connected devices, such as appliances.
M2M applications
M2M Architecture
M2M architecture consists of three domains:
1. M2M device domain
2. M2M network domain
3. M2M application domain
M2M network domain consists of M2M server, device identity management, data
analytics and data and device management similar to IoT architecture (connect + collect +
assemble + analyse) level.
M2M application domain consists of application for services, monitoring, analysis and
controlling of devices networks.
Sensor technology is a technology used for designing sensors and associated electronic
readers, circuits and devices. A sensor can sense a change in physical parameters, such as
temperature, pressure, light, metal, smoke and proximity to an object. Sensors can also sense
acceleration, orientation, location, vibrations or smell, organic vapours or gases. A
microphone senses the voice and changes in the sound, and is used to record voice or music.
A sensor converts physical energy like heat, sound, strain, pressure, vibrations and motion
into electrical energy. An electronic circuit connects to the input at a sensor. The circuit
receives the output of the sensor. The output is according to the variation in physical
condition. A smart sensor includes the electronic circuit within itself, and includes computing
and communication capabilities.
The circuit receives energy in form of variations through currents, voltages, and phase angles
or frequencies. Analog sensors measure the variations in the parameters with respect to a
reference or normal condition and provide the value of sensed parameter after appropriate
calculations.
The change of states with respect to a reference or normal condition senses the states in
the form of 0s and 1s in digital sensors.
ANALOG SENSOR
The sensors that produce continuous analog output signal these are considered as analog
sensors. There are various types of analog sensors such as temperature, moisture,
accelerometer, pressure, light, sound sensor etc.
DIGITAL SENSOR
Sensors in which data conversion & transmission takes place digitally are known as digital
sensors.
In digital sensors, the signal measured is converted into digital signal by the sensor itself. And
this digital signal is transmitted through wire digitally. Somehow it overcomes the
disadvantages of analog sensors.
Examples of digital sensors are IR, ultrasonic, float, moisture sensor etc.
1. Internet of Things:
IOT is known as the Internet of Things where things are said to be the communicating
devices that can interact with each other using a communication media. Usually every day
some new devices are being integrated which uses IoT devices for its function. These
devices use various sensors and actuators for sending and receiving data over the
internet. It is an ecosystem where the devices share data through a communication media
known as the internet.
2. Machine to Machine:
This is commonly known as Machine to machine communication. It is a concept where two
or more than two machines communicate with each other without human interaction
using a wired or wireless mechanism. M2M is an technology that helps the devices to
connect between devices without using internet. M2M communications offer several
applications such as security, tracking and tracing, manufacturing and facility
management.
Confidentiality
It ensures that only authorized users will have access to the underlying information. In other
words, it ensures that privacy by preventing unauthorized access to the information, which is
stored and transmitted using the IoT infrastructure.
Integrity
It ensures that only authorized users are allowed to modify the underlying information. It
ensures that unauthorized users will not be able to alter the information in any manner.
Alteration involves write, delete, and update operations.
Availability
It ensures that authorized users have access to the underlying information as and when it is
required. This includes ensuring the fact that the IoT infrastructure has fault tolerance
capabilities built into them. Fault tolerance can be built into the IoT infrastructure by ensuring
that backup components are present for each of the IoT infrastructure components, namely,
servers, storage, and networks. Server backup can be ensured by clustering the servers in
order to provide a high availability environment. It is also important to ensure that the backup
server is an identical copy of the primary server and can take over the role of the primary
server immediately upon the failure of the primary server. Storage backup can be ensured by
using the highly scalable RAID architecture for hard disks in which same data is striped and
mirrored across multiple hard disks, so that even if one hard disk fails, data will not be lost as
it will stored in the other disks of the array. Fault tolerance in networks can be ensured by
providing multiple switches, multiple ports, and multiple cables between the two connecting
endpoints in order to ensure that the failure of any network component will not hamper the
transfer of data through the network.
Authentication
This process checks to ensure that a user’s credentials are valid, so that users with invalid
credentials will not be allowed to access the underlying information. The simplest way to use
authentication is with the help of user names and passwords. But as hacking techniques are
evolving day by day, it is very important to ensure that sophisticated authentication
techniques are in place. One such authentication mechanism that is used is called multifactor
authentication. Multifactor authentication is a special authentication technique, which uses
a combination of parameters to verify a user’s credentials. An example of multifactor
authentication mechanism is described below:
First Factor: A user name and password, which will be unique for the specific user and which
may be sometimes unique for the specific session as well.
Second Factor: A secret key, which is generated by a random number generator, or a secret
key phrase, which is known only to the user, or answer to a secret question, which is specific
to a particular user.
Third Factor: This could be any biometric parameter of the user, which could be used as the
user’s biometric signature. This could include aspects like iris recognition, finger print
recognition, and so on.
Authorization
Authorization is a process which ensures that a specific user has rights to perform specific
operations on a specific object. This is generally by granting different types of permissions to
different types of users based on their role in a city government. For example, a fire station
executive will just be able to read the data pertaining to other city departments like water;
he/she may not be able to edit it. Edit permissions may be given only to the city supervisors
or executives who belong to the water department of the city. The different types of
permissions for different users on different objects are mapped and stored in a table, which
is called Access Control List (ACL). The different types of permissions, which are given for
users, are classified as the following:
Read only: The user has permission to only read the object. The user cannot delete or edit the
object. These types of permissions are granted to staff who are not required to perform any
alteration on the data.
Read and write: The user has permission to read and alter the object. These types of
permissions are granted to authorities who have the overall authority and discretion to
validate the rights and access permissions of other users.
Audit Trial
Audit trial is an activity, which is conducted periodically, to assess the effectiveness of the
security measures that are implemented in the IoT infrastructure. Audit trial is performed
with the help of audit logs, which track the operations that are performed by different users.
2. Cloud Computing:
It provides us the means by which we can access applications as utilities over the internet.
Cloud means something which is present in remote locations.
With Cloud computing, users can access any resources from anywhere like databases,
webservers, storage, any device, and any software over the internet.
Characteristics –
Examples –
Bank transactions
Data generated by IoT systems for location and tracking of vehicles
E-commerce and in Big-Basket
Health and fitness data generated by IoT system such as a fitness bands
4. Communications Protocols:
They are the backbone of IoT systems and enable network connectivity and linking to
applications. Communication protocols allow devices to exchange data over the network.
Multiple protocols often describe different aspects of a single communication. A group of
protocols designed to work together is known as a protocol suite; when implemented in
software they are a protocol stack.
They are used in
Data encoding
Addressing schemes
5. Embedded Systems:
It is a combination of hardware and software used to perform special tasks.
It includes microcontroller and microprocessor memory, networking units (Ethernet Wi-Fi
adapters), input output units (display keyword etc.) and storage devices (flash memory).
It collects the data and sends it to the internet.
Examples –
Digital camera
DVD player, music player
Industrial robots
Wireless Routers etc.
2.5.1 Wireless Sensor Networks
Sensor nodes are used in WSN with the on-board processor that manages and monitors the
environment in a particular area. They are connected to the Base Station which acts as a
processing unit in the WSN System. Base Station in a WSN System is connected through the
Internet to share data’s can be used for processing, analysis, storage, and mining of the data.
required information from the network by injecting queries and gathering results from the
sink. Typically a wireless sensor network contains hundreds of thousands of sensor nodes.
The sensor nodes can communicate among themselves using radio signals. A wireless sensor
node is equipped with sensing and computing devices, radio transceivers and power
components.
Applications of WSN:
Challenges of WSN:
1. Quality of Service
2. Security Issue
3. Energy Efficiency
4. Network Throughput
5. Performance
6. Ability to cope with node failure
7. Cross layer optimisation
8. Scalability to large scale of deployment
Components of WSN:
Sensors: Sensors in WSN are used to capture the environmental variables and which is used
for data acquisition. Sensor signals are converted into electrical signals.
Radio Nodes: It is used to receive the data produced by the Sensors and sends it to the
WLAN access point. It consists of a microcontroller, transceiver, external memory, and
power source.
WLAN Access Point: It receives the data which is sent by the Radio nodes wirelessly,
generally through the internet.
Evaluation Software: The data received by the WLAN Access Point is processed by a
software called as Evaluation Software for presenting the report to the users for further
processing of the data which can be used for processing, analysis, storage, and mining of the
data.
Area monitoring: In area monitoring, the sensor nodes are deployed over a region where
some phenomenon is to be monitored. When the sensors detect the event being monitored
(heat, pressure etc.), the event is reported to one of the base stations, which then takes
appropriate action.
Health applications: Some of the health applications for sensor networks are supporting
interfaces for the disabled, integrated patient monitoring, diagnostics, and drug
administration in hospitals, tele-monitoring of human physiological data, and tracking &
monitoring doctors or patients inside a hospital.
Environmental sensing: The term Environmental Sensor Networks has developed to cover
many applications of WSNs to earth science research. This includes sensing volcanoes,
oceans, glaciers, forests etc. Some other major areas are listed below:
Greenhouse monitoring
Landslide detection
Structural monitoring: Wireless sensors can be utilized to monitor the movement within
buildings and infrastructure such as bridges, flyovers, embankments, tunnels etc enabling
Engineering practices to monitor assets remotely without the need for costly site visits.
Industrial monitoring: Wireless sensor networks have been developed for machinery
condition-based maintenance (CBM) as they offer significant cost savings and enable new
functionalities. In wired systems, the installation of enough sensors is often limited by the
cost of wiring.
Agricultural sector: using a wireless network frees the farmer from the maintenance of wiring
in a difficult environment. Irrigation automation enables more efficient water use and reduces
waste.
Take the music streaming platform Spotify for example. The company has nearly 96 million
users that generate a tremendous amount of data every day. Through this information, the
cloud-based platform automatically generates suggested songs—through a smart
recommendation engine—based on likes, shares, search history, and more. What enables this
is the techniques, tools, and frameworks that are a result of Big Data analytics.
If you are a Spotify user, then you must have come across the top recommendation section,
which is based on your likes, past history, and other things. Utilizing a recommendation
engine that leverages data filtering tools that collect data and then filter it using algorithms
works. This is what Spotify does.
Stage 7 - Visualization of data - With tools like Tableau, Power BI, and QlikView, Big Data
analysts can produce graphic visualizations of the analysis.
Stage 8 - Final analysis result - This is the last step of the Big Data analytics lifecycle, where
the final results of the analysis are made available to business stakeholders who will take
action.
2. Diagnostic Analytics
This is done to understand what caused a problem in the first place. Techniques like drill-
down, data mining, and data recovery are all examples. Organizations use diagnostic analytics
because they provide an in-depth insight into a particular problem.
Use Case: An e-commerce company’s report shows that their sales have gone down, although
customers are adding products to their carts. This can be due to various reasons like the form
didn’t load correctly, the shipping fee is too high, or there are not enough payment options
available. This is where you can use diagnostic analytics to find the reason.
3. Predictive Analytics
This type of analytics looks into the historical and present data to make predictions of the
future. Predictive analytics uses data mining, AI, and machine learning to analyze current data
and make predictions about the future. It works on predicting customer trends, market
trends, and so on.
Use Case: PayPal determines what kind of precautions they have to take to protect their
clients against fraudulent transactions. Using predictive analytics, the company uses all the
historical payment data and user behaviour data and builds an algorithm that predicts
fraudulent activities.
4. Prescriptive Analytics
This type of analytics prescribes the solution to a particular problem. Perspective analytics
works with both descriptive and predictive analytics. Most of the time, it relies on AI and
machine learning.
Use Case: Prescriptive analytics can be used to maximize an airline’s profit. This type of
analytics is used to build an algorithm that will automatically adjust the flight fares based on
numerous factors, including customer demand, weather, destination, holiday seasons, and
oil prices.
Healthcare - With the help of a patient’s medical history, Big Data analytics is used to predict
how likely they are to have health issues
Media and entertainment - Used to understand the demand of shows, movies, songs, and
more to deliver a personalized recommendation list to its users
Banking - Customer income and spending patterns help to predict the likelihood of choosing
various banking offers, like loans and credit cards
Telecommunications - Used to forecast network capacity and improve customer experience
Government - Big Data analytics helps governments in law enforcement, among other things.
which is designed to perform a specific task. For example, a fire alarm is an embedded
system; it will sense only smoke.
An embedded system has three components −
It has hardware.
It has application software.
It has Real Time Operating system (RTOS) that supervises the application software
and provide mechanism to let the processor run a process as per scheduling by
following a plan to control the latencies. RTOS defines the way the system works. It
sets the rules during the execution of application program. A small scale embedded
system may not have RTOS.
So we can define an embedded system as a Microcontroller based, software driven, reliable,
real-time control system.
Advantages
Easily Customizable
Low power consumption
Low cost
Enhanced performance
Disadvantages
High development effort
Larger time to market
Sensor − It measures the physical quantity and converts it to an electrical signal which
can be read by an observer or by any electronic instrument like an A2D converter. A
sensor stores the measured quantity to the memory.
A-D Converter − An analog-to-digital converter converts the analog signal sent by the
sensor into a digital signal.
Processor & ASICs − Processors process the data to measure the output and store it
to the memory.
D-A Converter − A digital-to-analog converter converts the digital data fed by the
processor to analog data
Actuator − An actuator compares the output given by the D-A Converter to the actual
(expected) output stored in it and stores the approved output.
Short Questions:
1. What does M2M mean?
2. Give examples of M2M applications.
3. What are the three architectural domain functionalities in M2M architecture?
4. What is WSN?
5. What is Analog Sensor?
6. What is Digital Sensor?
7. Define big data Analytics.
8. Write a full form : Iaas,Paas,Saas
Long Questions:
1. Difference between IoT and M2M.
2. Explain Wireless Sensor Networks detail.
3. Explain Embedded Systems in detail.
4. Write a note on Security for IOT.
5. Write a Detail note on big data Analytics.
ACTUATORS IN IOT
3.1 Definition of Sensors
“Sensor is a device used for the conversion of physical events or characteristics into the
electrical signals. This is a hardware device that takes the input from environment and
gives to the system by converting it.”
For example, a thermometer takes the temperature as physical characteristic and then
converts it into electrical signals for the system.
Sensors made it possible to collect data in most any situation and are now used in various
fields - medical care, nursing care, industrial, logistics, transportation, agriculture, disaster
prevention, tourism, regional businesses and many more.
These three features should be at the base of a good sensor:
● It should be sensitive to the phenomenon that it measures.
● It should not be sensitive to other physical phenomena.
● It should not modify the measured phenomenon during the measurement process.
2. Humidity Sensor
If you see Weather Monitoring Systems, they often provide temperature as well as humidity
data. So, measuring humidity is an important task in many applications and Humidity
Sensors help us in achieving this.
Often all humidity sensors measure relative humidity (a ratio of water content in air to
maximum potential of air to hold water). Since relative humidity is dependent on
temperature of air, almost all Humidity Sensors can also measure Temperature.
Humidity Sensors are classified into Capacitive Type, Resistive Type and Thermal Conductive
Type. DHT11 and DHT22 are two of the frequently used Humidity Sensors in DIY Community
(the former is a resistive type while the latter is capacitive type).
4. Ultrasonic Sensor
Ultrasonic sensors are used to measure distance or travel time using ultrasonic waves. A
source will be used to emit ultrasonic wave. After wave hits the target, the waves are
reflected and the detector collects the signal. The travel time between the transmitted wave
and reflected wave is measured using Ultrasonic sensor. Optical sensors use two different
element for transmitter and receiver. Whereas ultrasonic sensor uses single element for
transmission and reception.
6. Light Sensor
Sometimes also known as Photo Sensors, Light Sensors are one of the important sensors. A
simple Light Sensor available today is the Light Dependent Resistor or LDR. The property of
LDR is that its resistance is inversely proportional to the intensity of the ambient light i.e.,
when the intensity of light increases, its resistance decreases and vise-versa.
By using LDR is a circuit, we can calibrate the changes in its resistance to measure the
intensity of Light. There are two other Light Sensors (or Photo Sensors) which are often used
in complex electronic system design. They are Photo Diode and Photo Transistor. All these
are Analog Sensors.
7. Sound Sensor
Sound is a waveform of energy which is produced by the form of mechanical vibration. The
type of sound determines its frequency.
For example, a bass drum has a low-frequency sound and a cymbal has a higher frequency
sound. The sound sensor is a simple device which can detect the sound. The sound sensors
are very simple to use.
8. IR Sensor
When we look into electromagnetic spectrum, infrared region is divided into three regions
as Near Infrared, mid Infrared and far Infrared region. Infrared spectrum has a higher
frequency range than microwave and lesser frequency than visible light. An infrared sensor
is used for emitting and detecting IR radiation. By this principle, IR sensor can be used as
Obstacle detector. There are two types of IR sensors as Active and Passive IR sensors.
Passive IR sensor: When sensor does not use any IR source to detect the emitted energy
from the obstacles it acts as a Passive IR sensor. Examples like thermocouple, pyro electric
detector and bolometers comes under passive sensors.
Active IR sensor: When are there two components which acts as IR source and IR detector it
is called as Active sensor. LED or laser diode act as IR source. Photodiode or phototransistors
acts as IR detector.
Actuators are basically the muscle behind a mechatronics system that accepts a control
command (mostly in the form of an electrical signal) and produces a change in the physical
system by generating force, motion, heat, flow, etc.
An actuator requires a control signal and a source of energy. The control signal is relatively
low energy: Electrical (voltage/current), Pneumatic Pressure, Hydraulic Pressure, Human
power, etc. When the control signal is received, the actuator responds by converting the
energy into mechanical motion. Typical mechanisms include rack and pinion, gear drive, belt
drive, lead screw and nut, piston, and linkages.
Functions of actuation:
1. Transformation of rotary motion into a translating motion as in the case of the cam
and follower mechanism where the rotational motion of the cam is changed into the
translational movement of the follower.
2. Transformation of rotary motion for a long distance which is not possible by using
gears, as in the case of belt drives.
3. Transformation of rotary motion for a medium distance without slipping which is not
possible by using belt drives, as in the case of belt drives.
4. Transformation of linear motion into rotational motion as in the case of rack and
pinion mechanism.
5. Locking of rotating elements as in the case of ratchet and pawl mechanism.
Disadvantages:
Compressibility and pressure losses are two factors that make these actuators
imperfect for various key linear motion applications
At times, it is very difficult to achieve positional accuracy with these actuators, which
is one of the largest drawbacks.
Noise generated by these actuators is large, which makes them incapable of
applications where silence is required.
2. Hydraulic Actuators: Hydraulic actuators have a cylinder or fluid motor that uses
hydraulic power to generate mechanical motion, which in turn leads to linear, rotatory or
oscillatory motion. Given the fact that liquids are nearly impossible to compress, a
hydraulic actuator can exert a large force. When the fluid enters the lower chamber of
the actuator’s hydraulic cylinder, pressure inside increases and exerts a force on the
bottom of the piston, also inside the cylinder. The pressure causes the sliding piston to
move in a direction opposite to the force caused by the spring in the upper chamber,
making the piston move upward and opening the valve. The downside with these
actuators is the need for many complementary parts and possibility of fluid leakage.
Advantages:
These actuators offer high horsepower than the pneumatic actuators.
The small and compact construction of these actuators makes them perfect for many
miniature devices of the day.
Disadvantages:
In some cases, the fluid may leak that will lead to huge losses. More to this, these
fluid leaks will also cause cleanliness problems, and damage their surrounding
components.
These actuators require too many companion parts, such as heat exchangers,
motors, pump and more. This increases user maintenance throughout the lifetime of
the actuator.
Midstroke positioning is difficult to achieve with these actuators, and it requires lots
of user support, as well as additional components.
3. Electrical Actuators: Electrical actuators are equipped with a motor. The rotational
energy of the motor is converted into the linear movement of a device. This actuator
possesses high positioning capabilities owing to electronic controllers fitted within.
These capabilities along with velocity control are brilliantly exploited by various
industries today. These actuators are easy to set up, and can be reprogrammed quickly,
and offer an immediate response. Electric actuators offer a wide range of motion
profiles, owing to their versatile designs.
Advantages:
These actuators require almost no maintenance, except for the replacement of worn
parts.
They do not leak fluids, so there are no cleanliness issues, also the environmental
hazards are eliminated.
Disadvantages:
The purchasing cost of these actuators is considerably high than the other two types,
but their operating and maintenance costs are low.
They are not suitable for hazardous and flammable areas.
Magnetic Actuators –
Magnetic actuators are those that use magnetic effects to produce motion of a part in the
actuator. They usually come in the following categories: moving coil actuator, moving
magnet actuator, moving iron actuator and electromagnetic actuator.
In case of the first kind (moving coil actuator), a mobile coil driven by a current is placed in a
static magnetic field, where it is subject to the Lorentz force. This force is proportional to the
applied current.
Moving magnet actuators work differently; here mobile permanent magnet is placed
between two magnet poles and is switched from one pole to the other using coils. Such
actuators can generate high forces but are not easily controlled.
In moving iron actuators, a soft magnetic part placed into a coil system moves in a fashion
that keeps the system magnetic energy to a minimum.
Mechanical Actuators –
Mechanical actuators create movement by converting one kind of motion, such as rotary
motion, into another kind, such as linear motion. Say for instance, a rack and a pinion.
Another example is that of a chain block hoisting weight where the mechanical motion of
the chain is used to lift a load. The functioning of mechanical actuators relies on the
combinations of their structural components, such as gears and rails, or pulleys and chains.
High reliability, simplicity of utilisation, easier maintenance and greater precision of
positioning are some of the advantages. They can be categorised into hydraulic, pneumatic
and electric actuators.
Example – A crankshaft.
Soft Actuators
Shape Memory Polymers
Light Activated Polymers
With the expanding world of IoT, sensors and actuators will find more usage in
commercial and domestic applications along with the pre-existing use in industry.
Short Questions:
1. What is Active IR Sensor?
2. What is Passive IR Sensor?
3. Definition of Sensor.
4. What is Actuator?
5. What is Thermal Actuator?
6. What is Ultrasonic Sensor?
7. Define: Light Sensor
8. Define: IR Sensor
Long Questions:
1. List out Types of Sensors. Explain in Detail.
2. Explain Types of Actuators in detail.
3. Difference between Sensors & Actuators.
Unit 4
Introduction to
Raspberry pi and
Arduino
Introduction to Raspberry pi and Arduino
A home automation device that allows remotely monitoring the status of appliances
and controlling the appliances.
An industrial machine which sends information about its operation and health
monitoring data to a server.
A car which sends information about its location to a cloud based service.
Sensing : Sensor can be either on-board the IoT device or attached to the device.IoT
device can collect various types of information from the on-board or attached sensors
such as temperature, humidity, light intensity, etc. The sensed information can be
communicated either to other devices or cloud – based servers/storage.
Actuation : IoT devices can have various type of actuators attached that allow taking
actions upon the physical entities in the vicinity of the device.for example , a relay
switch connected to an IoT device can turn an appliance on/off based on the commands
sent to the device.
Communication: Communication modules are responsible for sending collected data to
other devices or cloud based servers/storage and receiving data from other devices and
commands from remote applications.
Analysis & Processing: Analysis and processing modules are responsible for making
sense of the collected data.
The representative IoT device used for the examples in this book is the widely
used single-board mini computer called Raspberry Pi.The use of Raspberry Pi is
international since these device are widely accessible,in expensive, and available from
multiple vendors.
Figure shows a generic block diagram of a single – board compuer (SBC) based IoT
device that include CPU,GPU,RAM,Storage and various type of interfaces and
peripherals.
2
Introduction to Raspberry pi and Arduino
3
Introduction to Raspberry pi and Arduino
Inexpensive
Cross –Platform
Simple
Clear programming enviorment
Open source and extensible software
Open source and extensible hardware.
Application Area
Home Automation
Smart Cities
Environment Monitoring
Logistics Tracking
Smart Agriculture
Smart Industry
Smart Heath Care & Lifestyle
4
Introduction to Raspberry pi and Arduino
GPIO Pins : Raspberry Pi comes with a 40 number of general purpose input/output pins.
Figure 7.3 shows the Raspberry Pi GPIO headers. There are four types of pins on
Raspberry Pi –true GPIO pins,I2C interface pins,SPI interface pins and serial Rx and tx pins.
Display Serial Interface(DSI) : The DSI interface can be used to connect and LCD panel to
Raspberry Pi.
Camera Serial Interface(CSI) : The CSI interface can be used to connect a camera module
to Raspberry Pi.
Status LEDs : Raspberry Pi has five status LEDs.
SD Card Slot : Raspberry Pi does not have a built in operating system and storage. You
can plug-in an SD card loaded with a Linux image to the SD card slot.
Power Input : Raspberry Pi has a micro - USB Connector for power input.
GPIO
Raspberry Pi Board
5
Introduction to Raspberry pi and Arduino
You can tell your board what to do by sending a set of instructions to the microcontroller on the
board. To do so you use the Arduino programming language (based on Wiring), and the
Arduino Software (IDE), based on Processing.
Why Arduino?
6
Introduction to Raspberry pi and Arduino
Cross-platform, which can work on Windows, Mac or Linux platforms. Arduino follows Simple,
clear programming environment as C language. Arduino is best known for its hardware, but you also
need software to program that hardware. Both the hardware and the software are called “Arduino.” The
combination enables you to create projects that sense and control the physical world. The software is
free, open source, and cross-platform. The boards are inexpensive to buy, or you can build your own
(the hardware designs are also open source). In addition, there is an active and supportive Arduino
community that is accessible worldwide through the Arduino forums and the wiki (known as the Arduino
Playground).
In the ten years since Arduino was released, hundreds of “Arduino boards” are available in
the market serving every kind of purpose. Among all in this book we focus on popular Arduino
UNO which is used in almost 99% of projects.
Arduino Uno
Arduino board
7
Introduction to Raspberry pi and Arduino
Components of Arduino
Microcontroller: The ATmega328p is the Arduino brain. Everything on the Arduino board is
meant to support this microcontroller.
Digital pins: Arduino has 14 digital pins, labeled from 0 to 13 that can act as inputs or
outputs. When set as inputs, these pins can read voltage. They can only read two different
states HIGH or LOW. When set as outputs, these pins can apply voltage. They can only apply
5V (HIGH) or 0V (LOW).
PWM pins: These are digital pins marked with a ~ (pins 11, 10, 9, 6, 5 and 3). PWM stands
for “pulse width modulation” and allows to make digital pins output “fake” varying amounts
of voltage.
LED attached to digital pin 13: This is useful for an easy debugging of the Arduino sketches.
TX and RX pins: these pins blink when there are information being sent between the
computer and the Arduino.
Analog pins: the analog pins are labeled from A0 to A5 and are most often used to read
analog sensors. They can read different amounts of voltage between 0 and 5V. Additionally,
they can also be used as digital output/input pins like the digital pins.
Power pins: The Arduino has 3.3V or 5V supply, which is really useful since most
components require 3.3V or 5V. The pins labelled as “GND” are the ground pins.
Reset button: when you press that button, the program that is currently being run in your
Arduino will start from the beginning. You also have a Reset pin next to the power pins that
acts as reset button. When you apply a small voltage to that pin, it will reset the Arduino.
USB jack: a male USB A to male USB B cable is how you upload programs from your
computer to your Arduino board. This also powers your Arduino.
Power jack: The power jack is where you connect a component to power up your Arduino
(recommended voltage is 5V). There are several ways to power up your Arduino:
rechargeable batteries, disposable batteries, wall - warts and solar panel.
8
Introduction to Raspberry pi and Arduino
9
Introduction to Raspberry pi and Arduino
Input Voltage 7 to 12 V 5V
Flash 32KB SD Card(2 to 18G)
USB One, Input Only Two, peripherals OK
Operating None Linux distributors
System
Integrated Arduino Scratch,IDLE,anything with Linux
Development Support
Environment
Short Questions
1) What is the use of GPIO pins?
2) What is Sensing and Actuation?
3) What is GPIO Pins?
4) List out basic building blocks of an IoT Device.
5) What is an IoT Device?
Long Questions
1) What is an IoT Device? Explain basic building blocks of an IoT Device.
2) What is Raspberry Pi? Explain its Components.
3) What is Arduino? Explain its Components.
4) Explain Basic building block of an IoT Device.
5) How is Raspberry Pi different from a desktop Computer.
6) Explain Difference between Raspberry Pi and Arduino.
10
Unit 5
Case Study
Introduction to Raspberry pi and Arduino 2
There are different types of application of smart cities like Smart environment, Smart parking,
Smart living, Smart Governance, Smart Waste Management and Smart Street lighting etc.
Smart Parking
The purpose of a smart parking system is to detect the number of empty parking slots and send
the information over the internet to smart parking application backend. These applications can
be accessed by drivers from smartphones, tablets or from in-car navigation systems.in smart
parking, sensors are used for each parking slot, to detect whether the slot is empty or occupied.
This information is aggregated by a local controller and then sent over the internet to a server.
The following figure shows the domain model for the smart parking system. The domain model
includes a physical entity for the parking slot and the corresponding virtual entity.
Introduction to Raspberry pi and Arduino 3
Above figure shows the process diagram for the smart parking system. Each parking slot has an
ultrasonic sensor fixed above which can detect the presence of a vehicle in the slot. Each sensor
is read at regular intervals and the state of the parking slot (empty / occupied) is updated in
database.
Introduction to Raspberry pi and Arduino 4
Above figure show specification for the controller services of the smart parking system here in
Schedule part, every 5 seconds sensors are used for each parking slot, to detect whether the
slot is empty or occupied. In output part, State will be changed based on the detection of the
presence of a vehicle in the slot.
Service specification for the smart parking IoT system - State service
Introduction to Raspberry pi and Arduino 5
In above figure show specification of the state services of the smart parking system. The
services are derived from the process specification and the information model. The smart
parking system has two services.
(1) A service that monitors the parking slots (using ultrasonic sensors) and updates the
status in the database on the cloud.
(2) A service that retrieves the current state of the parking slots.
Above figure shows how the sensor deployed in a roof of parking area. The View Sets for the
model (StateViewSet) are included in the views file. The home view renders the content for the
smart parking application home page that displays the status of the parking slots. Notice that a
request is sent to the REST(Representational State Transfer) service to obtain the state of a
parking slots. Notice that a request is sent to the state REST service to obtain the state of a
parking slot.
Smart Lighting
The purpose of the home automation system is to control the lights in atypical home remotely
using a web application. The system includes auto and manual modes. In auto mode, the
system measures the light in a room and switches on the light when it gets dark. In manual
mode , The system provides the option of manually and remotely switching on/off the light.
Above figure shows the process diagram for the smart lighting system. The process diagram
shows the two modes of the system-auto and manual. In the process diagram the circle
denotes the start of a process, diamond denotes a decision box and rectangle denotes a state
or attribute. When the auto mode is choosen, the system monitors Light level. If the light level
is low, the system changes the state of the light to “off”. When the manual mode is
choosen,the system checks the light state set by the user. If the light state set by the user is
“on”. The system changes the state of light to “on”. Whereas, if the light state set by the user is
“off”, the system changes the state light to “off”.
Above figure shows the deployment design of the home automation system. The system
has two REST services (mode and state) and a controller native service. The following two figure
show specifications of the mode and state REST services of the home autonomous system.
Introduction to Raspberry pi and Arduino 8
The mode service is RESTful web service that sets mode to auto or manual,or retrieves the
current mode. The mode is updated to/ retrieved from the database.
The state service is a RESTful web service that sets the light appliance state to on/off, or
retrieves the current light state. The state is updated to/retrieves the current light state. The
state is updated to/retrieved from the status database.
Dashboard
Above figure shows a screenshot of the home automation web application. Figure show two
switches one for Auto or Manual (ON/OFF) and second is for Light (ON/OFF).If we off Auto
option then it will be convert into manual mode otherwise it is in Auto mode. The devices and
components are used in this example are Raspberry Pi mini computer , LDR sensor and relay
switch actuator.
Introduction to Raspberry pi and Arduino 10
The above figure shows the specification of the controller native service that runs on Raspberry
Pi. When in auto mode, the controller service monitors the light level and switches the light
on/off and updates the status in the status database. When in manual mode, the controller
service, retrieves the current state from the database and switches the light on/off.
Basic purpose of Smart health & Lifestyle is some wearable IoT device that continuous
monitoring of physiological parameters that can help in continuous health and fitness
monitoring. These wearable devices may be in various forms such as belts and wrist-bands. The
wearable devices form a type of wireless sensor networks called body area networks in which
the measurements from a number of wearable device are continuous sent to a master
node(such as smart-phone) which then sends the data to a server or a cloud based back –end
for analysis and archiving. Commonly used body sensor include: body temperature , heart rate,
pulse oximeter oxygen saturation(SPo2),blood pressure , electrocardiogram(ECG) etc.
Some challenges in the health care system are smarter hospital, Data Integration/realtimeness
, Medical resource shortness, Bad Health habits, Lack of information sharing etc.
Introduction to Raspberry pi and Arduino 11
Above figure shows the process diagram for the IoT health system. The process diagram shows
the two part Normal and Critical. In the Normal part, the blood pressure value is less than
threshold_min value and in the Critical part, the blood pressure value is more than
threshold_max value. In the process diagram the circle denotes the start of a process, diamond
denotes a decision box and rectangle denotes a state or attribute.
Introduction to Raspberry pi and Arduino 12
Above figure shows the deployment design of the IoT Health system. The system has REST
services and a controller native service.
Introduction to Raspberry pi and Arduino 13
In above figure shows blood pressure monitoring adhoc wireless sensor attach to patient body
that collect continues input value of blood pressure form the patient body and the controller
service calls the REST service to store these measurements in the cloud.In the cloud application
can analyze and check threshold minimum and threshold maximum value of blood pressure set
previously according to doctor advice and display on dashboard also. If blood pressure value
more than upper limit of threshold_max value or less than threshold_min value then alert
message sent to the corresponding doctor and patient. Doctor can give advice to the patient
immediately.
The purpose of the weather monitoring system is to collect data on environmental conditions
such as temperature, Pressure, humidity and light in an area using multiple end nodes. The end
nodes send the data to the cloud where the data is aggregated and analyzed.
Above figure shows process specification for the weather monitoring system. The process
specification shows that the sensors are read after fixed intervals and the sensor measurements
are stored.
Introduction to Raspberry pi and Arduino 16
Above figure shows the specification of the controller service for the weather monitoring
system, The controller service runs as a native service on the device and monitors
temperature,pressure,humidity and light once every 15 seconds. The controller service calls the
REST service to store these measurements in the cloud.
Introduction to Raspberry pi and Arduino 17
The above figure shows the deployement design for the weather monitoring system.The system
consists of multiple nodes placed in different locations for monitoring temperature,humidity
and pressure in an area.The end nodes are equipped with various sensors. The end nodes send
the data to the cloud and the data is stored in a cloud database. The analysis of data is done in
the cloud to aggregate the data and make predictions. A Cloud – based application is used for
visualizing the data. The centralized controller can send control commands to the end nodes, to
configure the monitoring interval on the end nodes.