Ch-2 Hardware For IoT
Ch-2 Hardware For IoT
Syllabus
Types of Sensors
•Temperature Sensors: Take temperatures.
•Light Sensors: Light intensity sensors: It has the function of detecting the intensity of
the light.
•Pressure Sensors: To use it to measure pressure in gases or liquids.
•Motion Sensors: Recognize motion in an established region.
Light Sensor
A digital sensor
A digital sensor is a device that measures a physical quantity (such as temperature,
pressure, light, or humidity) and then quantizes that measurement into a digital form.
In other words, it takes analog physical data and converts it into discrete digital values,
often in the form of binary code (0s and 1s).
Actuator is a device that converts the electrical signals into the physical events or
characteristics. It takes the input from the system and gives output to the environment.
For example, motors and heaters are some of the commonly used actuators.
Types of Actuators
•Linear Actuators: Utilize a linear motion to convert energy, Kinetic/pendulum.
•Rotary Actuators: This will affect the creation of rotational motion.
•Hydraulic Actuators: How does fluid power gives motion.
•Pneumatic Actuators: Function with use of compressed air.
Fig. Function of Actuator
Figure of Actuator
Wireless Sensor Network (WSN), is an infrastructure-less wireless network that is
deployed in a large number of wireless sensors in an ad-hoc manner that is used to
monitor the system, physical, or environmental conditions.
Sensor nodes are used in WSN with the onboard 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. The base Station in a WSN System is connected
through the Internet to share data. WSN can be used for processing, analysis, storage,
and mining of the data.
A Wireless Sensor Network (WSN) architecture is structured into three main layers:
•Physical Layer: This layer connects sensor nodes to the base station using technologies
like radio waves, infrared, or Bluetooth. It ensures the physical communication between
nodes and the base station.
•Data Link Layer: Responsible for establishing a reliable connection between sensor
nodes and the base station. It uses protocols such as IEEE 802.15.4 to manage data
transmission and ensure efficient communication within the network.
•Application Layer: Enables sensor nodes to communicate specific data to the base
station. It uses protocols like ZigBee to define how data is formatted, transmitted, and
received, supporting various applications such as environmental monitoring or
industrial control.
WSN Network Topologies
Wireless Sensor Networks (WSNs) can be organized into different network topologies
based on their application and network type. Here are the most common types:
•Bus Topology: In a Bus Topology, multiple nodes are connected to a single line or bus.
Data travels along this bus from one node to the next. It’s a simple layout often used in
smaller networks.
•StarTopology: Star Topology have a central node, called the master node, which
connects directly to multiple other nodes. Data flows from the master node to the
connected nodes. This topology is efficient for centralized control.
•Tree Topology: Tree Topology arrange nodes in a hierarchical structure resembling a
tree. Data is transmitted from one node to another along the branches of the tree.
•Mesh Topology: Mesh Topology feature nodes interconnected with one another,
forming a mesh-like structure. Data can travel through multiple paths from one node to
another until it reaches its destination.
Types of Wireless Sensor Networks (WSN)
A web source defines Participatory Sensing (PS) as “sensing by the individuals and
groups of people contributing sensory information to form a body of knowledge”.
How It Works
1.Data Collection: Users employ their devices to gather various types of data. This can
include environmental data (e.g., air quality, temperature), behavioral data (e.g., location,
activity levels), or subjective data (e.g., user surveys, photos).
2.Data Sharing: The collected data is often shared with a central server or platform
where it can be aggregated and analyzed. This can be done voluntarily by users who opt
into the sensing application.
3.Data Analysis: Researchers, developers, or organizations analyze the aggregated data
to gain insights, identify patterns, or address specific questions or problems.
2.2 IoT Protocol
2.UDP-Based: Unlike HTTP, which operates over TCP, CoAP runs over UDP (User
Datagram Protocol). This choice supports low overhead and faster message exchanges,
although it also means CoAP has to handle reliability and ordering on its own, which it
does using built-in mechanisms.
3. Resource-Oriented: Similar to HTTP, CoAP is resource-oriented, meaning it allows
clients to interact with resources on a server using methods like GET, POST, PUT, and
DELETE. This makes it intuitive for developers familiar with RESTful principles.
4. Multicast Support: CoAP supports multicast communication, which allows a single
message to be sent to multiple devices at once. This can be very useful in scenarios like
network-wide updates or queries.
5. Built-in Security: CoAP includes options for securing communications through DTLS
(Datagram Transport Layer Security), which provides encryption and integrity similar to
TLS used in HTTP but suited for UDP.
6. Interoperability: CoAP is designed to work well with HTTP, facilitating easier
integration with web services. For example, CoAP servers can be accessed through HTTP
proxies and vice versa.
• It has been standardized by the IETF, over time XMPP has become an old protocol
because it cannot provide services required for certain new data applications that
arise.
• Due to insufficient support, Google has ceased to maintain support for the standards
of XMPP. Nevertheless, XMPP recently considered as a good protocol of
communication in accordance with the internet of things, as it works with short
messages and low response time. For this reason, XMPP is among the protocols used
for IoT communication and messaging.
• As its name suggests, XMPP is extensible, offering the possibility of adding number of
extensions to realize various applications (VOIP, file transfer …). These extensions
allow it to support the request/response architecture as well as publish/subscribe.
• XMPP is a short form for Extensible Messaging Presence Protocol. Its protocol for
streaming XML elements over a network in order to exchange messages and presence
information in close to real time. This protocol is mostly used by instance messaging
application like WhatsApp.
X: Means eXtensible. XMPP is an open source project which can be changed or extended
according to the need.
M: Means XMPP is designed for sending messages in real time.
P: It determines whether you are online/offline/busy . It indicates the state.
P: XMPP is a protocol, i.e a set of standards that allow systems to communicate with each
other.
Embedded Platforms for IoT
Embedded computing Basics (Block Diagram)
IDE consists of the device APIs, libraries, compilers, RTOS, simulator, editor, assembler,
debugger, emulators, logic analyzer, application codes’ burner for flash, EPROM and
EEPROM and other software components for integrated development of a system. IDE
may be open source. For example, Arduino has open source IDE from the Arduino
website.
Simulator : Simulator is software that enables development on the computer without any
hardware, and then prototyping hardware can be connected for embedding the software
and further tests
There are two main types of embedded processors: Ordinary microprocessors and
Microcontrollers. Embedded processors are used for those systems which do not require
the processing power of standard devices such as desktops, laptops or workstations.
Processor is the heart of an embedded system. It is the basic unit that takes inputs and
produces an output after processing the data. For an embedded system designer, it is
necessary to have the knowledge of both microprocessors and microcontrollers
A processor has two essential units:
1. Program Flow Control Unit (C): The CU includes a fetch unit for fetching
instructions from the memory. The EU has circuits that implement the instructions
pertaining to data transfer operation and data conversion from one form to another.
2. Execution Unit (EU): The EU includes the Arithmetic Logical Unit (ALU) and also
the circuits that execute instructions for a program control task such as interrupt, or
jump to another set of instructions.
Types of Processors
1. General Purpose Processor (GPP): 2. Application Specific System Processor
Microprocessor (ASSP)
Microcontroller 3. Application Specific Instruction
A Embedded Processor Processors (ASIPs)
Digital Signal Processor 4. GPP core(s) or ASIP core(s) on either an
Media Processor Application Specific Integrated Circuit
(ASIC) or a Very Large Scale Integration
(VLSI) circuit
Microprocessor: A microprocessor is a single VLSI chip having a CPU. In addition, it
may also have other units such as coaches, floating point processing arithmetic units and
pipelining units that help in faster processing of instructions. Earlier generation
microprocessors' fetch-and-execute cycle was guided by a clock frequency of order of ~1
MHz. Processors now operate at a clock frequency of 2GHz.
Key Features:
1. Microcontroller: ATmega328P, 16 MHz clock speed
2. Digital I/O Pins: 14 digital pins (numbered 0 to 13), 6 of these can be used as PWM
outputs
3. Analog Input Pins: 6 analog input pins (numbered A0 to A5)
4. Power: USB connection (for power and programming), DC power jack (7-12V),
Regulated 5V and 3.3V outputs
5. Communication:
1 UART (hardware serial port) for serial communication
1 I2C and 1 SPI bus for communication with other devices
6. Memory:
32 KB of flash memory for storing code (of which 0.5 KB is used by the bootloader)
2 KB of SRAM (static RAM)
1 KB of EEPROM (electrically erasable programmable read-only memory)
7. USB Interface: Used for programming the board and for serial communication
between the board and a computer.
8. LED Indicators: A built-in LED on pin 13 that can be used for testing and debugging.
Physical Layout:
Headers: The board has rows of headers where you can connect wires, sensors,
actuators, and other components.
Reset Button: Allows you to manually reset the microcontroller.
Common Uses:
Prototyping: The Arduino Uno is often used for rapid prototyping of electronic
projects.
Learning: It's a great tool for beginners to learn about microcontrollers,
programming, and electronics.
Projects: It can be used in a variety of projects, from simple LED blinkers to
more complex applications like robotics, home automation, and data logging.
Programming:
•IDE: Code is written in the Arduino IDE, which is a user-friendly development
environment.
•Sketches: The code is referred to as a "sketch" and is typically written in C/C++.
The Arduino Uno is valued for its simplicity, ease of use, and robust community support,
making it an excellent starting point for both beginners and experienced makers.
Arduino UNO Boards
Arduino Hardware
Arduino UNO connection to PC: USB cable having Type-A on one side and Type-B on
other side is used for connecting Arduino board with PC/Laptop.
Raspberry Pi
The original device had a single-core Processor speed of device ranges from 700 MHz to
1.2 GHz and a memory range from 256 MB to 1 GBRAM.
To store the operating system and program memory Secure Digital (SD) cards are used.
Raspbian OS which is a Linux operating system is recommended OS by Raspberry Pi
Foundation. Some other third party operating systems like RISC OS Pi. Diet Pi, Kali,
Linux can also be run on Raspberry Pi.
Uses: It also provides a set of general purpose input/output pins allowing you to
control electronic components for physical computing and explore the internet of things
(IoT).
Features of Raspberry Pi
1. Affordability – Low cost
2. Versatility – Can run can run on Windows, Ubuntu
3. Computing Power –Quad core CPU up to 8 gb RAM.
4. Connectivity- Built in Ethernet and WiFi
5. Security – Security features are continuously improved.
6. Compatibility -Raspberry Piboards are compatible with a wide range of IoT sensors,
actuators, and accessories.
Thank you