Unit-2 Iot Notes
Unit-2 Iot Notes
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.
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.
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.
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:
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:
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
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:
Advantages:
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.
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.
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.
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.
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.
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.
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:
Key Features:
Applications:
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:
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:
Applications: