LowPowerLab Forum

Hardware support => RF - Range - Antennas - RFM69 library => Topic started by: Drae on September 03, 2013, 02:36:17 PM

Title: RFM69HW range test!
Post by: Drae on September 03, 2013, 02:36:17 PM
I finally got these modules soldered, debugged and running in a project as well as the old RFM12B's I was using, and finally managed to perform the same range test with the existing modules.

The results are impressive, ~540 meters range @38400kbps with lots of trees and one or two buildings inbetween. ;p

I could likely manage more range at a lower bitrate and different sensitivity sessions, but the ~4ms send time is quite important for the network design of the current project.

Thanks for taking the time to release the RFM69  library code Felix, it's been very helpful!

Here's a map I threw together plotted from various points when the signal dropped off. I sadly don't have anywhere nearby that has >700 meters of direct uninterrupted line of sight, but the local park was a good test of range with obstacles and people (trees)
(http://draelen.co.uk/g/images/RFM69HW_Range.jpg)

Title: Re: RFM69HW range test!
Post by: Felix on September 03, 2013, 06:54:13 PM
Nice, thanks for sharing and for taking the time to walk out there and put this together.
I've done a few park tests and it's quite time consuming. I ran out of space at around 350m in open air with no obstacles, the signal still around 85dBm. At 540m with obstacles that is still very good.

Another user reported getting a 1.5 mile range at 1200baud! See his post here (http://lowpowerlab.com/forum/index.php/topic,112.0.html).
Title: Re: RFM69HW range test!
Post by: hneiraf on October 11, 2013, 08:06:49 AM
Very nice!

I'm doing the same kind of test with some RFM69W radios.
Can you share with us your RFM69 library Config?

REG_BITRATEMSB
REG_BITRATELSB
REG_FDEVMSB
REG_FDEVLSB
RF_RXBW_MANT_
RF_RXBW_EXP_
RF_PACKET2_RXRESTARTDELAY_

I want to do some test with 38.4kbps but I'm afraid I don't have the right configuration.

Thank you in advance!

HN
Title: Re: RFM69HW range test!
Post by: anthonywebb on October 11, 2013, 06:30:59 PM
I would be interested in this config as well.  Moteinos will soon be on the way and I would like to really make them sing.  The details findings would make a good blogpost for people really wanting to push some distance out of their hardware.
Title: Re: RFM69HW range test!
Post by: Drae on October 12, 2013, 04:12:26 AM
Funnily enough, the settings are mostly all default; I haven't yet played with them to see which ones give more range (Until I finish some handheld units for indoor use over multiple floors)

I'm sure a few more meters range could be gotten with someone who understands how all these settings affect signal reception.

Also, as a disclaimer I have modified a good few parts of the library for my project (and use external logic for managing packet queues/acks), here are some which adds overhead for me, and may affect the amount of packets and range you'll manage at smaller packetsizez/slightly faster responses:

Anyhoo, here's the current settings:
Transmitting at 869.xmhz (haven't specifically checked which . yet)

REG_BITRATEMSB  0x3
REG_BITRATELSB   0x41

REG_FDEVMSB 0x03 (50k, can't recall why I set it away from the default 5k)
REG_FDEVLSB  0x33

RF_RXBW_MANT_
RF_RXBW_EXP_ - 
RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_16 | RF_RXBW_EXP_2


RF_PACKET2_RXRESTARTDELAY_
REG_PACKETCONFIG2, RF_PACKET2_RXRESTARTDELAY_2BITS | RF_PACKET2_AUTORXRESTART_ON | RF_PACKET2_AES_OFF

EDIT: Full list here! http://draelen.co.uk/g/rgm69regs.txt (http://draelen.co.uk/g/rgm69regs.txt)
Title: Re: RFM69HW range test!
Post by: Felix on October 12, 2013, 09:15:04 AM
Thanks all for continuing this discussion, all good stuff.
I'll include the reg list here if you don't mind, just in case the file goes away on Drae's server.

By the way, if someone has nice results or wants to share another driver (maybe Drae with the TCP/IP-ish approach?) and is willing to do a writeup, I would be more than happy to post it on the blog.

Code: [Select]
  const byte CONFIG[][2] =
  {
    /* 0x01 */ { REG_OPMODE, RF_OPMODE_SEQUENCER_ON | RF_OPMODE_LISTEN_OFF | RF_OPMODE_STANDBY },
    /* 0x02 */ { REG_DATAMODUL, RF_DATAMODUL_DATAMODE_PACKET | RF_DATAMODUL_MODULATIONTYPE_FSK | RF_DATAMODUL_MODULATIONSHAPING_00 }, //gaussian, bt=1.0
    /* 0x03 */ { REG_BITRATEMSB, RF_BITRATEMSB_38400}, //default:4.8 KBPS
    /* 0x04 */ { REG_BITRATELSB, RF_BITRATELSB_38400},
    /* 0x05 */ { REG_FDEVMSB, RF_FDEVMSB_50000}, //default:5khz, (FDEV + BitRate/2 <= 500Khz)
    /* 0x06 */ { REG_FDEVLSB, RF_FDEVLSB_50000},

    /* 0x07 */ { REG_FRFMSB, (freqBand==RF69_315MHZ ? RF_FRFMSB_315 : (freqBand==RF69_433MHZ ? RF_FRFMSB_433 : (freqBand==RF69_868MHZ ? RF_FRFMSB_869 : RF_FRFMSB_915))) },
    /* 0x08 */ { REG_FRFMID, (freqBand==RF69_315MHZ ? RF_FRFMID_315 : (freqBand==RF69_433MHZ ? RF_FRFMID_433 : (freqBand==RF69_868MHZ ? RF_FRFMID_869 : RF_FRFMID_915))) },
    /* 0x09 */ { REG_FRFLSB, (freqBand==RF69_315MHZ ? RF_FRFLSB_315 : (freqBand==RF69_433MHZ ? RF_FRFLSB_433 : (freqBand==RF69_868MHZ ? RF_FRFLSB_869 : RF_FRFLSB_915))) },
   
    // looks like PA1 and PA2 are not implemented on RFM69W, hence the max output power is 13dBm
    // +17dBm and +20dBm are possible on RFM69HW
    // +13dBm formula: Pout=-18+OutputPower (with PA0 or PA1**)
    // +17dBm formula: Pout=-14+OutputPower (with PA1 and PA2)**
    // +20dBm formula: Pout=-11+OutputPower (with PA1 and PA2)** and high power PA settings (section 3.3.7 in datasheet)
    ///* 0x11 */ { REG_PALEVEL, RF_PALEVEL_PA0_ON | RF_PALEVEL_PA1_OFF | RF_PALEVEL_PA2_OFF | RF_PALEVEL_OUTPUTPOWER_11111},
    ///* 0x13 */ { REG_OCP, RF_OCP_ON | RF_OCP_TRIM_95 },       //over current protection (default is 95mA)
   
    // RXBW defaults are {RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_24 | RF_RXBW_EXP_5} (RxBw: 10.4khz)
    /* 0x19 */ { REG_RXBW, RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_16 | RF_RXBW_EXP_2 }, //(BitRate < 2 * RxBw)
    /* 0x25 */ { REG_DIOMAPPING1, RF_DIOMAPPING1_DIO0_01 },     //DIO0 is the only IRQ we're using
    /* 0x29 */ { REG_RSSITHRESH, 220 },                         //must be set to dBm = (-Sensitivity / 2) - default is 0xE4=228 so -114dBm
    ///* 0x2d */ { REG_PREAMBLELSB, RF_PREAMBLESIZE_LSB_VALUE } // default 3 preamble bytes 0xAAAAAA
    /* 0x2e */ { REG_SYNCCONFIG, RF_SYNC_ON | RF_SYNC_FIFOFILL_AUTO | RF_SYNC_SIZE_2 | RF_SYNC_TOL_0 },
    /* 0x2f */ { REG_SYNCVALUE1, 0x2D },                        //attempt to make this compatible with sync1 byte of RFM12B lib
    /* 0x30 */ { REG_SYNCVALUE2, networkID },                   //NETWORK ID
    /* 0x37 */ { REG_PACKETCONFIG1, RF_PACKET1_FORMAT_FIXED | RF_PACKET1_DCFREE_OFF | RF_PACKET1_CRC_ON | RF_PACKET1_CRCAUTOCLEAR_ON | RF_PACKET1_ADRSFILTERING_OFF },
    /* 0x38 */ { REG_PAYLOADLENGTH, MAX_DATA_LEN },             //in variable length mode: the max frame size, not used in TX
    //* 0x39 */ { REG_NODEADRS, nodeID },                       //turned off because we're not using address filtering
    /* 0x3C */ { REG_FIFOTHRESH, RF_FIFOTHRESH_TXSTART_FIFONOTEMPTY | RF_FIFOTHRESH_VALUE }, //TX on FIFO not empty
    /* 0x3d */ { REG_PACKETCONFIG2, RF_PACKET2_RXRESTARTDELAY_2BITS | RF_PACKET2_AUTORXRESTART_ON | RF_PACKET2_AES_OFF }, //RXRESTARTDELAY must match transmitter PA ramp-down time (bitrate dependent)
    /* 0x6F */ { REG_TESTDAGC, RF_DAGC_CONTINUOUS },            // run DAGC continuously in RX mode
    {255, 0}
  };
Title: Re: RFM69HW range test!
Post by: john k2ox on October 12, 2013, 02:55:04 PM
This one's free.

Set reg 0x58 to 0x2D

It increases the sensitivity by 2-3db by enabling the low noise pre-amp.

Good for more distance!
Title: Re: RFM69HW range test!
Post by: englund on October 15, 2013, 08:26:00 AM
Nice john! Will you merge this into the library Felix?
Title: Re: RFM69HW range test!
Post by: Felix on October 15, 2013, 10:26:10 PM
The datasheet mentions this. I will give it a try and probably merge it on github when I get some time to test it. Thanks!
Title: Re: RFM69HW range test!
Post by: john k2ox on October 16, 2013, 09:45:33 AM
You need to be careful using it.  The idea is that if the signal is weak it adds a couple db of sensitivity.  Good for long distance.

On the other hand it should not be used when they are close together.  The rx will overload at least 10db lower than with it off.

BTW, that's why it isn't 'on' all the time.  It adds 2 db to the bottom end and takes off 10 db at the top.  That means the 'dynamic range' has  been reduced by 8 db.
Just like the saying goes, you don't get something for nothing.

If you plan to use radio in a non fixed location application (i.e. remote controlled lawn mower) you would probably want to turn the pre amp on when
the RSSI is less than -70dbm and off when above -40dbm.
Title: Re: RFM69HW range test!
Post by: jbeale on October 16, 2013, 03:15:26 PM
I gather the Tx power is settable? At expense of some code complexity, you could imagine a Tx-Rx handshake where the Tx side adjusts its power up or down depending on either its own RSSI from the Rx's ACK, or the Rx side's observed RSSI reported back to Tx as a data field in the ACK. The result is you reduce the total dynamic range the receiver needs to handle. I think something like that is done in cellphone networks.  If the preamp gain is only 2 dB in SNR, maybe that is not a dramatic help in range, but might help your Tx side battery life if you don't transmit with more power than needed.
Title: Re: RFM69HW range test!
Post by: pko on October 17, 2013, 12:48:11 AM
dB is not a linear scale.  It is a logarithmic unit.  So from memory back in the old uni student day, 2 dB is actually a significant increase.  John will be in a better position to tell us how it translate to real world distance improvement.  Have to find my old textbook and refresh my knowledge in this area.
Title: Re: RFM69HW range test!
Post by: jbeale on October 17, 2013, 10:16:04 AM
+3 dB is a doubling in power. However a doubling in effective range requires 4x the power (+6 dB), because the radio strength falls off as 1/r^2 where r is distance between Tx and Rx. Put another way, if power goes up by x, range goes up by square root of x.  So improving your signal 2 dB means it is 10^(2/10) or 1.58x stronger,  which means a range increase of sqrt(1.58) = 1.26 so your range goes up by 26%, which maybe useful but not a huge amount.

Adjusting the elevation, orientation, and geometry of your Tx and Rx antennas can change your total signal budget by much more than 2 dB, so that's the most important thing to optimize, if at all possible.

Another point of reference, the difference in Tx power between RFM69W and -HW is 7 dB or 5x, while the receive sensitivity is the same (-120 dBm @ 1.2 kbps). So in theory a pair of -HW modules should have 2.2x greater range than a pair of the -W modules, other things being equal. 

The older RFM12B has only +5 dBm output and the receive sensitivity is also 10 dB worse (-110 dBm @ 1.2 kbps) so a pair of RFM12B modules has 18 dB less link budget than RFM69W, that is quite a bit, only 12.6% of the range of the RFM69W if those numbers are right.

RFM12B:   +5 dBm output (3.1 mW)  (into 50 ohm load, at 915 MHz)
RFM69W:  up to +13 dBm output (20 mW)  settable -18 to +13 dBm
RFM69HW: up to +20 dBm output (100 mW) settable -18 to +20 dBm

http://www.hoperf.com/upload/rf/RFM12B.pdf
http://www.hoperf.com/rf/module/fsk/RFM69W.htm
http://www.hoperf.com/rf/module/fsk/RFM69HW.htm
http://www.hoperf.com/upload/rf/RFM69HW-V1.1.pdf

With mile-plus range into a dipole antenna at +20 dBm, it's worth thinking about using the variable output power of the RFM69 modules to reduce range to cover just what's needed. For example, if you're just working inside your house, no point in covering that size of a neighborhood (pi.r^2 => 3 square miles) with RF noise.
Title: Re: RFM69HW range test!
Post by: Felix on October 17, 2013, 09:34:14 PM
Many thanks jbeale for explaining this so plainly, yet detailed and easy to understand.
Title: Re: RFM69HW range test!
Post by: Cabe on November 04, 2013, 11:05:53 AM
Excellent work all round I say.

It also introduced me to Moteino, my projects will be pleased  ::)
Title: Re: RFM69HW range test!
Post by: wesner00192 on November 11, 2013, 10:48:38 AM
To set the power level in the sketches for the transmitting will the below statement work in the setup function?

radio.setPowerLevel(31);
Title: Re: RFM69HW range test!
Post by: Felix on November 11, 2013, 12:37:47 PM
Yes it should work.
Although setting it to 31 is pointless, it's already max by default.
Title: Re: RFM69HW range test!
Post by: Drae on November 24, 2013, 07:57:35 PM
Whoops, I never noticed all the replies, sorry! I thought the notify function would send emails on new posts o_o

This one's free.

Set reg 0x58 to 0x2D

It increases the sensitivity by 2-3db by enabling the low noise pre-amp.

Good for more distance!

This is a great find; easy enough to dynamically enable when all other reachable nodes are very far away!


By the way, if someone has nice results or wants to share another driver (maybe Drae with the TCP/IP-ish approach?) and is willing to do a writeup, I would be more than happy to post it on the blog.

Unfortunately I haven't yet been able to continue full time dev on this; though the network layer is mostly in a usable state (Still some timesync bugs between nodes to squish!). If there's interest I'd be happy to spend a little time explaining my own approach to a pseudo-TCP, fixed-broadcast window network. :)
Title: Re: RFM69HW range test!
Post by: hdphilip on April 21, 2014, 11:12:59 PM

       Did a range test today pretty impressed, 2.19 km. Their were a few house in the way, partial line of sight.
 The module was a 433 MHz RFM69HW,
bitrate   1200
RegFdev 2000
RegRxBw 0x19,0x56

I had it set at power level 29, max power would hang up the TX.

The LCD readout was about -108 Rx rssi. The antenna was a straight piece of wire soldered on the board.
The reception was pretty spotty at best, but when i saw the display change and the led blink,  that's it.


here's a picture of the area.


 
Title: Re: RFM69HW range test!
Post by: Felix on April 22, 2014, 08:20:53 AM
1.35 miles with some obstacles .. impressive.
So at least 1 mile is achievable without a lot of complications.
Nice to know... it confirms other people's tests. Thanks for sharing your findings!
Title: Re: RFM69HW range test!
Post by: hdphilip on April 24, 2014, 12:40:45 AM

Felix,

With the default settings, i was getting about 450 meters, pretty solid reception, but it dropped off pretty fast.
I think with good tuned antennas, the range would be better. I would like to add, on the 2.19 km test, the module was setting on the dashboard. I wasn't able to pull of the road. Here's a picture of my set up.
(http://) 

 On the test, i was using a straight piece of wire, although the spring antennas do work.
 I've found with my setup, the node rssi is always pretty close to the gateway rssi, about 5-6 dB worst case.

I'd like to make a software routine to optimize the settings.

Philip
Title: Re: RFM69HW range test!
Post by: travmaga on April 28, 2014, 10:03:46 PM
hey guys,
   i'm really impressed (and envious) of your range with the 69HW's.  i've been wrestling with the RFM69.cpp for what seems like weeks now trying to find a combination that works, but i'm afraid my lack of experience is what's hobbling me.  I've looked at all the posts regarding lowering bitrates on this forum, but i may be missing something (or a lot of things) but let me run this past you and tell me if i'm missing something obivous-

in looking at the previous post by  hdphillip, he lists
bitrate   1200
RegFdev 2000
RegRxBw 0x19,0x56

so, if i want to drop the bitrate to 1200, i'll need to change this block in the rfm69.cpp

Code: [Select]
    /* 0x03 */ { REG_BITRATEMSB, RF_BITRATEMSB_55555}, //default:4.8 KBPS
    /* 0x04 */ { REG_BITRATELSB, RF_BITRATELSB_55555},
    /* 0x05 */ { REG_FDEVMSB, RF_FDEVMSB_50000}, //default:5khz, (FDEV + BitRate/2 <= 500Khz)
    /* 0x06 */ { REG_FDEVLSB, RF_FDEVLSB_50000},


to reflect these changes:

Code: [Select]
    /* 0x03 */ { REG_BITRATEMSB, RF_BITRATEMSB_1200}, //default:4.8 KBPS
    /* 0x04 */ { REG_BITRATELSB, RF_BITRATELSB_1200},
    /* 0x05 */ { REG_FDEVMSB, RF_FDEVMSB_2000}, //default:5khz, (FDEV + BitRate/2 <= 500Khz)
    /* 0x06 */ { REG_FDEVLSB, RF_FDEVLSB_2000},




though it appears I’ll also need to adjust this line as well

Code: [Select]
 /* 0x19 */ { REG_RXBW, RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_16 | RF_RXBW_EXP_2 }, //(BitRate < 2 * RxBw)

but it lists 0x56, and I’m not quite sure what to make of that- I’ve searched for this combination through all of the files and can’t quite make sense of what I should do with that.

   I’ve tried to read as much as I can on this topic before posting, and I see in the comments in the forums and that the bitrate/freqdev and bwrx are interrelated.  I’ve also read that it’s possible to comment out the init functions that call to the non default values and return the 69hw to it’s orig. settings, which sounds like a great way to learn which settings need to be changed in order to affect the bitrate.  I looked for an init function that calls to the sepcs listed above, but haven’t been able to find it (if someone can point me in the right direction there as well, I’d be very grateful)
   Also, My technological acumen isn’t quite sharp enough to parse the hope rfm69 pdf so hopefully someone might be able to explain the best way to drop the bitrate in order to achieve the longer distance that I need for my project.  The data I’m sending is quite minimal so and I’d like to ideally have a large spread of nodes per gateway.  I’ve had great luck so far but this is my weakest part of the process, so I’m really hoping that I’ll be able to achieve some better transmission distances with the lower bitrates. 

   Thanks so much and I really look forward to your suggestions and replies.  If there is any more information I can give you to help better answer my questions, I’ll be happy to.
Title: Re: RFM69HW range test!
Post by: hdphilip on April 29, 2014, 10:55:16 PM
travmaga,

i had problems with changing certain parts of the .cpp file.

so i did it this way,
 

The RegRxBw 0x19,0x56 values are something i put together to change the channel filter bandwidth control.
it's register 19 (hex) and the value 56(hex).


what I'm trying to do is narrow the bandwidth of the receiver for a slower data rate. buy doing this the sensitivity will increase.

look at "3.4.6. Channel Filter" in the data sheet

56 in binary is:
01010110 

bits 7,6,5 = 010    DccFreq
bits 4,3    = 10      RxBwMant   the "10b / 24" in table 14 of the data sheet   
bits 2,1,0 = 110    RxBwExp     the "5" in table 14 of the data sheet

so put it all together, and it's 56 hex.

This give me a 10.4 kHz Rx bandwidth

notes:
on the "Struct_ " sketches,  do the "r" and read out the registers, very powerful tool Felix added

The      "radio.writeReg(0xreg,0xvalue);"     is how to change the registers, maybe better to do it this way instead in the .cpp file.

here's how i change the bitrate, freqdev, RegRxBw

 radio.writeReg(0x03,0x68);   //RegBitrateMsb 1200 bitrate
 radio.writeReg(0x04,0x2b);   //RegBitrateMsb
 radio.writeReg(0x05,0x00);   //RegFdevMsb     2000
 radio.writeReg(0x06,0x21);   //RegFdevLsb
 radio.writeReg(0x19,0x56);   //RegRxBw

 radio.writeReg(0x18,0x88); //RegLna register



hopefully this helps

Philip


       


 



Title: Re: RFM69HW range test!
Post by: travmaga on May 02, 2014, 03:04:41 PM
thanks so much for the very detailed response!
very helpful.  I'll try to implement these ideas, will let you know how it goes.

Title: Re: RFM69HW range test!
Post by: CaptainJack on June 29, 2014, 08:51:08 AM
Hello all,

I'm using a homebuilt moteino, that is: arduino uno and RFM69HCW-module, a cd4050 levelshifter between the two to convert 5v to 3v3 signals, and a 3v3 ldo to generate power for the radio module (rated for 250 mA). In the picture below my setup:

(https://lh3.googleusercontent.com/-baQ9SxfQ4ss/U7AKC25E49I/AAAAAAAAAUI/O4mFsn3LoLk/w1344-h747-no/20140629+setup.jpg)

The module is 433 MHz, set to 4.8 kbps, Pout=+20dBm. The antenna is 1/4 wavelength. Two closeups of the pcb:

(https://lh5.googleusercontent.com/-8bd7dPfDM8w/U7AKC-EYrkI/AAAAAAAAAUA/7MiB3Knc2fo/w601-h502-no/20140629+closeup+pcb+front.jpg)

(https://lh6.googleusercontent.com/-NokGKJfHHno/U7AKC5YJ79I/AAAAAAAAAUM/J3uTgNol3uI/w774-h723-no/20140629+closeup+pcb+back.jpg)

My maximum range with line of sight is between 100 and 130 meters, not by far what I would have expected. I have a pair of NRF24L01+PA+LNA for comparison: 2.4 GHz, 250kbps, they get 500 meters line of sight. My expectation was that a module with lower frequency would get me better range outdoors.  I also read that most users here get a much better range.

I would be much obliged for any suggestions how to approach from here. Am I experiencing a hardware problem or a software problem ? Some people claim to get 500 meter ranges with just a 1/4 wavelength wire soldered to the module, no apparent large ground plane present. I would say my antenna should be able to do the same...

Cheers,

Jack
Title: Re: RFM69HW range test!
Post by: hdphilip on June 30, 2014, 08:14:15 PM
captain jack,

i don't have the same module, but what i have found is the 433 MHz antenna's that are common on ebay aren't very good. try a wire cut to length,

also post your setup code may help.

but what i have found is my "SDR spectrum analyzer" is the best, cheapest tool to make sure you units are on freq.



on the attached picture, I'm a little off freq, i just connected the sdr usb adapter and it takes a little time to stabilize,
the long data burst (bottom) is on my outside unit which is reporting 127.4F
the shorter "ack" (top) is inside at 72F

I'm using a freq temp compensation on both units

Philip



 
 

Title: Re: RFM69HW range test!
Post by: Felix on July 01, 2014, 08:13:16 AM
Great stuff, would be nice if someone would write a for-dummies tutorial on how to set this up and calibrate everything.
Title: Re: RFM69HW range test!
Post by: hdphilip on July 04, 2014, 09:59:43 PM

here's a link to the software I'm using for my spectrum analyzer display.

 http://www.sdrsharp.com/

for someone want to pursue this, their are many YouTube videos with step by step instructions, the converter I'm using is from NooElec, R820T sdr & DVB-T "usb dongle. It take a little practice to get the hang of it, their are yahoo groups that can offer help if needed.

It works just like a radio receiver, and more, I would say, if your going to play with these moteino's,
it will be the best investment you'll ever make.

As far as doing the temperature compensation, search this forum for posts by "john k2ox" he pretty much spells it out.

I did create my own temperature compensation correction table for 433 MHz devices, and it seems to work pretty good. its the excel spreadsheet attached.

i made it by watching the frequency drift vs temperature from a remote moteino i put in the freezer, the took it outside set it in the sun.

 And as it reported the temperature, i made note of the frequency change from observing the SDR radio.
I did have to adjust the master's frequency a couple of times during the test.

when i get some time I'll post some code.

Philip

   



     




   
Title: Re: RFM69HW range test!
Post by: hneiraf on July 07, 2014, 04:24:51 AM
I have some moteinos running in the outside in a vineyard and a gateway inside a building 200 meters away approx. (base). The temperature change in the outside during the day and night is about 15 celsius degrees as max. The moteino in the outside is reporting PH from water every 15 seconds.

In order to keep the radios tuned I'm just calling this:

radio.rcCalibration();

Every 15 minutes, and this seems to work.
Is that OK? or I should do something else to try to keep the radios tuned in the right frequency?
I'm using the same calibration routine in the base, but every 1 hour.

Thank you,

Hugo
Title: Re: RFM69HW range test!
Post by: hdphilip on July 07, 2014, 08:04:30 PM
Hugo,

I haven't studied the radio.rcCalibration(), in depth, if your using the default settings for data rate and bandwidth, if may not be much of an issue at that distance. where the temp correction comes in handy is at long distances, with lower data rates.

Philip
Title: Re: RFM69HW range test!
Post by: CaptainJack on July 09, 2014, 08:51:34 AM
Philip,

thanks for your replies, it took me some time to get to my rfm69 again. I will build a setup with just a piece of wire as antenna to see how that works out. As soon as I have results I'll post them together with register settings.

I will have to look into that spectrum analyzer. What I have learnt is mostly that there is still much to learn about RF. I'll try and pick up a good book about it for the summer.

Cheers,

Jack
Title: Re: RFM69HW range test!
Post by: hneiraf on July 25, 2014, 09:51:49 PM
Hi hdphilip,

You said this in a previous post: "I had it set at power level 29, max power would hang up the TX"

In my experience using both default bitrate (56k) and your low bitrate configuration(1.2k), using a simple wire antenna with 433mhz RFM69HW I get better results with powerlevel 31. But when I use a high gain antenna (a 80 cm antenna with 5.5dbi) then I get better results using powerlevel 29.

These are the antenna features:
Frequency Range(MHz):433+/-5
V.S.W.R:<=1.5
Input Impedance(OHM):50
Max-power(W):10
Gain(dBi):5.5
Polarization:Vertical
Height(cm):80
Cable Length(cm):300
Weight(kg):0.5
Connector Type:SMA

Can you explain me/us why that happens, basically when to use powerlevel 31 and when to use powerlevel 29? in order to get better results?
I mean, you are the expert, and I would like to know when to reduce the powerlevel and when to increase it, more in deep than just try and try walking and walking away as I do :D

Hope you can help us

Thank you in advance!

Hugo
Title: Re: RFM69HW range test!
Post by: hdphilip on July 26, 2014, 07:06:52 PM

Hugo,

let me try this again, my first reply got deleted cause my picture attachment was too large.................

things to consider when using the highest power:

 
Quote
The Duty Cycle of transmission at +20dBm is limited to 1%, with a maximum VSWR of 3:1 at antenna port, over the
standard operating range [-40;+85°C].

if you were to upload a sketch could you damage the chip?

    I found my range suffered when i tried power level 31, not so much on the default bitrate, more so at slower bitrates. I don't have a power meter to measure the output, but maybe the slower bitrates are over driving the PA.


Would you  rather have a cleaner signal at a lower power, then a stronger, possible dirtier signal?
for instance, turning the volume on a television to 100% seldom makes the audio sounds better...

What kind of antenna is the 5.5 dB your using?

    I found all of those cheap ebay 433 MHz antennas were junk for long range, even though the SWR looked good on my sweep generator, their performance was poor.

Those bare "spring" antennas were ok. if you just don't have the space.

Philip

 
 
 
 



Title: Re: RFM69HW range test!
Post by: hdphilip on July 26, 2014, 07:54:55 PM
Hugo,

try some temp experiments,

set one of your unit outside in direct sunlight, and the other in the icebox, and compare rssi as the unit warms up from being in the icebox.

here's a few pictures.
Notice the ND TEMP of the unit outside and the temp of my display box (notice the frost on it) it shown on the LCD in yellow.

with temp compensation, I get "free db's worth of gain"

this is my "hybrid" moteino's, the outside unit has a small solar panel to keep the battery charged.

philip
Title: Re: RFM69HW range test!
Post by: griff on July 07, 2015, 01:14:25 PM
In 2013 Drae reported RFM69HW range test results of 540 meters. I also obtain about the same range. In the US, if you have an amateur radio license (a.k.a "ham radio"), you might check out my experience using a Moteino (RFM69HW) at  http://w5vwp.com/moteino.shtml. The web-page describes how I constructed a 4 watt 56kbps 433mhz Moteino transceiver for about $75 with a range of about 3 miles (5 km) to a mobile antenna.  I put firmware for the moteino on http://github.com/griff2/rfm69rptr. This firmware displays whatever you type on your keyboard to the screen of the "remote" computer, and vice versa.  The transceiver uses a Moteino plus a Chinese FSK 4 watt power amplifier ($53)I purchased on ebay.com.  To use this much power legally in the US, you must have a ham (or other) FCC license. For even longer range, try using directional antennas and/or the Down East Microwave (http://fwfvq.tehfm.servertrust.com/category-s/1814.htm) 433mhz 30 watt linear power amplifier, model 7025PA ($215).

Griff W5VWP
Title: Re: RFM69HW range test!
Post by: A_Christensen on April 09, 2017, 09:15:34 AM
Hi guys.  Hope to bring this old topic back to life.

We have tried to walk trough all the posts and change the cpp file to
bitrate   1200
RegFdev 2000
RegRxBw 0x19,0x56

When we go below 9600 baud.. it all just stop working.

Is there anyone out there that can be our hero and let us see a low baud working rfm69 cpp file. ?

We are running the RFM69HCW 433mhz.   and our goal is 3KM.

Dipoles are on their way.  But right now we are stuck at 300m. And we simply do not have any clue as to what settings could be wrong.

any help is greatly appreciated.

The RFM96 is a possibility. But the 10 x RFM69 we have bought for our demo, would be very nice getting to run. :)

Title: Re: RFM69HW range test!
Post by: perky on April 09, 2017, 09:42:13 AM
Useful reference for BR, Fdev and RxBw:
https://lowpowerlab.com/forum/rf-range-antennas-rfm69-library/definition-of-rxbw-with-rfm69/

From this the rules are (assuming you're not not using AFC):
1)  0.5 <= 2 * Fdev/BR <= 10    (modulation index, MI)
2)  BR < 2*RxBw     (bit rate)
3)  RxBw >=  Fdev + BR/2 + LOoffset (receiver bandwidth)
4)  Fdev + BR/2 < 500kHz  (maximum RxBw setting)

So at BR =1200, Fdev = 2000 you need RxBw >= 2600 + LOoffset.  However LOoffset can be quite high. At a nominal 20ppm (+/-10ppm) that can be 8.6kHz at 433MHz, but if you take into account temperature and drift it could be as high as +/-35ppm, or 70ppm for LOoffset. That's worst case and the crystals are better speced than that, but it's still much higher than your RxBw which you've set to 5.6kHz!

So I'd try setting RxBw to 31.3kHz, i.e. reg 0x19 set to 0x44.

Mark.
Title: Re: RFM69HW range test!
Post by: A_Christensen on April 09, 2017, 02:32:27 PM
Awesome!
We will give it a go ASAP. Thank you for the explanation! We get smarter every day. I'll post our findings!
Title: Re: RFM69HW range test!
Post by: steve v on April 10, 2017, 01:51:59 PM
If your Local oscillator Offset is too high, you can try what I have been doing.

Simply manually type in a frequency offset to only One of the two devices.

I.e  set your  Moteino #1  to 433.000 Mhz and your Moteino #2   try  433.006, 433.003, 432.997,  432.994   chances are one of those 4 frequs will be closer than your original test and it will fit into the 5.6Khz RxBW

Perhaps someone could write a code loop to automatically scan through a range of Frequs and print the frequs that worked

Steve

Title: Re: RFM69HW range test!
Post by: A_Christensen on April 10, 2017, 07:13:58 PM
So we made the changes. But once again the entire communication stopped.
BR =1200,
Fdev = 2000
RxBw = ( reg 0x19 set to 0x44 )

We then by mistake loaded
BR =1200,
Fdev = 20000
RxBw = ( reg 0x19 set to 0x44 )

When we loaded the Fdev = 20000 it all lighted up like a Christmas tree.
Not completely understanding this. We are running 1200 bauds and communicating.

Can anyone teach me how Fdev works.?

Useful reference for BR, Fdev and RxBw:
https://lowpowerlab.com/forum/rf-range-antennas-rfm69-library/definition-of-rxbw-with-rfm69/

From this the rules are (assuming you're not not using AFC):
1)  0.5 <= 2 * Fdev/BR <= 10    (modulation index, MI)
2)  BR < 2*RxBw     (bit rate)
3)  RxBw >=  Fdev + BR/2 + LOoffset (receiver bandwidth)
4)  Fdev + BR/2 < 500kHz  (maximum RxBw setting)

So at BR =1200, Fdev = 2000 you need RxBw >= 2600 + LOoffset.  However LOoffset can be quite high. At a nominal 20ppm (+/-10ppm) that can be 8.6kHz at 433MHz, but if you take into account temperature and drift it could be as high as +/-35ppm, or 70ppm for LOoffset. That's worst case and the crystals are better speced than that, but it's still much higher than your RxBw which you've set to 5.6kHz!

So I'd try setting RxBw to 31.3kHz, i.e. reg 0x19 set to 0x44.

Mark.
Title: Re: RFM69HW range test!
Post by: joelucid on April 11, 2017, 02:09:23 AM
Quote
When we loaded the Fdev = 20000 it all lighted up like a Christmas tree.
Not completely understanding this. We are running 1200 bauds and communicating.

These radios can't tolerate a large relative frequency offset to frequency deviation. Over 30% and you can place radios right next to each other, they won't talk. To use narrow fdev you need to reduce the frequency offset between both nodes. You could use AFC (see datasheet) for example. However this isn't trivial to do. Look around, there have been threads about it.
Title: Re: RFM69HW range test!
Post by: LukaQ on February 07, 2018, 04:40:45 PM
To use narrow fdev you need to reduce the frequency offset between both nodes, how do you find out, what is that offset between nodes?
As it seems to me, you don't but you do compensate that with bandwidth.

let's say at 868MHz, LOoffset = 8.68k
BR = 1200
Fdev = 2000
RxBw >=  Fdev + BR/2 + LOoffset (receiver bandwidth) = 11.3k
Then if you set REG_RXBW to 20.8k or even 15.6k it should work right?
Title: Re: RFM69HW range test!
Post by: perky on February 08, 2018, 06:54:30 AM
I think those 'rules' may need some additional qualification.

At the transmitter there will be two modulation frequencies, FDEV either side of the transmitter carrier. At the reveiver those frequencies are (FDEV + LOoffset) and (FDEV - LOoffset) relative to the receiver's carrier. It appears that without AFC the radios stop receiving if there is a significant difference between these two deviations. Worst case is both these deviations could appear on the same side of the receiver carrier if LOoffset is large enough. So even though the receiver bandwidth is large enough to see both of those frequencies, the demodulator has trouble demodulating.

With AFC the receiver carrier frequency is adjusted to be the same as the transmitter carrier, but it requires a longer preamble. It does appear that even if both transmitted frequencies are on the same side of the receiver carrier the AFC is still capable of adjusting correctly (assuming of course the receiver bandwidth is large enough to capture them).

So what you saw when you increased FDEV is that the relative percentage difference of the two frequencies either side of the receiver carrier reduced to the point it started to work.

I think you're going to have to use AFC. It's not that complicated, you need to set RxBwAFC and have a longer preamble (which you can calculate from formulae in the datasheet). Once AFC is done it will then automatically use RxBw so that can be set significantly lower because LOoffset is no longer a factor, in other words subsequent reception has a higher signal to noise for more robust reception.

Mark.
Title: Re: RFM69HW range test!
Post by: LukaQ on February 08, 2018, 09:15:52 AM
I think those 'rules' may need some additional qualification.

At the transmitter there will be two modulation frequencies, FDEV either side of the transmitter carrier. At the reveiver those frequencies are (FDEV + LOoffset) and (FDEV - LOoffset) relative to the receiver's carrier. It appears that without AFC the radios stop receiving if there is a significant difference between these two deviations. Worst case is both these deviations could appear on the same side of the receiver carrier if LOoffset is large enough. So even though the receiver bandwidth is large enough to see both of those frequencies, the demodulator has trouble demodulating.

With AFC the receiver carrier frequency is adjusted to be the same as the transmitter carrier, but it requires a longer preamble. It does appear that even if both transmitted frequencies are on the same side of the receiver carrier the AFC is still capable of adjusting correctly (assuming of course the receiver bandwidth is large enough to capture them).

So what you saw when you increased FDEV is that the relative percentage difference of the two frequencies either side of the receiver carrier reduced to the point it started to work.

I think you're going to have to use AFC. It's not that complicated, you need to set RxBwAFC and have a longer preamble (which you can calculate from formulae in the datasheet). Once AFC is done it will then automatically use RxBw so that can be set significantly lower because LOoffset is no longer a factor, in other words subsequent reception has a higher signal to noise for more robust reception.

Mark.
So what you set in registers is 1/2 of that is really going on? Something like +/- FDEV & LOoffset? But LOoffset can be set in positive or negative way. And from what you say AFC is a must and will be much better than setting LOoffset. And with  AFC and good signal, is there any penalty?
Title: Re: RFM69HW range test!
Post by: perky on February 08, 2018, 11:01:14 AM
So what you set in registers is 1/2 of that is really going on? Something like +/- FDEV & LOoffset? But LOoffset can be set in positive or negative way. And from what you say AFC is a must and will be much better than setting LOoffset. And with  AFC and good signal, is there any penalty?
The benefits of AFC are you can use narrow bandwidths for RxBw to reduce the noise floor and increase transmission distance. Now you could say 'but I have to have a wider RxBwAfc, doesn't that reduce the distance anyway?'. Normally a signal would need to have a certain S/N ratio to get an acceptable bit error rate, but AFC may not need such a high S/N ratio because it is effectively averaging out noise during that period with a known pattern, so the reality is you can do an AFC at a lower signal S/N ratio than the data. Unfortunately this difference isn't documented which is a shame.

The penalty with AFC is the longer preamble needed for the AFC to work, and this can be substantial needing several bytes, maybe up to 5 or more. That has impact on short packet sizes and battery usage.

As for the registers, Fdev sets the deviation from the centre frequency, so a transmitter will transmit at (fc + Fdev) and (Fc - Fdev). RxBw and RxBwAfc are single sideband bandwidths, they set how far out from the receiver's frequency it will receive. In a system where the receiver's centre frequency is the same as the transmitters these are half the full bandwidth of the signal (remember this is a zero IF chip). But if the receiver's centre frequency is offset from the transmitter's, one of those frequencies would be further away from the centre and the other closer. the RxBw would need to be set wider to pull in the furthest transmitted frequency.

Mark.
Title: Re: RFM69HW range test!
Post by: LukaQ on February 08, 2018, 11:47:46 AM
Right... now you would need to find out receivers Fc and transmitters Fc and align receivers Fc to transmitters.

But doesn't RegAfcFei, bit 2 and 3 do that also? And how big bandwidth do you set, if you don't know yet what is the difference in Fc's? Why would you want to  have narrow bandwidth anyway?
Title: Re: RFM69HW range test!
Post by: dhkriti on September 03, 2019, 09:44:56 AM
Can I know which antenna can be used for RFM69HCW 915 Mhz , for a range of up to 100-200 feet? Also can I know which antenna was used in your experiment?