Need Help RFM12B crashes on sending data [solved: PCB issue]

Started by Blueduin, November 19, 2017, 06:33:23 AM

Blueduin

Hello,
i'm a complete newby at rf modules, and stuck at a (for me) really mysterious problem.
A year ago i got some RFM12B modules, an begun to experiment with them. I used the
Send, and Receive examples from Felix's library (Many thanks for sharing !), and got fast results.
Based on that sample i made a breadboard-based data sender module with a low power modified arduino pro mini 3.3V,
collecting environment data, and a data receiver module on arduino mega for data logging and display.
This is working fine since june until today.
Last month i have designd a small PCB for the datasender module (newby too on that area), but i can not make it work.
If it is programmed with the receiver sample code - it works, and receives data from sender prototype module, until ACK is requested -
then the software stops when sending ACK telegram.
Programmed with Sender example, is crashes when sending first telegram. I have tried different Arduinos,  with and w/o hardware modifications, different
RFM12b modules, no change. Receiving OK, sending failed.
It seems, that a buffer underrun occurs at the RFM - because it is sending any data, until cutting power supply.

In my opinion, there is no problem with software, or  rfm library , but with my PCB design.

Is there anybody out there, who is patient enough, and interested in giving any advice, or help ?
If so, i will provide any information you need.

Thanks in advance
Blueduin


Blueduin

Hello,
appending information and pictures regarding my project:


The "clima data collector und sender" prototype, reliable running since may 2017, except some contact problems...
powered by a 1.2V 1000mA/h AAA NiMH cell, and 2 solarcells salvaged from cheap chinese
garden lamps, reading data from BME280 and BH1750 via I²C.


The indoor development prototype. reliable working as sender, or receiver, like outdoor installation.


Development version on PCB with soldered RFM12B and removable arduino. Works fine as receiver,
but not as sender. When trying to send anything, the arduino software freezes, and RFM12B is sending
continious any data (symptom of a fifo underrun ?).


PCB with soldered RFM12b only, when arduino is adapted to this, it also works fine for receiving, but not
for sending.
N.b. both PCBs have a  piece of Tesa-film between RFM and board to make shure that there is no unwanted contact between 
RFM and PCB.

I have noticed that the software stucks at the RFM12B::SendWait(...) loop. This happens (my theory...),
because after sending one or more bytes, a fifo underrun occures. This is signaled via IRQ, but the library does not handle this case.
This is the reason for never ending loop, because TXIDLE-state is never reached.

I have used a unmodified copy of RFM12B library (latest version from Github), and unmodified examples Receive and Send from that  Library.

The questions are :

  • why does this happen with PCB version, and not with prototype version ?
  • why does PCB version work as receiver, but fail when send ?

The attached fritzing project file was used for PCB manufacturing. Note: the used RFM12 Part has a issue regarding the position of IRQ.

May be, this helps understanding my problem.



Blueduin

Blueduin

Hello,
problem is solved. There was a little issue in PCB design. Why ? I Don't know, but it is working now.

Thank you , and DO NOT USE THAT PCB DESIGN (except you need a sender only).


Felix


Blueduin

Quote from: Felix on December 07, 2017, 07:59:37 AM
It's basically obsolete at this point.

...yes. Because the root of the problem was not the RFM12B, and not the software, or related library.
Same can happen with all other RF senders, when a RF newby tries to design a PCB with RF parts.

My solution was to remove the ground connection between Arduino and RFM (left only the connection between RFM ground pins).
I made a new ground connection outside of RFM module - and problem was solved.

I don't know why my design was not workig, and not, why this change solved my problem. My hope was, that any of the experts here
would have a look at my humble design, and would give me, and maybe, other newbies, a hint...

However - lesson learned: pay more attention to RF connections, look for working designs, and copy them.
Or - buy a ready solution.