EIOT NOTES
EIOT NOTES
Regulation 2021
III Year – VI Semester
CS3691- Embedded Systems and IOT
SYLLABUS
Course Code L T P C
CS3691 EMBEDDED SYSTEMS AND IOT
3 0 2 4
COURSE OBJECTIVES:
COURSE OUTCOMES:
CO1: Explain the architecture of embedded processors.
CO2: Write embedded C programs.
CO3: Design simple embedded applications.
CO4: Compare the communication models in IOT
CO5: Design IoT applications using Arduino/Raspberry Pi /open platform.
REFERENCES
UNIT – 1
What is a Microprocessor?
Computer's Central Processing Unit (CPU) built on a single Integrated Circuit (IC) is called
a microprocessor.
A digital computer with one microprocessor which acts as a CPU is called microcomputer.
It is a programmable, multipurpose, clock -driven, register-based electronic device that reads binary
instructions from a storage device called memory, accepts binary data as input and processes data
according to those instructions and provides results as output.
The microprocessor contains millions of tiny components like transistors, registers, and diodes that
work together.
Evolution of Microprocessors
We can categorize the microprocessor according to the generations or according to the size of the
microprocessor:
It was a processor on a single chip. It could perform simple arithmetic and logical operations such as
addition, subtraction, Boolean OR and Boolean AND.
I had a control unit capable of performing control functions like fetching an instruction from storage
memory, decoding it, and then generating control pulses to execute it.
The second generation microprocessors were introduced in 1973 again by Intel. It was a first 8
- bit microprocessor which could perform arithmetic and logic operations on 8-bit words. It was Intel
8008, and another improved version was Intel 8088.
Other improved 64-bit processors are Celeron, Dual, Quad, Octa Core processors.
Instruction Set - The group of commands that the microprocessor can understand is called Instruction
set. It is an interface between hardware and software.
Bus - Set of conductors intended to transmit data, address or control information to different elements
in a microprocessor. A microprocessor will have three types of buses, i.e., data bus, address bus, and
control bus.
IPC (Instructions Per Cycle) - It is a measure of how many instructions a CPU is capable of executing
in a single clock.
Clock Speed - It is the number of operations per second the processor can perform. It can be expressed
in megahertz (MHz) or gigahertz (GHz). It is also called the Clock Rate.
Word Length - The number of bits the processor can process at a time is called the word length of the
processor. 8-bit Microprocessor may process 8 -bit data at a time. The range of word length is from 4
bits to 64 bits depending upon the type of the microcomputer.
Data Types - The microprocessor supports multiple data type formats like binary, ASCII, signed and
unsigned numbers.
Working of Microprocessor
The microprocessor follows a sequence to execute the instruction: Fetch, Decode, and then Execute.
Initially, the instructions are stored in the storage memory of the computer in sequential order. The
microprocessor fetches those instructions from the stored area (memory), then decodes it and executes
those instructions till STOP instruction is met. Then, it sends the result in binary form to the output
port. Between these processes, the register stores the temporary data and ALU (Arithmetic and Logic
Unit) performs the computing functions.
MICROCONTROLLERS – Overview
In 1981, Intel introduced an 8-bit microcontroller called the 8051. It was referred as system on a
chip because it had 128 bytes of RAM, 4K byte of on-chip ROM, two timers, one serial port, and 4
ports (8-bit wide), all on a single chip.
What is a Microcontroller?
o A microcontroller is a small and low-cost microcomputer, which is designed to perform
the specific tasks of embedded systems like displaying microwave’s information,
receiving remote signals, etc.
o The general microcontroller consists of the processor, the memory (RAM, ROM,
EPROM), Serial ports, peripherals (timers, counters), etc.
The following table highlights the differences between a microprocessor and a microcontroller –
Microcontroller Microprocessor
Microcontrollers are used to execute a single task Microprocessors are used for big applications.
within an application.
Its designing and hardware cost is low. Its designing and hardware cost is high.
It is built with CMOS technology, which requires Its power consumption is high because it has to
less power to operate. control the entire system.
It consists of CPU, RAM, ROM, I/O ports. It doesn’t consist of RAM, ROM, I/O ports. It
uses its pins to interface to peripheral devices.
Features of 8051:
4KB on-chip program memory (ROM/EPROM).
128 bytes on-chip data memory.
Four register banks.
64KB each program and external RAM addressability.
One microsecond instruction cycle with 12MHz crystal.
32 bidirectional I/O lines organized as four 8-bit ports.
Multiple modes, high-speed programmable serial port (UART).
16-bit Timers/Counters.
Direct byte and bit addressability.
The applications of 8051 microcontroller involves in 8051 based projects. The list of 8051 projects is
listed below.
Arduino Managed High Sensitive LDR based Power Saver for Street Light Control System
The Temperature Humidity Monitoring System of Soil Based on Wireless Sensor Networks
using Arduino
RFID based Electronic Passport System for Easy Governance using Arduino
Arduino based RFID Sensed Device Access
Arduino based DC Motor Speed Control
Arduino Based Line Following Robot
Zigbee based Automatic Meter Reading System
To make the data process better than 8-bit, then it must be separated into eight different bit parts. It
includes several registers however general-purpose type registers are frequently available to
programmers. There are classified into two types like General purpose & Special purpose. So, most of
the general-purpose registers are listed below.
can be used as a base register within not direct jumps, lookup table instructions & external data
transfer.
Program counter or PC is a 16-bit register used to store the next instruction’s address to be
performed
These registers are 8-bits other than program counter & data pointer registers.
The term PSW stands for Program status word and it is one kind of register in the microcontroller. It is
also called a flag register, used to demonstrate the position of arithmetic logic instructions such as zero
carry bit, carry bit, etc. PSW or flag register is an 8-bit register where 6-bits are used. This register
includes 8-flags where these flags are known as conditional flags. These flags will perform instruction
simply if the condition is satisfied.
These conditional flags are overflow, parity, auxiliary carry & carry. The Program status word registers
bit numbers like 3 & 4 are used to alter the bank registers whereas 1 & 5 are not used but they can be
used by the programmer for executing a specific task.
Stack Pointer
In the 8051 microcontrollers, the stack is 8-bit wide and it can hold data from 00 – FFH. The stack
pointer can be used through the CPU to allow the stack. This microcontroller includes an 8-bit stack
pointer that means it can allow values from 00H to FFH. Once it is activated, then the stack pointer
includes the 07 value.
Ports 0 to 3
P0, P1, P2, and P3 are the SFR latches of Ports 0, 1, 2, and 3, respectively. Writing a one to a
bit of a port SFR (P0, P1, P2, or P3) causes the corresponding port output pin to switch high. Writing
a zero causes the port output pin to switch low. When used as an input, the external state of a port pin
will be held in the port SFR (i.e., if the external state of a pin is low, the corresponding port SFR bit
will contain a 0; if it is high, the bit will contain a 1).
The Serial Buffer is actually two separate registers, a transmit buffer and a receive buffer.
When data is moved to SBUF, it goes to the transmit buffer and is held for serial transmission.
(Moving a byte to SBUF is what initiates the transmission.) When data is moved from SBUF, it comes
from the receive buffer.
Register pairs (TH0, TL0), and (TH1, TL1) are the 16-bit Counting registers for
Timer/Counters 0 and 1, respectively.
Special Function Registers IP, IE, TMOD, TCON, SCON, and PCON contain control and
status bits for the interrupt system, the Timer/Counters, and the serial port.
The 8051 has four dedicated bus control signals. It is a control signal that enables external
program (code) memory. It usually connects to an EPROM's Output Enable (OE) pin to permit
reading of program bytes.
The PSEN signal pulses low during the fetch stage of an instruction. When executing a
program from internal ROM (8051/8052), PSEN remains in the inactive (high) state.
The 8051 similarly uses ALE for demultiplexing the address and data bus. When Port 0 is used
in its alternate mode—as the data bus and the low-byte of the address bus—ALE is the signal that
latches the address into an external register during the first half of a memory cycle.
EA (External Access)
The EA input signal is generally tied high (+5 V) or low (ground). If high, the 8051 executes
programs from internal ROM when executing in the lower 4K of memory. If low, programs execute
from external memory only (and PSEN pulses low accordingly).
RST (Reset)
The RST input is the master reset for the 8051. When this signal is brought high for at least
two machinecycles, the 8051 internal registers are loaded with appropriate values for an orderly system
start- up.
Timers/Counters
8051 microcontroller has two 16 bit timers and counters. These counters are again divided into a 8 bit
register. The timers are used for measurement of intervals to determine the pulse width of pulses.
The 8051 features an on-chip oscillator. The nominal crystal frequency is 12 MHz for most ICs
in the MCS-51™ family.
Memory Organization
Most microprocessors implement a shared memory space for data and programs. This is
reasonable, since programs are usually stored on a disk and loaded into RAM for execution; thus both
the data and programs reside in the system RAM. Microcontrollers have limited memory, and there is
no disk drive or disk operating system. The control program must reside in. For this reason, the 8051
implements a separate memory space for programs (code) and data. Both the code and data may be
internal; however, both expand using external components to a maximum of 64K code memory and
64K data memory.
The internal memory consists of on-chip ROM and on-chip data RAM. The on-chip RAM
contains a rich arrangement of general-purpose storage, bit-addressable storage, register banks,
and special function registers.
ADDRESSING MODES
The way in which an operand is given to an instruction is known as addressing modes in 8051
microcontroller.
1. Immediate Addressing
Data is immediately available in the instruction.
For example -
ADD A, #77; Adds 77 (decimal) to A and stores in A
ADD A, #4DH; Adds 4D (hexadecimal) to A and stores in A
MOV DPTR, #1000H; Moves 1000 (hexadecimal) to data pointer
2. Register Addressing
This way of addressing accesses the bytes in the current register bank. Data is available in the
register specified in the instruction. The register bank is decided by 2 bits of Processor Status
Word (PSW).
For example-
ADD A, R0; Adds content of R0 to A and stores in A
3. Direct Addressing
The address of the data is available in the instruction.
For example -
MOV A, 088H; Moves content of SFR TCON (address 088H)to A
For example -
MOV A, @R0 moves content of address pointed by R0 to A
Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any other functions. It is
internally pulled up, bi-directional I/O port.
Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial values.
Pins 10 to 17 − These pins are known as Port 3. This port serves some functions like interrupts,
timer input, control signals, serial communication signals RxD and TxD, etc.
Pins 18 & 19 − These pins are used for interfacing an external crystal to get the system clock.
Pin 20 − This pin provides the power supply to the circuit.
Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order address bus
signals are also multiplexed using this port.
Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read a signal
from the external program memory.
Pin 30 − This is EA pin which stands for External Access input. It is used to enable/disable the
external memory interfacing.
Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to demultiplex the
address-data signal of port.
Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order address and
data bus signals are multiplexed using this port.
Pin 40 − This pin is used to provide power supply to the circuit.
8051 microcontrollers have 4 I/O ports each of 8-bit, which can be configured as input or output.
Hence, total 32 input/output pins allow the microcontroller to be connected with the peripheral devices.
Pin configuration, i.e. the pin can be configured as 1 for input and 0 for output as per the logic
state.
o Input/Output (I/O) pin − All the circuits within the microcontroller must be connected
to one of its pins except P0 port because it does not have pull-up resistors built-in.
o Input pin − Logic 1 is applied to a bit of the P register. The output FE transistor is turned
off and the other pin remains connected to the power supply voltage over a pull-up
resistor of high resistance.
Port 0 − The P0 (zero) port is characterized by two functions −
o When the external memory is used then the lower address byte (addresses A0A7) is
applied on it, else all bits of this port are configured as input/output.
o When P0 port is configured as an output then other ports consisting of pins with built-in
pull-up resistor connected by its end to 5V power supply, the pins of this port have this
resistor left out.
Input Configuration
If any pin of this port is configured as an input, then it acts as if it ―floats‖, i.e. the input has
unlimited input resistance and in-determined potential.
Output Configuration
When the pin is configured as an output, then it acts as an ―open drain‖. By applying logic 0 to a
port bit, the appropriate pin will be connected to ground (0V), and applying logic 1, the external output
will keep on ―floating‖.
In order to apply logic 1 (5V) on this output pin, it is necessary to build an external pull up
resistor.
Port 1
P1 is a true I/O port as it doesn’t have any alternative functions as in P0, but this port can be
configured as general I/O only. It has a built-in pull-up resistor and is completely compatible with TTL
circuits.
Port 2
P2 is similar to P0 when the external memory is used. Pins of this port occupy addresses
intended for the external memory chip. This port can be used for higher address byte with addresses
A8-A15. When no memory is added then this port can be used as a general input/output port similar to
Port 1.
Port 3
In this port, functions are similar to other ports except that the logic 1 must be applied to
appropriate bit of the P3 register.
Instruction Set
8051 Microcontroller have set of instruction to perform different operations. There arefive group
of instruction which are listed below.
Arithmetic Instructions
Logic Instructions
Data Transfer Instructions
Branch Instructions
Bit-oriented Instructions
Operation : MOV
Syntax : MOV destination, source
Description: MOV copies the value of source into destination. The value of source is not affected.
Both destination and source must be in Internal RAM. No flags are affected unless the instruction is
moving the value of a bit into the carry bit in which case the carry bit is affected or unless the
instruction is moving a value into the PSW register (which contains all the program flags).
Operation : MOVC
Function : Move Code Byte to Accumulator
Syntax : MOVC A,@A+register
Description: MOVC moves a byte from Code Memory into the Accumulator. The Code Memory
address from which the byte will be moved is calculated by summing the value of the Accumulator
with either DPTR or the Program Counter (PC). In the case of the Program Counter, PC is first
Operation : MOVX
Function : Move Data To/From External Memory (XRAM)
Syntax : MOVX operand1,operand2
Description: MOVX moves a byte to or from External Memory into or from theAccumulator.
If operand1 is @DPTR, the Accumulator is moved to the 16-bit External Memory address indicated
by DPTR. This instruction uses both P0 (port 0) and P2 (port 2) to output the 16-bit address and
data. If operand2 is DPTR then the byte is moved from External Memory into the Accumulator.
If operand1 is @R0 or @R1, the Accumulator is moved to the 8-bit External Memory address
indicated by the specified Register. This instruction uses only P0 (port 0) to output the 8-bit address
and data. P2 (port 2) is not affected. If operand2 is @R0 or @R1 then the byte is moved from
External Memory into the Accumulator.
Operation : SWAP
Function : Swap Accumulator Nibbles
Syntax : SWAP A
Description: SWAP swaps bits 0-3 of the Accumulator with bits 4-7 of theAccumulator. This
instruction is identical to executing "RR A" or "RL A" four times.
Operation : XCH
Function : Exchange Bytes
Syntax : XCH A,register
Description: Exchanges the value of the Accumulator with the value contained inregister.
Ex: XCH A, R1
Operation : PUSH
Function : Push Value Onto Stack
Syntax : PUSH
Description: PUSH "pushes" the value of the specified iram addr onto the stack. PUSH first
increments the value of the Stack Pointer by 1, then takes the value stored in iram addr and stores it
in Internal RAM at the location pointed to by the incremented Stack Pointer.
Operation : POP
Function : Pop Value From Stack
Syntax : POP
Description: POP "pops" the last value placed on the stack into the iram addr specified. In other
words, POP will load iram addr with the value of the InternalRAM address pointed to by the
current Stack Pointer. The stack pointer is then decremented by 1.
Arithmetic Instructions
Operation: ADD, ADDC
Function: Add Accumulator, Add Accumulator With Carry
Description: Description: ADD and ADDC both add the value operand to the value of the
Accumulator, leaving the resulting value in the Accumulator. The value operand is not affected.
ADD and ADDC function identically except that ADDC adds the value of operand as well as the
value of the Carry flag whereas ADD does not add the Carry flag to the result.
Operation: SUBB
Function: Subtract from Accumulator With Borrow
Description: SUBB subtract the value of operand from the value of the Accumulator, leaving the
resulting value in the Accumulator. The value operand is not affected.
The Carry Bit (C) is set if a borrow was required for bit 7, otherwise it is cleared. In other words, if
the unsigned value being subtracted is greater than the Accumulatorthe Carry Flag is set.
Operation : MUL
Function : Multiply Accumulator by B
Syntax : MUL AB
Description: Multiples the unsigned value of the Accumulator by the unsigned value of the "B"
register. The least significant byte of the result is placed in the Accumulator and the most-
significant-byte is placed in the "B" register.
Operation: DIV
Function: Divide Accumulator by B
Syntax: DIV AB
Description: Divides the unsigned value of the Accumulator by the unsigned value of the "B"
register. The resulting quotient is placed in the Accumulator and the remainder is placed in the "B"
register.
Operation: INC
Function: Increment Register
Syntax: INC register
Description: INC increments the value of register by 1. If the initial value of register is 255 (0xFF
Hex), incrementing the value will cause it to reset to 0. Note: The Carry Flag is NOT set when the
value "rolls over" from 255 to 0.
In the case of "INC DPTR", the value two-byte unsigned integer value of DPTR is incremented. If
the initial value of DPTR is 65535 (0xFFFF Hex), incrementing the value will cause it to reset to 0.
Again, the Carry Flag is NOT set when the value of DPTR "rolls over" from 65535 to 0.
Operation : DEC
Function : Decrement Register
Syntax : DEC register
Description: DEC decrements the value of register by 1. If the initial value of register is 0,
decrementing the value will cause it to reset to 255 (0xFF Hex). Note: The Carry Flag is NOT set
when the value "rolls over" from 0 to 255.
Logical Instructions
Operation : ORL
Function : Bitwise OR
Syntax : ORL operand1,operand2
Description: ORL does a bitwise "OR" operation between operand1 and operand2, leaving the
resulting value in operand1. The value of operand2 is not affected. A logical "OR" compares the
bits of each operand and sets the corresponding bit in the resulting byte if the bit was set in either of
the original operands, otherwise the resulting bit is cleared.
Operation : ANL
Function : Bitwise AND
Syntax : ANL operand1, operand2
Description: ANL does a bitwise "AND" operation between operand1 and operand2, leaving the
resulting value in operand1. The value of operand2 is not affected. A logical "AND" compares the
bits of each operand and sets the corresponding bit in theresulting byte only if the bit was set in both
of the original operands, otherwise the resulting bit is cleared.
Operation : XRL
Function : Bitwise Exclusive OR
Syntax : XRL operand1,operand2
Description: XRL does a bitwise "EXCLUSIVE OR" operation between operand1 and operand2,
leaving the resulting value in operand1. The value of operand2 is not affected. A logical
"EXCLUSIVE OR" compares the bits of each operand and sets thecorresponding bit in the resulting
byte if the bit was set in either (but not both) of the original operands, otherwise the bit is cleared.
Operation : CPL
Function : Complement Register
Syntax : CPL operand
Description: CPL complements operand, leaving the result in operand. If operand is a single bit
then the state of the bit will be reversed. If operand is the Accumulator then all the bits in the
Accumulator will be reversed. This can be thought of as "Accumulator Logical Exclusive OR 255" or
as "255-Accumulator." If the operand refers to a bit of an output Port, the value that will be
complemented is based on the last value written to that bit, not the last value read from it.
Operation : CLR
Function : Clear Register
Syntax : CLR register
Description: CLR clears (sets to 0) all the bit(s) of the indicated register. If the register is a
bit (including the carry bit), only the specified bit is affected. Clearing the Accumulator sets the
Accumulator's value to 0.
Operation : RL
Function : Rotate Accumulator Left
Syntax : RL A
Description: Shifts the bits of the Accumulator to the left. The left-most bit (bit 7) of the
Accumulator is loaded into bit 0.
Operation : RR
Function : Rotate Accumulator Right
Syntax : RR A
Description: Shifts the bits of the Accumulator to the right. The right-most bit (bit 0) of the
Accumulator is loaded into bit 7.
Operation : RLC
Function : Rotate Accumulator Left Through Carry
Syntax : RLC A
Description: Shifts the bits of the Accumulator to the left. The left-most bit (bit 7) of the
Accumulator is loaded into the Carry Flag, and the original Carry Flag is loaded into bit 0 of the
Accumulator. This function can be used to quickly multiply a byte by 2.
Operation : RRC
Function : Rotate Accumulator Right Through Carry
Syntax : RRC A
Description: Shifts the bits of the Accumulator to the right. The right-most bit (bit 0) of the
Accumulator is loaded into the Carry Flag, and the original Carry Flag is loaded into bit 7. This
function can be used to quickly divide a byte by 2.
Branching Instructions
Operation : JMP
Function : Jump to Data Pointer + Accumulator
Syntax : JMP @A+DPTR
Description: JMP jumps unconditionally to the address represented by the sum of thevalue of
DPTR and the value of the Accumulator.
Operation : JC
Function : Jump if Carry Set
Syntax : JC reladdr
Description: JC will branch to the address indicated by reladdr if the Carry Bit is set. If the Carry
Bit is not set program execution continues with the instruction following the JC instruction.
Operation : JNC
Function : Jump if Carry Not Set
Syntax : JNC reladdr
Description: JNC branches to the address indicated by reladdr if the carry bit is not set. If the carry
bit is set program execution continues with the instruction following the JNB instruction.
Operation : JZ
Function : Jump if Accumulator Zero
Syntax : JNZ reladdr
Description: JZ branches to the address indicated by reladdr if the Accumulator contains the value
0. If the value of the Accumulator is non-zero program execution continues with the instruction
following the JNZ instruction.
Operation : JNZ
Function : Jump if Accumulator Not Zero
Syntax : JNZ reladdr
Description: JNZ will branch to the address indicated by reladdr if the Accumulator contains any
value except 0. If the value of the Accumulator is zero program execution continues with the
instruction following the JNZ instruction.
Operation : LCALL
Function : Long Call
Syntax : LCALL code addr
Description: LCALL calls a program subroutine. LCALL increments the program counter by 3 (to
point to the instruction following LCALL) and pushes that value ontothe stack (low byte first, high
byte second). The Program Counter is then set to the 16-bit value which follows the LCALL opcode,
causing program execution to continue atthat address.
Operation : ACALL
Function : Absolute Call Within 2K Block
Syntax : ACALL code address
Description: ACALL unconditionally calls a subroutine at the indicated code address. ACALL
pushes the address of the instruction that follows ACALL onto the stack, least-significant-byte first,
most-significant-byte second. The Program Counter is then updated so that program execution
continues at the indicated address.
Operation : RET
Function : Return From Subroutine
Syntax : RET
Description: RET is used to return from a subroutine previously called by LCALL or ACALL.
Program execution continues at the address that is calculated by popping thetopmost 2 bytes off the
stack. The most-significant-byte is popped off the stack first, followed by the least-significant-byte.
Bit-Wise Instructions
Operation : JB
Function : Jump if Bit Set
Syntax : JB bit addr, reladdr
Description: JB branches to the address indicated by reladdr if the bit indicated bybit addr is set.
If the bit is not set program execution continues with the instruction following the JB instruction.
Operation : JNB
Function : Jump if Bit Not Set
Syntax : JNB bit addr,reladdr
Description: JNB will branch to the address indicated by reladdress if the indicated bit is not set. If
the bit is set program execution continues with the instructionfollowing the JNB instruction.
INTERRUPTS
An interrupt is an internal or external event that interrupts the microcontroller to
inform it that a device needs its service. Whenever any device needs its service, the device
notifies the microcontroller by sending it as interrupt signal. Upon receiving an interrupt
signal, the microcontroller interrupts whatever it is doing and serves the device. The program
which is associated with the interrupt is called interrupt Service Routine (ISR). The
microcontroller can serve many devices based on the priority assigned to it.
Execution of an Interrupt
In order to use any interrupt, the following steps must be taken.
It finishes the instruction it is executing and saves the address of the next instruction
(PC) on the stack.
It also saves the current status of all the interrupts internally.
It jumps to a fixed location in memory called the interrupt vector or table that holds the
address of the Interrupt Service Routine (ISR).
The microcontroller gets the address of the ISR from the interrupt vector table and
jumps to it. It starts to execute the interrupt service subroutine until it reaches the last
instruction of the subroutine which is RET 1.
Upon executing RET 1 instruction, the microcontroller returns to the place where it was
interrupted. First it gets the program counter (PC) address from the stack by popping the
top two byes of the stack into the PC. Then it starts to execute from that address.
Interrupt Structure
Interrupts in 8051
Five interrupts are provided in the 805l.
Three of these a regenerated by internal operations: Timer Flag 1 & 0, and the serial
port interrupt (RI or TI).
Two interrupts are triggered by external signals provided by circuitry that is connected
to pin
It jumps to a fixed location in memory called the interrupt vector or table that holds the
address of the Interrupt Service Routine (ISR).
The microcontroller gets the address of the ISR from the interrupt vector table and
jumps to it. It starts to execute the interrupt service subroutine until it reaches the last
instruction of the subroutine which is RET 1.
Upon executing RET 1 instruction, the microcontroller returns to the place where it was
interrupted. First it gets the program counter (PC) address from the stack by popping the
top two byes of the stack into the PC. Then it starts to execute from that address.
Vector
Types Interrupt
Address
Interrupt Vector
Timer flag interrupts
When a timer / counter overflows, the corresponding timer flag TF0 or TFI
(location: 000B H or 001B H) is set to l.
flag is cleared to 0 when the resulting interrupt generates aprogram call to the appropriate
timer subroutine in memory.
External interrupts
The external hardware interrupts INT0 and INT1 are located on pins P3.2 and P3.3.
Inputs on these pins can set the interrupt flags IE0 and IE1 in the TCON register to 1 by level
triggering or edge-triggering.
Fig. Shows the activation of INT0 and INT1
If EA = 0, no interrupt will be responded to, even if the associated bit in the EI registeris
high.
IE Register
1. IE0
2. TF0
3. IE1
4. TF1
5. RI/TI
The bit addressable IP register is shown inFig.9. If the bit is 0, the corresponding interrupts
has a lower priority, otherwise higher priority.
Parallel I /O Ports :
The 8051 microcontroller has four parallel I/O ports , each of 8-bits .So, it provides the user
32 I/O lines for connecting the microcontroller to the peripherals. The four ports are P0 (Port 0),
P1(Port1) ,P2(Port 2) and P3 (Port3). Upon reset all the ports are output ports. In order to make them
input, all the ports must be set i.e a high bit mustbe sent to all the port pins. This is normally done by
the instruction ―SETB‖.
Ex: MOV A,#0FFH ; A = FF
MOV P0,A ; make P0 an input port
PORT 0:
Port 0 is an 8-bit I/O port with dual purpose. If external memory is used, these port pins are
used for the lower address byte address/data (AD0-AD7), otherwise all bitsof the port are either input
or output.. Unlike other ports, Port 0 is not provided with pull- up resistors internally ,so for PORT0
pull-up resistors of nearly 10k are to be connected externally as shown.
PORT 1:
Port 1 occupies a total of 8 pins (pins 1 through 8). It has no dual application and acts only as
input or output port. In contrast to port 0, this port does not need any pull-up resistors since pull-up
resistors connected internally. Upon reset, Port 1 is configured as an output port. To configure it as an
input port, port bits must be set i.e a high bit must
be sent to all the port pins. This is normally done by the instruction ―SETB‖.
Ex: MOV A, #0FFH; A=FF HEX
MOV P1, A; make P1 an input port by writing 1’s to all of its pins
PORT 2:
Port 2 is also an eight-bit parallel port. (pins 21- 28). It can be used as input or output port. As
this port is provided with internal pull-up resistors it does not need any external pull-up resistors.
Upon reset, Port 2 is configured as an output port. If the port isto be used as input port, all the port bits
must be made high by sending FF to the port. For
Ex: MOV A, #0FFH ; A=FF hex
MOV P2, A ; make P2 an input port by writing all 1’s to it
other words, when 8031is connected to external memory, Port 2 is used for the upper 8 bits of the 16-
bit address,and it cannot be used for I/O operations.
PORT 3:
Port3 is also an 8-bit parallel port with dual function. (pins 10 to 17). The port pins can be used
for I/O operations as well as for control operations. The details of these additional operations are
given below in the table. Port 3 also do not need any externalpull-up resistors as they are provided
internally similar to the case of Port2 & Port 1. Upon reset port 3 is configured as an output port. If
the port is to be used as input port, all the port bits must be made high by sending FF to the port.
2 P3.1 11 TxD
3 P3.2 12
4 P3.3 13
5 P3.4 14 T0
6 P3.5 15 T1
7 P3.6 16
8 P3.7 17
Serial communication
Serial communication uses only one or two data lines to transfer data and is generally used for
long distance communication. In serial communication the data is sentas one bit at a time in a timed
sequence on a single wire. Serial Communication takes place in two methods, Asynchronous data
Transfer and Synchronous Data Transfer.
After the Start Bit, the individual bits of the word of data are sent. Here each bit inthe word is
transmitted for exactly the same amount of time as all of the other bits. Whenthe entire data word has
been sent, the transmitter may add a Parity Bit that the transmitter generates. The Parity bit may be used
by the receiver to perform simple error checking. Then at least one Stop Bit is sent by the transmitter.
If the Stop Bit does not appear when it is supposed to, the UART considers the entire word to be
corrupted and will report aFraming Error.
Baud rate is a measurement of transmission speed in asynchronous communication, it
represents the number of bits/sec that are actually being sent over the serial link. The Baud count
includes the overhead bits Start, Stop and Parity that are generated by the sending UART and
removed by the receiving UART.
1. DTE (Data Terminal Equipment). Examples of DTE are computers, printers & terminals.
2. DCE (Data Communication Equipment). Example of DCE is modems.
1 Data is transmitted bit after the bit ina Data is transmitted simultaneously
single line through group of lines(Bus)
PIPELINING
To improve the performance of a processor we have two options: 1) Improve the
hardware by introducing faster circuits. 2) Arrange the hardware such that more than one
operation can be performed at the same time. Since there is a limit on the speed of hardware
and the cost of faster circuits is quite high, we have to adopt the 2nd option.
In a pipelined processor, a pipeline has two ends, the input end and the output end.
Between these ends, there are multiple stages/segments such that the output of one stage
is connected to the input of the next stage and each stage performs a specific operation.
Interface registers are used to hold the intermediate output between two stages. These
interface registers are also called latch or buffer.
All the stages in the pipeline along with the interface registers are controlled by a
common clock.
Stage / Cycle 1 2 3 4 5 6 7 8
S1 I1 I2
S2 I1 I2
S3 I1 I2
S4 I1 I2
Overlapped execution:
Stage / Cycle 1 2 3 4 5
S1 I1 I2
S2 I1 I2
S3 I1 I2
S4 I1 I2
Total time = 5 Cycle Pipeline Stages RISC processor has 5 stage instruction pipeline to
execute all the instructions in the RISC instruction set. Following are the 5 stages of the
RISC pipeline with their respective operations:
Stage 1 (Instruction Fetch) In this stage the CPU reads instructions from the address in
the memory whose value is present in the program counter.
Stage 2 (Instruction Decode) In this stage, instruction is decoded and the register file is
accessed to get the values from the registers used in the instruction.
Stage 3 (Instruction Execute) In this stage, ALU operations are performed.
Stage 4 (Memory Access) In this stage, memory operands are read and written from/to
the memory that is present in the instruction.
Stage 5 (Write Back) In this stage, computed/fetched value is written back to the register
present in the instructions.
Port 0 is used as multiplexed data & address lines. It gives lower order (A7-A0) 8bit address in
initial T cycle & higher order (A8-A15) used as data bus.
8 bit address is latched using external latch & ALE signal from 8051.
Port 2 provides higher order (A15-A8) 8 bit address.
PSEN is used to activate the output enable signal of external ROM/EPROM.
Figure shows how to connect or interface external RAM (data memory) to 8051.
Note:RD & WR signals: generally P3.6 & P3.7 pins of port 3 are used to generate memory read and
memory write signals. Remaining pins of port 3 i.e. P3.0-P3.5 can be used for other functions.
Solved Examples:
Example 1: Design a μController system using 8051 to Interface the external RAM of size 16k x 8.
Solution: Given, Memory size: 16k
Which means, we require 2n=16k: n address lines
Addr A A A A A A A A A A A A A A A A Hex
ess 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Addr
Start 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000
H
End 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3FF
FH
Addr A A A A A A A A A A A A A A A A Hex
ess 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Addr
Start 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000
H
End 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0FF
FH
Solution:
Addr A A A A A A A A A A A A A A A A Hex
ess 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Addr
Start 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000
H
End 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3FF
FH
Addr A A A A A A A A A A A A A A A A Hex
ess 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Addr
Start 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8000
H
End 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 FFF
FH
Figure shows the interfacing of 16Kx8 Memory (ROM) and 32Kx8 RAM with 8051
Figure 16Kx8 Memory (ROM) and 32Kx8 RAM Interfacing with 8051
RTOS
Real-time operating systems (RTOS) are used in environments where a large number of
events, mostly external to the computer system, must be accepted and processed in a short
time or within certain deadlines. such applications are industrial control, telephone switching
equipment, flight control, and real-time simulations
deadline can have unintended consequences, including a reduction in the quality of the
product. Example: Multimedia applications.
Advantages:
The advantages of real-time operating systems are as follows-
1. Maximum consumption –
Maximum utilization of devices and systems. Thus more output from all the resources.
2. Task Shifting –
Time assigned for shifting tasks in these systems is very less. For example, in older
systems, it takes about 10 microseconds. Shifting one task to another and in the latest
systems, it takes 3 microseconds.
3. Focus On Application –
Focus on running applications and less importance to applications that are in the queue.
5. Error Free –
These types of systems are error-free.
6. Memory Allocation –
Memory allocation is best managed in these types of systems.
Disadvantages:
The disadvantages of real-time operating systems are as follows-
1. Limited Tasks –
Very few tasks run simultaneously, and their concentration is very less on few
applications to avoid errors.
3. Complex Algorithms –
The algorithms are very complex and difficult for the designer to write on.
5. Thread Priority –
It is not good to set thread priority as these systems are very less prone to switching tasks.
Complex Simple
Processes can have several different types of timing requirements imposed on them by the
application. The timing requirements on a set of processes strongly influence the type of
scheduling that is appropriate. A scheduling policy must define the timing requirements that
it uses to determine whether a schedule is valid. Before studying scheduling proper, we
outline the types of process timing requirements that are useful in embedded system design.
Two important requirements on processes: release time and deadline.
The release time is the time at which the process becomes ready to execute; this is not
necessarily the time at which it actually takes control of the CPU and starts to run. An
aperiodic process is by definition initiated by an event, such as external data arriving or data
computed by another process.
The release time is generally measured from that event, although the system may want to
make the process ready at some interval after the event itself. For a periodically executed
process, there are two common possibilities.
In simpler systems, the process may become ready at the beginning of the period. More
sophisticated systems, such as those with data dependencies between processes, may set the
release time at the arrival time of certain data, at a time after the start of the period.
A deadline specifies when a computation must be finished. The deadline for an aperiodic
process is generally measured from the release time, since that is the only reasonable time
reference. The deadline for a periodic process may in general occur at some time other than
the end of the period.
Rate requirements are also fairly common. A rate requirement specifies how quickly
processes must be initiated.
The period of a process is the time between successive executions. For example, the period of
a digital filter is defined by the time interval between successive input samples.
The process’s rate is the inverse of its period. In a multirate system, each process executes at
its own distinct rate.
The most common case for periodic processes is for the initiation interval to be equal to the
period. However, pipelined execution of processes allows the initiation interval to be less
than the period. Figure 3.3 illustrates process execution in a system with four CPUs.
CPU Metrics
We also need some terminology to describe how the process actually executes.
The initiation time is the time at which a process actually starts executing on the CPU.
The completion time is the time at which the process finishes its work.
The most basic measure of work is the amount of CPU time expended by a process. The CPU
time of process i is called Ci . Note that the CPU time is not equal to the completion time
minus initiation time; several other processes may interrupt execution. The total CPU time
consumed by a set of processes is
T= ∑ Ti
We need a basic measure of the efficiency with which we use the CPU. The simplest and
most direct measure is utilization:
Utilization is the ratio of the CPU time that is being used for useful computations to the total
available CPU time. This ratio ranges between 0 and 1, with 1 meaning that all of the
available CPU time is being used for system purposes. The utilization is often expressed as a
percentage. If we measure the total execution time of all processes over an interval of time t,
then the CPU utilization is
U=T/t.
A context switching helps to share a single CPU across all processes to complete its
execution and store the system's tasks status. When the process reloads in the system, the
execution of the process starts at the same point where there is conflicting.
Following are the reasons that describe the need for context switching in the Operating
system.
1. The switching of one process to another process is not directly in the system. A
context switching helps the operating system that switches between the multiple
processes to use the CPU's resource to accomplish its tasks and store its context. We
can resume the service of the process at the same point later. If we do not store the
currently running process's data or context, the stored data may be lost while
switching between processes.
2. If a high priority process falls into the ready queue, the currently running process will
be shut down or stopped by a high priority process to complete its tasks in the system.
3. If any running process requires I/O resources in the system, the current process will
be switched by another process to use the CPUs. And when the I/O requirement is
met, the old process goes into a ready state to wait for its execution in the CPU.
Context switching stores the state of the process to resume its tasks in an operating
system. Otherwise, the process needs to restart its execution from the initials level.
4. If any interrupts occur while running a process in the operating system, the process
status is saved as registers using context switching. After resolving the interrupts, the
process switches from a wait state to a ready state to resume its execution at the same
point later, where the operating system interrupted occurs.
5. A context switching allows a single CPU to handle multiple process requests
simultaneously without the need for any additional processors.
Suppose that multiple processes are stored in a Process Control Block (PCB). One process is
running state to execute its task with the use of CPUs. As the process is running, another
process arrives in the ready queue, which has a high priority of completing its task using
CPU. Here we used context switching that switches the current process with the new process
requiring the CPU to finish its tasks. While switching the process, a context switch saves the
status of the old process in registers. When the process reloads into the CPU, it starts the
execution of the process when the new process stops the old process. If we do not save the
state of the process, we have to start its execution at the initial level. In this way, context
switching helps the operating system to switch between the processes, store or reload the
process when it requires executing its tasks.
1. Interrupts
2. Multitasking
3. Kernel/User switch
Interrupts: A CPU requests for the data to read from a disk, and if there are any interrupts,
the context switching automatic switches a part of the hardware that requires less time to
handle the interrupts.
Kernel/User Switch: It is used in the operating systems when switching between the user
mode, and the kernel/user mode is performed.
A PCB (Process Control Block) is a data structure used in the operating system to store all
data related information to the process. For example, when a process is created in the
operating system, updated information of the process, switching information of the process,
terminated process in the PCB.
There are several steps involves in context switching of the processes. The following diagram
represents the context switching of two processes, P1 to P2, when an interrupt, I/O needs, or
priority-based process occurs in the ready queue of PCB.
As we can see in the diagram, initially, the P1 process is running on the CPU to execute its
task, and at the same time, another process, P2, is in the ready state. If an error or interruption
has occurred or the process requires input/output, the P1 process switches its state from
running to the waiting state. Before changing the state of the process P1, context switching
saves the context of the process P1 in the form of registers and the program counter to
the PCB1. After that, it loads the state of the P2 process from the ready state of the PCB2 to
the running state.
1. First, these context switching needs to save the state of process P1 in the form of the program
counter and the registers to the PCB (Program Counter Block), which is in the running state.
2. Now update PCB1 to process P1 and moves the process to the appropriate queue, such as the
ready queue, I/O queue and waiting queue.
3. After that, another process gets into the running state, or we can select a new process from the
ready state, which is to be executed, or the process has a high priority to execute its task.
4. Now, we have to update the PCB (Process Control Block) for the selected process P2. It
includes switching the process state from ready to running state or from another state like
blocked, exit, or suspend.
5. If the CPU already executes process P2, we need to get the status of process P2 to resume its
execution at the same time point where the system interrupt occurs.
Similarly, process P2 is switched off from the CPU so that the process P1 can resume
execution. P1 process is reloaded from PCB1 to the running state to resume its task at the
same point. Otherwise, the information is lost, and when the process is executed again, it
starts execution at the initial level.
Earliest-Deadline-First Scheduling
Earliest Deadline First (EDF) is one of the best known algorithms for realtime processing. It
is an optimal dynamic algorithm. In dynamic priority algorithms, the priority of a task can
change during its execution. It produces a valid schedule whenever one exists.
EDF is a preemptive scheduling algorithm that dispatches the process with the earliest
deadline. If an arriving process has an earlier deadline than the running process, the system
preempts the running process and dispatches the arriving process.
A task with a shorter deadline has a higher priority. It executes a job with the earliest
deadline. Tasks cannot be scheduled by rate monotonic algorithm.
EDF is optimal among all scheduling algorithms not keeping the processor idle at certain
times. Upper bound of process utilization is 100 %.
Whenever a new task arrive, sort the ready queue so that the task closest to the end of its
period assigned the highest priority. System preempt the running task if it is not placed in
the first of the queue in the last sorting.
If two tasks have the same absolute deadlines, choose one of the two at random (ties can be
broken arbitrarily). The priority is dynamic since it changes for different jobs of the same
task.
EDF can also be applied to aperiodic task sets. Its optimality guarantees that the maximal
lateness is minimized when EDF is applied.
Many real time systems do not provide hardware preemption, so other algorithm must be
employed.
In scheduling theory, a real-time system comprises a set of real-time tasks;each task consists
of an infinite or finite stream of jobs. The task set can be scheduled by a number of policies
including fixed priority or dynamic priority algorithms.
The success of a real-time system depends on whether all the jobs of all the tasks can be
guaranteed to complete their executions before their deadlines. If they can, then we say the
task set is schedulable.
The schedulability condition is that the total utilization of the task set must be less than or
equal to 1.
Implementation of earliest deadline first : Is it really not feasible to implement EDF
scheduling ?
1. Absolute deadlines change for each new task instance, therefore the priorityneeds to
be updated every time the task moves back to the ready queue.
2. More important, absolute deadlines are always increasing, how can we associate a
finite priority value to an ever increasing deadline value.
EDF properties :
1. It is optimal algorithm.
2. Periodic, aperiodic and sporadic tasks are scheduled using EDF algorithm.
3. Gives best CPU utilization.
Disadvantages
Advantages :
Priority Inversion
Priority inversion occurs when a low-priority job executes while some ready higher-priority
job waits.
Consider three tasks Tl, T2 and T3 with decreasing priorities. Task T1 and T3 share some
data or resource that requires exclusive access, while T2 does not interact with either of the
other two tasks.
Task T3 starts at time t0 and locks semaphore s at time tv At time t2, Tl arrives and
preempts T3 inside its critical section. After a while, Tl requests to use the shared resource
by attempting to lock s, but it gets blocked, as T3 is currently using it. Hence, at time t3
continues to execute inside its critical section. Next, when T2 arrives at time t4, it preempts
T3, as it has a higher priority and does not interact with either Tl or T3.
The execution time of T2 increases the blocking time of Tl, as it is no longer dependent
solely on the length of the critical section executed by T3.
When tasks share resources, there may be priority inversions.
Priority inversion is not avoidable; However, in some cases, the priorityinversion could be
too large.
Simple solutions :
Embedded C
Comment: These are simple readable text, written in code to make it more
understandable to the user. Usually comments are written in // or /* */.
Pre-processor directives: The Pre-Processor directives tell the compiler which
files to look in to find the symbols that are not present in the program.
Global Declaration: The part of the code where global variables are defined.
Local Declaration: The part of the code where local variables are defined.
Main function: Every C program has a main function that drives the whole code.
It basically has two parts the declaration part and the execution part. Where, the
declaration part is where all the variables are declared, and the execution part
defines the whole structure of execution in the program.
In nature it uses a cross-platform development scheme, i.e., the development of the
application by it is platform-independent and can be used on multiple platforms.
The following table list the major differences between the C and Embedded C
programming languages:
Parameters C Embedded C
Parameters C Embedded C
Embedded C is a fully
C language is a hardware-
Dependency hardware-dependent language.
independent language.
Embedded C is OS-
C compilers are OS-dependent.
independent.
UNIT III
IOT AND ARDUINO PROGRAMMING
Introduction to the Concept of IoT Devices – IoT Devices Versus Computers – IoT
Configurations – Basic Components – Introduction to Arduino – Types of Arduino –
Arduino Toolchain – Arduino Programming Structure – Sketches – Pins –Input/Output
From Pins Using Sketches – Introduction to Arduino Shields –Integration of Sensors
and Actuators with Arduino.
WhatIsIot:
IoT stands for Internet of Things. It refers to the interconnectedness of physical
devices, such as appliances and vehicles, that are embedded with software, sensors, and
connectivity which enables these objects to connect and exchange data. This technology
allows for the collection and sharing of data from a vast network of devices, creating
opportunities for more efficient and automated systems.
IoTEnablers:
RFIDs: uses radio waves in order to electronically track the tag attached to each physical
object.
Sensors: devices that are able to detect changes in an environment (ex:motion detectors).
Nano technology: as the name suggests, these are extremely small devices with
dimensions usually less than a hundred nanometers.
Smart networks:(ex:meshtopology).
WorkingofIoT
CharacteristicsoftheInternetofThings
The Internet of Things (IoT) is characterized by the following key features that arementioned
below.
1. Connectivity
The extraction of knowledge from the generated data is very important. For example, asensor
generates data, but that data will only be useful if it is interpreted properly. Each IoT device
has a unique identity. This identification is helpful in tracking the equipment and at times for
querying its status.
3. Scalability
The number of elements connected to the IoT zone is increasing day by day. Hence, an IoT
setup should be capable of handling the massive expansion. The data generated as anoutcome
is enormous, and it should be handled appropriately.
1. Architecture
IoT architecture cannot be homogeneous in nature. It should be hybrid, supporting different
manufacturers' products to function in the IoT network. IoT is not owned by any one engineering
branch. IoT is a reality when multiple domains come together.
2. Safety
There is a danger of the sensitive personal details of the users getting compromised when all
his/her devices are connected to the internet. This can cause a loss to the user. Hence, data
security is the major challenge. Besides, the equipment involved is huge. IoT networks may also
be at risk. Therefore, equipment safety is also critical.
3. Self-Configuring
This is one of the most important characteristics of IoT. IoT devices are able to upgrade their
software in accordance with requirements with a minimum of user participation. Additionally,
they can set up the network, allowing for the addition of new devices to an already-existing
network.
4. Interoperability
IoT devices use standardized protocols and technologies to ensure they can communicate with
each other and other systems. Interoperability is one of the key characteristics of the Internet of
Things (IoT). It refers to the ability of different IoT devices and systems to communicate and
exchange data with each other, regardless of the underlying technology or manufacturer.
5. Embedded Sensors and Actuators
Embedded sensors and actuators are critical components of the Internet of Things (IoT). They
allow IoT devices to interact with their environment and collect and transmit data.
6. Autonomous Operation
Autonomous operation refers to the ability of IoT devices and systems to operate independently
and make decisions without human intervention. This is a crucial characteristic of the Internet of
Things (IoT) and enables a wide range of new applications and services.
**Security Measures:**
Implement security mechanisms to protect your IoT ecosystem from unauthorized access,
data breaches, and cyberattacks. This could involve using encryption, secure bootstrapping,
device authentication, and firewalls.
abnormal conditions.
Compliance and Regulations: Ensure that your IoT system complies with relevant
regulations and standards, especially if it involves sensitive or personal data.
Testing and Iteration: Thoroughly test your IoT configuration in a controlled environment
before deploying it at scale. Make necessary adjustments based on testing results and user
feedback.
Documentation: Maintain comprehensive documentation of your IoT configuration,
including device specifications, network settings, security measures, and communication
protocols. This documentation will be valuable for trouble shooting and future
enhancements.
TypesofIoT Applications:
Agriculture: Soil moisture sensors, GPS trackers for livestock, and automated irrigation
systems.
SmartCities: Connected street lights,waste management systems, and traffic monitoring.
Automotive: Connected vehicles, vehicle-to-vehicle(V2V) communication,and self-driving
cars.
BenefitsofIoT Devices:
Efficiency: IoTdevicescanoptimizeprocesses,reducewaste,andenhanceresource
utilization.
Automation: Taskscanbeautomatedbasedonreal-timedata,leadingtoimproved
productivity.
Data-DrivenInsights: IoTdevicesprovidedatathatcanbeanalyzedtogaininsights,make
informed decisions, and identify trends.
RemoteMonitoringand Control: Devicescanbemonitoredandcontrolledremotely,
enabling real-time adjustments.
EnhancedUserExperience: IoTdevicescreatepersonalizedexperiencesandconvenience for
users.
ChallengesandConsiderations:
BasiccomponentsofIoT:
Devices/Things: These are physical objects embedded with sensors, actuators, and communication
modules that enable them to collect data, perform actions, and communicate over the internet. Devices can
range from simple sensors to complex machinery.
Sensors: Sensors are components that detect changes in the environment and convert physical
phenomena (like temperature, light, pressure, humidity, etc.) into electrical signals that can be processed by
IoT devices.
Actuators: Actuators are devices that perform actions based on the data received from sensors or
commands from remote systems. Examples include motors, servos, solenoids, and relays.
Computing Units: These are the computing units within IoT devices. They process data from sensors,
control actuators, and execute programmed instructions. They also manage communication with other
devices and systems.
Communication Modules: IoT devices need communication capabilities to send and receive data over
the internet. Communication modules can include Wi-Fi, Bluetooth, Zigbee, LoRa, cellular, Ethernet, and
more.
Network Infrastructure: This includes the underlying network that enables devices to connect to the
internet. It can be wired (like Ethernet) or wireless (like Wi-Fi, cellular, or satellite).
Internet Connectivity: The devices need access to the internet to communicate with other devices and
central systems. This connectivity can be through Wi-Fi, cellular networks, satellite connections, or other
means.
Cloud Platforms: Cloud platforms provide storage, computing power, and services that enable data
processing, analysis, storage, and remote control of IoT devices. Cloud services facilitate the scalability and
management of IoT solutions.
Data Processing and Storage: IoT devices generate a vast amount of data. Data processing involves
analyzing and interpreting this data to extract meaningful insights. Data storage involves storing the
collected data for future reference and analysis.
User Interfaces: User interfaces can be web applications, mobile apps, or dashboards that allow users to
monitor and control IoT devices remotely. These interfaces provide real-time information and enable users
to set preferences or receive alerts.
Security: Security is critical in IoT to protect data, devices, and networks from unauthorized access and
cyberattacks. Security measures include encryption, authentication, access controls, and regular software
updates.
Power Management: IoT devices often operate on limited power sources such as batteries. Power
management strategies are essential to optimize energy consumption and extend the device's operational
lifespan.
Data Analysis: Analyzing the data collected from IoT devices can yield valuable insights for making
informed decisions, predicting trends, and improving operations.
Machine Learning and Artificial Intelligence (AI): IoT systems can leverage machine learning and AI
to improve automation, anomaly detection, and decision-making based on real-time data.
ModernApplications:
Smart Grids and energy saving
Smart cities
Smart homes/Home automation
Healthcare
Earthquake detection
Radiation detection/hazardous gas detection
Smartphone detection
Water flow monitoring
Traffic monitoring
Downloaded by SAI ARJUN.A.S ([email protected])
lOMoARcPSD|28897484
Wearables
Smart door lock protection system
Robots and Drones
Healthcare and Hospitals, Telemedicine applications
Security
Biochip Transponders (For animals in farms)
Heart monitoring implants (Example: Pacemaker, ECG real-time tracking)
AdvantagesofIoT:
1. Improved efficiency and automation of tasks.
2. Increased convenience and accessibility of information.
3. Better monitoring and controlof devices and systems.
4. Greater ability together and analyze data.
5. Improved decision-making.
6. Cost savings.
Disadvantages of IoT:
Security concerns and potential for hacking or data breaches.
Privacy issues related to the collection and use of personal data.
Dependence on technology and potential for system failures.
Limited standardization and interoperability among devices.
Complexity and increased maintenance requirements.
High initial investment costs.
Limited battery life on some devices.
Concerns about job displacement due to automation.
Limited regulation and legal framework for IoT, which can lead to confusion and uncertainty.
One big difference between IoT devices and computers is that the main function of IoT
devices is not to compute(not to be a computer) and the main function of a computer is to
compute functions and to run programs. But on IoT devices that is not its main point, it
hassomeotherfunctionbesidesthat.Asanexamplelikeincars,thefunctionofIoTdevicesare not to
compute anti-lock breaking or to do fuel injection, their main function from the point of view of
a user is to be driven and to move you from place to place and the computer is just to help that
function. For example, The main function of the car is not to compute like anti-lock breaking or
to do fuel injection their main function from the point of view of a user isto drive, to move you
from place to place. But when we embed software in it then the software can beable for fuel limit
detection.
Computers
IOT Devices
Introduction to Arduino
Arduino is a project, open-source hardware, and software platform used to design and
build electronic devices. It designs and manufactures microcontroller kits and single-board
interfaces for building electronics projects.
The Arduino boards were initially created to help the students with the non-technical
background. The designs of Arduino boards use a varietyof controllers and microprocessors.
The Arduino board consists of sets of analog and digital I/O (Input / Output) pins,
which are further interfaced to breadboard, expansion boards, and othercircuits. Such
boardsfeaturethemodel,UniversalSerialBus(USB),andserialcommunicationinterfaces, which
are used for loading programs from the computers.
Types ofArduino
The flexibility of the Arduino board is enormous so that one can do anything they
imagine. This board can be connected very easily to different modules such as obstacle
sensors, presence detectors, fire sensors, GSM Modules GPS modules, etc.
The main function of the Arduino board is to control electronics through reading
inputs &changing it into outputs because this board works like a tool. This boardis also used
to make different electronics projects in the field of electronics, electrical, robotics, etc.
6 input,
Arduino Uno 16MhzATmega328 2KBSRAM, 32KB flash 14
0 output
12 input,
Arduino Due 84MHz AT91SAM3X8E 96KBSRAM, 512KB flash 54
2 output
16 input,
Arduino Mega 16MHz ATmega2560 8KBSRAM, 256KB flash 54
0 output
12 input,
Arduino Leonardo 16MHz ATmega32u4 2.5KBSRAM, 32KB flash 20
0 output
Arduino Uno(R3)
Arduino Nano
Arduino Micro
ArduinoDue
LilyPadArduinoBoard
Arduino Bluetooth
Arduino Diecimila
RedBoardArduino Board
ArduinoMega(R3) Board
ArduinoLeonardoBoard
Arduino Robot
Arduino Esplora
ArduinoPro Mic
Arduino Ethernet
ArduinoZero
FastestArduino Board
Arduino Uno(R3)
The Uno is a huge option for your initial Arduino. This Arduino board depends on an
ATmega328P based microcontroller. As compared with other types of arduino boards, it is
verysimpletouseliketheArduinoMegatypeboard..Itconsistsof14-digital I/Opins, where 6-pins
can be used as PWM(pulse width modulation outputs), 6-analog inputs, a reset button, a
power jack, a USB connection, an In-Circuit Serial Programming header (ICSP), etc.
ArduinoUno(R3)
Arduino Uno is the most frequently used board and it is the standard form apart from
all the existing Arduino Boards. This board is very useful for beginners. Please refer to this
link to know more about Arduino Uno Board
Arduino Nano
This is a small board based on the microcontrollers like ATmega328P otherwise
ATmega628 but the connection of this board is the same as to the Arduino UNO board. This
kind of microcontroller board is very small in size, sustainable, flexible, and reliable.
ArduinoNano
As compared with the Arduino Uno board, it is small in size. The devices like mini
USB and Arduino IDE are necessaryto build the projects. This board mainlyincludes analog
pins-8, digital pins-14 with the set of an I/O pin, power pins-6 & RST (reset) pins-2. Please
refer to this link to know more about Arduino Nano Board.
Arduino Micro
The Arduino Micro board mainly depends on the ATmega32U4 based
Microcontroller that includes 20-sets of pins wherethe7-pins are PWM pins, 12-analoginput
pins. This board includes different components like an ICSP header, RST button, small USB
connection, crystal oscillator-16MHz. The USB connection is inbuilt and this board is the
shrunk version of the Leonardo board.
Arduino Micro
Arduino Due
This Arduino board depends on the ARM Cortex-M3 and it is the first Arduino
microcontroller board. This board includes digital I/O pins-54 where 12-pins are PWM o/p
pins, analog pins -12, UARTs-4, a CLK with 84 MHz, an USB OTG, DAC-2, a power jack,
TWI-2, a JTAG header, an SPI header, two buttons for reset & erase.
ArduinoDue
This board works with 3.3V where the highest voltage that the pins of input/outputcan
stand is 3.3V because providing a high voltage to any I/O pin can lead to damage the board
This board is simply connected to a computer through a small USB cable otherwise it can be
powered through an AC to DC adapter. This Arduino Due board is suitable with all shields of
Arduino at 3.3V.
LilyPadArduinoBoards
Arduino Bluetooth
This Bluetooth mainly depends on the microcontroller like ATmega168 and thisboard
is also called Arduino BT. This kind of board includes different components likedigital pins-
16, analog pins-6, crystal oscillator-16MHz, reset button, screw terminals, ICSP header. In
this board, the screw terminals are mainly used for power. The programming ofthis Bluetooth
microcontroller can be done with Bluetooth like a wireless connection.
Arduino Diecimila
The microcontroller board like Arduino Diecimila mainly depends on the
ATmega168. This board includes digital I/O pins -14 where 6-pins can be used like PWM
outputs & analog inputs-6, a USB connection, a crystal oscillator-16 MHz, an ICSP header, a
reset button & a power jack. This board can be connected to a computer through a USB cable
and it can be activated using a battery and an AC-DC adapter.
Arduino Diecimila
As the name suggests, the meaning of Diecimila in Italian is 10,000 which means that
marks the truth that above 10k Arduino boards have been designed. In a set of USB Arduino
boards, it is the latest one as compared with other versions.
RedBoardArduino Boards
Arduino Mega(R3)Board
The Arduino Mega is similar to the UNO‟s big brother. It includes lots of digital I/O
pins (from that, 14-pins can be used as PWM o/ps), 6-analog inputs, a reset button, a power
jack, a USB connection, and a reset button. It includes everything required to hold up the
microcontroller; simply attach it to a PC with the help of a USB cable and give the supply to
get started with an AC-to-DC adapter or battery. The huge number of pins make this Arduino
board very helpful for designing projects that need a bunch of digital i/ps or o/ps like lots of
buttons. Please refer to this link to know more about Arduino Mega (R3) Board
ArduinoMega(R3) Board
ArduinoLeonardoBoard
Arduino Robot
This kind of board is the first Arduino over wheels. This Arduino robot includes two
processors on each of its boards. The two boards are the motor board and control board where
the motor board controls the motors & the control board is used to read the sensors for
operating. Every board is a complete Arduino board and its programming can be done
through the Arduino IDE. These are microcontroller boards that depend on the ATmega32u4.
The pins of this Robot are mapped to actuators and sensors onboard.The process of
programming the robot is the same as the Arduino Leonardo board. It is also named a small
computer and it is extensively used in robotics.
This board includes the speaker, color screen, buttons-5, motors-2, a digital compass,
an SD card reader, potentiometers-2 & floor sensors-5. The library of this robot can be used
for controlling the sensors as well as the actuators.
Arduino Esplora
Arduino Esplora
Arduino ProMic
The Arduino Pro Micro board is the same as the Arduino Mini board apart from the
ATmega32U4 Microcontroller. This pro mic board includes digital I/O pins-12, pulse width
modulation (PWM) pins-5, serial connections of Tx & Rx &10-bit ADC.
Arduino Ethernet
The Arduino Ethernet board depends on the microcontroller like ATmega328. This
kind of microcontroller board includes analog pins-5, digital I/O pins-14, RST button, an
RJ45 connection, crystal oscillator, a power jack, ICSP header, etc. The connection of the
Arduino board can be done through the Ethernet shield to the internet.
Arduino Zero
This is a powerful as well as simple 32-bit board and it provides the best platform for
innovative projects like wearable technology, smart IoT devices, crazy robotics, high-tech
automation, etc. This board expands by providing improved performance, permitting a range
of project opportunities & performs like a great educational tool.
ArduinoZero
Thisboardincludesanaloginputpins-6,digitalI/Opins-14,apowerjack,AREF button,
UART port pins, a USB connector & an In-Circuit Serial Programming (ICSP) header, a
power header, etc.
RAM– 1 Mbyte
DMAcontrollers-4
Communication peripherals-Upto 35
16-bitMaxResolutionwith3×ADCs
D/Aconverterswith2× 12-bit
Hardware with JPEG Codec
Timers-22&Watchdogs– 200Mhz
HW Calendar &RTC with Sub-second Accuracy
Cryptographic Acceleration
Toolchain(IDE)
A toolchain is a set of programming tools that is used to perform a complex set of
operations. In the Arduino Software (IDE), the toolchain is hidden from the user, but it is
used to compile and upload the user Sketch. It includes a compiler, assembler, linker, and
Standard C & math libraries.The source code for the Java environment is released under the
GPL and the C/C++ microcontroller libraries are under the LGPL.
StructureofSketch
A sketch can be divided into two parts:
Setup()
Loop()
Thefunctionsetup()isthepointwherethecodestarts,justlikethemain()functionin C and
C++
I/OVariables, pinmodes are initializedintheSetup() function
Loop()function, as the namesuggests, iterates the specified task in the program
Structure
Arduino programs can be divided in three main parts: Structure, Values (variables
and constants), and Functions. In this tutorial, we will learn about the Arduino software
program, step by step, and how we can write the program without any syntax or compilation
error.
Let us start with the structure. Software structure consists of two main functions. −
Setup( ) function - The setup() function is called when a sketch starts. Use it to
initializethe variables (not declaration),pin modes, start using libraries, etc. Thesetup
function will only run once, after each power up or reset of the Arduino board.
Loop( ) function - After creating a setup() function, which initializes and sets theinitial
values, the loop() function does precisely what its name suggests, and loops
consecutively, allowing your program to change and respond. Use it to activelycontrol
the Arduino board
Voidsetup ( ){
}
PURPOSE− Thesetup()function is called when a sketch starts. Use it to initializethe
variables, pin modes, start using libraries, etc. The setup function will only run once,
after each power up or reset of the Arduino board.
INPUT −-
OUTPUT−-
RETURN−-
VoidLoop( ){
}
PURPOSE− After creating asetup()function, which initializes and sets the initial
values, theloop()function does precisely what its name suggests, and loops
consecutively, allowing your program to change and respond. Use it to activelycontrol
the Arduino board.
INPUT −-
OUTPUT−-
RETURN−-
ArduinoUnoPinsDiagram
ARDUINOI/O(Input,Output)Functions
1. Pin Mode()-The pin Mode()function is used to configure a specific pin to behave either
as an input or an output.
2. digitalWrite()-
ThedigitalWrite()functionisusedtowriteaHIGHoraLOWvaluetoadigitalpin.
3. digitalRead()-Readsthevaluefromaspecifieddigitalpin,eitherHIGHorLOW.
4. analogRead( ) function- we can read the voltage applied to one of the pins. This
functionreturnsanumberbetween0and1023,whichrepresentsvoltagesbetween0 and 5 volts.
5. analogWrite()function-Writesananalogvaluetoapin.
Input/Ouput(I/O)inArduino
Setsapintoactaseitheraninputoranoutput
pinisthenumberofthepin
1-13forthedigitalpins
A0-A5fortheanaloginputpins
ModeistheI/Omodethepinissetto
INPUT,OUTPUT
DigitalInput
val;
Pin val=digitalRead(3);
pinvalissettothestateofdigitalpin3
Digital Output
Assigns thestateofanoutputpin
AssignseitherLOW(0volts)orHIGH(5volts)
digitalWrite(3, HIGH);
Digitalpin3issetHIGH(5volts)
Analog Input
pin val;
Pin val=analogRead(A3);
Analog Output
ARDUINO SHIELDS
TypesofShields
Ethernet shield
XBee shield
Proto shield
Relay shield
Motor shield
LCD shield
Bluetooth shield
Capacitive Touchpad shield
The Ethernet shields are used to connect the Arduino board to the Internet. We need to mount the
shield on the top of the specified Arduino board.
The USB port will play the usual role to upload sketches on the board.
The latest version of Ethernet shields consists of a micro SD card slot. The micro SD card slot can
be interfaced with the help of the SD card library.
o We can also connect another shield on the top of the Ethernet shield. It means that we
can also mount two shields on the top of the Arduino board.
Xbee Shield
o WecancommunicatewirelesslywiththeArduinoboardbyusingtheXbeeShield with
Zigbee.
o Itreducesthehassleofthecable,whichmakesXbeeawirelesscommunication model.
o TheXbeewirelessmoduleallowsustocommunicateoutdoorupto300feetand indoor upto
100 feet.
o TheXbeeshield is shown below:
Proto shield
o We can also solder the SMD (Surface Mount Device) ICs on the prototyping area. A
maximum of 24 pins can be integrated onto the SMD area.
Relay shield
The Arduino digital I/O pins cannot bear the high current due to its voltage and current limits. The
relay shield is used to overcome such situations. It provides a solution for controlling the devices
carrying high current and voltage.
The shield consists of four relays and four LED indicators.
It also provides NO/NC interfaces and a shield form factor for simple connection to the Arduino
board.
The LED indicators depict the ON/OFF condition of each relay.
The relay used in the structure is of high quality.
The NO (Normally Open), NC (Normally Closed), and COM pins are present on each relay.
Motor shield
The motor shield helps us to control the motor using the Arduino board.
It controls the direction and working speed of the motor. We can power the motor shield either by
the external power supply through the input terminal or directly by the Arduino.We can also
measure the absorption current of each motor with the help of the motor shield.
o The motor shield is based on the L298 chip that can drive a step motor or two DC
motors. L298 chip is a full bridge IC. It also consists of the heat sinker, which
increases the performance of the motor shield.
o It can drive inductive loads, such as solenoids, etc.
o Theoperatingvoltageisfrom5Vto12V.
LCDshield
The keypad of the LCD (Liquid Crystal Display) shield includes five buttons called up, down, left,
right, and select.
There are 6 push buttons present on the shield that can be used as a custom menu control panel.
It consists of the 1602 white characters, which are displayed on the blue backlight LCD.
The LED present on the board indicates the power ON.
The five keys present on the board help us to make selections on menus and from the board to our
project.
o The LCD shield is popularly designed for the classic boards such as Duemilanove,
UNO, etc.
Bluetooth shield
o The Bluetooth shield can be used as a wireless module for transparent serial
communication.
o It includes a serial Bluetooth module. D0 and D1 are the serial hardware ports in the
Bluetooth shield, which can be used to communicate with the two serial ports (from
D0 to D7) of the Arduino board.
o We can install Groves through the two serial ports of the Bluetooth shield called a
Grove connector. One Grove connector is digital, while the other is analog.
The communication distance of the Bluetooth shield is up to 10 m at home without any obstacle in
between.
It has a touchpad interface that allows integration of the Arduino board with the touch shield.
The Capacitive touchpad shield consists of 12 sensitive touch buttons, which include 3 electrode
connections and 9 capacitive touch pads.
Arduino is a popular microcontroller platform that allows you to easily interface with
various sensors and actuators to create interactive projects. Integrating sensors and actuators
with Arduino involves the following steps:
Selecting the appropriate sensors and actuators: Identify the specific sensors and
actuators you need for your project. Arduino supports a wide range of sensors such as
temperature sensors, motion sensors, light sensors, and actuators such as motors, servos, and
LEDs.
Wiring connections: Connect the sensors and actuators to the Arduino board using
jumper wires or appropriate connectors. Arduino boards typically have digital input/output
(I/O) pins, analog input pins, and power pins that you can use for wiring.
For digital sensors and actuators, you can connect them to the digital I/O pins. These
pins can be configured as either input or output. Analog sensors can be connected to the
analog input pins, which can read continuous voltage values.
Power and ground connections should be made to provide appropriate voltage and
common reference for the sensors and actuators.
Code development: Write the Arduino code to read sensor data and control the
actuators. The code should include appropriate functions and commands to initialize the
sensors, read their values, and control the actuators based on the sensor inputs. The specific
code will depend on the sensors and actuators you are using, so refer to their respective
documentation and examples.
Uploading and testing: Upload the code to the Arduino board and test the integration.
Use the Serial Monitor in the Arduino IDE to view sensor readings or debug any issues.Make
sure the sensors and actuators are functioning as expected.
By following these steps, you can integrate sensors and actuators with Arduino to
create interactive projects and prototypes. The possibilities are vast, ranging from simple
projects like temperature monitoring and LED control to complex robotics and automation
systems.
IoT devices are found everywhere and will enable circulatory intelligence in the future. For
operational perception, it is important and useful to understand how various IoT devices
communicate with each other. Communication models used in IoT have great value. The
IoTs allow people and things to be connected any time, any space, with anything and
anyone, using any network and any service.
2. Publisher-Subscriber Model
Publishers are the source of data. It sends the data to the topic which are
managed by the broker. They are not aware of consumers.
Consumers subscribe to the topics which are managed by the broker.
Hence, Brokers responsibility is to accept data from publishers and send it to the
appropriate consumers. The broker only has the information regarding the
consumer to which a particular topic belongs to which the publisher is unaware
of.
3. Push-Pull Model
The push-pull model constitutes data publishers, data consumers, and data queues.
4. Exclusive Pair
Simplicity: REST APIs are relatively simple to design and implement, making them a
popular choice for building APIs for web applications.
Flexibility: REST APIs can be used to support a wide range of applications and
services, from simple web applications to complex enterprise systems.
Caching: REST APIs can leverage caching to improve performance and reduce server
load.
Stateless: REST APIs are stateless, meaning that each request is processed
independently of any previous requests, making them easy to scale and distribute.
Web Socket APIs allow bi-directional, full-duplex communication between clients and
servers. It follows the exclusive pair communication model. This Communication API does
not require a new connection to be set up for each message to be sent between client s and
servers. Once the connection is set up the messages can be sent and received continuously
without any interruption. WebSocket APIs are suitable for IoT Applications with low
latency or high throughput requirements.
Complexity: WebSocket APIs are more complex to design and implement than REST
APIs, requiring additional programming skills and knowledge.
Security: WebSocket APIs can be vulnerable to security threats if not properly secured.
Compatibility: WebSocket APIs are not supported by all browsers, requiring fallback
mechanisms for older browsers.
Both REST API and WebSocket API are used to build APIs for web applications.
Both REST API and WebSocket API are standardized interfaces that enable
communication between the server and client.
Both REST API and WebSocket API can be customized to suit the specific needs of a
particular application or system.
Both REST API and WebSocket API can be secured using various authentication and
encryption methods.
It is Stateless protocol. It will not store It is Stateful protocol. It will store the
1.
the data. data.
It depends upon the HTTP methods to It depends upon the IP address and
7.
retrieve the data.. port number to retrieve the data
It is slower than web socket regarding web socket transmits messages very
8.
the transmission of messages. fastly than REST API.
MQTT
Message Queuing Telemetry Transport (MQTT): The message query telemetry transport
protocol is a communication-based protocol that is used for IoT devices. This protocol is
based on the publish-subscribe methodology in which clients receive the information
through a broker only to the subscribed topic. A broker is a mediator who categorizes
messages into labels before being delivered.
Light-weight and reliable: The MQTT message is compact, which can realize stable
transmission on severely limited hardware equipment and network with low bandwidth
and high delay.
Created for the IoT: It provides comprehensive IoT application features such as
heartbeat mechanism, testament message, QoS quality level
Better ecosystem: It covers all-language platform's clients and SDKs, and it has mature
Broker server software, which can support massive Topic and ten-million-level device
access and provide rich enterprise integration capabilities.
CoAP
Constrained Application Protocol (COAP): The constrained application protocol is a
client server-based protocol. With this protocol, the COAP packet can be shared between
different client nodes which are commanded by the COAP server. The server is responsible
to share the information depending on its logic but has not acknowledged it. This is used
with the applications which support the state transfer model.
It supports IP multicast
It supports observation mode
It supports asynchronous communication
LoRaWAN
LoRaWAN refers to Long Rage Wide Area Network which is a wide area network
protocol. It is an optimized low-power consumption protocol design to support large-scale
public networks with millions of low-power devices. A single operator operates the
LoRaWAN. The LoRaWAN network is a bi-directional communication for IoT application
with low cost, mobility, and security..
Over-the-air Activation (OTAA): A device has to establish a network key and an application
session key to connect with the network.
Activation by Personalization (ABP): A device is hardcoded with keys needed to communicate
with the network, making for a less secure but easier connection.
o Standard: LoRaWAN
o Frequency: Various
o Range: 2-5km (urban environment), 15km (suburban environment)
o Data Rates: 0.3-50 kbps.
6LoWPAN
The 6LoWPAN protocol refers to IPv6 Low Power Personal Area Network which uses a
lightweight IP-based communication to travel over low data rate networks. It has limited
processing ability to transfer information wirelessly using an internet protocol. So, it is
mainly used for home and building automation. The 6LoWPAN protocol operates only
within the 2.4 GHz frequency range with 250 kbps transfer rate. It has a maximum length of
128-bit header packets.
Security is a major issue for 6LowPAN communication Protocol. There are several attacks
issues at the security level of 6LoWPAN which aim is to direct destruction of the network.
Since it is the combination of two systems, so, there is a possibility of attack from two sides
that targets all the layer of the 6LoWPAN stack (Physical layer, Data link layer, Adaptation
layer, Network layer, Transport layer, Application layer).
1. The device should be having sleep mode in order to support the battery saving.
2. Minimal memory requirement.
3. Routing overhead should be lowered.
Features of 6LoWPAN:
Advantages of 6LoWPAN:
1. 6LoWPAN is a mesh network that is robust, scalable, and can heal on its own.
2. It delivers low-cost and secure communication in IoT devices.
3. It uses IPv6 protocol and so it can be directly routed to cloud platforms.
4. It offers one-to-many and many-to-one routing.
5. In the network, leaf nodes can be in sleep mode for a longer duration of time.
Disadvantages of 6LoWPAN:
Applications of 6LoWPAN:
Communication
It uses Request-Response model. It uses Publish-Subscribe model
Type
Transport layer This mainly uses User Datagram This mainly uses Transmission
protocol protocol(UDP) Control protocol(TCP)
Effectiveness in LNN is
Effectiveness in LNN is low.
Effectiveness excellent.
Bluetooth
Bluetooth Architecture:
Piconet:
Piconet is a type of Bluetooth network that contains one primary node called the
master node and seven active secondary nodes called slave nodes. Thus, we can say
that there is a total of 8 active nodes which are present at a distance of 10 meters.
The communication between the primary and secondary nodes can be one-to-one or
one-to-many. Possible communication is only between the master and slave; Slave-
slave communication is not possible. It also has 255 parked nodes, these are
secondary nodes and cannot take participation in communication unless it gets
converted to the active state.
Scatternet:
It is formed by using various piconets. A slave that is present in one piconet can act as
master or we can say primary in another piconet. This kind of node can receive a message
from a master in one piconet and deliver the message to its slave in the other piconet where
it is acting as a master. This type of node is referred to as a bridge node. A station cannot be
mastered in two piconets.
Advantage:
Disadvantages:
Applications:
We are all familiar with Wi-Fi, which is available on our mobile phones, laptops, or wherever
Wi-Fi is supported. Wi-Fi is a wireless networking technology that permits to connect
Wireless Fidelity (Wi-Fi) is a generic term for the wireless network in the communication
norm. Wifi operates like a local area network without the use of a wire or cables.
WLAN stands for Wireless Local Area Network. IEEE 802.11 is the rule for
communication. WiFi uses the Physical Data Link Layer (PDLL) to operate.
As mentioned earlier, Wi-Fi has numerous kinds or standards. Here, the names of the
standards are defined.
o Wi-Fi-1 (802.11b, launched in 1999) - This version has link speed from 2Mb/s to 11
Mb/s over 2.4 GHz frequency band
o Wi-Fi-2 (802.11a) launched in 1999. After a month of releasing the previous
version, 802.11a, was released, and it provides upto 54 Mb/s link speed over the 5
GHz band
o Wi-Fi-3 (802.11g) was launched in 2003. In this version, the speed was risen up to
54 to 108 Mb/s over 2.4 GHz
o 802.11i launched in 2004. This is equivalentto802.11g, but only the security feature
was enhanced in this version
o 802.11e launched in 2004. This is also the same as 802.11g; only Voice over
Wireless LAN and multimedia streaming are included.
o Wi-Fi-4 (802.11n) launched in 2009. This version holds up both 2.4 GHz and 5 GHz
radio frequencies, and it provides up to 72 to 600 Mb/s speed.
o Wi-Fi-5 (802.11ac) launched in 2014. It supports a speed of 1733 Mb/s in the 5 GHz
band.
Advantages of WIFI
Wi-Fi Disadvantages
o Mobile phones, laptops, and other devices with batteries consume a lot of power when
using Wi-Fi.
o Even when encryption is in place, security issues can still arise.
o Wi-Fi can be attacked and accessed in the same way that recognised devices become
unidentified to the router.
o In comparison to a direct cable connection, the speed is slower.
o People can be harmed by it because it emits radiation like cell phones.
o Thunderstorms, for example, can interfere with Wi-Fi signals.
o Because it lacks a firewall, unauthorised access to Wi-Fi is possible.
o Since a router is required to access the internet via Wi-Fi, we can't access the internet
if the power goes out.
Zigbee
What is Zigbee? – Zigbee is a low power, low data rate (250kbps) wireless protocol used
primarily for Home automation and industrial control, building automation,sensor data
collection etc
Full Function Device (FFD)- Can communicates with all node types and can
operate in one of three modes:
Operating Frequency
Features of Zigbee:
Advantages of Zigbee:
1. Designed for low power consumption.
2. Provides network security and application support services operating on the top of
IEEE.
3. Zigbee makes possible completely networks homes where all devices are able to
communicate and be
4. Use in smart home
5. Easy implementation
6. Adequate security features.
7. Low cost: Zigbee chips and modules are relatively inexpensive, which makes it a cost-
effective solution for IoT applications.
8. Mesh networking: Zigbee uses a mesh network topology, which allows for devices to
communicate with each other without the need for a central hub or router. This makes it
ideal for use in smart home applications where devices need to communicate with each
other and with a central control hub.
9. Reliability: Zigbee protocol is designed to be highly reliable, with robust mechanisms
in place to ensure that data is delivered reliably even in adverse conditions.
Disadvantages of Zigbee :
1. Limited range: Zigbee has a relatively short range compared to other wireless
communications protocols, which can make it less suitable for certain types of
applications or for use in large buildings.
2. Limited data rate: Zigbee is designed for low-data-rate applications, which can make
it less suitable for applications that require high-speed data transfer.
3. Interoperability: Zigbee is not as widely adopted as other IoT protocols, which can
make it difficult to find devices that are compatible with each other.
4. Security: Zigbee’s security features are not as robust as other IoT protocols, making it
more vulnerable to hacking and other security threats.
Zigbee Applications:
1. Home Automation
2. Medical Data Collection
3. Industrial Control Systems
4. meter reading system
5. light control system
6. Commercial
7. Government Markets Worldwide
8. Home Networking
GPS
Global Positioning System (GPS) is a navigation system based on satellite. It has created the
revolution in navigation and position location. It is mainly used in positioning, navigation,
monitoring and surveying applications.
Usage of GPS:
There are five most uses of the GPS.
Location:- with the help of GPS we can find the exact position of the object.
Navigation:– we can navigate one location to another with the help of GPS.GPS
technology is also useful for Transportation Management and breathing of Ship at
docks.
Tracking: -with the help of GPS we can Monitor object movement like speed, distance,
position.
Mapping:– GPS also helps in creating maps of the World.
Timing:- GPS also provides the estimated time for reaching destination measurement
its depend on speed and object movement.
GSM
GSM stands for Global System for Mobile Communication. GSM is an open and digital
cellular technology used for mobile communication. It uses 4 different frequency bands of
850 MHz, 900 MHz, 1800 MHz and 1900 MHz . It uses the combination of FDMA and
TDMA.
1. BSS : BSS stands for Base Station Subsystem. BSS handles traffic and signaling
between a mobile phone and the network switching subsystem. BSS having two
components BTS and BSC.
2. NSS : NSS stands for Network and Switching Subsystem. NSS is the core network of
GSM. That carried out call and mobility management functions for mobile phone
present in network. NSS have different components like VLR, HLR and EIR.
3. OSS : OSS stands for Operating Subsystem. OSS is a functional entity which the
network operator monitor and control the system. OMC is the part of OSS. Purpose of
OSS is to offer the customer cost-effective support for all GSM related maintenance
services.
Suppose there are 3 Mobile stations which are connected with the tower and that tower is
connected to BTS through TRX, then further connected to BSC and MSC. Let’s understand
the functionality of different components.
1. MS : MS stands for Mobile System. MS comprises user equipment and software needed
for communication with a mobile network. Mobile Station (MS) = Mobile
Equipment(ME) + Subscriber Identity Module (SIM). Now, these mobile stations are
connected to tower and that tower connected with BTS through TRX. TRX is a transceiver
which comprises transmitter and receiver. Transceiver has two performance of sending and
receiving.
2. BTS : BTS stands for Base Transceiver Station which facilitates wireless communication
between user equipment and a network. Every tower has BTS.
3. BSC : BSC stands for Base Station Controller. BSC has multiple BTS. You can consider
the BSC as a local exchange of your area which has multiple towers and multiple towers
have BTS.
4. MSC : MSC stands for Mobile Switching Center. MSC is associated with
communication switching functions such as call setup, call release and routing. Call tracing,
call forwarding all functions are performed at the MSC level.
Services of GSM:
Advantages:
Compatibility: GSM is widely used around the world, so it is compatible with many
different networks and devices.
Security: GSM offers enhanced security features such as authentication, encryption and
confidentiality, which helps to protect the user’s privacy and data.
Efficient use of bandwidth: GSM uses a time-division multiplexing (TDM) technique
which enables many users to share the same frequency channel at different times, making it
an efficient use of the available bandwidth.
Roaming: GSM allows users to roam internationally and use their mobile phones in other
countries that use the same GSM standard.
Wide range of features: GSM supports a wide range of features, including call
forwarding, call waiting, voicemail, conference calling, and more.
Disadvantages:
Limited coverage: GSM networks may have limited coverage in some remote areas, which
can make it difficult for users to make calls or access the internet.
Network congestion: GSM networks may become congested during peak hours, which can
lead to dropped calls or poor call quality.
Security vulnerabilities: Although GSM offers enhanced security features, it is still
vulnerable to certain types of attacks, such as eavesdropping and spoofing.
Data transfer speed: GSM networks offer relatively slow data transfer speeds compared to
newer technologies such as 3G and 4G.
Limited capacity: GSM networks have a limited capacity for handling large volumes of
data, which can be a disadvantage for users who require high-speed internet access or other
data-intensive applications.
Raspberry Pi is launched in 2012 and there have been several iterations and variations
released since then.
Various versions of Raspberry Pi have been out till date. All versions consist of a
Broadcom system on a chip (SoC) with an integrated ARM-compatible CPU and on-chip
graphics processing unit (GPU).
Use for explore computing as for programmings like Scratch and Python
languages.
Structure of board
The latest version of Raspberry Pi (model B, revision 2) comes with a 700 MHz low-
power ARM 1176JZ-F processor And a 512 MB SD Ram.
USB ports
Two USB 2.0 USB ports on Raspberry pi can provide a current of up to 100 mA.
For connecting devices that draw a current of more than 100 mA, an external USB-
powered hub is required.
Ethernet port
Standard RJ45 Ethernet port.
HDMI outputs
The HDMI port on Raspberry Pi provides both video and audio output.
For monitors that have a DVI port but no HDMI port so use an HDMI to DVI adaptor
or cable.
Audio output
3.5 mm audio output jack is used for audio output to old television along with the
RCA Jack for video.
The audio quality is inferior to the HDMI output.
Status LEDs
Raspberry Pi has 5 status LED is which are:-
SD card slot
Not have a built-in operating system and storage so plug in an SD card
loaded with a Linux image to an SD card slot.
Power input
A micro-USB connector for power input.
GPIO Pin
A number of general-purpose Input / Output pins are used by Raspberry Pi.
There are four types of pins on Raspberry Pi:- True GPIO pins, SPI interface
pins, 12C interface pins, and Serial RX and TX pins.
Voltages
From the above diagram, we can see that there are two 5V pins and two 3V3 pins on the
board. It also has several ground pins (0V). All these pins are unconfigurable.
Outputs
A GPIO pin can be designated as an output pin. The pin set as output pin can be set
to 3V(high) or 0V(low).
Inputs
A GPIO pin can be designated as an input pin. The pin set as input pin can be read as
3V(high) or 0V(low). You can use internal pull-up or pull-down resistors.
above diagram, GPIO2 and GPIO3 pins have fixed pull-up resistors but for the other pins,
you can configure it in software.
Alternative Functions
GPIO pins can be used with a variety of alternative functions. Among them, some are
available on all pins and others on specific pins.
Software PWM are available on all the pins whereas Hardware PWM are available on
GPIO12, GPIO13, GPIO18, and GPIO19.
SPI0: MOSI (GPIO10); MISO (GPIO9); SCLK (GPIO11); CE0 (GPIO8), CE1 (GPIO7)
SPI1: MOSI (GPIO20); MISO (GPIO19); SCLK (GPIO21); CE0 (GPIO18); CE1 (GPIO17);
CE2 (GPIO16)
Serial
TX(GPIO14)
RX(GPIO15)
Connecting a Raspberry Pi to the cloud allows you to access and manage your Raspberry Pi
remotely, exchange data with cloud services, and perform various tasks such as data logging,
remote control, and automation. Here's a general overview of how to connect a Raspberry Pi
to the cloud:
1. Select a Cloud Service Provider: Choose a cloud service provider that fits your needs.
Some popular options include AWS (Amazon Web Services), Microsoft Azure, Google
Cloud Platform, and various IoT-focused platforms like AWS IoT, Azure IoT, or Google
Cloud IoT. Each has its own set of features, pricing, and capabilities.
2. Set Up Your Raspberry Pi: Ensure your Raspberry Pi is set up correctly, connected to the
internet, and running an appropriate operating system like Raspbian (now called Raspberry Pi
OS).
3. Install Necessary Software: Depending on your chosen cloud platform, you may need to
install specific libraries or SDKs on your Raspberry Pi. For example, if you're using AWS,
you would install the AWS SDK for Python (Boto3). If you're using Azure, you might use
the Azure IoT SDK or Azure Python SDK.
4. Create Cloud Resources: Create the necessary resources on your cloud platform. For
example, if you're using AWS IoT, you'd create an IoT Thing, a policy, and certificates.
5. Connect to the Cloud: Write code on your Raspberry Pi to connect to your cloud platform
of choice. This typically involves using the SDK you installed earlier and providing the
necessary authentication credentials (e.g., API keys, certificates, or access tokens).
6. Publish and Subscribe to Topics (MQTT): Many IoT applications use the publish-
subscribe model for communication. MQTT (Message Queuing Telemetry Transport) is a
common protocol for this purpose. You can publish data from your Raspberry Pi to specific
MQTT topics and subscribe to topics to receive commands or data from the cloud.
7. Data Handling and Processing: Once your Raspberry Pi is connected, you can send and
receive data between the Raspberry Pi and the cloud. You may want to implement data
processing, storage, or analytics depending on your project's requirements.
8. Security Considerations: Ensure proper security practices. Use secure connections (HTTPS,
MQTT over TLS), secure your IoT devices and cloud resources, and regularly update your
Raspberry Pi's software to patch any security vulnerabilities.
9. Monitoring and Management: Set up monitoring and management tools provided by your
cloud platform to keep an eye on your Raspberry Pi's health and performance. This might
include dashboards, alerts, and logging.
10. Scale and Optimize: As your project grows, you may need to scale your cloud resources and
optimize your code and infrastructure for performance and cost-efficiency.
Embedded System
As its name suggests, Embedded means something that is attached to another thing. An
embedded system can be thought of as a computer hardware system having software
embedded in it. An embedded system can be an independent system or it can be a part of a
large system. An embedded system is a microcontroller or microprocessor based system
which is designed to perform a specific task. For example, a fire alarm is an embedded
system; it will sense only smoke.
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.
Advantages
Easily Customizable
Low power consumption
Low cost
Enhanced performance
Disadvantages
Home Automation
Home Automation is a system that allows users to control various appliances of varying
kinds and also makes controlling of home appliances easier and saves energy. Nowadays,
home automation is used more and more. On the other hand, it provides increased comfort
especially when everyone is busy with their work. Home automation installed in houses
does not only increase comfort but also allows centralized control of heating, ventilation,
air-condition, and lighting. Hence, they contribute to an overall cost reduction and also
useful in energy saving which is certainly the main problem today.
In present years, wireless systems like Wi-Fi, Bluetooth have become more and more
common in home networking. Also in home automation, the use of wireless technologies
gives several advantages that could not be achieved using a wired network only.
Home Automation Components: At the most initial level, home automation systems are
made up of three elements-
1. A smart device.
2. A hub.
3. A connected application.
While some other home automation systems work with just two elements which include a
single device that works with the help of an app on mobile or a tablet or a system that
includes a hands-free hub that controls home automation system while most of the systems
work using all the above three components.
1. Smart Devices: These are the real powerhouse of any home automation system. These
are the main parts that actually implement the whole system commands. Examples of the
smart devices which can be added to any home automation to complete the whole system
are as follows:
Access Control
Security Devices: This includes security cameras, smart locks.
Home Appliances: Smart refrigerators, washing machines, dishwashers, and ovens
already exist.
Smaller Appliances: As automatic coffee pots and electric kettle have been also around
for a while too
Climate Controls: Climate control system with energy management systems
Smart Thermostats.
Entertainment Pieces: Entertainment includes smart TVs, wireless speakers, and film
projectors
Health Care Devices: Smart humidifiers and smart scales are two common examples
of health care devices.
Lighting Controls: They include dimmers, light bulbs, light strips, and switches, etc.
A high-speed internet plays an important role in smooth connectivity and also plays an
important reliable performance between Wi-Fi-enabled devices.
2. Smart Hubs: The hub is the controlling center of the home automation system. It is the
piece that connects your individual devices and helps them talk to one another.
3. Mobile Apps: The mobile application provides an interface between the user and the
system. It gives you the ability to control or monitor your smart devices remotely. They can
be easily downloaded with the help of a provided application on mobile and provide access
control of the system, power controls, timer access, and many more things.
Home automation works with the help of a network of devices that are connected to the
Internet through different communication systems like Wi-Fi, Bluetooth, ZigBee, and
others. Through these devices can be managed remotely through controllers through an app.
Many of these IoT devices have sensors that monitor changes in motion, temperature, and
light so the user can gain information about the device’s surroundings.
1. Monitoring: This means keeping the control of the system using an app on a device
remotely.
2. Control: This means that the system can be controlled remotely from anywhere through
the app by the user.
3. Automation: Automation means making almost all devices automatic for making it a
better system.
Applications: Some of the most common applications of home automation are as follows-
Heating, ventilation, and air conditioning.
Lighting control system.
Energy Savings: Self-automated light bulbs, fans, and switchboards save energy,
cutting utility costs over time.
Home Safety: Home automation provides the best technologies for home security.
Consumers purchase these devices because they want to make their homes safer and
more secure. Automatic lighting systems and motion sensors help people to enter doors
and walk late at night.
User Convenient: Because home automation performs role tasks automatically, end-
users experience great convenience. For instance, you could use sensors indoors to turn
on your smart lighting when you unlock the front door.
Better Control: Consumers also choose smart home devices to better control functions
within the home. With home automation technology, you can know easily what’s
happening inside your home at all times.
Comfortable Atmosphere: All Connected devices around our home can also help to
create a comfortable atmosphere—they provide intelligent and reliable lighting, sound,
and temperature, which can all help to create a comfortable environment.
Provide Peace of Mind: This system may help consumers to invest in home
automation for peace of mind.
Remote Access: Being able to control devices remotely means things like unlocking the
door for a plant sitter without having to leave a key under the mat.
IOT in Agriculture
Agriculture is another important domain for IOT. IOT systems play an important role for
crop and soil monitoring and give a proper solution accordingly. IOT leads to smart farming.
Using IOT, farmers can minimize waste and increase productivity. The system allows the
monitoring of fields with the help of sensors. Farmers can monitor the status of the area.
The challenges faced by the farming industry and agriculture are listed as follows -
There are various uses of IOT in agriculture that are discussed as follows -
The data from smart sensors can be further analyzed for automated decision-making and
predictive analysis. Machine learning and predictive analysis will be helpful for farmers to
cope up with the weather conditions such as drought, flood, etc.
Drone-based uses
Drones are also useful in smart farming. On one side, drones are useful to monitor the soil,
air, moisture quality, and on another side, they can also be used for physical activities such as
prevention of physical breakouts in farms, automated spraying of fertilizers, and many more.
Although there are some limitations of using a drone, but it is useful to reduce the manual
workforce.
Motion detectors, light detectors, smart-motion sensing sensors, smart sensors are useful to
provide real-time data to farmers of their farms. It will be helpful in the monitoring of the
quality of their products.
It is one of the parts of smart agriculture using IOT. In it, IOT checks the water lanes created
by the farmer or the moisture level in the environment.
Infrastructure requirements
There are some infrastructure requirements for adopting smart farming in IOT. Some of the
requirements are listed as follows -
The water supply is one of the most significant perspectives for legislatures. With intelligent
sensors, the water levels can be checked progressively.
These sensors can send triggers and alarms to key chiefs for low or high water levels. The
spillages and water dispersion can be combined using IoT sensors and ICT frameworks.
All regions with a plentiful water supply can be set apart on the guide; correspondingly, the
guides can feature regions with water spillage or deficiency.
A complete outline of the water supply with GPS directions can be given to water specialists with
IoT frameworks.
2. Health Cards
Clinics and medical services frameworks are significant marks of administration. The smart
city requires a state−of−the−art medical services framework that can follow quantifiable
advancement concerning residents' well−being.
A shrewd card−based framework can be utilized by people that might be utilized in all
administration and approved clinics.
This card will have the verifiable subtleties of the medicines and so on for people. The robust
medical care framework will empower the public authority to look at the clinics and their
administrations to residents.
The smart card empowers the framework to work with simple information assortment. The
cloud−based framework can give essential knowledge to Medical services experts for a
further progressive organization.
The waste and trash the executive's exercises can be improved with intelligent sensors and
IoT Frameworks.
The trash containers can utilize intelligent sensors to demonstrate when they should be
discharged. This diminishes the times that vehicles are expected to gather the trash from the
receptacles and evades what is going on of waste flood.
Metropolitan organizations can involve shrewd receptacles and IoT frameworks for trash
assortment.
4. Transport Systems
The transportation framework for the residents can be improved with IoT−empowered
frameworks. The armadas can be overseen and followed utilizing GPS beacons.
Legislatures can finish armadas' organization, planning, ongoing situating, support, and free
time for executives with IoT frameworks.
The residents can likewise benefit from transportation administrations with a card−based
framework for tickets and so on.
Traffic is one of the significant problem areas for residents. With IoT sensors, traffic can be
controlled better.
The sensors are associated with traffic lights and send data to an incorporated server. The
approaching vehicles are followed utilizing these sensors.
When the quantity of vehicles arrives at a limit, signals are shipped off to the drivers to
redirect. These signs are shown with electronic showcase sheets.
Constant traffic cautions and GIS planning of the streets can further develop gridlocks and
blockage during top hours.
The brilliant city requires advanced usage of framework resources. The plants, apparatus, and
gear are labeled and observed with the brought−together resource of the executive's
framework.
The continuous undertaking stock for different advancement works can be followed utilizing
the brought−together framework.
The situation with framework resources, their usage, upkeep, and the complete lifecycle of
the board should be possible with the brought−together IoT framework.
7. Surveillance Systems
IP cameras and reconnaissance frameworks can assist the public authority with controlling
crime percentages in a city.
The IP cameras can be utilized for surveying and monitoring essential foundations. These
cameras can be associated with unified frameworks with reinforcements for verifiable
information.
The public authority can make a move given the contamination levels; e.g., they can establish
trees in a specific area.
The plant life and contamination levels can likewise be portrayed online with google maps
for executives.
One of the critical difficulties for state−run administrations is to decrease energy utilization
and introduce a proficient appropriation framework set up.
Brilliant framework arrangements, electronic meters, and intelligent lighting frameworks are
a portion of the components that are utilized by legislatures to oversee energy effectively.
The power dispersion guides can show on going energy utilization levels, spillages, and
upkeep plans. The IoT−empowered arrangements can improve the energy of the board for
urban areas.
10. E-Services
This can be overseen through biometric confirmation or smart cards. Residents can benefit
from all taxpayer−driven organizations through this card.
The public authority can collect data through these cards for proactive preparation and the
executives.
The residents can benefit from these offices for paying their water and power bills, local
charges, medical clinic check−ups, etc. Coordinated information additionally helps in
strategy−making and organization.
IoT technology brings numerous applications in healthcare, from remote monitoring to smart
sensors to medical device integration. It keeps the patients safe and healthy as well as
improves the physician delivers care towards the patients.
Healthcare devices collect diverse data from a large set of real-world cases that increases the
accuracy and the size of medical data.
There are various factors that affect the IoT healthcare application. Some of them are mention
below:
o Better Care: Using IoT technology, healthcare professionals get the enormous data
of the patient, analysis the data and facilitate better care to the patient.
The application of the Internet of Things (IoT ) in healthcare transforms it into more smart,
fast and more accurate. There is different IoT architecture in healthcare that brings start
health care system.
Connectivity: IoT system provides better connectivity (using Bluetooth, WiFi, etc.) of
devices or sensors from microcontroller to server and vice-versa to read data.
Analytics: Healthcare system analyzes the data from sensors and correlates to get healthy
parameters of the patient and on the basis of their analyze data they can upgrade the patient
health.