Wired Communication Protocols In IoT

The Internet of things refers to a network of devices which communicate with each other through the internet through wires or wirelessly. When connected with a smartphone or laptop, it can automate and form a network of all the connected devices. So, This makes data sharing and data access simple and seamless. The type of network chosen depends on the network range, network bandwidth, power usage, intermittent connectivity and security.

Though the IoT system mostly utilises wireless communication networks, sometimes wired networks become easier and efficient. So, IoT uses a hybrid of both networks.

There are two types of communication protocols:- Wired communication and wireless communication.

So, we shall discuss the wired communication. Basically, wired communication is the transfer of data from the transmitter to the receiver through a wired medium like Ethernet, USB, etc.

However, For IoT, understanding communication protocols is very important, why they are, why they are used and the difference between different protocols. Wired communication protocols are simply a set of rules that allows us to transmit data through a physical medium.

 Therefore, the syntax, semantics, and synchronization of communication and possible error recovery methods between communication systems are called “protocol”. Further, each protocol has its own use.

Communication protocols are of two types: –

  1. External system protocols:- USB, UART/USART, RS-232, RS-485, Ethernet.
  2. Internal system protocols:- I2C, SPI.

External system protocols

External system protocols are used to communicate between two communicating devices. For example, between a laptop and development boards. Hence communication is through the inter bus system.

1. USB Protocols

USB stands for Universal Serial Bus. Hence, It is a serial communication protocol for connecting devices with USB ports like gaming consoles, mobile phones, set-top box, etc. It also provides a fast master-slave interface supporting up to 127 devices with up to 6 tires.

A pc is generally the master or host and each of the other components or devices linked to it are called slaves.

USB 1.X and 2.X use four lines ie. Vcc, Ground, D+ and D-. Data is though transferred in the form of packets, which is composed of 8 bits(1 byte) with LSB(Least Significant Bit) transmitted first.

Pros:-

  1. Simple and fast.
  2. Almost acceptable everywhere.

Cons:- 

  1. Requires powerful master-slave device.
  2. Particular drivers are required.
2. UART/USART Protocols

UART stands for Universal Asynchronous Receiver Transmitter and USART also means for Universal Synchronous Asynchronous Receiver Transmitter.

UART converts data into serial data. though, UARTs communicate directly by converting data into serial form and transmits it into the receiving UART that converts serial data into parallel data for the receiving device.

The flow of data is from the Tx pin of the transmitting UART to the Rx pin of the receiving UART. Hence only two wires are required. UART is asynchronous and hence doesn’t require a clock for synchronisation whereas USART uses a clock for synchronisation in case of synchronous communication. It can be used in asynchronous communication also. Hence, it is a dual-type of serial communication.

UART is generally used in serial ports used with personal computers connected to modems use 8 data bits and low cost embedded systems.

Pros:-

  1. No clock signal required.
  2. Only requires two wires.

Cons:-

  1. Data frame size is limited only to a maximum of 9 bits.
  2. Multiple master/slaves are not possible.
3. RS-232 Protocols

RS-232 stands for Recommended Standard 232. Basically, it is an interface standard commonly used in computer serial ports. It also defines the electrical signals and its timings. However, It serializes the data to be transfer to the modem and deserializes it back while receiving back from the modem.

It uses a half-duplex master-slave operation. The current version is TIA-232F.

Pros:-

  1. Cheap and also easily available.
  2. Simple connections and easy to code.
  3. Commonly in use.

Cons:- 

  1. Half Duplex master/slave operation.
  2. Less standardized connectors and terminology also.
4. RS-485 Protocols

It is an improved version of RS-232 which can connect 10 to 32 devices at the same time and defines electrical characteristics to ensure proper signal voltages under maximum load. The good noise immunity and multi-drop ability make it the choice for serial connection in industrial applications with its cable length up to 4000 feet. However, generally in use for computer and automation systems.

Pros:- 

  1. Good noise immunity.
  2. Multipoint applications.
  3. Though Cheap.

Cons:- 

  1. Half-duplex master-slave operation.
  2. Less standardized connectors and technology.
5. Ethernet

A system connecting a number of systems to form a LAN (Local Area Network) having protocols to control the data transfer and avoid data transmission by two or more systems simultaneously.  Every Ethernet network interface card (NIC) is apply a unique identifier – a MAC address which is a 48-bit number.

The first 24 bits identify the manufacturer and it is the manufacturer ID or Organizational Unique Identifier (OUI) which is assign along the registration authority. It comes in various strengths like standard ethernet(10 Mbps), Fast Ethernet(100 Mbps), Gigabit ethernet(1000 Mbps), etc.

Pros:– 

  1. The network starts and ends with it.
  2. needs a switch to keep a network.
  3. can be in use in a building.

Cons:- 

  1. Can’t be in use for long distances as Fibre should be in use.
  2. It includes too many wires while connecting it in a building which is tough to manage.

INTERNAL SYSTEMS

Internal system protocols are use to communicate between devices within the same circuit.

1. I2C Protocols

I2C stands for Inter-Integrated Circuit bus. It is an internal communication protocol that uses one wire SCL (serial clock) for clock and the other wire SDA (serial data) for transmission. It can connect many slave devices to master devices. Since communication is half-duplex, it can either send or receive messages at a time.

Pros:- 

  1. Multiple devices can Connect.
  2. Interconnection without extra wires.

Cons:- 

  1. Complicated hardware.
  2. complicated programming.
2. SPI Protocol

The SPI stands for Serial Peripheral Interface bus. It is a synchronous serial communication interface which is generally in use for short-distance communication. It uses four wires i.e. 

  • SCLK (serial clock).
  • MOSI (master output slave input).
  • MISO (Master Input Slave Output).
  • SS (Slave Select).

Here, the communication is full-duplex i.e. devices can transmit and receive data simultaneously. First 3 pins have the same line from the controller. Only the SS pin controls which slave device is active.

Pros: – 

  1. Faster.
  2. The receiver can be also a simple shift register.
  3. multiple devices can connect.

Cons:-

  1. Requires a greater number of wires than other types of protocols.
  2. Slave devices can not communicate with each other. An only master-slave can communicate with slaves.
  3. So, each slave requires different SS lines which causes problems if many slaves have connection.

Written by: Aparna Chaurasia

Reviewed by: Batta Pruthvi

If you are Interested In Machine Learning You Can Check Machine Learning Internship Program
Also Check Other Technical And Non Technical Internship Programs

Leave a Comment

Your email address will not be published. Required fields are marked *