Conf42 Internet of Things (IoT) 2023 - Online

Communication Protocols for IoT Systems

Video size:

Abstract

IoT is all about devices talking to each other and server. In this ecosystem the communication protocols plays a vital role as they are back bones of this communication. I will talk about various Wired and Wireless protocols along with exciting things and startups coming around these protocols.

Summary

  • In this talk, we will be talking about protocols which are used to enable IoT systems. These protocols are wired as well as wireless. Many new protocols are coming up every other week for the wireless Internet of things. In things session we will see which all protocols are needed.
  • Wired protocols or wired Internet of things protocols are enabled through physical cables. These protocols are generally used to make connection between sensors and the microcontrollers. One advantage of wired IoT protocols is they are much more reliable. But the range is something which may fluctuate for different protocols.
  • UArt is the most basic protocol which is being used. Second one is like I two c. Another important protocol for enabling wired Internet of things systems is SPI. It works on very high speed communication, and IoT requires more wires.
  • Modbus protocol is widely used in manufacturing and other industrial grade IoT systems. OPC, UA is a unified architecture which was formed by the consortium of many companies who work on Iot. Let's move on to wireless IoT protocols and see how that scenario is coming up.
  • One important protocol for IoT is Zigbee. Zigbee is mostly used in home automation and offers a decent amount of range with very less electricity. Another protocol, like in wireless protocols, there is always a fight between two protocols. According to me, Zigbee has already won that war.
  • Wireless protocols offer long range with low power consumption. With IoT, you have to go with the network providers. Most of the time we prefer to use wired protocols. We cannot say like wired or wireless is the winner.

Transcript

This transcript was autogenerated. To make changes, submit a PR.
You. Hello, everyone. So in this talk, we will be talking about protocols which are used to enable IoT systems. And these protocols are wired as well as wireless. So we will be discussing about various protocols in this particular session. So, like, the first question which we want to ask is why protocols are important. See, to make any system work, we need to have a set of instructions which are also known as protocols. So to enable IoT systems, we require certain set of protocols which needs to be followed. And let's see. So the Internet of Thing is something which is realized by the interconnectedness of the devices. So to enable this interconnectedness, we need various protocols. And in things session we will see which all protocols are needed. So basically there are two types of protocol. One is wired and another one are wireless. So first we will see wired protocols, and after that we'll see wireless protocol. And let me assure you that wireless protocols are much more interesting than wired ones because wired ones is something very basic which we can see like everywhere around us, but wireless. Many new protocols are coming up every other week for the wireless Internet of things. So that part would be more interesting. So let's start with wired Iot protocols. So these, like, as the name says, wired protocols or wired Internet of things protocols are enabled through physical cables. Like we have real physical cable which goes from point a to point b to make sure that our system works. So these wired protocols, there are certain advantages of these things, like they are more reliable and offers stable connection. And these protocols are generally used to make connection between sensors and the microcontrollers, or microcontrollers and the gateways. And sometimes if we are using like Ethernet Internet, then from gateways to the server as well. So let's see, what are the advantages, what are the disadvantages and various types of wired Iot protocols. So, like as you can see in this image, there are many small electronic components connected with each other. So how these components are talking to each other, that is defined by these wired IoT protocols. So one advantage of wired IoT protocols is they are much more reliable because we know a clear path from where the signal has to transfer from point a to point b, and that path is through the wires. So there are very less chance that some kind of interference will occur or some kind of intrusion will occur. And it offers better security because everything is enclosed in a physical space and no one from outside can read those things. See, definitely it will offer better speed because we know at our home also, WiFi is always slower than the physical lan cable. So same things applies here, because if we have wires, we know like 100% the signal will go from point a to point b. And the range, like it offers good range because through wires, we can transfer the signals from kilometers to kilometers. But IoT also depends on the protocol, like how the signals are being transferred. So the range is something which may fluctuate for different protocols. So let's begin and start with the most basic, most basic IoT protocol, or let's say most basic electronics protocol. This protocol is used in almost like all of the electronic appliances, be it your smart tv, be it your speaker, be it your mobile phone, or be it your vehicle, or like anything. UArt is the most basic protocol which is being used. It is a serial protocol, like the data goes after one after another. And this is basically used to enable the communication between two devices over a shorter range of distances. And it is very simple to implement. There are various libraries and packages available for all the microcontrollers. And this is the most basic protocols, which if you are getting into IoT, you need to study about this thing and use it as well. And there are some disadvantages, like it can only be used for shorter distances and interface interference is also there. Second one is like I two c. So advantage of I two c over any other wired protocol is that we just require two wires to enable this particular protocol. And we can connect multiple hardware on those two lines. So it works as a multimaster, multislaves. Like, we just need to have two wires. And on these two wires we can connect hundreds or thousands of different devices or sensors or actuators. And like each sensor or actuator will have a particular address. So these two guidelines, which we have, one is for the address and another is to transfer the data. And this protocol is also used in various sensors, if you startups exploring any industry grade sensors. So most of the sensors work on like I two C bus. And it is efficient for shorter distances. But for longer distances, there could be some synchronization issues because see, like on two wires we are using so many hardware. So some issues will be there. But yeah, another thing to note down here is if we decrease the number of devices on I two C bus, we can increase the range or we can increase the speed. So that is one thing to note. Another important protocol for like enabling wired Internet of things systems is SPI. SPI is, let's say more advanced version of the protocols which we saw like earlier. So this also works on a master slave architecture, but there is always one master in this particular case, which is usually the microcontroller. And these slaves will be all the sensors and actuators. The advantage of using SPI is it works on very high speed communication, and IoT requires more wires. It requires four wires to work for each slave. So, like, if there are multiple slaves and one master microcontroller, then the number of wires will increase for SPI. And SPI is also used, like in many of the gateways. If you see anything with antennas, be it your Wi Fi router or be Iot the cellular signals, antennas, like these circuits, will be having something or other which is working on these, like, SPI protocol, because it is very high speed. Now, these three were the most basic electronics, or like IoT protocols. Now we will move to something which is specific to industrial IoT, or let's say specifically for IoT things. So one of the protocol is modbus. This is very much used in industry. Manufacturing. Like anything in your home which is manufactured in some or other kind of factory must have been gone through this modbus protocols, because these machinery which is controlling that manufacturing plant or the machines which are present in that manufacturing plant is certainly working on things. Modbus protocol. And it is very simple to use, and it is widely used in manufacturing and other industrial grade IoT systems. This protocol, I think, like every one of you have used, like, if you are a bit from the older generation, because like earlier, we don't used to have WiFi everywhere. So we used to have that lan cable which we have to drag and put it in the Ethernet or RJ 45 port in our laptop or computers. So this is also like very old protocol, which is still being used in many IoT systems. This is used in industrial as well as like home or office networks. Advantages like high speed, it can support up to one gbps of speed. Like, I have one gbps connection in my home, and through WiFi, I am only able to get 400 to 600 mbps. But from Ethernet wire, I get exact one gbps speed of Internet. And limitation is like, you cannot drag it anywhere in the house. It can only be enabled at a particular place. If you have a cpu in your room, then you can only use in that cpu. If you have laptop, then you have to physically put this wire in your laptop. You cannot use it, like anywhere in the house, like Wi Fi. This is very interesting protocols, which is like OPC, UA. This is like a unified architecture which was formed by the consortium of many companies who work on Iot. So this is a standard. Like, they made a particular standard for like, m to m communication or machine to machine communication. This protocol is also used in manufacturing and process controls, like in your electricity grids or your water system. Advantages like, there are many companies who make their own products. So all these companies thought like, let's make some unified architecture for our IoT products. So in this thing, you can have a gateway from Samsung and a sensor from Siemens or a sensor from Honeywell, and they all will be working with each other. So this protocol provides interoperability. But at the same time, this thing is a bit complex to implement. But for us, we always have sdks to just use these things easily. So this is the thing, another protocol, which is like almost used in all of the vehicles, be it your two wheeler, four wheeler, trucks, or anything else. So this is a standard protocols for your vehicles. You can also access a part of this protocol if you have access to the OBD port in your vehicle. So what usually happens is if you are driving a four wheeler, there will be many things happening, like engine rpm, coolant temperature, the speed of the vehicle, the amount of the fuel present. So all these things can be accessed through the can protocols. We just have to plug in obd reader and all these information can be read. So this particular protocol is used in vehicles or like vehicles, be it two vehicle, four wheeler, or like trucks or buses or anything. But IoT is not used in railways or like airplanes for those things. There are very specific protocols which we will not be discussing in this talk. So the scenario of wired protocol is very small. Like, you only have certain set of protocols and they work like that. There is not much innovation happening in things particular field as compared to the wireless IoT protocols. So let's move on to wireless IoT protocols and see how that scenario is coming up. So, in wireless protocols, like we know, there is no physical connection. We can have two devices present anywhere, there is no physical connection between them, and they are communicating with radio waves. So this is used in variables like your smartwatch is sending the data to the phone through bluetooth. Or smart cities where your traffic is controlled by some IoT protocols, like the street lights, it is controlling the street lights, or it is controlling the traffic signals. There are remote sensors which are reading the temperature, humidity, or like air quality values. Transportation, where you can track your vehicle. Where is my vehicle present right now? Or if you have booked an Uber, you can track where is your Uber? Like, all this is happening through wireless protocols. So, first of all, we'll see what is the advantage. I think everyone knows. Like, it offers flexibility, IoT offers mobility. Like you can move your things from one place or one room to another and it will still work. Scalability. So suppose there is a wifi in your house and you are using four laptops with that. And suppose your friend, up friend comes to your home, he or she also wants to use your wifi connection. They can easily connect to your network without any trouble. But same thing, if there was a lan connection and you have to put an ethernet cable, then there will be various issues. Like first of all you have to put a cable in your router. After that your friend will use that cable and like again, range. Like if we speak about 4g or 5g connections, so they work like all over your city. So it offers good range as well. Now first of all, we'll go through some protocols which we all have heard about. The first one is bluetooth. So it is something which is for shorter range because bluetooth signals cannot move beyond say 2020, 5 meters. After that they will start to decrease. And in bluetooth we also have various flavors of bluetooth, like we have ble, which is bluetooth low on energy. So ple is used for systems like your smartwatch because we need to conserve the battery life in the watch. We can trade off it with the range, but in smartwatch, either way we don't need higher range, like maybe two or 3 meters. That's it. IoT is present everywhere. Like any electronic device you buy, be it any smartphone or laptop, bluetooth will always be presented that. And now Bluetooth is mostly used with Bluetooth speakers, Bluetooth headsets and all these things. So Bluetooth is like the most basic wireless protocol. Second widely adopted wireless protocols is Wi Fi. It is also used in many IoT systems. See, most of your smart home things will be using Wi Fi like smart lamp or smart speaker, or if you take the case of Amazon Alexa. So like alexa connects with the Wi Fi to stream the songs or give any of the information to you. So it is used in local area networks, smart homes, offices and these public spaces as well. High transfer data rate. I think with Wifi five or six, like we can get one gbps of speed. But one thing to note is it uses higher amount of electricity, so you won't find Wifi protocol like in the appliances or IoT devices which run on battery. It is like always present in something which runs on the mains power supply. One important protocol for IoT is Zigbee. Zigbee is mostly used in home automation and the advantages it offers a decent amount of range with very less electricity. So if you have any of the IoT devices in your home, which requires a special gateway, that IoT device is most probably using a Zigbee protocol. So, Zigbee is also very similar to Wi Fi, where you need to have a router or a gateway, and all the Zigbee clients will connect to that particular gateway. And like, another advantage is it gives us the option to exploit the features of mesh networking. So, mesh networking is something like, if there are four devices present, four IoT devices present in your home, they will relay their information from bones to two to three, and the third one will relay it to the gateway and something like that. So all the IoT devices will be able to connect to each other and send, and finally send that information to the gateway. Speaking about the range, so, Zigbee gives a decent range of, say, 100 meters. So that is decent for any of the smart home scenarios. Another protocol, like in wireless protocols, the scenario is there is always a fight between two protocols. So there is a fight between Zigbee and Zwave. So these two protocols offer almost same advantages, and they have same disadvantages, but let's go through them. According to me, I think in the war between Zigbee and Zwave, Zigbee has already won that war, and like Zwave is slowly and slowly going out of the market. So, IoT also offers same flexibility, that is of Zigbee, low powered wireless communication. And it is also used in smart home scenarios, mesh networking and all these things. Now we will move to some interesting wireless protocols. Like the first one is my favorite, which is Loravan. So when we see these particular protocols, they are called as long range, wide area network, or like wide area network protocols. So these are also wireless protocols, but the range is like 5 km or 8 km, something of that scale. So, in Loravan protocols, you can place a gateway inside your home. It's not very expensive, like you can plays it in your home and in your city, you will have your private network connection for say like 5 km. So, like, any of the sensor you place in that five kilometer range will have the access to your private network. And these sensors, the most important advantage of Loravan is that IoT requires very low amount of electricity. So the sensors, which are, let's say, battery operated, can run for like five, six or eight years without any interference. So this particular protocol offers long range with low power consumption. But at these same time, there is the trade off with the speed. So you won't be getting any gbps or mbps of speed, like rarely you will get five or six kbps of speed, but it is still decent if you have basic sensors for which you want to send the data. It is mostly used in smart cities and like also in smart agriculture. It is very much low powered. Like a battery operated device can also run for five years at least. And transfer speeds are pretty low. At the same time, like in this particular space, which is like Lpvan, low powered, wide area network. There are many other protocols. Another one is nbiot. So, Loravan is something which operates on ISM frequency band, which is industrial, scientific or medicinal. But like NBIoT, for this, you need to purchase the spectrum to run this protocol. And this protocol is usually offered by the ISPs or SIM providers in your area. So if there is Vodafone, like Vodafone will be providing 4G or 5G services as well as they will be providing NBiot. Similarly for AT and T or any other protocol. So like one advantage of NBIot is for these service provider or for these network provider. These don't have to install additional antennas to give access to this protocols. So if suppose at and T already has thousands of antenna in a country using those same antennas, using those same four g, five g antennas, we can also give access to this IoT protocol. And it is also being used in smart cities asset tracking. And for these also the sensors can be run on battery. And they will be providing battery life of say five, six years. I personally have used Loravan as well as NBIot. And these two protocols are very similar. The only advantage to go for Loravan is like you can have your own private infrastructure, but with IoT, you have to go with the network providers. Another important protocols in this particular space is like lp van space is Sigfox. So like, speaking of the advantages, same advantages things gives low power, long range connectivity. And it is having same disadvantages, which are like slow data rate and all these things. So it is almost similar to IoT and Loravan. But this protocol is also slowly and slowly getting outdated. So Sigfox is moving also out. One important startup about which I want to talk about is lacuna. It is project Lacuna. And what these guys are doing is they are placing Loravan sensor in these satellites around the Earth orbit. And what they are claiming is like if on planet Earth, from anywhere, if you have access to the sky, you can see the sky from your line of sight. You can use Loravan protocol because those guys already have the satellites in the space. So if you have any of the application where things are moving on a ship and you want to send some data to your server, then you can use Loravan protocol to send that information from that ship to the satellite using Loravan protocols, and that satellite will relay the information to your servers. So, like in wireless protocol, many new things are happening. Now, let's see, what is a comparison between wired and wireless? We cannot say like wireless is the winner or wired is the winner. Like almost in every case, these two things will work in conjunction of each another. So if you have IoT system, a complex IoT system, it is surely using wired as well as wireless protocols. The choice is up to you, like which wired or which wireless protocol you have to use. But these two protocols will always be used together. Most of the sensors, actuators or microcontrollers connection will be happening through wired protocols. And from microcontroller when we are relaying the information to the gateway or from the gateway to the server. Most of the time we prefer to use wireless protocols. So advantages of wired protocols is like they offer very good reliability and stable connection. And they are more secure because in wireless, like someone can eavesdrop on your signal and try to decrypt it. But in wired protocols, there is no chance like anyone will be able to read your signal. And wireless protocol advantages like you can place your sensor anywhere. You don't have to care about laying the wires or something like that. And like in wireless, there are many protocol you have to first understand your use case. After that, choose between if your sensor or IoT device will be having access to mains electricity source, or you have to use a battery to operate your devices. Maybe it could be solar powered. And you also have to think about the speed at which you have to transfer the data. If you have some basic sensors, which just has to send like a temperature or humidity values, then we can use like LPvan protocols. But if you have some IoT device which is sending like say a video stream, then we require something high speed like Wifi, or we can also use wired protocol like Ethernet for that. So when we talk about real world applications, like smart home is one of the scenarios where IoT devices are growing at a very fast pace. So in smart home, if you see any of the device, IoT is using wired and wireless protocols. Let's say you have a smart led present in your house. So that led is actually an actuator which is controlled by a microcontroller. So that microcontroller to led IC signal will be something over wired protocol, but that MCU will be connected to the server or to the Internet via Wi Fi or Zigbee or any other protocols. So both wired and wireless protocol are being used similarly with these case of industrial automation. Like suppose we have a factory where machines are working together to manufacture your products, something of the use. So those machines will be controlled by a protocol, let's say modbus. And in that smart factory, there are various sensors which are present, let's say temperature and humidity sensor, just to track the working conditions of that factory. For those sensors, we can have protocol like Loravan to send the data to the server and all these things. So in short, like any IoT system will be using wired as well as wireless protocol. And if you are making a system, then first of all, you have to understand your use case. And after that you have to see which wired protocol I will be using or which wireless protocol I have to use. So this is the trade off which you guys have to choose. And I think all for this talk. Thank you guys for listening to my talk. And I am very much passionate about IoT. And if you guys are also passionate, then we can also connect on LinkedIn. Or if you have any question or queries you can anytime ask me, I would be more than happy to answer it. So thank you guys, have a nice day.
...

Samarth Gupta

IoT Developer @ Think Future Technologies

Samarth Gupta's LinkedIn account



Awesome tech events for

Priority access to all content

Video hallway track

Community chat

Exclusive promotions and giveaways