Tuesday, May 17, 2011

RFM12B with Arduino

I've tried to get this very cheap radio modem working with Arduino. So far, no success, but I still got something working. I'll write a little bit about what I've done so that someone smarter than me will get it right. I managed to connect the board to Arduino using the SPI interface. I also managed to get the software working but couldn't get any data through the modem. Anyway, here's how you connect the RFM12B to Duemilanove or similar 168/328 boards.

1. Download the demo code and RF12.h Arduino library from here http://jeelabs.org/2009/02/10/rfm12b-library-for-arduino/

2. Download and install ports.h library from here http://jeelabs.net/projects/cafe/wiki/Ports

3. Upload the code to Arduino and connect the modem using SPI. The SPI bus uses pins 11 (SDI), 12 (SDO), and 13 (SCK). Also connect the pins 10 (SEL), 2 (IRQ) and 3.3V pin to (VDD) and ground to (GND). Use this datasheet to find correct pins on the RFM12B.

4. Open serial monitor and see the main menu where you can select your modem's frequency, node, etc.