LowPowerLab Forum

Hardware support => Moteino => Topic started by: hneiraf on October 10, 2013, 05:51:23 AM

Title: Changing RFM69W Bitrate
Post by: hneiraf on October 10, 2013, 05:51:23 AM
Hi guys,

I have been testing the RFM69W within a farm and I got 400 meters using a 1/2 Wave monopole antenna (line of sight) which I think is pretty good.
As per the RFM69 library the default bitrate is 4.8kbps which should set RF_BITRATEMSB = 0x1A and RF_BITRATELSB = 0x0B, defined as RF_BITRATEMSB_4800 and RF_BITRATELSB_4800, but the library I have downloaded some days ago is using a custom bitrate RF_BITRATEMSB_55555 and RF_BITRATELSB_55555 which I think is 56kbps.

I would like to test with lower bitrates like 9.6 4.8 2.4 and 1.2kbps. I know I need to change the RF_BITRATEMSB_ and RF_BITRATELSB_ to the right values, but do I need to change something else in order to lower the bitrate? I mean, another variable related to the bitrate that can be affected by lowering it? and How much can this affect the communication timing (add some ms) I mean, is there a formula to calculate how much time can the sending message process takes at 56k and then at 4.8k, 9.6k etc?

Thank you in advance!

HN
Title: Re: Changing RFM69W Bitrate
Post by: john k2ox on October 10, 2013, 09:06:05 AM
1/BR * number of bits = t
Title: Re: Changing RFM69W Bitrate
Post by: hneiraf on October 11, 2013, 09:06:32 AM
Thank you john!

If I want to test with 38.4Kbps then I should change all the following variables in the CONFIG?

REG_BITRATEMSB = RF_BITRATEMSB_38400
REG_BITRATELSB = RF_BITRATELSB_38400
REG_FDEVMSB = RF_FDEVMSB_40000
REG_FDEVLSB = RF_FDEVLSB_40000
RF_RXBW_MANT_ = 24
RF_RXBW_EXP_ = 3
RF_PACKET2_RXRESTARTDELAY_ (keep it in 2 bits?)

Anything else more to be changed?

Thank you in advance

HN

Title: Re: Changing RFM69W Bitrate
Post by: john k2ox on October 11, 2013, 12:32:23 PM
I didn't check your numbers but, in general

Choose your BR and set it. Set your dev >=  BR/2.  Set RXBW >= 2*dev.

This is a good starting point.

There are considerations for spectrum use, battery life, orthogonality, ...
Title: Re: Changing RFM69W Bitrate
Post by: hneiraf on October 11, 2013, 02:26:15 PM
Thank you so much John!

I'm using your rule :)

some advice about RF_PACKET2_RXRESTARTDELAY_ variable? keep it in 2bits?
Or anything more to be changed in order to test at 38.4kbps?

Best regards,

HN
Title: Re: Changing RFM69W Bitrate
Post by: john k2ox on October 16, 2013, 09:22:25 AM
It needs to be set to match the TX ramp setting.

When you have a signal that goes from zero power to full power in zero time it takes up infinite spectrum!

This obviously is the behavior of a bad neighbor.  So in TX you increase the power gradually.  The tx ramp time.

In rx you use RXRESTARTDELAY to let the radio know what the transmitter is doing.  I'm guessing it throws out the first RXRESTARTDELAY bits of the sync.