LowPowerLab. It is an Arduino clone with a 3.3V Atmega 328p that integrates a HopeRF RFM69 RF module. And let me tell you, this little module rocks. They are small, cheap, and readily available. Felix from LowPowerLab is getting tons of range out of the high power variant of these little guys. They are easily programmed over a SPI bus so you don't need special hardware like you do with TI's CC1110, and cheap versions operating in the 900 MHz band are easy to get unlike TI's CC1101. And recently, interoperability with the RFM12B popularized by the JeeNode has been achieved.
Now the RFM12B deserves a bit of discussion. Like the RFM69 module, it is small, cheap, and easily programmed. But it sucks in a number of ways.
- it has a very small FIFO that makes you jump through hoops if you don't have something real-time to respond to incoming data
- it has hardcoded sync bytes
- it is no longer recommended for new designs
The RFM69 fixes all these problems and adds some nice features while it is at it:
- it has a 66 byte FIFO, a fully programmable sync pattern up to eight bytes in length, and a variable length preamble
- address checking and CRC validation is optional
- it supports OOK, FSK, or GFSK
- it can do AES encryption
- other stuff
Intrigued, I picked up a Moteino with integrated RFM69W module and a couple standalone modules while I was at it. Then I got busy (see above). Then I got some free time (see above). Then I started hacking (see below).
Devoted readers of this blog will know that I am strangely compulsed to receive wireless transmissions from my Davis weather station using all kinds of strange hardware platforms. So why stop now? I've been looking for a platform like this that is available and easy to use so that more people can take a crack with this stuff (it isn't like you can walk into a Toys-R-Us and pick up an IM-ME anymore). I also don't want to be glued to the Arduino for everything. While it is great for running as a remote node, I like the idea of something like my BeagleBone Black connected directly to a transceiver module running some home monitoring and control software (HouseMon?) with Internet connectivity.
But, baby steps. What I decided to start with was my RFM69 equipped Moteino and the LowPowerLab RFM69 Arduino library. Because once you've got the wireless protocol figured out, hard hard can it be? Turns out, harder than I thought. But after slamming my head against a brick wall a time or two, I got this.
Want to check it out? My DavisRFM69 library is on GitHub and the data above was collected using the ISSRx sketch in the Examples folder. The approach that I've taken is to subclass my driver from the LowPowerLab one, overwriting just a couple of methods that are specific to this application (namely the initialization and the interrupt handler). That reduces duplication and lets me automatically pick up any improvements Felix incorporates into his main library. I have made a couple minor tweaks to his main library for some register definitions that I've issued a pull request for. Hopefully these will be incorporated into his main library soon. In the meantime, you'll want to use my fork of the library, so everything will compile cleanly. This and more is all in the README.
This work can be taken a lot further:
- do a full emulation of the Davis indoor console for use by weather software like WeeWx and Cumulus
- hang an RFM69 directly off a BeagleBone Black and write a driver to work under node.js
- why just receive?
I'm glad to now have this stuff under my belt. I could have taken the entire break to just sit in front of the TV eating fruitcake. That would be easy because My Lovely Wife makes a rocking fruitcake. But what I really find satisfying is that sense of accomplishment when you set a challenge for yourself and make it happen. This was a good way to kick off 2014, and the year is just getting started.
And don't get me wrong: I had lots of fruitcake.