IoT – Sensors and
Devices
© Kalasalingam academy of research and education
Course Outline
CO1: : Distinguish between the different concepts of
IoT for its applications.
CO2: Analyze the optimal usage of
microcontroller.
Course description:
CO3: Demonstrate the usage of sensors and
actuators for specific requirements To expose the students to the fundamental
concepts of Microcontrollers and its interfacing,
CO4: Analyze the communication protocols for that will help them put a strong foundation for the
different devices and its applications. implementation of Internet of things in real time.
CO5: Inspect the various cloud services in alignment
with the corresponding IoT devices.
CO6: Work effectively in as team and individual in doing the
experiments following the safety procedures and ethics and
document effectively the experiments carried out in the
laboratory.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Unit-4: Communication Protocols
Syllabus – Lecture contents
Serial – Parallel
I2C
SPI Unit 4
UART
SCI
Communication Protocols
USB
CAN
Ethernet
Bluetooth
Zigbee
WiFi.
© Kalasalingam academy of
of research
research and
and education
education COURSE NAME IOTIOT:
COURSENAME: SENSORS AND DEVICES
SENSORS AND DEVICES
Communication
The communication is very well known terminology which involves the exchange of information between two or
more mediums. In embedded systems, the communication means the exchange of data between two
microcontrollers in the form of bits.
This exchange of data bits in microcontroller is done by some set of defined rules known as communication
protocols.
If the data is sent in series i.e. one after the other then the communication protocol is known as Serial
Communication Protocol. More specifically, the data bits are transmitted one at a time in sequential manner over
the data bus or communication channel in Serial Communication.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Types of Communication Protocols
Examples of Parallel Communication Protocols.
Examples of Serial Communication Protocol ISA, ATA, SCSI, PCI and IEEE-488.
CAN, ETHERNET, I2C, SPI, RS232, USB, 1-Wire,
and SATA etc.
Example of a serial interface, transmitting one bit every clock
pulse. Just 2 wires required!
An 8-bit data bus, controlled by a clock, transmitting a byte every
clock pulse. 9 wires are used.
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Transmission Modes in Serial Communication
Every electronics device whether it is Personal Computer (PC) or Mobile runs on serial communication.
The protocol is the secure and reliable form of communication having a set of rules addressed by the source host
(sender) and destination host (receiver) similar to parallel communication.
There are several types of serial communication depending on the type of transmission mode and
data transfer.
The transmission modes are classified as
• Simplex
• Half Duplex
• Full Duplex.
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Transmission Modes in Serial Communication
Simplex Method:
In simplex method either of the medium i.e sender or receiver can be active at a
time. So if the sender is transmitting the data then receiver can only accept and vice
versa. So simplex method is one-way communication technique. The well-known
examples of simplex method are Television and Radio.
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Transmission Modes in Serial Communication
Half Duplex Method:
In half duplex method both sender and receiver can be active but not at the same time. So if the
sender is transmitting then receiver can accept but cannot send and similarly vice versa. The well-
known examples of the half duplex is the internet where the user sends a request for a data and
the gets it from server.
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Transmission Modes in Serial Communication
Full Duplex Method:
In full duplex method, both receiver and transmitter can send data to each other at
the same time. The well-known example is mobile phone.
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Clock Synchronization
The clock is different for serial devices, and it is classified in two type viz.
• Synchronous Serial Interface
• Asynchronous Serial Interface.
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Synchronous Serial Interface:
It is a point-to-point connection from a master to slave. In this type of interface, all the devices use single CPU bus
to share data and clock.
The data transmission becomes faster with same bus to share clock and data. Also there is no mismatch in baud
rate in this interface.
The well-known examples are I2C and SPI.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Asynchronous Serial Interface:
In asynchronous Serial Interface, the external clock signal is absent. The Asynchronous Serial Interfaces can be seen
in mostly in long distance applications and are a perfect fit for the stable communication.
In asynchronous Serial Interface the absence of external Clock Source makes it rely on several parameters such as
Data Flow Control, Error Control, Baud Rate Control, Transmission Control and Reception Control.
The well-known examples are RS-232, RS-422 and RS-485.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Baud Rate:
Baud rate is rate at which the data is transferred between the transmitter and receiver in
the form of bits per second (bps).
The most commonly used baud rate is 9600. But there are other selection of baud rate
such as 1200, 2400, 4800, 57600, 115200.
The more the baud rate will be fast the data will be transferred at a time. Also for the data
communication the baud rate has to be same for both transmitter and receiver.
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Synchronous Serial Protocols
SPI Protocol
• The Serial Peripheral Interface (SPI) is a synchronous interface which allows several SPI microcontrollers to be
interconnected. In SPI, separate wires are required for data and clock line.
• Also the clock is not included in the data stream and must be furnished as a separate signal. The SPI may be
configured either as master or as a slave.
• The four basic SPI signals (MISO, MOSI, SCK and SS), Vcc and Ground are the part of data communication. So it
needs 6 wires to send and receive data from slave or master. Theoretically, the SPI can have unlimited number of
slaves.
• The data communication is configured in SPI registers. The SPI can deliver up to 10Mbps of speed and is ideal for
high speed data communication.
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Synchronous Serial Protocols
Most of the microcontrollers have inbuilt support for SPI and can be directly connected SPI supported
device
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Synchronous Serial Protocols
I2C Serial Communication
Inter integrated circuit (I2C) two-line communication between different ICs or modules where two lines are SDA
(Serial Data Line) and SCL (Serial Clock Line). Both the lines must be connected to a positive supply using a pull up
resistor.
I2C can deliver speed up to 400Kbps and it uses 10 bit or 7 bit addressing system to target a specific device on the
i2c bus so it can connect to 1024 devices.
Same like SPI, microcontroller generally have I2C pins to connect any I2C device
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Synchronous Serial Protocols
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Synchronous Serial Protocols
USB
USB (Universal Serial Bus) is widely used protocol with different versions and speeds. A maximum of 127
peripherals can be connected to a single USB host controller. USB acts as "plug and play" device.
The USB are used in almost devices such as keyboards, printers, media devices, cameras, scanners and
mouse. It is designed for easy installation, faster data rated, less cabling and hot swapping.
It has replaced the bulkier and slower serial and parallel ports. USB uses differential signaling to reduce
interference and allow high-speed transmission over a long distance.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Synchronous Serial Protocols
USB protocol was designed for two specific purposes:
• Communicate with peripheral devices
• Supply power to the connected devices if applicable
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Synchronous Serial Protocols
The CAN or Controller Area Network protocol was conceived by Robert Bosch (of GmbH) in
the 1980s. Previously during the late 70’s, manufacturers started using advanced features in their
automobiles, such as anti-lock braking systems, air conditioners, central door locks, airbags, gear
control, engine management systems and so on.
It is used in automotives to allow communication between ECUs (Engine Control Units) and sensors.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Synchronous Serial Protocols
The CAN bus system allows for central error diagnosis and configuration across all ECUs. CAN messages are
prioritized via IDs so that the highest priority IDs are non-interrupted.
Each ECU contains a chip for receiving all transmitted messages, decide relevance and act accordingly - this
allows easy modification and inclusion of additional nodes (e.g. CAN bus data loggers).
The applications include start/stop of vehicles, collision avoidance systems. The CAN bus systems can
provide speed up to 1Mbps.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Asynchronous Serial Protocols
Asynchronous communication does not require a timing clock that is common to both devices. Each device
independently listens and sends digital pulses that represent bits of data at an agreed-upon rate.
Asynchronous serial communication is sometimes referred to as Transistor-Transistor Logic (TTL) serial, where the
high voltage level is logic 1, and the low voltage equates to logic 0.
Almost every microcontroller on the market today has at least one Universal Asynchronous Receiver-Transmitter
(UART) for serial communication. The examples are RS232, RS422, RS485 etc.
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Ethernet
A local Area Network (LAN) is a data communication network connecting
various terminals or computers within a building or limited geographical area.
The connection between the devices could be wired or
wireless. Ethernet, Token rings, and Wireless LAN using IEEE 802.11 are
examples of standard LAN technologies.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Ethernet
Ethernet is the most widely used LAN technology and is defined under IEEE standards 802.3. The reason
behind its wide usability is that Ethernet is easy to understand, implement, and maintain, and allows low-
cost network implementation.
Also, Ethernet offers flexibility in terms of the
topologies that are allowed.
If two or more connected devices on a shared
network attempt to transmit data packets at
the same time, a packet collision occurs.
Ethernet technology provides rules that allow network-connected devices to talk to one
another without packet collisions.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Ethernet networks that are used to connect devices and
transfer data.
1. Fast Ethernet: Fast Ethernet uses 3. 10-Gigabit Ethernet: This is an
both fiber optic and twisted pair advanced and high-speed network that
cables to enable communication. can transmit data at a speed of 10
gigabits per second. With the help of
2. Gigabit Ethernet: It can transfer
fiber optic cables, this network can cover
data at a speed of 1000 Mbps or 1
longer distances, up to around 10,000
Gbps (gigabit per second).
meters.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Ethernet networks that are used to connect
devices and transfer data contd…
4. Switch Ethernet: This type of network involves using switches or hubs to improve network
performance. Each workstation in this network has its own dedicated connection, which improves the
speed and efficiency of data transfer.
Advantages of Ethernet Disadvantages of Ethernet
• Speed • Distance Limitations
• Efficiency • Bandwidth Sharing
• Good Data Transfer Quality • Security vulnerabilities
• Complexity
• Compatibility issues
• Cable installations
• Physical limitations
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Bluetooth
Bluetooth is a standardized protocol for sending
and receiving data via a 2.4GHz wireless link. It's a
secure protocol, and it's perfect for short-range, low-
power, low-cost, wireless transmissions between
electronic devices.
Examples of Bluetooth master/slave
Bluetooth serves as an excellent protocol for piconet(Bluetooth networks) topologies.
wirelessly transmitting relatively small amounts of
data over a short range (<100m). It's perfectly suited
as a wireless replacement for serial communication
interfaces.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
ZigBee
ZigBee is a Personal Area Network task group with low rate task group 4. It is a technology of home
networking. ZigBee is a technological standard created for controlling and sensing the network.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Types of ZigBee Devices:
•Zigbee Coordinator Device: It
communicates with routers. This device
is used for connecting the devices.
•Zigbee Router: It is used for passing
the data between devices.
•Zigbee End Device: It is the device that
is going to be controlled.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Zigbee Applications:
[Link] Automation
[Link] Data Collection
[Link] Control Systems
[Link] reading system
[Link] control system
[Link]
[Link] Markets Worldwide
[Link] Networking
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Wi-Fi
Wi-Fi is a wireless networking technology that allows devices such as computers (laptops and desktops),
mobile devices (smart phones and wearables), and other equipment (printers and video cameras) to interface
with the Internet.
It allows these devices--and many more--to exchange information with one another, creating a network.
A wireless network uses radio waves, just like cell phones, televisions and radios do. In fact, communication
across a wireless network is a lot like two-way radio communication.
Here's what happens:
1.A computer's wireless adapter translates data into a radio signal and transmits it using an antenna.
2.A wireless router receives the signal and decodes it. The router sends the information to the internet using a
physical, wired ethernet connection.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Wi-Fi
The process also works in reverse, with the router receiving information from the internet, translating it into a
radio signal and sending it to the computer's wireless adapter.
The radios used for WiFi communication are very similar to the radios used for walkie-talkies, cell phones and
other devices. They can transmit and receive radio waves, and they can convert 1s and 0s into radio waves and
convert the radio waves back into 1s and 0s.
But WiFi radios have a few notable differences from other radios:
They transmit at frequencies of 2.4 GHz or 5 GHz. This frequency is considerably higher than the frequencies
used for cell phones, walkie-talkies and televisions. The higher frequency allows the signal to carry more data.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES
Ethernet Bus Animation Wireless Connections through bluetooth
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
802.11ax Solution: Wi-Fi 6th Gen Cisco
ZigBee home network
© Kalasalingam academy of research and education COURSE NAME IOT SENSORS AND DEVICES
Thank You!
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere,
magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.
COURSE NAME IOT SENSORS
© Kalasalingam academy of research and education AND DEVICES