rfm12


My sample order of the RFM22 were waiting for me when I arrived home late last night.

Here is a picture of the RFM22 (Left) next to the RFM12B (Right).  Pretty much the same physical size, but more pins, and a lot of very small discrete components.

RFM22 and RFM12B

So What’s New?

These new transceiver modules from HopeRF appear to be based on Silicon Labs Si4431 and Si4432 RF Chips.  Silicon Labs purchased Integration, from where the RFM12B were based on their EzRadio Series of transceiver chips.

It looks like there are a heap of new feature available, (too many to list here), including some onboard lower MAC smarts called EzyMac, while not as nice as the 802.15.4 MAC layer it looks like it can simplify things such as:

  • Automatically adding pre-amble and sync bytes.
  • Automatic packet size – you just push bytes into the Tx FIFO and it will create the packets of a fixed size and send for you.
  • Built in basic frequency hopping.
  • Built in Data Whitening, Manchester Encoding, and CRC

Some more niceties:

  • 64Byte FIFO.
  • Onboard A/D, allows access to read such things as an onboard Temperature Sensors, Voltage buses.
  • x2 configurable GPIO ports.
  • More Rx Sensitivity than the RFM12B.
  • More Tx power than the RFM12B
  • Lower Operating voltage.
  • 8bit RSSI value.
  • Three different modulation schemes to select from.

Some not so niceties:

  • More current draw on Rx than the RFM12B.
  • More current draw on Tx than the RFM12B (understandable seeing it also has a higher Tx Power).
  • Costs about twice as much as the RFM12B ~ $USD6.00 in sample quantities direct from HopeRf vs ~$USD3.00 for the RFM12B.
  • Heaps more commands/Registers to learn.
  • No onboard encryption.

Feature comparison:

RFM12B RFM22 RFM23
Voltage 2.2-3.8V 1.8-3.6V 1.8-3.6V
Modulation FSK FSK,GFSK,OOK FSK,GFSK,OOK
Max Data Rate 115.2kbps 1-128Kbps 1-128Kbps
Max Power Output (Tx) 5dBm@433MHz
3dBm@868MHz
3dBm@915MHz
17dBm@315MHz
17dBm@433MHz
17dBm@868MHz
17dBm@915MHz
13dBm@315MHz
13dBm@433MHz
13dBm@868MHz
13dBm@915MHz
Sensitivity (Rx) -105dBm@433MHz
-102dBm@868MHz
-102dBm@915MHz
-118dBm@315MHz
-118dBm@433MHz
-118dBm@868MHz
-118dBm@915MHz
-118dBm@315MHz
-118dBm@433MHz
-118dBm@868MHz
-118dBm@915MHz
Max Supply current (Tx) 22mA@433MHz
23mA@868MHz
24mA@915MHz
80mA@315MHz
80mA@433MHz
80mA@868MHz
80mA@915MHz
28mA@315MHz
28mA@433MHz
28mA@868MHz
28mA@915MHz
Max Supply Current (Rx) 11mA@433MHz
12mA@868MHz
13mA@915MHz
18.5mA@315MHz
18.5mA@433MHz
18.5mA@868MHz
18.5mA@915MHz
18.5mA@315MHz
18.5mA@433MHz
18.5mA@868MHz
18.5mA@915MHz
Standby Current ≤0.3uA ≤0.01uA ≤0.01uA
FIFO 16bit 64byte 64byte
Frequency Resolution 2.5-7.5kHz 156.25-312.5Hz 156.25-312.5Hz
Low Battery Detect Yes Yes Yes
Temperature Sensor No Yes Yes
Frequency Hopping Capable Yes Yes Yes
Wideband or Narrow Band Design Wideband Wideband or Narrowband Wideband or Narrowband
RSSI No Yes Yes

 

Solar Powered Widget board

One of the tasks I want to use the widget boards for is a Wireless Sensor Network around the house for measuring environmental values.  The sensors that I want to live outdoors will need to be self sufficient in terms of power, so I wanted to see if I could charge the batteries via solar, of course this can be done, but again I want to do it as cheaply and as simply as possible, I also want the widget board to monitor the solar voltage and report it back.

I already had a 3.6v 0.2w cell that I picked up some time ago from Sure Electronics for about $10 for 5.  The spec for this cell is max voltage (under load) is 3.6v and max current is 60mA, more than enough to trickle charge x2 AA NIMH batteries. 

The Batteries should not require much of a top up as the node will be sleeping most of the time, from the power saving discussion @ JEELabs, by adding the solar, I should be able to just leave the node without having to change batteries (replacing failed batteries aside).

To measure the voltage produced by the solar cell I need a voltage divider that would produce 1.1v max @ 3.6v.

Why 1.1v I hear you ask?  The reason for the A/D full scale input voltage of 1.1V is that I’ll be using the ATMega168 internal bandgap reference as the AREF source for the onboard A/D and not the default AREF. 

There are a couple for reasons for this.  The internal bandap reference itself is a 1.1v voltage reference, because the battery voltage may change over time (remember I’m not using any onboard voltage regulators) so as the VCC / battery voltage changes, so would my A/D voltage readings unless I use a reference voltage.   Now as the reference is 1.1v this means that my input must not go above 1.1v else I will go over scale and get an incorrect reading.

I’m not going to bore you with the math so a quick calculation using an online voltage divider calculator (http://www.daycounter.com/Calculators/Voltage-Divider-Calculator.phtml)

Input Voltage = 3.6v

Output Voltage = 1.0v  (remember I don’t want to go over 1.1V so I’ve given myself some headroom)

Gave the values for R1 = 26K and R2 = 10K

Luckily I had both these values, however for the 26K I only had  one in 5% tolerance, the 10K I had as 1% (I like to use low tolerance resistors for voltage dividers so my error is minimised),upon testing the 26K resistor actually read 26.4K on my meter, so after plugging these real values in my actual FS Vout is 0.989v, pretty close to 1.0V.

A blocking diode is also required to prevent any damage to the Solar cell by the batteries, see the circuit and photo below.

(Click for larger image)

image

(Click for larger image and notes)

Solar Powered Widget Board

Arduino Sketch to read the voltage produced by the solar cell, next step is to find a waterproof housing and add some environmental sensors. 

Another benefit of taking voltage readings of the solar cell is I now have a light sensor.

int raw_solar = 0;        // Raw Solar FS ~ 1.0v
int raw_bandgap = 0;      // Intenal bandgap reference
float volt_solar = 0.0;
 
void setup(){
  Serial.begin(57600);
  analogReference(INTERNAL);  // select internal reference for AREF
}
 
 
void loop(){
  
  raw_solar = analogRead(0);                         // read solar voltage raw values
  volt_solar = (raw_solar * 1.1 * 3.617) / 1024;     // Scale ADC input.  (voltage divider r1= 26.4k  r2 = 10k  vi=vo/(r2/(r1+r2)) = vo/.2777 =  vo * 3.617
  Serial.print(volt_solar);                          // display raw solar voltage reading
  Serial.println("v");  
  delay(1000);                    
  
}

I had a chance to grab a few photos of the progress so far, also helps that most of my components that I had on order arrived today so the boards has been kitted out with all the headers.  Now I can plug the prototype personality in, still waiting on my crystals, switches, and diodes.

This gives an idea of size. (I don’t have big hands either)  This board has a 900MHz 2dB GSM SMA antenna, prototype personality board installed and battery holder for CR123A Lithium battery. 

0515-1105040515-110420

 

Different battery options, using x2AA with a switched battery pack soldered onto the board.

0515-110726-01

The SMA connector is a standard PCB straight SMA connector that has been soldered onto the edge of the board.  The board have been designed for the Sparkfun PCB edge mounted SMA connector (SKU: WRL-00593), however I found that a standard PCB SMA connector will do the same job, the distance between the centre pin and the ground pins is the same thickness as the PCB and all the pins line up with the Sparkfun footprint, the centre pin fits perfectly and so do the two bottom ground pins, only difference is the two top ground pins don’t get soldered.

0515-110243

 

One of the LEDs flashing….Its Alive!!!!0515-110702

Today I did some testing on the RF side of things,  nothing scientific, just walking around the house seeing if it would dropout or report bad checksums, I’m happy to reports all is working as expected (using the 915Mhz RFM12B module)

The tests are done by using the RFM12B Example sketch found in the JeeLab RFM12B library by Jean-Claude over at Jeelab (RFM12B Arduino Library)

This library runs unmodified on the wireless widget board, just follow the instructions in the README about setting up node ids.

From the preliminary testing using some compact 1/2 wave GSM 900MHZ/1800MHZ antennas (http://www.dealextreme.com/details.dx/sku.5237)  I’m easily getting all the way around the house with no dropouts, have yet to do outside tests.

Today I constructed another 2 boards, very easy to do all done in around 30 minutes.  This now brings the total to 3.

Applying the boards with solder paste by hand, manually placing the components, bake them in the toaster oven together.  This time I got the LEDs the right way around and the right amount of solder paste on everything, no bridges on the CPU pins and looks like the right amount of fillet on the RFM12B module, very little cleanup work required, it’s amazing how little solder paste is required.

Add another 5 minutes to hand solder on the SMA connectors and program the boot loader on each, voila all done in around 30 minutes.

Now I have a potential “Network” I will start testing the RF side of things.  Currently I’m using the 915MHz modules.

Today I got a chance to do some testing on the boards. 

State of play so far:

  1. Checked for shorts on power – OK
  2. Did a board level continuity test – everything as per schematic.
  3. Power at the correct levels and at the right places.
  4. Found that my USBASP programmer needs sw2 set and now all working, I can now read and set fuses etc.
  5. Arduino lillypad bootloader successfully loaded and working – Whoot!
  6. ASCII sketch loaded via Arduino development environment, serial port tested at 9600, all working.
  7. Jean claudes RFM12B Test Sketch loaded and working.  Can configure device and some random data is being read back from RFM12B, need a second board operational to fully test the RF side of things.

TODO:

  1. Build a second device now that the basic circuit is working and verified.
  2. Fully test RFM12B and wireless comms.
  3. Test I/O i.e. Analogue and Digital ports, LEDS  etc
  4. Customise boot loader to use onboard LEDS.
  5. Document all of the above for others on the project’s website.

All in all I’m pretty happy :)

The PCBs arrived last week, unfortunately not in time for the long weekend so I haven’t really had a change to do anything until today and from my initial observations I’m happy with the results.

RFM12B PCB

IMG_8691_crop

2.4GHz MRF24J40MA PCB

IMG_8693_cropped

Prototype PCB

IMG_8699_cropped

As I mentioned on the Strobit-general Google List and the SPOT-development Google list,  they seem to have multiplied from when I placed my order to when I received them,  I calculated I would get approx 12 back of each board, in the end I received 32 of each board, go figure…..so if anyone wants a couple of free blank PCB then contact me and I can send you some if you cover the postage costs.  Please use the contact form to let me know.

Hot Out of the Oven

Today I assembled the first one!  Didn’t take long at all due to the minimal component count.  If anything I need to add more solder paste to the RFM12B footprint, but seems to have taken.

RFM12B PCB Assembled

IMG_8706_crop

I’ve partially assembled the board, enough to give me basic functionality so I can do some tests, while the rest of my components I’ve ordered (SMA connectors etc) arrive.  Unfortunately my stash of 0603 capacitors were actually 0805 ones in disguise, so I’ve had to use these even though the footprints are for 0603.   In the photo you can see some of them installed on their side.   Same goes for my bead, I only had some 0805 in my stash but have 0603 on order, just couldn’t wait :)  

I’ve enabled all the solder jumpers so I don’t need to install the switch and the BAV diode for the time being.

Changes for next board revision:

A couple of things stand out with this board revision, nothing major but niggly enough to warrant changes or at least thinking about them.

Crystal Footprint – One thing so far, I’m kicking myself for not making the crystal footprint a HC-49 SMD, I thought about it before I send the files off for fabrication, instead I opted for the sleek 0503 ceramic smd crystal, problem is they are more expensive and not as easy to come by, so I’ve added this as a change for the next board revision.  In future I’ll stick with the stock standard low cost crystal HC-49C footprint.

Switch – Do I really need it?  The onboard switch seemed like a good idea at the time, but in reality do I really need it?  I’m glad I had the fore thought to add a solder jumper to bypass it. Honestly I will probably more than likely use a switch remotely (i.e. on the side of an enclosure) or on the battery pack itself rather than on the PCB.  I may just leave the ability to have a remote switch and remove the onboard footprint all together.

LDO regulator onboard? – I’m still up in the air about this one.  Initially I wanted to keep things as low cost as possible (and I still do), and then add additional functionality via the personality boards so keeping the core board to bare minimum components, as I have only intended these to run from battery or from USB, not from a wall wart or A/C plug pack.  I have added some reverse protection with the BAV Scotty diode, but this won’t protect the board if someone connects a 9vDC source.  Anyway I think  I will wait and see how I go with testing and community feed back.

Jean-Claude over at JeeLabs has been playing with the RFM12 and has noted some differences between the RFM12B and the RFM12.

http://jeelab.equi4.com/2009/05/06/rfm12-vs-rfm12b-revisited/

I’ve been playing around with Googles sketchup over the weekend and have created some components, one the RFM12B module and a basic camera hotshoe to scale.  It’s been a great little exercise in learning both Alibre and Sketchup as I’ve been wanting to get some 3D modelling practice, I’m finding that it’s easier to create things in Alibre and then export them to Sketchup.  Alibre does not support texture mappings in the drawing or export to POV, but Sketchup does it brilliantly, while on the other hand, Alibre’s3D modelling is very easy to use.

Currently the workflow is:  Model in Alibre –> textures in Sketchup – > POV Rendering– > Eagle3D Components.

Keep an eye out for more to come.  I’ve started a Stobit Collection in Googles 3D warehouse  for use with this project and will be adding to it as I go.   I’ll be putting the Eagle3D component files that I’ve created online shortly.

I know I’m a bit slack in updates on the blog.  If you haven’t noticed I now have a twitter account  http://www.twitter.com/madeinoz so you can follow what I’m doing when it’s not getting updated here.

However since the blog is way over due for an update here is what’s been happening in a nutshell.

Strobit Trigger:

I have finally gotten off my butt and done a redesign (hah and you thought the project had died a slow death, it may have stalled slowed, but certainly not dead!)

Features worthy of note in the new design (in no particular order):

  • 3V design, will run from x2 AA Alkaline or single CR123A 3V battery.
  • Fairly compact board, 30mm x 70mm. (without battery)  slightly lalonger on 2.4ghz design due to antenna.
  • Onboard on/off switch to save batteries when not in use.
  • FTDI 3.3v breakout cable port for connecting to either RS232 or USB using the FTDI cable.
  • Onboard ISCP port for programming.
  • Personality daughter boards.  Will allow users to create their own hardware modules, i.e. sound trigger, light trigger, LCD UI, or whatever they like etc
  • Atmega168V processor, low cost, low voltage design = longer battery life.
  • Can run Arduino bootloader, so developers have access to Arduino development libraries.
  • I’ve designed 2 different boards.  One using the RFM12B module at either 433Mhz or 915Mhz.  The second board I’m going to try a 2.4GHZ design using Microchips FCC certified MRF24J40MA 802.15.4 module, this is purely experimental so I don’t have any testing done yet, but I have some of these modules and would like to try them out, also being FCC certified will be an added benefit.  (not to mention I’ll be using these for a mesh sensor network project I have planned around the house)
  • RFM12B board design has external SMA antenna.
  • Base PCB board designs are done and I’m fairly happy with them so far, I’m just finishing a basic personality modules which I can used for testing and maybe another one so I can make up the  max designs I can have on a single panelized board (may as well get the most designs I can get fabricated when I send it off to GoldPheonix).  I’ve done some initial Eagle3D runs to get an idea of the boards and so I can post them on the blog, but I really need to learn how to create components in Eagle3D as it leaves unknown components blank, i.e. the RF modules and therefore looks incomplete.  (anyone that can help me here please contact me)

Still To Do:

  • Panelize boards
  • Send to GoldPheonix for PCB fabrication.
  • Assemble and test.

I’ve also been playing with learning Alibre, a fantastic 3D design package (they have a free version) so I can get some ideas for building enclosures design for these boards.

RFM12B PCB

image

MRF24J40MA PCB

image

For those interested I found an RFM12 library for the Arduino  http://jeelab.equi4.com/2009/02/10/rfm12b-library-for-arduino/

I’ve been playing around with the Arduino Diecimila and the ATMEGA168 over the last couple of weeks to better familiarise myself with the AVR ATMega168 MCU, I’ve been using PICs on and off the last few years, but the decision was made to use the ATMEGA as the MCU of choice for the Strobit Triggr project, mainly due to the open source tool chains available, and the simply programmer required.

In short I’m glad I’ve made the switch and I must say I’m loving the learning experience.  I’ve moved from the Arduino software development platform as I found it very limiting and am now using the open source avr-gcc (win-avr) and Eclipse, using the AVR plugin and CDT plugin as my development platform of choice, I’m comfortable with eclipse as my editor as I’ve been using this for my Java development for the last 5 or so years.

As a task I set for myself to learn the onboard peripherals,  I’ve created a Weather Shield for the Arduino, so far it has the RFM12B RF module, DS1307 RTC, HH10D Humidity Sensor, a HP03D, combined barometric pressure and temperature sensor, and soon to have a light sensor and Dallas 1-Wire interface for talking to the Dallas Weather Station that I’ve had lying around in a box for the last 10 years, (yes one of the original ones released by Dallas in 1998, I’ve been waiting to move in my house for a long time),  I’ll post the weather shield design up on a separate topic later, but suffice to say, I’ve enjoyed playing with the SPI, I2C, ICP, UART and onboard timers.

IMG_8204.JPGAll the design files and software are now available online for Jan Gentschs M8 Triggr Implementation.

Files can be found here.

During the prototyping of the StrobIt Triggr, I found that I could only hit the maximum bit rate of approx 12000bps, this is a far cry from the reported 256Kbps, so what was I doing wrong?

(more…)

Well my new tool, a LogicPort Logic analyser from http://www.pctestinstruments.com/index.htm, arrived last week whilst in the middle of our house move and I’ve been itching to try it out, well last night I made time to play with it.  The result is, man I wish I had one of these beasts earlier.

(more…)

Next Page »

Switch to our mobile site