Internet of Things (IoT) is a hot topic right now. Millions and billions of tiny devices will interact with each other, the Cloud and machines all over the internet, in the near future. That’s what people say, anyway. By and large, they communicate wirelessly.
Everybody knows what “wirelessly” means…right?
We’ve covered the ESP8266 chips, which use a conventional WiFi (802.11-based) radio for wireless communication, in recent Off-The-Shelf Hacker projects. To me, wireless equals some kind of radio, typically, but not always set up for two-way operation. Since I’ll be rolling out more wireless projects, now is a great time to explore some of the cool types of radios Off-The-Shelf Hackers have at their disposal.
You thought microcontrollers were plentiful, cheap and easy to use? Radio modules, my friend, are just as easy to find and buy. They’re also relatively inexpensive. The variety of devices has exploded over the last year.
An important evolutionary step for physical computing is combining microcontrollers and various “wireless” modules to form devices that connect to networks.
In this installment, I’ll cover two common types of radios that you might use in your projects. I’ll also share where you can find the devices, along with cost and a few design considerations. Later articles will cover other radios and delve more deeply into project integration.
It’s simply a remarkable time for building Off-The-Shelf projects.
Lessons from Your Cell Phone
My two-year-old Samsung Galaxy 5s Active contains five different radios. You won’t see them as discrete components. The radios are very tightly integrated into the phone’s main board.
The good news is that you can have the same kind of radios in your project. They might be a little bigger or reside on a breakout board. That’s OK, with careful design and part placement, fitting a lot of radio and computing power into a compact package is certainly doable. The best part is that the tech is available, right now, off-the-shelf.
The two main radios in a cell phone are the multi-band cellular radio and WiFi. Here’s a summary of their functions and capabilities:
The cellular radio in my phone connects it to the cell network. I’m an AT&T customer and have great service, almost all of the time, anywhere. Cellular has a range of about a mile or so between the phone and the cell tower. The cells are roughly mapped out on a grid so you are usually in range. Obviously, long stretches of highway have the cells, well, close to the highway. Carriers place cell towers where people will connect to them, so you generally won’t find a tower 10 miles out in the middle of nowhere. Mountains, valleys, large bodies of water and buildings all affect the density and placement of cell towers.
Bottom line is that cell connectivity is remarkably uniform and getting better all the time. And, you can certainly use them in your projects.
Of course, there are trade offs to being able to connect anywhere. One big consideration is that cellular radios use a sizable burst of power, when first connecting to a cell site, so packaging an appropriate high-current capable battery into your project is important for good performance.
WiFi is the go-to radio for nearly ubiquitous, local connectivity. Of course it’s helpful to have a local area network (LAN) and access point (AP) handy to make that happen. Many modern cell phones let you connect to the cell network and then bridge that link over to the WiFi side. Your cell phone then becomes its own access point. The technique is called tethering and is supported by many carriers.
Using a WiFi module in your project allows it to easily connect to your local wireless network. If your network is connected to the Internet, say through a router, the path is there for your physical computing project too. Or, how about firing up “tethering” on your phone and connecting your project that way? Your project can then get to the Internet, any time you have cell service. Many WiFi modules can run in access point (AP) mode.
The ESP8266 modules are extremely common and cheap (some as little as $3) these days. They come in a variety of configurations and even have their own little programmable microcontroller. The latest Raspberry Pi 3 and clones include WiFi and Bluetooth, on the board itself. They are a little pricier at around $40. Integrating WiFi into nano-Linux and Arduino-derived systems is a growing trend. Suddenly that massively integrated radio array in a cell phone, isn’t that impressive.
Data rates over WiFi can reach up into the tens of MBs per second. Most of my projects, using the ESP8266 WiFi chip never reach that level of throughput. The PIR Yard Sensor, for example, only outputs a short (about 10 to 20 characters) message back to the data logging server whenever an object is detected. You could send streaming video over a WiFi link, if you wanted.
Power for the WiFi modules can be high. The ESP8266 radios draw upwards of 350 milliamps at 3.3 volts on transmit, so a fairly stout power supply is needed for reliable performance. The good thing is that you can use “sleep mode” or low a low power state during battery or solar operation and only use the high-current transmit mode, when you need to move data to the network.
Where Do You Get the Radios?
Cellular radio modules are readily available from Adafruit and others. Cell phones need a data plan so Sparkfun offers a SIM card with unlimited data from T-Mobile (good for six months) for around $80. Be sure to connect any of these devices to a high-current power supply. Sagging voltages when the phone tries to connect to a cell site can reset the board and generally cause unreliable operation. Communication with your projects are through a serial connection, so you may also need to take 5.0-volt vs. 3.3-volt requirements into account.
AT&T offers IoT starter kits for developers. One kit provides the SIM card for your existing cellular modem board, while the other provides a SIM card and boards to connect to their LTE network. Their plans include 300 MB of data usage and 300 SMS messages, to be used over a six-month period. Cost for the card is about $11. The card bundled with the hardware goes for $99.
Standalone WiFi modules and breakout boards are available, all over the place. Banggood has proven to be a reliable vendor for many of my projects. ESP8266.net has a whole list of vendors and links to tutorials. Adafruit has a bunch of modules, including some one-off models like the ATWINC1500 or the CC3000 WiFi shield.
Don’t forget that if you are running a Raspberry Pi without built-in WiFi, you can always simply plug in a miniature USB WiFi chip for around $12. I’ve used an EDIMax device for a couple of years with my Raspberry Pi and BeagleBone boards.
WiFi radios tend to be power hungry too, so decent supply currents are essential for reliable operation. Radios can communicate with the host microcontroller over USB, a serial line or over an SPI bus.
Wire Them Up
Cellular and WiFi radios are readily available, cheap and fairly easy to integrate into your physical computing projects. I’m amazed that the technology was almost non-existent as little as five years ago. And, it’s evolving at a phenomenal rate. Start investigating how you can use these gadgets, so you don’t get left behind.
Feature image via Pixabay.
The New Stack is a wholly owned subsidiary of Insight Partners, an investor in the following companies mentioned in this article: Shelf.