Project

General

Profile

No connection between two RFM12B

Added by firlefranz about 4 years ago

Hi,

some time ago I bought this nice six pack of RFM12B modules (433MHz) from the JeeLabs Shop. I’d like to use two of the modules for a Arduino based thermometer. The outside sensor uses the TinyTX PCB from Nathan Chandrell including a Attiny84 and a DS18B20 temperature sensor. At the receiver side I’m using a Atmega328 and the common connection to the RFM12B as specified in this picture:

The antennas are 165mm long silver wire.

I could burn the bootloader on the Attiny using the Arduino Uno without a problem and also the upload of the code works fine as specified on the TinyTX page. For the first test I’m using the DS18B20 test sketch from the TinyTX page (https://github.com/nathanchantrell/TinyTX/blob/master/TinyTX\_DS18B20/TinyTX\_DS18B20.ino). Since it’
s been an old script and the TinyTX has become popular I’m not expecting any error here. On the receiver side I’m using a simple receiving example from the same website (https://github.com/nathanchantrell/TinyTX/blob/master/TinyTX\_RX\_Simple/TinyTX\_RX\_Simple.ino). But the problem is that I don’
t get any temperature values submitted.
The first thing I tested was the DS18B20 but it works they way it should. Also the power for the TinyTX board is stable at 3.3V. The receiver shows in the console just the Serial.println commads specified in the setup() part of the program, but it’s not receiving any data.

At the transmitter side I used another TinyTX board with another RFM12B (since I bought 6 of them), but nothing worked. I really need some help.

Cheers
Cornelius


Replies (79)

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

It assumes that a RFM69 radio should be present, it doesn’t detect RFM12B units.

RE: No connection between two RFM12B - Added by firlefranz almost 4 years ago

How to solve this problem?

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

Perhaps a photograph of your RFM69CW and cabling to the Uno. The connecting wires need to be as short as possible and the 3v3 versus 5v situation resolved for the SPI interfacing pins. There are two ground pins on the RFM69CW as I recall.

RE: No connection between two RFM12B - Added by firlefranz almost 4 years ago

Here is a picture from the wiring.

Foto.JPG (743 KB) Foto.JPG
2326

RE: No connection between two RFM12B - Added by martynj almost 4 years ago

firlefranz,

The “module absent” error message is generated when, as a sanity test, a known bit pattern is injected into one of the RFM69CW registers, read straight back and compared.
This is failing since the SPI bus cannot perform correctly with your wiring harness - the interconnects are too long and the capacitance between tracks on the breadboard is too high.
Have a look here to see what is needed to operate at high SPI speeds.

RE: No connection between two RFM12B - Added by firlefranz almost 4 years ago

Ok, thanks. I’ll start a new test tomorrow with shorter cables or a small PCB. As soon as I’m finished I’ll post the result :-)

RE: No connection between two RFM12B - Added by firlefranz almost 4 years ago

I’m finished with my new test PCB. The connections between the RFM69CW and the Arduino are as short as possible but the message still appears in the serial monitor. The whole test sketch is build up on a perfboard. Will it be possible to send between my two RFM69CW even when this message shows up?

RE: No connection between two RFM12B - Added by firlefranz almost 4 years ago

Meanwhile I would like to send a finished thermometer PCB to some of you as long as we get this wireless connection to work….

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

firlefranz wrote:
> I’m finished with my new test PCB. The connections between the RFM69CW and the Arduino are as short as possible but the message still appears in the serial monitor.
Oh.

> The whole test sketch is build up on a perfboard.
Could you post a photograph?

> Will it be possible to send between my two RFM69CW even when this message shows up?
I’m afraid not the SPI bus is responsible for configuring the radio and transferring all messages between the microprocessor and the radio.

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

I have just updated RFxConsole library to support slower speed SPI. Could you pull the latest and then comment out line 9 of RF69_avr.h to operate SPI bus at 250KHz. Operation at 125Khz has some functionality but the ‘t’ pattern isn’t ACK’ed.

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

Did you get the Radio Absent message?

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

I have loaded an even slower version - it won’t work properly but it may get over the Radio Absent message.

Could you pull the latest and then comment out line 9 of RF69_avr.h to operate SPI bus at 125KHz. Operation at 125Khz has some functionality but the ‘t’ pattern isn’t ACK’ed.

RE: No connection between two RFM12B - Added by firlefranz almost 4 years ago

I already did this, since you wrote it in your message from this morning.

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

I have changed it one last time!

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

Did you take a look at @MartynJ’s post describing what good looks like: http://jeelabs.net/projects/hardware/wiki/RFM12B\_Board.

Is your circuit capturing the specifics of the enclosed circuit diagram?

RE: No connection between two RFM12B - Added by firlefranz almost 4 years ago

[RFxConsole.0]8B
Available commands:
i - set node ID (standard node ids are 1..30)
b - set MHz band (4 = 433, 8 = 868, 9 = 915)
o - change frequency offset within the band (default 1600)
96..3903 is the range supported by the RFM12B
g - set network group (RFM12 only allows 212, 0 = any)
c - set collect mode (advanced, normally 0)
t - broadcast max-size test packet, request ack
…,a - send data packet to node , request ack
if using group 0 then sticky group number is used
…,s - send data packet to node , no ack
… - space character is a valid delimiter
128,,n - release group/node index number entry in eeprom
n - set group as sticky. Group 0 only, see p command
l - turn activity LED on PB1 on or off
…,m - add message string to ram, see p command
,,p post semaphore for group node , to be
sent with its next ack. Group number becomes sticky
q - set quiet mode (1 = don’t report bad packets)
x - set reporting format (0: decimal, 2: decimal+ascii
- 1: hex, 3: hex+ascii)
v - return firmware version and current settings
123z - total power down, needs a reset to start up again
Current configuration:
B i2 g5 @ 868 MHz
Radio is absent

RE: No connection between two RFM12B - Added by firlefranz almost 4 years ago

The only things, which is missing in my layout are the capacitors. What I could test is soldering the RFM69CW to a TinyTX board and test if I get some temperature values to my receiver.

Are there any big changes in the TinyTX code to be done due to the change from RFM12B to RFM69CW?

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

No, just set the #define RF69_COMPAT 1 // define this to use the RF69 driver i.s.o. RF12

The rest is detected when you select JeeNode Micro in the Arduino Boards menu.

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

I would put the #define OPTIMIZE_SPI 1 // comment this out to write to the RFM69x @ 125Khz

back to its default value i.e. NOT commented out.

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

JohnO wrote:
> I would put the #define OPTIMIZE_SPI 1 // comment this out to write to the RFM69x @ 125Khz
>
> back to its default value i.e. NOT commented out.

Although this setting isn’t used for the ATTiny.

RE: No connection between two RFM12B - Added by JohnO almost 4 years ago

firlefranz wrote:
> [RFxConsole.0]8B
> Radio is absent

Hi Cornelius, If you have any patience left with this one and at @MartynJ’s suggestion I have added a few lines of code to take a look at what the SPI is seeing when it decides that the radio isn’t behaving. You would obviously see more if you have an oscilloscope to bring to bear, The code is RFxConsole.cpp in the RFxConsole library.

RE: No connection between two RFM12B - Added by firlefranz almost 4 years ago

I just uploaded the standard TinyTX sketches to the Attiny and my thermometer. At the thermometer side the serial connection shows nothing in the window - not even the serial.println commands in the setup(). I tested it with the #define RF69_COMPAT 1 line and without it. Nothing changed….

JohnO, are you interested in a nice thermometer PCB? I would send you the whole board (including all parts), if you like. You can keep it as long as you could tell my whats going wrong here.

(51-75/79)