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 about 4 years ago

Looking again at IMG_1472.jpg. I may be seeing this the wrong way around but it looks like some of the soldering is missing.

GND, SCK and SDI appear unconnected.

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

Oh my god, you’re right. I soldered the whole RFM12B wrong. It should be rotated by 180°. But isn’t it strange, that I could see some packages in the serial monitor even with this mistake?

Hope, I didn’t destroy the RFM12B with this fault…

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

No, sorry. I was wrong. The module is soldered correct. The missing joints are one the backside. Everything’s fine with that.

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

How do you mean the missing joints are on the back side? Perhaps another picture.

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

So, checked to soldering again, there was a mistake from my side. Now the module is positioned the right way. I also checked the PCB design two times (again). Everything should work, but I don’t see anything in the console. I uploaded the radioBlip to both TinyTx including the changes you wrote down. I tested one after another, but nothing to see in the console at the Atmega328 :-(

What shall I do?

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

Perhaps post the Eagle files and maybe someone else can spot the problem.

How about attaching the antenna directly to the radio card as Jeenodes do. Do you have a ground plane for the radio - way out of my league so I can’t validate your reply.

If you have two TinyTX units then perhaps you can get an RF12demo.ino working and listening to the other TinyTX running radioBlip.

Have you been able to use avrdude on the TinyTX - do we know the fuse settings are as we need them?

On the ATMega328, if you set “0q” and “0g” you should see lots of noise if the radio is working.

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

I can confirm that I definitely see a lot of noise using the 0q and 0g command on the Atmega328. The antenna is meanwhile directly soldered to the pad of the RFM12B. The PCB was designed in Fritzing, but the circuts for the RFM12B are really exactly to what is shown in the first picture of my thread here. The IRQ is directly connected to pin 2. MISO is connected to pin 12. SS, SCK and MOSI are also connected to the specified pins through 4,7k resistors and each line goes with 10k to GND. There is not much what can be wrong in here.

Something like this show up in the console using 0q and 0g.

A i1 g5 @ 433 MHz q1
> 0q
A i1 g5 @ 433 MHz
> 0g
A i1 g0 @ 433 MHz
? G0 0
? G0 30 127 128 192 176 128 50 129 126 133 67 227 126 180 60 250 47 127 224 48 67
? G0 0 196 200 127 192 128 31 132 125 240 126 193 192 126 127 132 63 128 208 232 43
? G103 128 224 57 228 123 214 136 122 192 127 128 202 25 192 121 192 127 192 53 115 192
? G0 191 128 31 95 224 125 192 128 194 89 192 79 127 136 192 62 200 62 63 103 137
? G255 193 132 22 196 125 192 144 16 192 63 194 192 62 127 128 63 193 192 125 121 192
? G191 138 31 192 62 194 127 195 121 192 109 136 30 200 127 136 127 168 196 127 79 192
? G0 0 128 120 125 224 127 126 241 196 127 129 228 193 15 123 192 126 198 79 232 128
? G255 193 121 128 66 77 128 192 200 236 159 193 63 128 15 29 128 232 63 202 46 224
? G0 0 128 63 132 208 192 128 79 144 208 63 224 192 28 107 250 127 196 127 198 47
? G216 130 37 224 127 217 63 43 208 47 198 31 192 23 127 128 51 194 128 53 128 198
? G0 63 23 192 63 192 224 192 192 176 95 192 63 195 126 202 119 130 63 243 127 59

It’s coming up very fast. But still nothing from the Tinys…

Under the RFM12B there is an LED soldered, sitting on the other side of the PCB, but since the multiplexing of the LED matrix is offline, nothing should interfere in here.

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

I think the ATMega is looking reasonable.

Lets concentrate on the Tiny. Do you have avrdude to read the fuses.

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

Ok, something new. Since the serial connection to the TinyTX was not really nice I decided to build up a second transmitter/receiver using a plugboard. I’m using a normal Arduino Uno on this side and my thermometer PCB on the other side, which we know works very well - at least for catching noise.
I uploaded the modified radioBlip sketch to the Uno and the RF12demo to the thermometer. After the 5g command there was nothing to see, but - and here comes the interesting point - when I touch both antennas I got well transmitted packages. In the console it’s written “OK” followed by some numbers. For this the antennas have to be in a very close distance (less than 10cm). If I move both boards more far away from each other the Uno is still receiving packages but these are not ok (while touching). If I stop touching the antennas the signal is gone. And if I do this test the other way around - sending from the thermometer and receiving at the Uno-side nothing works at all - even at close distance and also with touching both antennas.
Using the 0g command both modules catching noise - the Uno is receiving less noise than the thermometer (from counting of the packages per time).

Any ideas?

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

Umh, indeed interesting - are we sure that the radios are indeed 433Mhz units? I guess the green dot will mean something to @MartynJ.

I wonder if the radio was damaged earlier. Group 0 on the RFM12B is only really for identifying reception. Since there is so much noise you run the risk of masking good signals while the radio is locking in on noise. If set to group 5 then I guess the touching antennas thing still works as when group == 0.

I am still concerned about the ‘spare’ pcb track to the antenna pad, even though the antenna is on the radio right now. I have similar concerns about the ground plane connected to the GND connection.

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

Looking a the different noise messages in the console I see definitely a difference in both signals. The noise recorded from the Uno has many different groups ranging from 0 to 254. The noise recorded from the thermometer is mostly group 0. There are nearly no other groups visible.
I disconnected the spare pcb track from the antenna which lead to this situation, that the touching effect is gone - meaning that no signal in group 5 is registered even if the antennas are close to each other. Now I see that the noise stops when I touch the antennas.

RE: No connection between two RFM12B - Added by tve about 4 years ago

The use of 10K pull-down resistors seems pretty strange to me. Should be pull-ups, no?
Scratch that, hadn’t realized these are voltage converters…

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

At the moment I’m really sad about this situation. I’ve spend the fourth evening in a row on this stupid problem and I don’t see another option as replace the modules (both). It’s also really sad since I didn’t bought them from some strange Chinese website… Anyway I probably change to RFM69CW at that point. Maybe this helps… :-(

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

Hi Cornelius, I understand your frustration and will give you my take on things in the last paragraph.

First, another suggestion, you have probably already have done it but here goes. Have you tried loading RF12demo.cpp onto your plugboard ATMega and see if it can see your TinyTX device?

Now the awkward paragraph, I find it hard to see how you are unhappy with your suppliers. The paint dot on your RFM12B shows that it was operational when tested. All the Jeelabs radios are tested and the paint dot only applied when the radio works. With regard to Chinese suppliers, whilst they don’t test and apply paint dots they do a great job down to an amazing price. I buy lots of stuff from Chinese websites and have nothing but praise for them. Granted I would build my heart pacemaker with parts from a more local source but if it cost me £100 to buy a radio module to play with I wouldn’t go down that route. From here I see that you have designed a board, great since I have never done that. You are now snagging a section of the design and have hit problems. Problems happen to the best designers, look at the problem that jcw is snagging with his Micro Power Snitch design: http://jeelabs.org/2015/03/18/micro-power-snitch-last-part/ I hope we will get to the bottom of your problem but I doubt it will be in faulty supply. Similarly a switch to RFM69CW will not of itself solve this problem. Since there are thousands of Jeenode out there all working fine with RFM12B & RFM69CW the decision on RFM12B versus RFM69CW should be based on range required or management information available etc.jcw takes a break to recharge when he frustrated, perhaps that would help here.

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

I wonder if it worth slowing down the SPI bus, the code is in rf12.cpp, around line number 162 & 216.

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

Hello Cornelius, I have just returned from holiday and wondered how you were getting on with this problem - is there an update yet?

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

I took a break from this project, like you suggested. The new RFM69CW modules also arrived and could be tested as a second source. So lets see if I find some time within the next week. As soon as there are some news I’ll post it here.

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

Great, if you use the RFM69CW module you might consider using the https://github.com/jcw/jeelib/tree/RFxConsole library since it contains a few bug fixes not in the master branch.

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

Back to work. After a long break I’m back regarding my thermometer project. I changed both modules to RF69CW (868MHz). So how do I test them? On the first one I uploaded the RF12demo sketch and changed the 9th line to #define RF69_COMPAT 1. After doing so, the normal serial monitor menu showed up. Now I’d like to use the radioBlip sketch on the other module. Is this possible and what should I change in the code that it’s working on the RF69CW?

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

Welcome back I hope you are refreshed after your holiday. Are you still limited to one FTDI board and hence your desire for radioBlip? Are you using the RFxConsole library?

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

At the moment one of the modules is soldered to my thermometer PCB. Here I’m using a USB BUB FTID adapter. On the other side the module is connected to a Arduino Uno. The limitation is on the computer side, since I can just open one console window at a time, but I could use the laptop of my wife for one of the modules. I installed the RFxConsole library. So what should I upload?

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

Ah, you are not limited to using the Arduino console window. In fact I very seldom use the Arduino console monitor I typically use a Putty terminal emulator in my Win7 environment: http://www.chiark.greenend.org.uk/\~sgtatham/putty/download.html

Putty is a very handy tool since it also supports ssh and telnet terminal session as well as the serial ones that you need.

I would start with RF12Demo on both units since you can send test messages back and forth under your control.

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

I’ve no Windows around here, but with the second Mac it works fine. After uploading both sketches to the boards I’m getting a “Radio is absent” message on the Arduino Uno side. I checked the connections twice. Everything’s correct. Any ideas?

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

Radio absent means that the Uno isn’t seeing talking to the radio correctly. The code sends SPI instructions to configure the radio and then reads back a register to see if it has been configured. If it doesn’t read the correct value back it assumes the radio is absent.

(26-50/79)