Go Down

Topic: RFM12BS rev 4.0 troubleshooting (Read 3662 times) previous topic - next topic


I have two RFM12BS rev. 4.0 434MHz exactly like those in : https://www.sparkfun.com/products/10153
I have also two Arduinos UNO rev 2.
I made connections, like : http://openenergymonitor.org/emon/buildingblocks/rfm12b-wireless
And I carefully check contacts and connections (I exclude mistakes in this part).
Then I downloaded the Jeelab library and installed in the Arduino IDE 1.0.4. and I loaded the two example files  for communication: https://github.com/openenergymonitor/RFM12B_Simple . Both Arduinos show in the Serial Monitor the initialization of the code, but if the sender periodically print what it is supposed to send, the receiver doesn't show anything else.
Probably, this is out of my knowledge but I don't know how to get out. I read a lot treads but I am even more confused.
I have some questions in case someone used the same hardware components:
1)   How long should be the antenna? For the 433 MHz I used 173 mm but for 434 MHz is it the same? People claim that it is a key parameter.
2)   The rev 4.0 change something in the hardware set up? The crystal is different, so the frequency too.
3)   I found another library, called RFM12B, holder than the Jeelab, but I found some compilation errors. It is worth try to install it ?
4)   I found a post similar to mine : http://openenergymonitor.org/emon/node/2084 but it is not clear the solution they found (condenser addition ?!) and the circuits they use for debugging
5)   Can someone suggest a guidelines for troubleshooting? Maybe I haven't found the right reference.
Thanks in advance


Jun 27, 2013, 12:50 am Last Edit: Jun 27, 2013, 12:57 am by oric_dan Reason: 1
I'm not familiar with the openenergymonitor work, but had serious hair-pulling problems with the
jeelib library and examples. Other people have mentioned that the library from these guys works
better, but I haven't gotten to trying it myself as yet,

You might have problems with the wrong xtal frequency. Why are you doing that?

With a mistuned antenna, the thing will probably work, but the range will be smaller. I doubt
it will cause you to have no communications - there are a dozen other reasons for that, :-).

In any case, that thing is a 1/4 wave whip, and the formula is

wavelength L = (300,000,000 m/s) / 433,000,000hz = 0.69m, so antenna length = L/4 = 0.173m.
You're right on the mark.


About yor question. I've not changed the xtal, the producer did. See:https://groups.google.com/forum/#!topic/nanode-users/WclCPYi08Ig
The most part of the posts deal with rev 3.0 so I wonder if something has to be changed with rev. 4.0

Thanks for the answer on the antenna lenght, it is probably the cause of probem. I have changed the library, and I use now the RFM12B library without problem but there is not communication between the two. I have no idea how to go on....

Nobody knows how to test if a RFM12BS transmit someting ?


The module you linked at SF has been sold for several years, and people have been using
it with success. As I mentioned, I would scrub the system of jeelib, and try the lowpower
library. First, establish simple comms between transceivers, and then go from there.


I did what you suggested. I've got the library from here https://github.com/LowPowerLab/RFM12B
I started with LED_Control_Gateway example.
In the Serial Monitor the menu starts and I can send the three commands:
2,p,f and then Enter
I should expect that the routine sendmessage() prints on the Monitor "Request send" etc.. however nothing happens.
I measured the voltage (vs. ground) of different RFM12BS pins and I 've got :
VDD =+3.3 V
GND =0.0
SDI=+3.46 V
Maybe  I have  to decrease the resistors in the voltage dividers ? I use 10 K Ohm as drawn in the circuit.
By the way, the LowPowerLab suggest an Antenna length of 164.7 mm. I don't know from where this number comes out.


I did a further step. I kept the same circuit but I replaced the RFM12BS module with the other. I expected to have the same behavior.
This time the menu  with the the commands shows up in the Serial Monitor but immediately a long and continous list of messages :
"BAD-CRC" starts.
I have also measured the voltage at the pins and I found:
VDD =+3.3 V
GND =0.0
SDI=+3.46 V
The two RFM12bS should perform the same, right? Now, I have to understand which is wrong. I suspect the second. I thought that some short circuit was present on one of the pins. So I renewed the connections, but nothing changed. Is the chip damaged?
If these modules are common and working, maybe someone has the right answer.


Further question: looking at the circuits: http://openenergymonitor.org/emon/buildingblocks/rfm12b-wireless
Why the SDO(RFM12BS)->D2(Arduino) and nIRQ(RFM12BS)->D12(Arduino) have not voltage diveders in the Arduino board working at 5 V ?
The circuits of the two boards drive two different voltages. I suppose the RFM12BS should receive 3.3 V current only.
Why don't do for SDO and nIRQ the same as nSEL,SCK and SDI ?


Jul 01, 2013, 12:20 am Last Edit: Jul 01, 2013, 12:32 am by oric_dan Reason: 1
1. alright, I dug out my jeenodes and installed the lowpower RFM12 library, and it worked
   fine with no problems the very first time. Note - I spent a couple of miserable weeks
   messing with jeelib before I ever got the RFM12s to communicate with each other.

2. I used the most recent library found here,

3. I used the simplest examples, with Send loaded into one jeenode and Receive into
   the other, and it worked with no problem the first time.

4. the following:
Why the SDO(RFM12BS)->D2(Arduino) and nIRQ(RFM12BS)->D12(Arduino) have not voltage diveders in the Arduino board working at 5 V ?

  should read:
Why the SDO(RFM12BS)->D12(Arduino) and nIRQ(RFM12BS)->D2(Arduino) have not voltage diveders in the Arduino board working at 5 V ?

   Do you have your pins crossed?

5. you only need voltage-dividers when connecting a 5V output signal to a 3.3V input pin.
   However, in the cases cited in item 4, you have a 3.3V ouput signal from the
   RFM12 going to a 5V input pin, and that's ok.

6. In regards this:
By the way, the LowPowerLab suggest an Antenna length of 164.7 mm. I don't know from where this number comes out.

    it's actually the openenergymonitor page says that, and I don't know where they got
   the 164.7 value either. Maybe radio waves travel at different speeds where they live
   [doubtful, ;-)].

It's nice to have a 3rd party library work correctly the first time, as I find I usually have to
mess around a lot to get them to work. With jeelib, the examples that came with the
library all had bugs, and would not work. Once I found a properly written example, I finally
got it to work.

In this case, if your devices are not working, the problem is probably something other than
antenna length or bad lowpower library code.


Sorry to be late but I made some tests. Here results.
I bouth another RFM12BS rev4.0 replacacing the one I though it was broken. Same results, nothing better.
So I am convinced that something I made is wrong not the chips. I found some other circuits with (RFM12BS/Arduino) similar but not equal to mine (different values of resistors and different position).
I noticed that using voltage deviders 10k and 4.7k ohms I still have a voltage 3.8-3.9V at the pins nSel and SDI. This voltage is too high. Then, I made a change and I increased the 3 resistors from 4.7-->5.6 ohm. The pin voltage is now 3.6 V and I'm fine. This seems to be benefical because the sketch "Send" in the Example list of LowPower RFM12B library works and doesn't stop after the first string transmission (as I always got).
Now I'll try to check if the same performance are reproducible with the other RFM12BS chips and the Two Arduino. They must perform in the same way before they can communicate. Am I wrong ?
A small progress is done.
Short answers: a) I didn't cross the pins D2 and D12, I do what you wrote. I just made a mistake in my first script. b) antenna length: I agree, it doesn't matter. I found documented examples with good communication (maybe shorter) with antenna length of 60 mm. So this is not may problem.


Sounds like something is wrong with your wiring, as 4.7k feeding onto 10k
should give 3.4v not 3.9v. Also, you can tell if the sketches are loaded
properly and each RFM working correctly, because you will see a startup
message, even if the two units have not established communications.


Solved ! Two units communicate fast and well !
You are probably right, but I think in my previous message I was not very precise. Let me wrap-up for the people that may be interested in (and save their time).

I initially made the circuit like:
with resitors : 4.7 and 10 KOhms, but this didn't work. I don't know why but the voltage at the pins was:
VDD =+3.3 V
GND =0.0
SDI=+3.46 V
Then I made a circuit like:
with resistors: 10 and 10 KOhms, but it didn't work.
Then I made a circuit like:
with resistors 10 and 15 KOhms (they are also placed in a different order too). It did not work.

Finally I come back to the first circuit (http://openenergymonitor.org/emon/buildingblocks/rfm12b-wireless) but I used:
15k instead of 10k and 5.6k instead of 4.7k Ohms. This is a working circuit. The pin voltage is:
VDD =+3.3 V
GND =0.0
SDI=+3.60 V

I don't know why it works. I suppose this is because the voltage of SDI and nSEL vs VDD is now higher. Does it make sense ?
Anyway, now I can go on. Thanks oric_dan for your help and support!


Difficult to troubleshoot hardware connections from 5,000 miles away ;-), but good
to see you have it working now.

I like the RFM12 very much. It's low-power but has good range, much better than
low power devices at 2.4Ghz. I got only about 10m range with nRF2401 and XBee
[not the Pro], but about 40m with the RFM12s.


I agree it is a nice chip. Maybe you can give me some advices about its consuption.
What I like to do it is a wireless and cheap network of sensors for small scale chemical equipment. I need to power each of them by batteries. Do you think that a 9V battery can last some hours powering the trasmitter ? Any alternative ?  I suppose 3 V batteries are too small.


3 1.5V AA cells should give you a day or more depending on use.. If possible you should "Sleep" the modules as much as possible and awaken then on pin change interrupts or simply at a fixed rate. It's the major method to save power. A bare 328 can go below 100 nA or slightly better (lower) than the self discharge of the batteries. I like the Low Power Lab Library... It makes sense and you are making your own devices nearly useless Jeenodes... If your project can use 4 digital and 4 analog I/O you are in good shape with a Jeenode.. But that leaves 12 or 13 pins on the 328 unused and I for one am going to use all the pins I need, Not what the JeeNodes are. The Moteino is a great deal @18.95 US, complete with the radio of choice, Small board using a SMD 328 and a real crystal IIRC and all the pins are available.. It's very similar to a Pro Mini in size and shape.
FYI there is some Pre jeenode demo code that doesn't have all that extra crap for his system "Demo.ino"  which writes stuff to the Eeprom (Frequency band, unit ID and group ID is his final and a nice program to make Jeenodes... Not General Purpose Radio Modules.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


Yeah, as Bob says, you can use various sleep modes on the Arduino chip, and also
power down the RFM12. There is a lot of info around about Arduino sleep, and
the RFM12 datasheets describe how to power those down.

I would use 3 AA alkaline cells to power something like this for a longer term. This
gives 4.5V feeding into a 3.3V regulator. Or better 4 AA-cells. Those have maybe
10X the energy of the 9V snap-tops. Also, depending upon the lifetime needed,
I mentioned alkaline rather than NiMH, since the latter type self-discharge over a
few weeks.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131