KEMBAR78
Unit-2 Iot Notes | PDF | Internet Of Things | Raspberry Pi
0% found this document useful (0 votes)
440 views12 pages

Unit-2 Iot Notes

Uploaded by

msharad486
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
0% found this document useful (0 votes)
440 views12 pages

Unit-2 Iot Notes

Uploaded by

msharad486
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/ 12

UNIT-2

IoT Hardware and Software


Sensors in IoT -

A sensor is a device that detects and measures a physical property and converts it into data
that can be used by an IoT system. Sensors monitor various environmental factors like
temperature, pressure, light, humidity, motion, and more.

Types of Sensors in IoT:

1. Temperature Sensors: Measure the temperature of an environment or object.


o Use Cases: Smart thermostats (Nest), weather monitoring systems, industrial
machines, and agricultural systems.
2. Humidity Sensors: Measure the moisture level in the air.
o Use Cases: Climate control in smart homes, industrial manufacturing processes, and
agricultural monitoring.
3. Proximity Sensors: Detect the presence of objects or the distance to an object
without physical contact.
o Use Cases: Parking sensors, automated doors, and security systems.
4. Pressure Sensors: Measure the force applied to a surface.
o Use Cases: Monitoring tire pressure, weather stations, and industrial systems.
5. Motion Sensors (Accelerometers and Gyroscopes): Detect movement, acceleration,
or tilt of an object.
o Use Cases: Fitness trackers, smartphones, autonomous vehicles, and gaming
consoles.
6. Light Sensors: Measure the intensity of light.
o Use Cases: Automatic lighting systems, smart street lights, and photography
applications.
7. Gas Sensors: Detect the presence of gases like carbon monoxide, methane, or smoke.
o Use Cases: Air quality monitoring systems, smart homes, and industrial safety
systems.
8. Sound Sensors: Capture sound waves and convert them into electrical signals.
o Use Cases: Voice-activated assistants (Amazon Echo, Google Home), security alarms,
and noise level monitoring.
9. Image Sensors: Capture images or video, typically used in cameras.
o Use Cases: Security cameras, smart doorbells, and facial recognition systems.
10. Vibration Sensors: Detect vibrations or oscillations in machines and equipment.
o Use Cases: Predictive maintenance in industrial IoT, vibration analysis for machinery.

Working of Sensors in IoT:

 Sensing: Sensors detect physical phenomena (temperature, light, pressure, etc.).


 Conversion: The detected analog data is converted into digital signals.
 Transmission: The data is sent to the cloud or edge servers for processing using IoT protocols
like MQTT, HTTP, or CoAP.
 Action: The collected data is analyzed, and decisions are made (e.g., turning on a heater if
the temperature is low).
Actuators in IoT

An actuator is a device that converts electrical signals into physical actions, such as moving
an object, opening a valve, or controlling a motor. Actuators are responsible for acting on the
data collected by sensors and executing commands in response to those readings.

Types of Actuators in IoT:

1. Electric Motors: Convert electrical energy into mechanical movement.


o Use Cases: Robotics, smart locks, and automated window blinds.
2. Solenoids: Electromagnetic devices that convert electrical energy into a linear
motion.
o Use Cases: Locking mechanisms in smart locks, automated doors, and vending
machines.
3. Pneumatic Actuators: Use compressed air to generate mechanical movement.
o Use Cases: Industrial automation, robotic arms, and HVAC systems.
4. Hydraulic Actuators: Use liquid pressure to create motion.
o Use Cases: Heavy machinery, construction equipment, and industrial robots.
5. Relay Switches: Electrically operated switches that control high-power devices.
o Use Cases: Smart home appliances, lighting systems, and HVAC systems.
6. Piezoelectric Actuators: Use electrical signals to create precise, small movements.
o Use Cases: Precision engineering, inkjet printers, and medical devices.

Working of Actuators in IoT:

 Signal Reception: The actuator receives a signal from the IoT system, typically as a result of
sensor data or a command from a user interface.
 Action: The actuator performs a physical action, such as turning a motor, opening a valve, or
moving an object.
 Feedback: Some actuators provide feedback to the system, confirming that the action was
completed successfully.

1. Humidity Sensors

A humidity sensor measures the amount of moisture in the air and is commonly used in
environmental monitoring and climate control systems. Humidity sensors are essential for
applications where moisture levels must be regulated, such as in agriculture, HVAC systems,
and certain manufacturing processes.

Types of Humidity Sensors:

1. Capacitive Humidity Sensors: Use a humidity-sensitive capacitor where the dielectric


constant changes with humidity, altering the capacitance value.
2. Resistive Humidity Sensors: Measure the change in electrical resistance as humidity
changes.
3. Thermal Humidity Sensors: Use a dual thermistor setup where the difference in thermal
conductivity between dry and moist air is used to calculate humidity.
Working Principle:

 A capacitive or resistive element changes its physical properties based on the relative
humidity of the environment.
 The change is converted into an electrical signal, which is processed by the IoT device to
monitor moisture levels.

Applications:

 HVAC Systems: Regulate the moisture level in homes, offices, or factories.


 Agriculture: Monitor soil and air humidity to optimize irrigation systems.
 Healthcare: Maintain precise humidity levels in sensitive environments like hospitals.
 Industrial Automation: Used in processes where precise moisture control is critical (e.g.,
pharmaceutical manufacturing).

2. Ultrasonic Sensors

An ultrasonic sensor measures the distance to an object using sound waves. It emits high-
frequency sound waves (ultrasonic waves) that reflect off an object and return to the sensor.
The time it takes for the sound wave to return is used to calculate the distance to the object.

Working Principle:

 The sensor emits an ultrasonic pulse (usually around 40 kHz).


 The pulse travels through the air, hits an object, and reflects back to the sensor.
 The sensor calculates the distance based on the time interval between emitting the pulse
and receiving the echo (using the speed of sound as a constant).

Types of Ultrasonic Sensors:

1. Proximity Detection: Detect the presence of objects within a specific range.


2. Ranging Sensors: Measure the exact distance to an object by calculating the round-trip time
of the sound waves.

Applications:

 Obstacle Detection: Common in autonomous vehicles and robots to detect nearby objects.
 Parking Sensors: Used in cars to measure the distance between the vehicle and an obstacle
while parking.
 Liquid Level Monitoring: Measure the level of liquids in tanks or reservoirs without direct
contact.
 Smart Trash Bins: Monitor the fill level in trash cans to optimize waste collection schedules.

Advantages:

 Works in challenging environments like fog, dust, or high humidity where optical sensors
might fail.
 Non-contact measurement ensures durability and long service life.
3. Temperature Sensors

A temperature sensor measures the temperature of the surrounding environment or an


object and converts the measurement into a readable signal for IoT systems. Temperature
sensors are widely used in climate control, industrial processes, and consumer electronics.

Types of Temperature Sensors:

1. Thermocouples: Measure temperature using the voltage generated by the junction of two
different metals.
2. Thermistors: Resistive temperature sensors where the resistance decreases with an increase
in temperature (NTC) or increases with temperature (PTC).
3. RTDs (Resistance Temperature Detectors): Measure temperature by detecting changes in
electrical resistance.
4. Semiconductor Temperature Sensors: Use integrated circuits to measure temperature
through the voltage output.

Working Principle:

 Thermocouples: When two dissimilar metals are joined, a voltage difference is created,
which varies with temperature.
 Thermistors and RTDs: These sensors measure the change in electrical resistance that occurs
with changes in temperature. The sensor's resistance or voltage is then converted to
temperature.

Applications:

 HVAC Systems: Control heating, cooling, and ventilation systems.


 Wearable Devices: Monitor body temperature for health tracking.
 Industrial IoT: Measure temperature in processes like manufacturing, power plants, and oil
and gas.
 Consumer Electronics: Used in devices like smartphones, refrigerators, and ovens for
temperature monitoring and control.
 Smart Homes: Temperature sensors in smart thermostats optimize energy use by adjusting
the temperature based on environmental conditions.

Advantages:

 Accurate and reliable temperature measurement.


 Available in a wide range of types, offering flexibility for different applications (industrial,
healthcare, consumer devices).

Arduino –
Arduino is one of the most popular platforms for building Internet of Things (IoT)
applications. It provides a flexible, open-source platform for building IoT prototypes and
projects, enabling both beginners and experts to design and implement IoT systems. Arduino
offers a variety of boards, shields, and software tools that simplify IoT development.
Key Components of Arduino in IoT

1. Arduino Board:
o The Arduino board is the core hardware component that processes data and
controls connected sensors, actuators, and communication modules. Popular
Arduino boards for IoT projects include:
 Arduino Uno: Ideal for beginners and simple IoT projects.
 Arduino Nano: A smaller version of the Uno, suited for more compact IoT
projects.
 Arduino MKR1000: Comes with built-in Wi-Fi for seamless connectivity.
 Arduino Nano 33 IoT: A compact board with integrated Wi-Fi and Bluetooth
for IoT applications.
2. Sensors and Actuators:
o Arduino interfaces with sensors to collect data from the environment (e.g.,
temperature, humidity, light, motion sensors).
o It also controls actuators, such as motors, relays, and LEDs, to perform specific
actions based on sensor data or user commands.
3. Communication Modules:
o Arduino supports a variety of communication protocols for connecting IoT devices
to the internet or local networks:
 Wi-Fi Modules: Like the ESP8266 or ESP32, to connect Arduino to wireless
networks.
 Bluetooth Modules: Such as the HC-05 or HM-10 for short-range
communication.
 LoRa Modules: For long-range, low-power communication, commonly used
in IoT applications for smart cities and agriculture.
 Ethernet Shield: Allows Arduino to connect to the internet via wired
Ethernet.
 GSM Modules: Enable cellular communication for remote IoT projects.
4. Arduino IDE:
o The Arduino Integrated Development Environment (IDE) is the software used to
write, compile, and upload code to the Arduino board. It supports a variety of
programming languages, but the primary one is C/C++.
o The IDE provides an extensive library of pre-built functions and examples to interact
with sensors, actuators, and communication modules.
5. Cloud Platforms:
o Arduino IoT devices can be connected to various cloud platforms for data storage,
processing, and analysis:
 Arduino IoT Cloud: A platform specifically designed by Arduino for
connecting, managing, and controlling IoT devices.
 Third-Party IoT Platforms: Arduino can also connect to cloud services like
AWS IoT, Microsoft Azure, Google Cloud, ThingSpeak, and Blynk for data
logging, analytics, and remote control.

Arduino Works in an IoT System

1. Data Collection:
o Arduino collects data from connected sensors (e.g., temperature, humidity, motion
sensors).
o The data is processed and can be used for real-time decision-making or sent to the
cloud for further analysis.
2. Communication:
o Using Wi-Fi, Bluetooth, LoRa, or GSM modules, Arduino connects to the internet or a
local network.
o The data is transmitted to a remote cloud server or mobile device, allowing users to
monitor the system remotely.
o Commands from the cloud or user interface are sent back to the Arduino to control
actuators (e.g., turn on a motor or change an LED's state).
3. Control and Automation:
o Based on sensor inputs, the Arduino controls actuators (e.g., adjusting the speed of
a motor, opening a valve, or sending a notification).
o These actions can be fully automated or triggered by user commands via
web/mobile applications.

Advantages of Using Arduino in IoT

 Open-source platform: Arduino is open-source, making it accessible and affordable for


developers and hobbyists.
 Wide community support: A large, active community provides a wealth of resources,
tutorials, and libraries, making development easier.
 Extensive hardware support: Arduino supports a wide range of sensors, actuators, and
communication modules, enabling versatile IoT applications.
 Ease of use: The Arduino platform is beginner-friendly, with simple hardware connections
and an easy-to-use IDE.

Challenges and Limitations:

 Limited processing power: Arduino boards have limited memory and processing capabilities
compared to more powerful microcontrollers or single-board computers like Raspberry Pi.
 Energy efficiency: Some Arduino boards are not optimized for low-power IoT applications,
making them less suitable for battery-operated projects.
 Limited connectivity options: Some Arduino boards may require additional shields or
modules for connectivity, adding to the cost and complexity.

Arduino IoT Example Projects

1. Smart Home Automation:


o Arduino can be used to create a smart home system where it controls lights, security
systems, and climate control based on inputs from sensors and user commands via a
mobile app.
2. Weather Monitoring System:
o Arduino collects data from temperature, humidity, and pressure sensors, uploads the
data to the cloud, and allows users to monitor weather conditions remotely.
3. Smart Irrigation System:
o Arduino monitors soil moisture levels and automatically turns on irrigation systems
when moisture falls below a set threshold. It can also provide real-time data to
farmers via a mobile app.
4. IoT-Based Security Systems:
o Arduino can be connected to motion sensors, cameras, and alarm systems to create
a security system that sends alerts to the user’s smartphone when unusual activity is
detected.
5. Health Monitoring Systems:
o Arduino can be used in wearables or medical devices to track heart rate,
temperature, and other vitals, sending the data to the cloud for real-time monitoring
by healthcare professionals.

Raspberry Pi -

Raspberry Pi is a powerful and versatile platform widely used in Internet of Things (IoT) projects. It is
a low-cost, single-board computer that offers more processing power and flexibility compared to
microcontroller platforms like Arduino. Due to its full-fledged operating system, Raspberry Pi is
suitable for both IoT prototyping and deploying real-world applications.

Key Components of Raspberry Pi in IoT

1. Raspberry Pi Board:
o The Raspberry Pi is a compact, credit card-sized computer that features a processor,
memory, storage, and a variety of input/output interfaces.
o Popular models for IoT include:
 Raspberry Pi 4 Model B: Comes with up to 8GB of RAM, offering powerful
processing capabilities for IoT applications.
 Raspberry Pi 3 Model B+: A more affordable option with built-in Wi-Fi and
Bluetooth.
 Raspberry Pi Zero W: A smaller, low-power version with built-in wireless
connectivity, ideal for compact IoT projects.
2. Operating System:
o Raspberry Pi runs Raspberry Pi OS (formerly Raspbian), a Linux-based operating
system that supports various programming languages, libraries, and software tools
necessary for IoT development.
o You can also install other operating systems, such as Ubuntu, Windows IoT Core, or
specialized IoT-focused OSes like BalenaOS.
3. Connectivity:
o Built-in Wireless: Many Raspberry Pi models come with built-in Wi-Fi and Bluetooth,
making it easy to connect to the internet or other devices.
o GPIO (General-Purpose Input/Output): Raspberry Pi has a 40-pin GPIO header,
allowing it to interface with sensors, actuators, and other electronics.
o USB, Ethernet, HDMI: These standard ports allow connection to peripherals like
keyboards, cameras, monitors, and networking devices.
4. Sensors and Actuators:
o Like Arduino, Raspberry Pi can connect to various sensors (e.g., temperature,
humidity, proximity) and actuators (e.g., motors, lights, relays) via the GPIO pins or
communication protocols like I2C and SPI.
o For more complex applications, Raspberry Pi can handle image processing through
camera modules or advanced sensors like LIDAR.
5. Programming:
o Python is the most commonly used programming language for Raspberry Pi IoT
projects, thanks to its ease of use and extensive libraries.
o Other languages like C, Java, Node.js, and Go can also be used depending on the
requirements of the IoT application.
6. Cloud Platforms:
o Raspberry Pi can connect to various cloud services for data storage, processing, and
remote management, such as:
 AWS IoT, Microsoft Azure IoT, Google Cloud IoT for scalable, enterprise-
level IoT deployments.
 Open-source platforms like ThingsBoard or Node-RED for easier IoT
application development and management.

Raspberry Pi Works in IoT Systems

1. Data Collection:
o Raspberry Pi collects data from connected sensors (e.g., temperature, humidity,
pressure, camera) via GPIO, USB, or wireless communication protocols (Wi-Fi,
Bluetooth).
o The data is processed locally, where it can be stored, analyzed, or transmitted to a
cloud platform for further processing.
2. Edge Computing:
o Raspberry Pi can perform edge computing, meaning it processes data locally before
sending it to the cloud. This reduces latency, optimizes bandwidth usage, and allows
real-time decision-making.
o For example, in a security camera system, Raspberry Pi can run machine learning
algorithms locally to detect motion or recognize faces before sending alerts to the
cloud.
3. Communication:
o Raspberry Pi uses Wi-Fi, Bluetooth, or Ethernet to connect to the internet or other
local devices. It can send sensor data to cloud platforms for monitoring, storage, or
advanced analytics.
o It can also serve as a gateway device, collecting data from multiple sensors and
devices, and relaying that information to cloud services.
4. Control and Automation:
o Based on sensor inputs and data analysis, Raspberry Pi controls actuators to perform
actions like turning on lights, opening doors, or sending notifications.
o Users can interact with the system remotely via web interfaces or mobile apps,
controlling devices and monitoring the system in real-time.

Raspberry Pi IoT Example Projects

1. Smart Home Automation:


o Raspberry Pi can be used to control and automate smart home devices, such as
lights, thermostats, and security systems. It can be integrated with platforms like
Home Assistant or OpenHAB to create custom smart home solutions.
2. Weather Station:
o A Raspberry Pi weather station can collect data from sensors (e.g., temperature,
humidity, wind speed) and display it on a local interface or upload it to a cloud
service for remote monitoring.
3. Security Camera System:
o Raspberry Pi can be used with camera modules to create a low-cost security camera
system. It can be programmed to detect motion, stream video, and send alerts to a
smartphone app when unusual activity is detected.
4. Industrial IoT (IIoT) Monitoring:
o In industrial applications, Raspberry Pi can be used to monitor equipment
performance, collect data from machinery, and predict failures using machine
learning models.
5. Smart Irrigation System:
o Raspberry Pi can control an irrigation system based on soil moisture data. It can
automate watering schedules and monitor soil conditions in real time.
6. Health Monitoring Systems:
o Raspberry Pi can be used to track and monitor vital signs (e.g., heart rate,
temperature) using connected sensors. Data can be sent to healthcare providers for
real-time analysis and remote monitoring.

Advantages of Using Raspberry Pi in IoT

1. High Processing Power: Raspberry Pi offers more computational capability than


microcontrollers like Arduino, allowing for advanced data processing, machine
learning, and even image recognition.
2. Versatile Connectivity: Built-in Wi-Fi, Bluetooth, and Ethernet make it easy to
connect Raspberry Pi to the internet or other devices in an IoT network.
3. Edge Computing: With its processing power, Raspberry Pi can run applications
locally, reducing the need for constant cloud communication and making it suitable
for real-time decision-making.
4. Multitasking: Raspberry Pi can run multiple applications simultaneously since it
operates as a full computer. This is useful for managing several sensors, data streams,
and communication protocols at once.
5. Extensive Software Support: Running a Linux-based operating system, Raspberry Pi
supports a wide range of software, tools, and programming languages, making it
flexible for IoT development.
6. Affordability: Raspberry Pi offers a high-performance computing platform at a low
cost, making it accessible for both hobbyists and professionals.

Challenges and Limitations:

1. Power Consumption: Compared to microcontroller platforms like Arduino,


Raspberry Pi consumes more power, which may not be ideal for battery-operated IoT
devices.
2. Complexity: While Raspberry Pi offers more features and flexibility, it also requires
a deeper understanding of software and networking, which may be challenging for
beginners.
3. Overheating: Raspberry Pi can overheat if used in resource-intensive applications for
long periods, especially in industrial environments. Cooling solutions like heat sinks
or fans may be needed.

LiteOS
LiteOS is a lightweight operating system developed by Huawei, designed specifically for IoT
and embedded devices. It is a highly scalable, real-time, and secure OS that can be used in a
wide range of applications from smart homes to industrial IoT.

Key Features:

 Lightweight: LiteOS is designed to operate on devices with constrained resources (e.g., low
memory and CPU).
 Real-Time: It supports real-time operations with low latency, which is critical in IoT systems
requiring immediate responses.
 Scalability: LiteOS can scale from tiny sensors to more powerful IoT devices, making it
versatile for various IoT ecosystems.
 Modularity: The OS is modular, meaning developers can pick and choose components based
on their project requirements.
 Low Power Consumption: It is optimized for energy-efficient devices, making it suitable for
battery-powered IoT devices.
 Networking: It supports various communication protocols such as Wi-Fi, Bluetooth, NB-IoT,
and Zigbee, enabling seamless IoT connectivity.

Applications:

 Smart cities (e.g., traffic management, energy grids)


 Industrial IoT systems (IIoT)
 Smart homes and appliances
 Wearable devices

RIoT OS (RIOT OS)


RIOT OS is an open-source operating system designed for IoT applications, specifically
catering to devices with limited resources. It supports real-time performance and a wide
variety of IoT hardware platforms, including low-power wireless devices.

Key Features:

 Modular and Lightweight: RIOT OS is designed to be highly modular, allowing developers to


use only the components necessary for their project, which reduces resource consumption.
 Multi-Threading: It supports real-time, multi-threading applications, which allows IoT
devices to handle multiple tasks simultaneously.
 Energy Efficiency: Optimized for ultra-low-power devices, making it suitable for battery-
powered IoT applications.
 Networking: RIOT supports IPv6, 6LoWPAN, RPL, CoAP, and other network protocols,
allowing it to function in large-scale IoT networks.
 Open Source: It is freely available and has a large, active developer community.

Applications:

 Wireless sensor networks


 Smart energy systems
 Industrial IoT solutions
 Smart home automation

Contiki OS
Contiki OS is a highly popular open-source operating system for the Internet of Things, particularly
known for its support of low-power, wireless communication devices. It is primarily used for small,
constrained systems like sensor networks.

Key Features:

 Low Power and Memory Footprint: Contiki is optimized for devices with low memory
(kilobytes of RAM) and processing power, which is ideal for battery-operated devices.
 6LoWPAN: It supports IPv6 over low-power wireless personal area networks (6LoWPAN),
which is crucial for enabling IoT devices to communicate over the internet.
 Protothreads: Uses lightweight protothreads, which allow efficient multitasking while using
minimal memory.
 Real-Time Processing: Supports real-time operations, although it is not a hard real-time OS.
 Networking Support: Contiki OS has built-in support for protocols like CoAP, RPL, and UDP,
making it ideal for wireless sensor networks (WSNs) and IoT applications that require reliable
communication.
 Simulators: Contiki comes with Cooja, a network simulator that allows developers to
simulate IoT networks before deploying them, making testing more efficient.

Applications:

 Wireless sensor networks


 Smart buildings and cities
 Environmental monitoring systems
 Smart healthcare solutions
 IoT in agriculture (smart farming)

TinyOS
TinyOS is a flexible, open-source operating system designed for low-power, wireless devices
in sensor networks. It is one of the earliest operating systems developed specifically for IoT
applications and is widely used in academia and research.

Key Features:

 Event-Driven Architecture: TinyOS uses an event-driven architecture rather than multi-


threading, which is suitable for highly constrained devices and improves resource efficiency.
 Lightweight: It has a small footprint and is specifically designed for devices with very limited
memory and processing power.
 Component-Based Design: TinyOS uses a component-based design, where applications are
written as a set of reusable components, improving flexibility and modularity.
 Low-Power: It is optimized for power efficiency, making it suitable for battery-operated
devices that need to run for extended periods without human intervention.
 Networking: Supports multiple networking standards, such as 802.15.4, making it suitable
for wireless sensor networks and IoT applications that require reliable communication.
 Flexible Scheduling: TinyOS has a unique scheduling system that enables efficient handling
of concurrent tasks on resource-constrained devices.

Applications:

 Environmental monitoring (e.g., forest fire detection, pollution monitoring)


 Smart grids and energy management
 Industrial sensor networks
 Medical monitoring devices
 Smart agriculture

You might also like