[From the last episode: we looked at different styles of programming for IoTThe Internet of Things. A broad term covering many different applications where "things" are interconnected through the internet. devices as well as a couple of communications protocolsAn agreed way of doing something. Like a convention, except that protocols tend to be related to processes. that follow one or the other approach.]
Wireless communication can be a complex business. We’re going to be looking into it in more detail in the future, but we’re going to hit one aspect of it now because it affects the ways some IoT devices may connect to each other or the cloudA generic phrase referring to large numbers of computers located somewhere far away and accessed over the internet. For the IoT, computing may be local, done in the same system or building, or in the cloud, with data shipped up to the cloud and then the result shipped back down..
What do we mean when we talk about a wireless signal? It means that we’re using radio waves to carry the information just like we use radio waves to carry – surprise! – radio content or broadcast television content. But, for anyone new to this, we first need to grapple with the notion of a radio frequencyThe rate of change of a signal, specified in hertz, or cycles per second..*
Dialing Up a Frequency
When we dial up a radio station, we can see that it’s identified by a frequency. For AM radio, it might be something like 740 kHz; for FM it might look more like 88.5 MHz. In case those units aren’t familiar to you, a frequency refers to how fast a signal changes. If a signal goes from low to high back to low again in one second, then we say that the frequency is 1 Hz, pronounced “hertzThe unit used for frequencies. It’s abbreviated Hz. Equivalent to cycles per second. A periodic signal that completes a cycle in one second is said to have a frequency of 1 hertz, or 1 Hz..” It’s related to the notion of a wavelength, which is – surprise – the length of one cycle of the signal – in this case, one second.
And what is a cycle, you ask? Well, that really only applies cleanly to a periodicThis can be a characteristic of some signal. If the signal changes somehow, and that change repeats itself exactly over time, over and over - like a sine wave - then the signal is said to be periodic. The amount of time it takes for the signal to repeat itself is called the "period." signal – that is, one that repeats its cycle over and over forever (theoretically).
Now, I’m going to put off a discussion of how “periodic” applies to the kinds of signals we’re talking about, so, for now, let’s just pretend that radio communication simply means sending a periodic signal of some frequency.
That means that our machinesIn our context, a machine is anything that isn't human (or living). That includes electronic equipment like computers and phones. could be talking to other machines or the cloud by sending out such a signal – at some frequency. But what frequency? What if it’s the same frequency as your favorite FM station?
I Call Interference!
That… would be a problem. Because these kinds of waves combine, so if that were happening, then your radio station wouldn’t sound right. That’s because the machine signal would be interferingWhen two radio signals exist at the same frequency, you end up with a combination of both. They are then said to be interfering with each other, meaning that they mess each other up. with the normal FM signal.
There is a huge range of frequencies that you might consider using, but if everyone just went out and picked a frequency, then there’s a really good chance that you’d be interfering with someone else. Which is why governments allocate the different frequency ranges – referred to as spectrumA range of frequencies. A prism shows a range, or spectrum, of visible light frequencies (yes, light is a wave). This is the literal definition of spectrum. Other uses – like references to the autism spectrum use the word figuratively to indicate a continuous range. In our context, this refers to the range of radio frequencies available for communication. Access to those frequencies is usually regulated by governments since they're viewed as a public asset. allocation. It divides all the frequencies into ranges and says who gets to do what with each range.
If you were around in the early days of cellular phones, you may have heard news stories about spectrum auctions: this was when new cellular companies wanted to have access to the frequencies they needed to carry our phone calls over the airwaves.
There are a TON of different allocations, and the following image from Wikipedia shows just how crazy it is. (You can click on it to get a version that you can expand so that you can read the labels. Note that each row in the image is a continuation from the row above. Ideally, they’d all be strung together left to right, but that would take too much space. So it’s broken up row by row. One row starts where the prior row ends.)
(Click to see original. Source: US Dept. of Commerce, via Wikipedia)
You may notice that this says “United States.” That’s because each country can do this themselves, and, no, they don’t always do it the same way. (Although, to be fair, you can see evidence of attempts at coordinating when possible.) If you have a machine that needs to move from one country to another, it has to be able to work on the allocated frequencies for each country that it’s going to be in.
Airwaves and the IoT
So let’s be specific about IoT: there are lots of ways to send information wirelessly. It might be over WiFiA common type of wireless network used to connect computers and phones to each other and the internet. or by cellular phone… or by one of a couple of different protocols specifically set up for the IoT.
- Cellular signals use the spectrum that your cellular provider leased at auction. That provider gets exclusive use of that part of the spectrum. This is a longer-range signal.
- Most other protocols use what’s called the Industrial, Scientific, and Medical bandA specific range of frequencies. Usually smaller and more specific than what’s referred to by spectrum. You would refer to the AM radio band, not the AM radio spectrum. That’s where CB – Citizens’ Band – comes from., or ISMA band of frequencies that anyone can use. In order to avoid interference, there are rules as to how one can broadcast on this band so that everyone plays nice together. band. That includes shorter-range protocols like WiFi and Bluetooth as well as longer-range protocols like Sigfox and LoRaWAN, which were designed for the IoT.
Those last two are important to note. A cellular provider gets exclusive access to the band they leased, so, within reason, they can do what they want without any fear of interfering with someone else. But the ISM band isn’t that way: anyone can use it. For that reason, they have a lot of rules intended to make sure that some bully doesn’t go out and broadcast loud and proud, crowding everyone else out.
You can think of cellular as like buying a big farm: you can plant whatever you want anywhere you want on that farm. The ISM band is more like a community garden: you can get a piece of it, but you can’t just take over the whole thing.
Cellular vs. ISM
That makes it harder to send large amounts of data over ISM-based systemsThis is a very generic term for any collection of components that, all together, can do something. Systems can be built from subsystems. Examples are your cell phone; your computer; the radio in your car; anything that seems like a "whole.". Sending an hourly temperature measurement? No problem; easy to do over ISM. Need to send a video? Probably not going to work – you’ll be better off with cellular.
Cellular is often more expensive, and it drains batteries faster (although they’re trying to make that better). So there are tradeoffs.
Most home IoT systems will use your home internet connectionThis refers to some kind of electrical connection. It might be through a network cable, a cable connection, a wireless connection, or a phone - just to name some options. The connection might be to the internet or to some other local device. – whatever that is – to get to the cloud. It might use your cellular carrier, but probably not — except when you control things from your phone. Industrial IoT equipment, on the other hand, is much more likely to use these other protocols.
*Here I’m using the term “radio” loosely. In dividing up the range of possible frequencies, there’s a range generally referred to as “radio” that’s specific – as opposed to microwave, infraredLight below the frequency of (or with longer wavelength than) visible light. The wavelength range is roughly from 800 nm to 1 mm. Near infrared is the range near the visible part of the spectrum, from 800 nm to 2500 nm., visible light, ultraviolet, and <danger!> gamma rays. But I’m not being that specific in my usage for this particular blog post.
Leave a Reply