Moteino Power Savings with Wireless Programming

Started by lilpint97, January 30, 2014, 10:44:43 AM

lilpint97

All, still having fun, and wireless programming working like a champ. I do however have some power concerns, on my RFM69HW when I use the LowPower.h powerdown function, and I see 16 mA draw, with the radio in RX mode. Now, for obvious reasons (or maybe not hence my post), I can't put the radio to sleep or when I send the Wireless Programming commands, if I just have the Moteino powered down, the RFM accepts the request and brings the moteino ready to do the work. This process works great, however 16mA means I will burn through batteries, unless I am missing something. Now if I use the radio.sleep() function my mA drops to .01 mA, however now I can't do wireless programming or I have not thought of something simple.

Now my question, does anyone have any suggestions on how to save max power, but still have the ability to wireless program the devices. My first thought is to have a hardware switch that turns on or off the radio.sleep(), but that means I have to be physically present.

I welcome thoughts trying to drive power usage down unless I need new code or it's sending the data.

Thanks.

Felix

Well you're right. For the radio to receive anything, it has to be in RX mode (~15mA). The topic has been discussed before in the forum, I think several topics.
If you want to battery power and also wirelessly program, that will be a little tricky. Several suggestions have been made to address this. One is to periodically wake up the radio and put it in RX mode for a little while (like 30ms - that's a 3% duty cycle as compared to 100% when always in RX), and make the gateway try hard to find it (ie wait for the node to wakeup and respond to the wireless programming command). This is probably the most straight forward scheme - AKA brute force :)

Another possibility is to have the node ask whether there's anything important for it at the gateway. That way you just wake the node when you need to send something and also ask the gateway if it needs to do anything. Then have the gateway wait until that happens and deliver the wireless programming command then.

You will still get hit with a pretty considerable power bill on the battery when the wireless programming is in progress. It can easily take between 30s-60s to program a good size sketch and during that time there's heavy use of RX/TX of course. So you probably don't want a coin cell battery for this type of stuff, but rather a Lipo or set of AAs.

So can it be done? For sure ... it's just a little more work than the stock wireless programming sketch I offered.

lilpint97

Thanks for confirming that, yeah I am in debate. I think for the most part I am going to add a programming switch, where when I want to program it, I select it, and avoid radio.sleep() and then I don't have to crack open the enclosure. Thanks again.