LowPowerLab Forum

Hardware support => Low Power Techniques => Topic started by: Ryan on September 17, 2021, 12:37:03 AM

Title: Low-power listening using RFM69
Post by: Ryan on September 17, 2021, 12:37:03 AM
I'm working on a DIY project built on the Moteino M0 + RFM69 consisting of a battery-powered receiver and a line-powered transmitter.

My goal is to reduce power consumption for the receiver to the absolute minimum while still allowing it to detect a transmitted signal within ~1 second. The transmitter is always-on with no power restrictions, and transmissions are rare (e.g. a few per day), so it can blast out and repeat a transmission until the receiver sends an ACK.

I understand that the RFM69 radio will always draw ~17mA when in receive mode, so I assume that any power reduction will come from minimizing its RX duty cycle. I read elsewhere on the form, for example, that the radio may only need ~250uS to reliably detected a transmission with a long enough preamble, however I'm not sure if that was verified or followed through with working code.

Does this come down to calling radio.receiveDone() once per second for as short a time a possible, or are there other tips/tricks/best practices here?
Title: Re: Low-power listening using RFM69
Post by: Ryan on September 17, 2021, 11:14:29 PM
Just to clarify my question a bit further: It sounds like the most battery-efficient way for the RFM69 to work as a receiver for this use case is to:
So far all the examples I've seen (e.g. for "listen mode") are for older AVR boards, but with the latest Moteino M0 being SAMD-based, I haven't found any implementations of this type of scheme anywhere.

I'm really impressed with the job Felix and the community have done utilizing Moteinos and the RFM69 for low-power use cases, and appreciate any guidance here.
Title: Re: Low-power listening using RFM69
Post by: redpoll123 on September 18, 2021, 12:04:54 PM
I have  a Moteino/RFM95 lora controlling a remote gate opener.
The Moteino needs to listen 24/7  (drawing 16 ma).
It  listens for 4 seconds and sleeps 8 seconds.
The 6 volt battery needed charging every 10 days.
Changed  the  Moteino to an 8 mhz.
Changed the battery to a single cell  >25ah<  3.2v Lithium Iron Phosphate (LiFePO4).
Now it has been running for 30 days and voltage has dropped .1 volt.
Sometimes  the solution is a bigger hammer.
Title: Re: Low-power listening using RFM69
Post by: Ryan on September 18, 2021, 12:20:48 PM
Sounds like brute force is getting the job done for your use case! I'm building a lightweight wearable, so doing the same isn't an option for me.

I'm sure there must be some way to set the receiver to listen for ~1ms then sleep for 1000ms, ensuring both a low duty cycle as well as a reasonably quick response time after a burst transmission. Hoping someone out there can educate us a bit here!
Title: Re: Low-power listening using RFM69
Post by: arf on May 07, 2022, 12:13:12 PM
I did some experiments where I made a packet of a certain length and then used micros() before and after to determine how long it took to TX.   I reasoned that if I had the receiver listen for 2 times longer than that single packet transmission time, then I would be guaranteed not to clip the packet.  Is this right?

I had the transmitter spam out the same packet back-to-back for 10 second.  I set the receiving moteino to listen for that 2 times that single packet transmission time and then sleep (the moteino and radio) for just under 10 seconds.  For example, if the single packet transmission time was 1ms, then I listened for 2ms and slept the moteino and radio for just under 10 seconds.  So the radio/uController duty cycle is 2ms per 10 seconds.  It seems like I never miss a packet. 

Maybe there is a smarter way to do this.  Wondering how your work on this has ended up
Title: Re: Low-power listening using RFM69
Post by: Felix on May 07, 2022, 12:27:24 PM
A great way, and quick, is to use the CurrentRanger (https://lowpowerlab.com/shop/product/152) or similar current meter and look at the packets on a scope, they stand out very clearly and you can dynamically adjust radio parameters and see how they reduce the packet on-air time, transmission power at varios levels, and many other details. Greatly useful when you are developing a particular radio protocol and timins are critical - like say if you wanted a super fast FWOTA and make it transfer 30k in 2-3 seconds ;)

(https://lowpowerlab.com/shop/image/cache/data/CurrentRanger/DS1Z_QuickPrint5_LPF2-500x375.png)