Hack your own radio transmitter
My last little exploration of the RF spectrum was actually only part one of a two-parter that continues here. We’ve done the theory test; now it’s time to get our hands dirty with the more practical side of things.
I’ll be showing you how to hack together a simple and cheap system for short-range radio data communication. We’re going to use one of the licence-free bands within the RF spectrum, and the frequencies you can use will vary depending on where in the world you live.
The ITU splits the world into three regions, Region 1 being Europe, Africa, the western side of the Middle East and what we used to call the Soviet Union. Region 2 comprises North and South America, Greenland and a few eastern Pacific Islands, and Region 3 contains everything else – those bits of Asia that weren’t part of the Soviet Union, the Middle East including and east of Iran, and most of Oceania.
We’ve done the theory test; now it’s time to get our hands dirty with the more practical side of things
The licence-free bands vary by region, and there are a few national variations as well. Here in Europe, we’re able to use 433MHz, 868MHz and 2.4GHz for practical short-range RF experiments, but I’m going to ignore the latter because it’s slightly more expensive than the other two (and we don’t want to go stomping all over our Wi-Fi signal).
The lowest of the three frequencies, 433MHz, is one of the ISM (industrial, scientific and medical) bands, while 868MHz falls under Europe’s SRD (short-range device) regulations. Both are essentially free, although there are strict limits on radiated power and duty cycles. We won’t be getting close to those limits, but it’s something to bear in mind if you start building your own RF experiments.
Although 433MHz is more ubiquitous and perhaps has slightly better range indoors, 868MHz is less crowded and so is often the better choice. As we’ll discover, however, it’s easy to switch between the two.
There are several ways to get started with 433MHz or 868MHz data comms, but probably the easiest (and, indeed, the most flexible) is to use one of the new breed of single-board computers (SBCs). I happen to know that Kevin Partner has written about his Raspberry Pi in this month’s Online Business column, so, by way of contrast, my examples here will use Arduino-based kit.
It’s worth describing the difference between these two little computer boards. The Pi certainly has more CPU power and is more self-contained, with its on-board keyboard input and video output. The Arduino is slower and more basic, but it consumes far less power, so you can easily put together battery-powered experiments. Also, because it’s been around a while longer, there’s a whole industry of companies producing add-ons (or “shields” in Arduino-speak) that cover just about every application you can think of.
The RF module that’s become pretty well standard for low-power data applications is the RFM12B. If you own a wireless weather station or one of those whole-house energy monitors, there’s a good chance it features an RFM12B module. It was created by China’s Hope Microelectronics, but there are now a few third-party clones on the market. Perhaps it’s ironic that a Chinese company should fall victim to such piracy, but it still isn’t something to be encouraged, so do try to find a genuine model manufactured or licensed by Hope.