RFM12 Tutorial – Part1

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:

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.

Next – Part 2

Similar Posts:

Print Friendly

Author: Stephen Eaton

Geek at heart. Loves to tinker and find out how things work, which inevitably leads to items in pieces and not working for much longer :)

13 thoughts on “RFM12 Tutorial – Part1”

  1. Ayesha
    Hello, Its great but i m waiting for the next parts as I am working on RFM12BP and facing a lot lot of problems.I am sure that the next parts will help me out Wating anxiousely. When is the next part comming.

  2. I have just moved house so everything is pretty well all over the place until I get unpacked.

    I have also been playing around with a logic analyser so I can better monitor the SPI interaction between the RFM12 and the MCU.

    Stay tuned…

  3. Hi,
    I wish u get settled in your new home as soon as possible.and find it comfortable and couzy.
    Acn i use oscilloscope instead of logic analyser for the same purpose.

  4. Oscilloscope will be fine, it’s what I’ve been using up until now, but you can only view 2 channels at a time (if using 2 channel model).

    I also replied to you posts on the forums so they should give you something to try.

  5. Hi,
    I am currently working with the RFM12B transciever. Hope I will run them, I have already written a transmitter side, still working on the reciever. However, if anyone would share the code, I would appreciate that. I also want to implement checksum. Discussion about these transciever through PM or emila would be great as well.
    Thanks in advance.

  6. hi,

    Now i am working with RFM12b,the problem is,c8051F120 controller can transmitted and c8051F326 can received properly,but
    while c8051F326 transmitting the c8051F120 is not receiving.

    for TX/RX, i am using RFM12b,,,,,,,,,,,,,,

    can u plz explain the problem …….,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Leave a Reply