Project

General

Profile

(Resolved) Strange problems with rfm12b

Added by yattapl almost 7 years ago

Hello,

Welcome Everyone, as it is my 1 post on this forum.
My name is Peter, i’m from Poland and AVR’s became my hobby recently :)

Now the description of my problem.

I’ve 3 jeelabs rfm12b boards.
1 is with voltage regulators, other have only resistors.

I’ve connected them via breadboard with atmega2650 and atmega328p. Each time i’ve fired rfm12bdemo sketch to check if everything works properly.
The problem is that on 2 boards - that with voltage regulator and one without - demo sketch displayed only partially - only first line showed up. When i disconnected nIRQ pin, the rest showed up and i was able to setup some settings. On the other board everything worked without removing nIRQ connection.

I’ve tested it on both atmega2560 and atmega328p - same behaviour.

Where should i look for the problem - config, electric connections?
When assembling a board should i solder all joints between rfm12b and board?

Regards,
Piotr


Replies (20)

Strange problems with rfm12b - Added by martynj almost 7 years ago

yattapl,

>When assembling a board should I solder all joints between rfm12b and board?

Have a look at Construction hints - RFM12B module

RE: Strange problems with rfm12b - Added by yattapl almost 7 years ago

Thanks, soldering is clear now.
What about 3.3v version - withour voltage regulator and capacitors. I’ve seen picture on the internet, that all resistors were present.
But here - http://jeelabs.net/projects/hardware/wiki/RFM12B\_Board\#Configuration - i’ve found:
“When used at 5V, all components should be included. At 3.3V, they can be omitted and the 3 solder jumpers closed instead.”

That means i should remove 3 resistors - R1, R2, R3 on 3.3V version?

RE: Strange problems with rfm12b - Added by martynj almost 7 years ago

yattapl,

Try reviewing the corresponding Wiki again - I’ve added somewhat to the unclear wording in there.

RE: Strange problems with rfm12b - Added by JohnO almost 7 years ago

Also try compiling the RF12Demo sketch with the following change:

#define DATAFLASH 1 // check for presence of DataFlash memory on JeeLink
#define FLASH_MBIT  16  // support for various dataflash sizes: 4/8/16 Mbit

change to:

#define DATAFLASH 0 // check for presence of DataFlash memory on JeeLink
#define FLASH_MBIT  16  // support for various dataflash sizes: 4/8/16 Mbit

RE: Strange problems with rfm12b - Added by yattapl almost 7 years ago

Thanks.

Back to soldering issue.
In construction hints i’ve found this - But soldering them all is fine as well.
It means i can solder all joints of rfm12b ?

If so, then it means that my problem lies somewhere else - i’ve full rfm12b board with voltage regulator and all resistors and demo sketch works only if i disconnect nIRQ pin.
Will give a shot tonight with dataflash=0.

Okay, i’ve tested setup with dataflash=0.
Results are strange - one time i got only one line and rest after disconnecting nIRQ, sometimes i got all data.
Can’t figure out what’s the problem.

Back to rfm12b board setup - http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/ - how come it is working without any resistors?

RE: Strange problems with rfm12b - Added by yattapl almost 7 years ago

Okay, i’ve setup 2 arduino’s .

One is mega2560, other is 328p on breadboard.
I’ve fired demo sketch on both ends. I’ve set same group, same frequency.

But nothing goes via radio. Any ideas?
Mega is 16Mhz, 328p is 8mhz internal osc.

RE: Strange problems with rfm12b - Added by JohnO almost 7 years ago

Can you post some logs from your terminal emulator. What happens when you use the “t” command?

RE: Strange problems with rfm12b - Added by yattapl almost 7 years ago

[RF12demo.8] I i9 g44 @ 868 MHz 

Available commands:
   i     - set node ID (standard node ids are 1..26)
               (or enter an uppercase 'A'..'Z' to set id)
   b      - set MHz band (4 = 433, 8 = 868, 9 = 915)
   g    - set network group (RFM12 only allows 212, 0 = any)
   c      - set collect mode (advanced, normally 0)
  t          - broadcast max-size test packet, with ack
  ..., a - send data packet to node , with ack
  ..., s - send data packet to node , no ack
   l      - turn activity LED on PB1 on or off
   q      - set quiet mode (1 = don't report bad packets)
Remote control commands:
  ,,, f     - FS20 command (868 MHz)
  ,, k              - KAKU command (433 MHz)
Current configuration:
 I i9 g44 @ 868 MHz

After pressing t I got on both sides similar stuff.

> 0t
test 0
 -> 66 b

Gonna buy Saleae logic analyzer.

On one of rfm12b i’m getting some trash data:
? 0 0 0
? 0 34 22 44
On the other not - maybe it’s damaged?

RE: Strange problems with rfm12b - Added by JohnO almost 7 years ago

I haven’t seen group 44 used before - do you a have the same results when using group 212 on both devices ?

RE: Strange problems with rfm12b - Added by yattapl almost 7 years ago

Yep, results are the same.

I’ve checked with group 0 - on one rfm12b i got looot of trash.

?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 191 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 0
?G 0 1 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
?G 0 0
?G 191 0

On second one purely nothing.

RE: Strange problems with rfm12b - Added by JohnO almost 7 years ago

The trash isn’t random enough. How have you wired up the 328P ?

RE: Strange problems with rfm12b - Added by yattapl almost 7 years ago

That’s standard wiring.
Power to pin 7 and 20,ground to 8 and 22.
Then serial to digital 0 and 1.
Then rfm12b:
irq - digital 2
sel - digital 10
sdi - digital 11 - mosi
sdo - digital 12 - miso
sck - digital 13 - sck.
ground - same as 328p ground
3v3 - same as 328p source.

After changing group to 1, i’m getting such printout
? 0 lots of times. One or two per 30sec.

RE: Strange problems with rfm12b - Added by JohnO almost 7 years ago

Sounds correct, are you using the internal oscillator or a crystal? What are your fuse settings on your ATMEGA328?

RE: Strange problems with rfm12b - Added by JohnO almost 7 years ago

Any chance of a photograph of your ATMEGA328P setup?

RE: Strange problems with rfm12b - Added by yattapl almost 7 years ago

I’m using internal oscillator, bootloader - ATmegaBOOT_168_atmega328_pro_8MHz
Fuses taken from boards.txt file:

atmega328bb.upload.protocol=usbasp
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600

atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.path=arduino:atmega
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F

atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino

I’ve attached pic.

Ok, i’ve switched my rfm12b boards.

On board from pic and another rfm12b board i’m getting such noise:
? 50 163 5 247 60 216 129 81 134 50 6 149 132 63 132 204 224 5 72 26 250
? 30 234 4 38 196 189 85 178 158 15 123 64 158 48 215 196 203 111 11 98 40
? 167 193 59 64 231 231 3 140 6 7 126 89 149 150 187 251 35 13 177 255 32

I’ve used breadboard and rfm12b board from Jeelabs - full version with voltage regulator.
Is it correct noise? Looks fine to me, i’ve seen the same results on the internet.

Please look also on rfm12b board from pic, this is 3v3 version, is it properly soldered? I mean resistors and brigdes.
On this board i get only ? 0 .

I afraid that this one is damaged - rfm12b chip. I’ll order few more.
Atmega

arduino.jpg (352 KB) arduino.jpg Atmega
1172

RE: Strange problems with rfm12b - Added by JohnO almost 7 years ago

Lots of random characters with short delays between the lines is typical, setting “1q” ignores noise and lets you see good data if you have any! Your resistors look wrong to me - I think you need 6 resistors if you are using 5V power and no resistors just soldered links if using 3v3.

RE: Strange problems with rfm12b - Added by JohnO almost 7 years ago

You also appear to be missing a couple of capacitors.

RE: Strange problems with rfm12b - Added by yattapl almost 7 years ago

Thats 3rd version of board i’ve heard:)

I think resistors does not matter that much because on breadboard, which is powered with 3v3 i’ve used full rfm12b board from jeelabs, which is ready to work on 5v.
At this moment, i’ll be happy to se any correct noise on all boards i have.
I’ll order new boards tomorrow and see if my are damaged or not. At this moment i have one working setup.

According to this:
http://jeelabs.net/projects/hardware/wiki/RFM12B\_Board

For use at 5V:

Include all the components (C1, C2, C3, VR, R1, R2, R3) to activate the signal voltage-level converters and the voltage regulator (VR).

The VR reduces the 5V supply to 3.3V for the RFM12B module. A regulated 3.3V output is available at the connector pin marked ‘3V3’ for light loads from other circuits needing 3.3V.

For use at 3.3V: (the signal logic levels plus the power supply voltage level already match)

Omit components R1, R2, R3 and bridge across the respective topside solder jumpers SJ1, SJ2, SJ3. This disables the voltage-level convertors.
Omit the voltage regulator (VR) and supply 3.3V into the connector pin marked ‘3V3’.

You may be right, i’ve been sure that i can ommit capacitors if i’m using 3v3.

But i wonder how it works without any resistors or caps?
http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/

Sometimes i get weird output:
Current configuration:
B i2 g1 @l868 Maz

RF12demo.8] B i2 g1 @ ü<cRF1 demo 8] B i2 g1 @ 868 MHz

What the heck?

After supplying board with missing caps i don’t get any output - not even config :)
Have enough for today..

RE: Strange problems with rfm12b - Added by martynj almost 7 years ago

yattapl, the Wiki documentation was not clear about using the capacitors when in a 5v context.
Please refer to the amended text.

RE: Strange problems with rfm12b - Added by yattapl almost 7 years ago

Okay, new chip arrived.
Soldered, checked - success :)

Thanks for support.

    (1-20/20)