Author Topic: low power ListenMode with lower Baud rates  (Read 1245 times)

DRCO

  • Newbie
  • *
  • Posts: 17
    • View Profile
low power ListenMode with lower Baud rates
« on: March 02, 2017, 05:55:47 PM »
Hi Forum
I have been trying to use the low power ListenMode with lower Baud rates. In the long-running  post https://lowpowerlab.com/forum/low-power-techniques/ultra-low-power-listening-mode-for-battery-nodes/165/, Joe Lucid advised:
If you use lower baud rates you need to increase the rx time because it will take longer to check for RSSI. This will make listen mode much more power hungry unfortunately. There is a formula in the data sheet that lets you calculate how long it needs to be.
At 1200 baud your talking several milliseconds instead of the 250 or so uS we've been using. I would recommend turning off AGC as well since that significantly increases RSSI detect time.


Couple of Questions...

To vary the rx time, I take it you alter the value set in the RFM69_h Library
// By default, receive for 256uS in listen mode and idle for ~1s
  #define  DEFAULT_LISTEN_RX_US 256 // vary this value?
  #define  DEFAULT_LISTEN_IDLE_US 1000000
And
Can anyone advise how I “Turn Off” AGC?

Greatly appreciate any help.
thanks,
Chris

joelucid

  • Hero Member
  • *****
  • Posts: 869
    • View Profile
Re: low power ListenMode with lower Baud rates
« Reply #1 on: March 06, 2017, 03:04:08 AM »
Quote
To vary the rx time, I take it you alter the value set in the RFM69_h Library
// By default, receive for 256uS in listen mode and idle for ~1s
  #define  DEFAULT_LISTEN_RX_US 256 // vary this value?
  #define  DEFAULT_LISTEN_IDLE_US 1000000

Hi Chris,

I think this is from the RFM69 listen mode implementation which is not my code. Tom might be able to confirm.

Quote
Can anyone advise how I “Turn Off” AGC?

During the radio initialization code in rfm69.cpp initialize REG_LNA to LNA_ZIN_50 | LNA_GAINSELECT_MAX. Prefix the defines appropriately as you'll see in rfm69registers.h.

Joe

DRCO

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: low power ListenMode with lower Baud rates
« Reply #2 on: March 07, 2017, 05:48:47 PM »
Thanks Joe - greatly appreciated.
I have hacked together simple Gateway / Node example codes for testing the ListenMode at low baud rates and I can claim some (very) modest success. I’m using Moteino R4s with the wire monopole antenna at 433Mhz. My test environment is urban, which includes a site with concrete and brick buildings in the way – as well as plenty of cars, trees etc...
Couple of points:
I tested using Felix’s 19.2K library
https://lowpowerlab.com/forum/moteino/long-range-low-bitrate-library-config/msg1137/#msg1137
with a slight modification to the default Rx time – increasing it from 256us to 512us as follows (RFM69.h).
 // By default, receive for 256uS in listen mode and idle for ~1s
  #define  DEFAULT_LISTEN_RX_US 512

The results were pretty poor.

I then modified the setup() code using Steinarrr’s 1200bps example tx as shown here:
https://lowpowerlab.com/forum/moteino/multistorey-indoor-range-performance-1-75km-range-(solution)/msg3189/#msg3189

(Joe (if you’re reading) I believe Steinrrr’s code turns off the AGC – as you suggested.)

My code uses multiple attempts at the gateway to connect to the sleeping node, and I’m finding pretty reliable contact up to about 150 metres at 1200bps(I get no more than 50 metres at 19.2k).

But if I use a simple struct / send type of code (no ListenMode) I get a range of well over 500 metres using the 1200bps code – infact I got one transmission closer to 1 km!

OK – while there’s plenty I don’t understand about this, the main thing that bugs me is the range. If I understand it right, the node (radio) sleeps for 1 second – wakes up (for 512uS in my case) checks for incoming and if correctly addressed, then wakes up the microcontroller and does stuff.

So what’s the difference in range about? If the signal strength is good at 500 metres, why doesn’t it work at greater than 150 metres in ListenMode?

If anyone’s interested in seeing the code, I have it attached – it’s setup for a gateway and 2 nodes – but you can increase the number of nodes by changing a line of code in the gateway sketch – it’s commented.

Hope some of you gurus can shed some light on this. For my purposes 150 metres is OK – but it would be good to improve on it.
All the best,
Chris
« Last Edit: March 07, 2017, 09:48:01 PM by DRCO »

craigburden

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: low power ListenMode with lower Baud rates
« Reply #3 on: June 30, 2017, 11:01:20 AM »
So what’s the difference in range about? If the signal strength is good at 500 metres, why doesn’t it work at greater than 150 metres in ListenMode?

I am looking for similar answers. I am seeing my range with "full rx" around 120m however as soon as I go to Listen it drops dramatically. I am seeing more like 50m. This is with the low power module at a 26.5kbps bitrate hence the difference from your results.

Does anyone know why this is the case?

I currently use a RSSI and sync condition and my rx on time is over double that of a packet length to "ensure" at least one preamble and sync word is captured.

WhiteHare

  • Hero Member
  • *****
  • Posts: 1297
  • Country: us
    • View Profile
Re: low power ListenMode with lower Baud rates
« Reply #4 on: July 01, 2017, 12:18:22 PM »
I can't say that I've noticed this, but then I'm lately using 300kbps.  Have you tried giving it a ridiculously large Rx window just to rule out that you aren't cutting it short?  At lower bitrates the setup time can be longer because you're probably doing frequency correction and the like during each get-ready phase because of the narrower bandwidth.
 Anyhow, just a suggestion. 

I presume you've moved it around to rule out that it's not sitting in a null zone?

Have you tried capturing the RSSI to see if it is, in fact, "seeing" a low signal strength (regardless of whether it should or shouldn't be)?
« Last Edit: July 01, 2017, 01:19:31 PM by WhiteHare »

craigburden

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: low power ListenMode with lower Baud rates
« Reply #5 on: July 03, 2017, 10:43:18 AM »
I can't say that I've noticed this, but then I'm lately using 300kbps.  Have you tried giving it a ridiculously large Rx window just to rule out that you aren't cutting it short?  At lower bitrates the setup time can be longer because you're probably doing frequency correction and the like during each get-ready phase because of the narrower bandwidth.
 Anyhow, just a suggestion. 

I presume you've moved it around to rule out that it's not sitting in a null zone?

Have you tried capturing the RSSI to see if it is, in fact, "seeing" a low signal strength (regardless of whether it should or shouldn't be)?

Today I tried a 262ms RX time and a 262ms idle time which given my 26.5kbps bitrate and a 14 byte long packet including 3 bytes of preamble and CRC I would constitute as large! I didn't see much of an improvement. My deviation is 165kHz so my system is considered wideband surely? As far as I can tell I don't have AFC on and I have tried with both AGC on (With all of the methods like Normal, improved_lowbeta0 and lowbeta1) and off. Regardless I see significant range reduction.

Could it be something to do with the condition I am using? I notice that most people do RSSI only, I just have no idea how you could set that sensically without an intimate knowledge of the RF environment where the devices will be or a background RSSI reading.

On the topic of RSSI, I have tried printing out RSSI readings today. I noticed however that with the "normal" AGC routine the RSSI reading is updated infrequently (Note I did this test in "full RX"). I noticed a range drop when trying to print these values too, perhaps because of the added time between processing a packet and returning to RX? Does anyone know how to to calculate the receiver sensitivity at a given baud rate etc? I would like to know what I should be expecting.

WhiteHare

  • Hero Member
  • *****
  • Posts: 1297
  • Country: us
    • View Profile
Re: low power ListenMode with lower Baud rates
« Reply #6 on: July 03, 2017, 12:20:47 PM »
I don't have succinct answers for you, but here's a thread that dives deep on the topic of RSSI so as to better understand what's really going on:  https://lowpowerlab.com/forum/rf-range-antennas-rfm69-library/real-time-rssi-measurement-broken-rfm69cw/

DRCO

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: low power ListenMode with lower Baud rates
« Reply #7 on: October 23, 2017, 05:35:08 PM »
Hi WhiteHare and craigburden,
Just to clarify, I also used a ridiculously large Rx window and got no better performance.

WhiteHare, do you have a library or setup mod for 300bps - I'd like to try it
All the best,
Chris

Leonid49

  • Newbie
  • *
  • Posts: 20
  • Country: ua
    • View Profile
Re: low power ListenMode with lower Baud rates
« Reply #8 on: January 04, 2018, 07:06:42 AM »
Hi, DRCO.

Tell me please did copmpilling Your sketh NODE_TEST_1200.ino without errors? In this ino file are included RFM69.h and LowPower.h only. But in line radio.listenModeStart(); function listenModeStart() not exist in included libraries and not declared in Your sketch.

Thank You.
Leonid.

Edit: I removed library RFM69-Master and installed library RFM69-ListenMode. Now is compilling goes without errors.
« Last Edit: January 04, 2018, 10:54:12 AM by Leonid49 »

DRCO

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: low power ListenMode with lower Baud rates
« Reply #9 on: March 29, 2018, 07:35:24 PM »
Hi Leonid49, glad you got it working. I'm getting around 150 metres range using a really small helical coil antenna - how are you going?