During the development of the StrobIt Open Trigger Project I’ve been using the HopeRF RFM12B Tranceiver as the RF module. The learning curve was fairly steep so I’ve decided to create a series of How-To articles so that others can easily get the module up and running fairly quickly for their project of choice. So far I’ve already slated these for use in a few other projects around the house, both robotics, home control and weather station related.
Disclaimer: I’m not an RF Engineer so please bear with me when the RF theory comes into play as I may be wrong!
The RFM12B tranceiver is a multi-channel RF FSK tranceiver that operates in the unlicensed ISM bands, being 433,868 and 915MHz. You need to purchase the module that that meets your countries licensing requirements, i.e in Australia 433 and 915Mhz are allowed, I’ve been developing with the 915MHz dip module, they are also available in two types of SMD.
The range of these modules appear to be very good, this will obviously depend on a number of factors, like interference, how the module is configured and so on, but the data sheets for the RFM12B report a max distance for all bands of 250m in open air, the RFM12BP it is 3000m, not too bad eh? Now granted these are probably under ideal test conditions.
I’ve had success of 25-30m with the 915Mhz module @ 9600bps with no packet drops using the supplied basic piece of wire antenna Indoors through a couple of walls i.e. non line of site, I’ve yet to test it out in the open air for the max line of site distance, but I’m guessing that it will be further than the 25-30m I achieved indoors 😀
The modulation technique used by the tranceiver to transmit the binary data over the air is FSK, this stands for Frequency Shift Keying, without going into too much detail basically means that by varing the frequency it is used to represent binary 0’s and 1’s, its also less prone to interference than the more common ASK relatives. (see http://en.wikipedia.org/wiki/Frequency-shift_keying for more details).
These modules use a software interface accessible via SPI to program all configurable parameters, so there is nothing on the outside of the module for the user to tune. This allows you to control things like Frequency, Receiver Bandwidth, Data Rate, Transmitter Power, Modulation , Power management and lots more. In short it’s very flexible to configure, but also a bugger to work out how it all goes together if you are new at it (which is the purpose of these articles).
One of the features I do like of these modules is they are programable via the software interface to just about any frequency in the band of choice.
- 430.2400 – 439.7575MHz in 2.5kHz steps
- 900.72MHZ – 929.2725MHz in 7.5kHz steps
This will lend them to frequency hopping, but more of that down the track.
During these articles its probably a good idea to printout and refer to the following datasheets from the manufacturer:
- Detailed Data – http://www.hoperf.com/pdf/RF12B.pdf
- RFM12B – http://www.hoperf.com/pdf/RFM12B.pdf
- Programming Guide – http://www.hoperf.com/pdf/RF12B_code.pdf
- Demo Unit – http://www.hoperf.com/pdf/RF12TOOLS.pdf
I found that I’ve needed to refer to all of them during my development process as there are questions raised in one that I’ve thought to myself, how the heck do you get that?only to find the question answered in another datasheet, so it’s just handy to have all of them available, I’ll also refer to them in these articles.
In the next article I’ll move onto the hardware interfacing and how we go about connecting the module to the MCU of your choice. I’ll be using the PIC, in particular the PIC16F88 as it’s a fairly common part and it’s also what I’m using for the StrobIt Project.