Tinkering with the RFµ-328

The RFµ (or RFu, for the purposes of people being able to Google this without trying to type µ) 328 is a really neat little board from wireless vendor Ciseco. I picked one up for a project I’m doing where I need a low power microcontroller and some way to talk to a base station with power. This is basically what this board is – an integrated ~896MHz radio module and microcontroller. The radio module works as a serial link so it’s really easy to work with, and the microcontroller is the Arduino compatible ATmega 328 chip, complete with the Arduino Uno bootloader.

There were some stumbling blocks I figured I’d document here, though, to get to the point where you can throw code at this thing and have it work, entirely over the air.

First up – I’m doing this on my Windows box using a SRF Stick, a USB stick which shows up as a serial port in Windows. I had to go into Device Manager and set the baud rate there to 115200 baud, and disable hardware flow control (8N1 parity, of course). Next a bit of configuration is needed to set up the SRF Stick for remote over the air programming. Grab PuTTY or your favourite other serial terminal tool and point it at COM18 or whatever your SRF Stick has shown up as.

Programming the SRF is simple – you type “+++” (without quotes) and wait for it to say OK. Then you enter the command, and hit enter. You have about 5 seconds after it says OK to get the command input, so you may prefer to paste it into PuTTY (right mouse button by default) from your clipboard. After those 5 seconds it drops out of config mode. The commands you need to run are, in order:

  • ATRP 1
  • ATRI —
  • ATRC 3
  • ATAC
  • ATWR

These commands: enable remote reset, set the remote ID to –, set the channel to 3, apply the changes and writes them to memory. After this, unplug and plug in your SRF Stick. Next grab the Arduino IDE, set it to the Uno bootloader and point it at COM18 (or whatever your SRF Stick is). If you want some more info and details on how to do this on a Slice of Pi module or other non-USB module, look here.

Now let’s prep the RFµ-328. You can connect 3V3 directly to pin 1 and ground to pin 10 (pinout) – how you’re wiring this up I leave as an exercise to the reader but in my case I used the Ciseco development board (having put the fine pitch headers in and soldered the module directly to those pins, to reduce the height of the device). I then had a Cisceo PowerPOD which is just a little 3V3 switching regulator to provide solid 3V3 out from my power source (a 3.6 nominal volts LiPoly battery with 1000mA of capacity).

Once you’ve powered it  you’re basically good to go – the default config is set up to pass serial through to the µC directly with the ID of — on channel 3. You can configure it further if you like but that’s out of scope of this guide.

Once you’ve got the device powered you probably want some sort of indication it’s working – so clip an oscilloscope or multimeter onto a pin, grab the Arduino ‘Blink’ program and hit upload. If it goes accordingly, you’ll see a pin wiggling as intended. Congrats, you’re up and running!

There is one other trick which is that to use the radio for talking back, you’ll need to pull pin 8 high. This link has some example code for this – basically set pin 8 as an output and pull it HIGH before you do Serial.begin!

It’s quite a nice little board (and it is tiny, which is great for space constrained projects). I suspect some power users might want something with a bit more flexibility to allow for  use of an external directional antenna but for low range low power stuff this is a good starting point.