Using Cellular for Internet of Things Devices and Design
As our world becomes ever more connected and data-driven, the demand for many devices has been moving from intermittent submission or data collection to immediate reporting to cloud services. This can present some serious challenges once devices get beyond your client’s WiFi network, such as sensors in farm fields or on the move. The cost of deploying a wireless network of any sort across a large industrial site or farm can be prohibitive without considering the maintenance and support costs. In many situations, there may not even be the option of deploying a wireless network, as when working with construction equipment or delivery vehicles.
In one of my recent projects, we designed an LTE connected GPS tracking/monitoring system that could be used as an asset tracker or preventative maintenance data collection device. Cellular internet of things products like the asset tracker project are only expected to grow in popularity as more devices become smarter and generate more data than ever before. If you want to add cellular communication to your next mobile product, here's what you need to know about cellular networks and how they interface with embedded/mobile devices.
What is Cellular IoT?
If you've ever wondered how to include cellular capabilities in your IoT products, I've compiled the definitive guide you'll need to stay at the cutting edge. Here's what I'll address in this guide:
- Cellular Internet of Things Services
- SIM Cards
- Cellular Modules
- Cellular Bands/Protocols
- IoT/M2M Operators
- Is a Cellular Modem Right for You?
Cellular Internet of Things Services
Cellular networks exist across much of the world’s landmasses and easily provide the best and easiest to access terrestrial network to send your data to the cloud wherever your device may go. Thanks to standardized bands and protocols, we can supply a device to New York, USA, York, UK, or even York in Australia with a cellular modem and know that it will be able to connect our services without requiring any new infrastructure.
While the concept of “Internet of Things” devices is relatively new, using cellular networks for machine communications is not a new concept. If you’re thinking about using cellular for your device, you might be thinking of the cost of being locked into a phone plan or similar contract just to use a tiny amount of data. Thankfully, you don’t need to worry about this! Where you have phone providers for your mobile phone, you have Machine to Machine (M2M) providers for devices.
M2M providers have several major advantages over a typical cellular network provider:
- They tend to allow access to hundreds of networks worldwide, rather than just their own.
- They are typically data or data + SMS only, so you don’t pay for expensive voice and video capabilities.
- You don’t typically need a plan or subscription, and they are pay as you go/prepaid with long expiry on credits.
All major IoT connectivity providers are either already providing global coverage or are in the process of extending their networks worldwide. They can achieve this by negotiating with the local operators on your behalf and leveraging their customers’ cumulated data volumes. This means you can buy just a few megabytes of data very cheaply, and it might have an expiry time of six months or a year, which is perfect for collecting intermittent sensor data. Suppose you have a large number of devices deployed. In that case, an M2M supplier will often allow you to manage all your SIM cards centrally and have a data allowance per account rather than per device, which can further ease costs and administrative burdens.
In addition to centralized management, many providers also offer an API for easily managing SIMs. This allows you to easily provide information and data to your clients through your own portal. Automation rules with most providers allow you to be notified of any issues with your devices automatically, allowing you to be proactive instead of waiting for your customer to start asking why their data is no longer being collected.
For testing, some regular mobile providers such Three (at least in some countries) allow you to have a no-contract SIM card you can activate and get a relatively large amount of monthly data, at least for IoT applications, free each month - typically around 200 MB. For a user with a phone or tablet, this might allow you to load Facebook once every few days for the month, but for an IoT node sending compressed text data, this could allow thousands of sensor readings to be sent each day at no cost.
Typically SIM cards from a regular provider do not come with a technical data sheet; nevermind a specified service temperature range or any industrial/automotive qualifications. With M2M SIM cards, you can get extended temperature range cards that offer a rated life of 10 years. These ratings can be critical to the success of your device. If your device is on an out of the way oil derrick or a rural farm, the cost of having a technician or engineer visit the site could be incredibly expensive, just to replace a SIM card that costs a few dollars.
Likewise, consumer-grade SIM cards may not be expected to have a life beyond the phone’s 24-month contract. If your product is going to be out monitoring a piece of equipment in a harsh environment, it could be there for a decade without needing servicing as long as power is supplied. Paired with a high-quality SIM card socket such as those from Würth, Molex, and others, you can be sure your product will not lose connectivity if the SIM card fails in your cellular internet of things device.
Embedded SIM (eSIM)
Alternatively, using an embedded SIM card (eSIM) saves significant real estate on the board. Where a SIM card is read-only, an eSIM is rewriteable and, better yet, surface-mountable like any other component on your board. It’s worth noting that eSIM support is not as widely available as for a regular SIM card. However, most major networks in the developed world will support them. In addition to the saving board space, you could also be looking at significant cost savings by adopting an eSIM for cellular internet of things products. The cost of an eSIM chip is typically lower than a SIM card plus socket and saves considerably on the labor of manually inserting a SIM card into a socket. The eSIM could be programmed automatically during the burn-in and test process of your device’s assembly.
There are some exciting benefits of adding a SIM to your products that may be hidden. The history of SIM cards is deeply intertwined with smart-cards, and numerous SIM-oriented microcontrollers have extensive cryptographic support.
For these reasons, some cellular internet of things providers such as Hologram have added integrated certificate management, a chain of trust, one-time tokens, and other advanced security features in their SIM cards. Managing certificates is not an easy job: the topic is extremely complicated, and small mistakes can have a long-lasting impact on your business. Even then, useful cryptographic libraries are hard to come by for smaller microcontrollers. IoT SIMs can be a first stepping stone into more robust, more secure communications for your devices.
With the complexities of cellular carrier certification on top of intentional radiator electromagnetic compliance laws and all the programming that goes into building a cellular module, you will almost certainly want to use a cellular module. Where a typical pre-certified radio module is cheaper to implement up to around 10,000 units versus doing the design and certification yourself, a cellular module is likely to be cheaper than a do it yourself approach for well over 100,000 units manufactured. Luckily there are some fantastic, modern options available.
Historically, cellular modules have been bulky, power-hungry, and limited in capabilities. The popular SIMCom SIM900, for example, is 24 by 24mm (576 sq. mm), whereas the more modern uBlox SARA-R4, which I used in my project, is 16 by 26mm (416 sq. mm) yet offers significantly more capabilities and much higher bandwidth. By taking advantage of the newer LTE bands, the uBlox module provides over four times greater data rates than the SIM900. The uBlox does not use appreciably more power to communicate with the network than the SIM900, however with up to 4 times the data rate thanks to LTE, sending the same amount of data potentially consumes a quarter of the power which is great for battery life.
Cellular modules are still relatively high power consumers, despite the great progress in the technology over the past few years. In contrast, a typical LoRaWAN module uses only 450 mW of power to transmit at its maximum power compared to 2 W or more for an LTE module. However, the LTE module will automatically transmit using much less power if it is closer to a cell tower. In contrast, the LoRa module will typically be programmed to use a set power level, and more firmware development is needed to include automatic transmit power reduction features. Despite the seemingly high power consumption, the throughput of an LTE module is far greater than that of a LoRaWAN module. LoRA has a maximum data rate of 27 kbps, almost 15 times slower than the maximum throughput of an LTE module. With only four times the power consumption, an LTE module can finish transmitting data faster and go back to sleep, overall using less power.
Despite potentially using less power per byte, the LTE module's large maximum power consumption does have other costs. A larger power supply is required, which will increase the cost of the components on the board, the board size, and potentially the battery or power source for the device to handle the current.
Which Module to Use?
After a lot of researching for my LTE tracker project, the uBlox SARA R410 met my requirements the best; however, it might not be the perfect module for your project’s requirements. Here are a few noteworthy alternatives in no particular order:
|SIM7000G||Made by SIMCom, the company behind the famous SIM900 module, offers both NB-IoT and LTE-M support in an extremely compact 14x12mm package.|
|SIM7060G||Also made by SIMCom, this module offers GNSS (GPS + Glonass + Beidou) and NB-IoT in the same compact, 24x24mm package.|
|Type 1SC-DM||Made by muRata, this module is feature-packed and likely to offer the same excellent quality we’ve all come to expect from all of their products.|
|EXS62-W||Made by Gemalto, one of the world-leading companies in the mobile payment industry, is sure to be relied upon in many commercial POS terminals.|
|nRF9160||Made by Nordic, this module features a great SDK, a full Arm Cortex-M33 at your disposal, GPS, LTE-M, and NB-IoT. Since the MCU is integrated with the modem and the SDK, this is one of the most accessible and most robust solutions supporting FOTA (Firmware Over The Air) updates.|
3GPP (3rd Generation Partnership Project) is the body responsible for developing new technical specifications for cellular networks. Their work then gets incorporated into standards by numerous national and international committees.
If you read all the specifications and material created by the 3GPP in-depth, you’ll hardly mention often over-hyped marketing terminologies such as 4G, 4.5G, and 5G. The 3GPP team works under a refreshingly sober and humble approach, considering much of modern technology is built on their shoulders. The only guidelines they offer on the subject are the following:
- 1G: First analog-based wireless phone technology. Think about the 80’s Wall Street movies and phone-bricks.
- 2G: 1990s tech, GSM/GPRS, EDGE, SMS, and data services. Still widely adopted by us folks in the electronics industry, this is very much so a legacy technology.
- 3G: Improvements over the existing GPRS and EDGE tech, improvement of the data rates, packet-first approach.
- 3.5-4G: Includes LTE, LTE Advanced, and LTE Advanced Pro. This is the most commonly adopted generation by modern devices and operators.
- 5G: The latest generation, which is just starting to be implemented in the world’s wealthiest nations, covers a significant number of innovations and is being heavily marketed.
Currently, the last frozen 3GPP release is Release 15 (approved in 2017), while Release 16 and Release 17 are still in the works. 3G and 4G specifications mostly fall under the LTE standard. LTE divides devices into categories based on the allocated data rate, release number, MIMO configuration, and other parameters.
The categories 1 to 5 are the original ones - dating back to Release 8 in 2006, and covering from around 10 Mbit to 300 Mbit. Release 10 and release 11 expanded the maximum speed reachable at 4 Gbit through categories 6 to 12.
More interesting to us is what Releases 12 and 13 did. The former introduced CAT-0 with a maximum speed of 1 Mbit and reduced power consumption. The latter went down to 0.68 Mbit but enabled the creation of devices with ultra-low power consumption, competing with protocols like SigFox and LoRa, as well as enabling 10-year battery life out of a single cell lithium primary battery.
If you need the 10-year battery life, you have little choice but to go with IoT-NB, but if your power requirements are a little more relaxed, then CAT-M with a CAT-1 fallback should cover you worldwide. Luckily, many companies offer LTE modules supporting multiple protocols, usually a combination of NB-IoT and CAT-M, sometimes with a GPRS or CAT-1 fallback.
2G and 3G
2G networks, of the type often used in legacy embedded devices, offer a maximum connection speed of 40 kbps, making the connection impractical for many modern applications, such as a web API with a lot of sensor readings or other data being transferred. The low speed also has a negative impact on power consumption. If you send 1 MByte of data, you need to keep your 2G modem powered up for 3 minutes. By choosing a faster modem, you can extend the sleep time as much as possible, saving time and battery power.
Many network operators are depreciating 2G support entirely. It’s unused by the vast majority of mobile devices in use today, and customer demand is practically non-existent outside of rural areas. The majority of smartphone applications will not work on a 2G connection as the data rate is too slow and appears to the software as if the network is not responding. 3G is rapidly going the way of 2G for very similar reasons. Modern devices require higher throughput than 3G can provide, and supporting this technology makes little sense for a modern carrier. While there is far more support for 3G around the world than 2G, its days are numbered.
Very soon, the minimum level of cellular capabilities that will be available in the majority of the world will be provided by LTE networks. Here's a short description of different LTE categories:
|LTE CAT-1||8||LTE CAT-1 release goes back to 2006 and is a slimmed-down version of the mainstream version of LTE. It uses less power and less bandwidth, but the improvement is not dramatic. LTE CAT-1 is the only widespread category with almost worldwide coverage.|
|LTE-M CAT 0||12||LTE-M CAT 0 has started the serious push for IoT applications, five years after the release of CAT 1. It trimmed all the fat (requirements) around the higher speed data-rates and streamlined the modem into a simpler, easier to manufacture, and more affordable component.|
|LTE-M CAT M1 (AKA CAT-M), CAT-M2||13 and 14||CAT M1 pushes forward the cost reduction for the end devices while symmetrically lowering implementation costs for the provider, being largely compatible with previous LTE protocols.|
|LTE CAT NB1/NB2 (NB-IoT)||13 for NB1, 14 for NB2||LTE CAT NB1 and NB2, commonly referred to as NB-IoT, finally reached feature parity with protocols like SigFox and LoRa, achieving the long dreamed of 10-year battery life single lithium cell. While the rollout of the technology is still just starting, many operators have heavily invested in technology, such as AT&T in the United States, Vodafone in over 15 countries, and China Mobile in China.|
5G is quite different from the LTE categories above. It not only increases its performance and requirements, with support for up to 71GHz in frequency but also allows a massive number of devices. 5G lays the groundwork for a more connected society through 3GPP releases 15 to 17: Mission-critical communication, API to build on the technology, vehicular and railway connectivity, ultra-reliable communication, low latency, private networks, and even Non-Terrestrial Networks (NIN) and satellite communication. 5G thus goes higher, wider, and also goes smaller through extended support for ultra-low power devices and reduced complexity implementations through the aforementioned NB-IoT protocol.
Many of the heavily marketed features of 5G are going to be fairly useless for embedded applications. The huge bandwidth is likely to be challenging for an embedded microcontroller or microprocessor to take advantage of. The new high-frequency bands severely limit range for accessing a tower, and most importantly - cellular modems supporting LTE have only come out relatively recently. It will likely be several years before a mass-produced, low-cost 5G modem of practical application for most IoT devices is released.
In the last 50 years, the embedded devices we electronics engineers have access to have trailed the consumer IT industry by about 20 years. We use microcontrollers with a similar density as a 20-year-old CPU. Our basic Linux embedded systems are usually about the power of an early 2000s system. We still often use technology from the 2000s in our devices for wireless communication (the GPRS networks we’ve talked about). Admittedly, the devices we use are a fraction of the technology's size and cost from 20 years ago. In just the last few years, we’ve started to see this gap be greatly reduced, partially due to the portable device industry. Will the smartphone industry's massive drive trickle down to provide pre-certified cellular modems that are accessible to us in the near future?
3GPP has introduced several features that ensure power consumption is significantly lower in cellular internet of things products, especially for products using the NB-IoT protocol. Two important features are:
Power Save Mode (PSM)
PSM or Power Save Mode allows the device to sleep without disconnecting from the network. While no data can be exchanged during this time, the feature removes drawbacks of typical modem sleep, such as the power-hungry handshake to rejoin the network and timeouts after entering sleep. The device communicates its preference regarding sleep time to the network, but it gets the final word.
Extended Discontinuous Reception (eDRX)
eDRX is a somewhat cryptic acronym for a simple feature. When activated, the device can choose an eDRX period during which will not be able to receive messages but only send. While the power savings are not as deep as with PSM, it allows the device to keep sending data and be an interesting compromise. It’s extended in comparison to the periods of a couple of seconds previously allowed for LTE devices.
Here is a list of IoT SIM network operators, and while we do not offer any endorsement, the following, among others, have consistently distinguished themselves in online reviews:
- Things Mobile is probably the most famous M2M provider specifically targeting IoT, as it was one of the first-movers in the IoT cellular market.
- 1NCE offers attractively priced 10-year options.
- Truphone is a UK-based operator that has been in business for many years catering to enterprise businesses and now has a broad IoT portfolio.
- Hologram comes with extensive cloud services, a Python SDK, and integrated support for Linux SBCs (Single-board computers). It’s among the easiest to get started with.
- Twilio Narrowband Is the latest offer from Twilio, one of the biggest VoIP and email operators worldwide, known for being extremely developer-friendly.
Is a Cellular Modem Right for You?
For specific applications, a cellular connection might be the only way you can get data back to your web services without building out extensive physical and software infrastructure. Since the early days, cellular has come along with large modems and terrible data rates that were very power-hungry per byte transmitted. That being said, if you have a WiFi connection available and the device will always be within the WiFi connection range, it’s easier to go with WiFi rather than build a cellular internet of things product. You don’t need to manage a SIM card and M2M contract that comes with it - its a lot of extra overhead when you already have a serviceable connection.
If your device is going to be on the move or in a location without other network options, then cellular might just be perfect as long as there is coverage. Using a cellular modem will be cheaper and faster than almost any other option available. If you’re working on a device that will be very remote, you might need to look into a satellite service as a backup to cellular to ensure your data gets submitted in a timely manner. The great thing about using a prepackaged cellular modem is that many of the EMC challenges in a high frequency mobile device are already solved at the modem level. Your job as a PCB designer is to properly layout the rest of the board around the modem while ensuring isolation between different circuit blocks.
Once you're ready to create a PCB for your cellular IoT product, use the design and layout features in Altium Designer®. When you're ready to manufacture your board, you can share your project data with your manufacturer using the Altium 365® platform. Have more questions? Call an expert at Altium.