LowPowerLab Forum

Hardware support => Moteino => Topic started by: roflcopter123 on August 28, 2014, 09:53:47 PM

Title: Another Long Range Post -- RadioHead RFM69 Library
Post by: roflcopter123 on August 28, 2014, 09:53:47 PM
Hi all,

I have seen many posts here regarding lowering the bitrate and using special configurations in order to maximize the distance of an RFM69W. However, I am unsure that the code below (as noted by Felix in an older thread) is still relevant to the new library, RadioHead RF69.

    /* 0x03 */ { REG_BITRATEMSB, RF_BITRATEMSB_19200}, //default:4.8 KBPS
    /* 0x04 */ { REG_BITRATELSB, RF_BITRATELSB_19200},
    /* 0x05 */ { REG_FDEVMSB, RF_FDEVMSB_25000}, //default:5khz, (FDEV + BitRate/2 <= 500Khz)
    /* 0x06 */ { REG_FDEVLSB, RF_FDEVLSB_25000},
    /* 0x19 */ { REG_RXBW, RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_24 | RF_RXBW_EXP_3 },
    /* 0x3d */ { REG_PACKETCONFIG2, RF_PACKET2_RXRESTARTDELAY_NONE | RF_PACKET2_AUTORXRESTART_ON | RF_PACKET2_AES_OFF }, //RXRESTARTDELAY must match transmitter PA ramp-down time (bitrate dependent)

Please correct me if I am wrong. As such, I have been using the setModemConfig() instead with the table of predefined bitrates found here: http://www.airspayce.com/mikem/arduino/RadioHead/classRH__RF69.html#a8b7db5c6e4eb542f46fec351b2084bbe

From that table, I am using the following: rf69.setModemConfig(RH_RF69::OOK_Rb4_8Bw9_6)

This means that I am transmitting at 4.8kbps. Since my data I am sending is only about 50bps, is there a way for me to lower the bitrate even more so, and possibly increase the strength of the signal as well by allowing the device to transmit at a higher than the (presumably lower) default dBm?

Any advice regarding all of this would be appreciated. My goal would be to achieve the 350m+ in an open field as I believe Felix achieved with his RFM69W. Other notes would be that I am currently using a 1/4 wave length monopole antenna. Also, is ASK/OOK the best modulation of choice for long distance? I assume that choosing the right modulation will also play a role as I have a suspicion that FSK will have a higher sensitivity thank ASK.
Title: Re: Another Long Range Post -- RadioHead RFM69 Library
Post by: roflcopter123 on August 30, 2014, 01:09:33 AM
Apologies for not realizing that RadioHead and your library, Felix, were not one in the same. I was confused, as they stated that the RFM69 library was retired.

No matter. I have since shifted to using FSK_Rb2Fd5 as I believe that the guys over at RadioHead have taken a liking to the register tweaks you guys have been doing, and modified it to replicate the low power forum's findings. Maybe this will work better for me.

So far, line of sight, I have gotten a little over 300m, but am confident that if I didn't have that last building in the way, I could have gone much further.

Are there any other recommendations for me in order to achieve these long distances that I keep seeing posted? Would I benefit from a helical copper antenna more?
Title: Re: Another Long Range Post -- RadioHead RFM69 Library
Post by: Felix on August 30, 2014, 09:26:23 PM
Others experimented with lowering bitrate and narrowing the bandwidth.
There is no definite recipe that I can point you to, but there are some sample code posts about that in the forum, you might have picked one of them. I tried to keep some of those posts sticky that were relevant.

I am curious .. who is claiming that my RFM69 library is retired?
Title: Re: Another Long Range Post -- RadioHead RFM69 Library
Post by: roflcopter123 on August 30, 2014, 11:10:14 PM
Quote from: Felix on August 30, 2014, 09:26:23 PM
Others experimented with lowering bitrate and narrowing the bandwidth.
There is no definite recipe that I can point you to, but there are some sample code posts about that in the forum, you might have picked one of them. I tried to keep some of those posts sticky that were relevant.

I am curious .. who is claiming that my RFM69 library is retired?

I guess that the names are way too similar, especially to someone who is not familiar with the two communities regarding this radio module.

http://www.airspayce.com/mikem/arduino/RF69/

At the top, he says that the RF69 is retired. I must have mistaken this for yours since the names of the libraries are very similar.

One other question I have would be the application of Steinarrr's register combination (https://lowpowerlab.com/forum/index.php/topic,562.msg3345.html#msg3345) in reference to the following format:

CONFIG_FSK,  0x3e, 0x80, 0x00, 0x52, 0xf4, 0xf4, CONFIG_WHITE}, // FSK_Rb2Fd5

I understand that in his post, the first 4 are being written to the 3, 4, 5, and 6 addresses, but am not quite following 19 or 18. How does this translate to the format posted above?

Edit: It looks like I can manually write the registers via the function spiWrite(). Please correct me if I am mistaken.

http://www.airspayce.com/mikem/arduino/RadioHead/classRHSPIDriver.html#a649210bd63262e23c9becabfc7142fd3

Also, I assume that these register changes are interchangeable between the RFM69W and the RFM69HW?
Title: Re: Another Long Range Post -- RadioHead RFM69 Library
Post by: Felix on August 31, 2014, 10:42:54 AM
Quote from: roflcopter123 on August 30, 2014, 11:10:14 PM
http://www.airspayce.com/mikem/arduino/RF69/
At the top, he says that the RF69 is retired. I must have mistaken this for yours since the names of the libraries are very similar.

One other question I have would be the application of Steinarrr's register combination (https://lowpowerlab.com/forum/index.php/topic,562.msg3345.html#msg3345) in reference to the following format:

CONFIG_FSK,  0x3e, 0x80, 0x00, 0x52, 0xf4, 0xf4, CONFIG_WHITE}, // FSK_Rb2Fd5

I think he's just referring to his own RF69 library being retired and taken over by RadioHead. I am not familiar with those libraries and not affiliated so if you're looking for help on those please ask Mike.

I don't know where this came from but I don't think from this forum:

CONFIG_FSK,  0x3e, 0x80, 0x00, 0x52, 0xf4, 0xf4, CONFIG_WHITE}, // FSK_Rb2Fd5

So I don't know how to help.
Title: Re: Another Long Range Post -- RadioHead RFM69 Library
Post by: Steinarrr on September 04, 2014, 08:41:47 AM
Quote from: roflcopter123 on August 30, 2014, 11:10:14 PM
.....but am not quite following 19 or 18.....

18 is just because my antenna was specified as having 50 ohm impedance, i didn't notice any difference commenting it out or leaving it in :/

and 19 is setting the Recieving Bandwidth :)