#112 LoRa / LoRaWAN De-Mystified / Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Greetings YouTubers Here is the guy with the Swiss accent It seems that LoRa and IOT are somehow connected and both are currently hyped very much. Today I try to put things a little in order, show you the basic principles of LoRa, it's pluses and minuses and also show you my own LoRa gateway and a LoRa client. And of course, I will send the first message to the things Network. A lot of stuff. So, buckle up the journey starts. LoRa is a low-power wide area network standard. Also called LPWAN. This term consists of three parts. One, low power. Two, wide area. And three, network. let's start with network. The difference between a normal small device and an IOT device is it's capability to connect to the internet. And because we expect millions of them, we need a network to connect all of them This network has to be based on standards because the network itself and the IOT devices will not be built by the same company. Best is always an international standard accepted by everybody. The next part is wide area. Our ESP8266 devices can connect to our Wi-Fi network which is part of a LAN or local area network . We all know that it's reach is limited to a few meters around our access points. Wide area networks need to bridge much bigger distances. This is necessary for IOT devices, because we want to use them everywhere. The real old guys amongst us might remember AM radio stations. We were able to receive AM even in the middle of nowhere. Far away from the station. This was a really wide area. But these transmitters were huge. Usually they were emitting kilowatts of energy. So it seems to be quite easy to bridge big distances using high power. But now we come to the third word. Low power. If we want to work on batteries we do not have lots of power for transmission. And here we see the dilemma. We want kilometers of reach, but have no power to spend. Fortunately physics gives us a third parameter to ease this dilemma a bit. It is called bandwidth. The physical laws say that if we want to create radio connections for a certain distance, we can either increase transmission power or decrease the bandwidth of the channel. But why should we bother about bandwidth? Because bandwidth and maximum capacity of a channel are directly related. The smaller the bandwidth, the lower the capacity of our channel. I still remember the old days of Morse, where a good operator was able to transmit 2 characters/sec. Which is a little less than 20 bits/sec. Today our wireless LANs are capable of transferring millions of characters per second. And they are still always too slow. To visualize the relation between bandwidth and range, we can use this chart. On the x axis we have the range and on the y-axis the bandwidth. let's now look at some of the well-known technologies and where they fit. Wi-Fi has a high bandwidth but only a low reach; and we know from our esp8266 it is quite power-hungry, not in the kilowatts as the old radio stations, but it easily needs a quarter of a Watt during transmission. And if we go up into the new faster standards the power hunger increases. And you know that the reach of 5 gigahertz links is shorter than the ones of 2.4 gigahertz links. The next technology is mobile Internet on our smartphones. The reach here is a few hundred meters up to a few kilometers in rural areas. But also here you do not get fast 4G coverage if you are in the middle of nowhere, because the next antenna tower is probably a few kilometers away. And we all know that the battery life of our smartphones is not great at all. Because this technology needs quite some power. The next technology is Bluetooth this technology runs well on small batteries as we know from many gadgets but unfortunately it reaches only a few meters so all of these technologies do not fulfill the needs of our IOT devices which was low power and wide area I think you know now what will come LoRa it has its own space long range but because of power limitations also low in reality extremely low bandwidth and this bandwidth is not only limited by the law of physics no it is even more limited by human laws as we will see later on so we know now where LoRa fits to make it very clear it is absolutely not comparable with Wi-Fi and not at all a replacement of this technology it is much closer to the mobile internet standards where also low-power variants are in development but it has its space with sensor networks if these sensors do not transmit a lot of data for telemetry in Formula One races for example this technology would not be suitable because of the number of readings required for humidity of your plants it is perfect because soil humidity usually does not change in second or if you monitor the occupation of a parking lot you also might not detect too many changes a day in order to understand the range better we have to deal with a quite complex topic the link budget what is this the link budget and why it is so important the link budget is as every other budget something you have at the beginning and which you spend over time if your budget is used up you cannot spend more at least this is what we learned when we were young the link budget also has to do with a link or the connection between the sender and the receiver it is filled up by the transmission power of the sender and the sensitivity of the receiver and it is calculated in decibel or dB it is also frequency-dependent the link budget is deducted by all sorts of obstacles between the sender and the receiver like distance cables walls trees and so on if the link budget is used up the receiver will only create some noise and we will not get any usable signal so what is the link budget for LoRa compared with other technologies like LTE or 4G LoRa has according its inventor Semtech a link budget of 154 dB which is much higher than the mobile internet with only 130 dB even if the radiated power is much higher than with LoRa but what does this mean is this an important difference fortunately we find so called radio link budget calculators on the intimate let's do some calculations to understand the topic better first let's assume we have a line of sight connection between the sender and the receiver and everything is perfect as we know our LTE budget is 130 dB so let's check the biggest distance we can communicate we set everything to 0 and the distance to 100 kilometers and we get minus 131.5 dB which is already more than the 130 available so LTE even in ideal conditions does not reach 100 kilometers 80 kilometers would be ok now we check LoRa with a link budget of 154 dB at 1,000 kilometers it is still below the 154 dB and that 1,300 kilometers it is close to the 154 dB I think you get the point as I said this is all theoretical if we connect our antennas to the sender and receiver and we assume that we have 10 meters of cable in total we lose about eight dB the maximum distance is now reduced to only 500 kilometers so 10 meters of cable is equivalent to 800 kilometers in free air and we did not use thin tables like this pigtailed we used the normal rg58 cable next we have to spend part of our budget for all obstacles between the sender and the receiver like walls or trees the thicker and the more conductive the obstacle the more budget it requests and sometimes we even do not have a line of sight connection and we have to work with reflected signals which reduces the link budget extremely luckily we can also increase the budget we can add an amplifier between the sender and the antenna or we can use a different kind of antenna with some gain I will not cover this topic here but at the end human law allows us only a certain power emitted by the antenna because we use a free band I shortly mentioned 868 megahertz before this is the frequency used by LoRa in Europe if we ask Google we see that each region uses different frequencies this is why you have to pay attention when you buy a LoRa device they all have their band marked on the back and because my Chinese supplier sent me a wrong device I even have now one for 915 megahertz to show you all these frequencies have something in common they are free bands and we do not need to apply for a license or pay a monthly fee to use it which i think is very good but it comes with a handicap the allowed power is only 25 milli watts in Europe and a little more in the US which is really not a lot even my small amateur radio rig has 5 watt output power we learned that the budget of LoRa is much bigger than of LTE why is this is LoRa really the better technology or did its inventors even create a miracle no LoRa is not at all a miracle it complies with all physical laws its high budget is mainly achieved by a very narrow bandwidth so how big or small is the throughput of such a LoRa connection the rated capacity ranges from 250 bits per second to 250 kilobits per second which is rather low compared with the mega bits of LTE but unfortunately this is not the whole truth as we will see later on one important thing at the end the lower standard is supported by a big alliance of companies called the LoRa Alliance which is important for its future up till now we just covered the transmission technology between the IOT device and something the next question is how can we connect our other devices or applications to these devices here comes the network into play it is called LoRaWAN the LoRaWAN band consists of distributed gateways or concentrators which are connected to the Internet and it consists of an infrastructure which is capable to transmit the IOT messages to our applications here we have an overview over the whole infrastructure many devices connects to one gateway many gateways are connected to the broker infrastructure and many applications are also connected to the same brokers and here we see two different approaches the commercial and the community approach in many places telecom companies started to deploy LoRa networks as with cellular phones you can buy a contract and use this infrastructure you just have to connect your device to the available networks here you see a press release from the Netherlands and also a price plan from Swisscom sig Fox is only providing IOT communication but they you do not use LoRa they use a slightly different protocol between the IOT devices and the network the community approach is led by The Things Network abbreviated TTN you find a link in the description these guys built an infrastructure to transfer the messages between the gateways and your application but they need of course many gateways all over the world and because of that they are glad if people like me build such a gateway and deploy it they provide a map of all available gateways and you can check here if one is close to you if so you can connect your device through this gateway and the TTN network to your application free of charge of course great unfortunately there was no gateway where I live so I had to build my own here it is it consists of a concentrated PCB in my case a IC 888 from I'm stand a raspberry 2 the concentrator has eight RF channels so it can support up to eight IOT devices in parallel which is not alot if we read the projected numbers of millions of IOT devices so what to do if we would agree that each device would only use one channel let's say for fifty percent of the time we could already support 16 devices and if each device only would use the channel by one percent of the time we could already support 800 devices just with my gateway and this is exactly the concept this is why I told you before that the bandwidth will be reduced even more and this concept is also in line with the law which allows only a one percent maximum usage of these frequencies by one device so you can divide the 250 bits per second by a factor of 100 which ends up in 2.5 bits per second in the worst case and now we are slower than morse and we are not finished with reducing capacity you remember your walkie-talkies what was the rule there yes only one should speak at one time otherwise nobody got anything and because LoRa uses the same channel for both communication directions this applies here as well to preserve the valuable capacity and because we want to use this network mainly for sensors LoRa favors the direction from the sensors to the Gateway and limit the traffic in the other direction also that will be a topic of future videos so I have now a gateway in my area and I only need one additional part a sensor node all sensor nodes consist of at least two components a microprocessor and a communication module you can use your microprocessor of choice and connect it with the communication module which complies with the LoRa standard there are a few out there mainly the RF m95 and the SX 1276 as already mentioned these modules usually exist in three different versions for 433 868 and 915 megahertz by the way they are not as cheap as other RF modules this is probably because the LoRa technology belongs to only one company Semtech for my first tests I use a Dragino shield and an Arduino Uno also this device will be covered in one of the next episodes but now let's check if the whole thing works the Arduino should be capable to transfer a message so first let's check in the air yes the spectrum analyzer receives some traffic on frequencies between 868 and 869 megahertz so the sensor device works and the concentrator you should get it because we still have lots of link budget left the distance is only a few centimeters and there are no major obstacles between the two devices so let's check on the console of TTN yes we see the message and it is high so summarized LoRa is a new transmission standard between distributed devices and distributed gateways it has an extremely low channel capacity a very low power consumption and therefore a very high link budget which makes it ideal for low-power sensors distributed everywhere all so far from the next gateway there are two different approaches for the network a commercial and the community approach the community approach is based on privately built and operated gateways and an infrastructure which transfers the messages from the Gateway to your application this was the first introduction the next episodes will cover the build and connection of a gateway as well as the build of a client some range tests and so on stay tuned I hope this video was useful or at least interesting for you if true then like bye you
Info
Channel: Andreas Spiess
Views: 683,293
Rating: 4.9528241 out of 5
Keywords: electronics, communication, eevblog, arduino, esp8266, hobby, diy, esp32, lora, lorawan, Range, tutorial, TTN, the things network, ESP32, LPWAN, low power, LoRa Gateway, Lora node, How-to, sigfox, NB-IOT, esp32 project, esp8266 project
Id: hMOwbNUpDQA
Channel Id: undefined
Length: 20min 25sec (1225 seconds)
Published: Thu Jan 19 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.