Author Topic: Power Saving Techniques and Libraries  (Read 33873 times)

KanyonKris

  • Full Member
  • ***
  • Posts: 113
Re: Power Saving Techniques and Libraries
« Reply #30 on: December 15, 2014, 11:35:27 PM »
Tomega3, this sticky thread is for low power libraries and it seems were off on an application problem. I recommend you start a new thread (topic) to continue this discussion.

hexium

  • Newbie
  • *
  • Posts: 3
Re: Power Saving Techniques and Libraries
« Reply #31 on: February 09, 2015, 07:36:09 AM »
Hi,

I'm using the LowPower library with my moteino R4 with RFM69H and i'm not getting the results expected in terms of power consumption.
It's drawing 0.99 mAmps from the battery when using

Code: [Select]
radio.Sleep();
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

which is driving me nuts since according to the rocketscream webpage and according to the first post on this thread, the consumption should be way lower than that.

I even tried disabling the wdt but that wasn't useful.
Any hints?

Hi, I had exactly the same problem. I think it was caused by the flash memory.

If you have flash on your Moteino you can try the following

#include <RFM69.h>
#include <SPI.h>
#include <SPIFlash.h>
#include <LowPower.h>

#define NODEID        1    //unique for each node on same network
#define NETWORKID     100  //the same on all nodes that talk to each other
#define FREQUENCY     RF69_868MHZ

#define FLASH_SS      8 // and FLASH SS on D8

RFM69 radio;
SPIFlash flash(FLASH_SS, 0xEF30); //EF30 for 4mbit  Windbond chip (W25X40CL)

void setup()
{
   radio.initialize(FREQUENCY, NODEID, NETWORKID);
   radio.sleep();
   flash.sleep();          // put flash (if it exists) into low power mode
}

void loop()
{
   LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
}

dhnz

  • Newbie
  • *
  • Posts: 1
Re: Power Saving Techniques and Libraries
« Reply #32 on: March 07, 2015, 01:43:32 AM »
Hello,

I am using the example Struct_Send with an RFM69HW.

I have tried using ...

Code: [Select]
radio.Sleep();
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

It works, but the Acknowledge reply from the Receiver  no longer works. 

I have tried it in multiple places within the code.  I guess it is putting the system to sleep before it hears the acknowledge?

Can someone please point me where in the Struct_Send this should go?

Thank You  ;D

Stark

  • Newbie
  • *
  • Posts: 25
  • Country: gb
Re: Power Saving Techniques and Libraries
« Reply #33 on: March 11, 2015, 05:20:19 PM »

I have tried using ...

Code: [Select]
radio.Sleep();
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

It works, but the Acknowledge reply from the Receiver  no longer works. 

A bit off topic here probably, but I have the same problem.

I apply the radio.sleep and the powerdown in a loop to give me 10 minute intervals for sensor data transmission from the node. Gateway pings node but always nothing.

I think I'm lacking the understanding of the ACK process....or an idiots guide!
If anyone can give some pointers this would be much appreciated.

WhiteHare

  • Hero Member
  • *****
  • Posts: 1297
  • Country: us
Re: Power Saving Techniques and Libraries
« Reply #34 on: August 24, 2015, 09:24:26 PM »
Does everything that was put to sleep by the sleep library automatically wake up when the arduino does, or does the arduino have to explicitly wake some things up?  I never investigated, so I'm still wondering.

As a test bed I was able to get an 8Mhz Pro Mini down to 3.5uA (while sleeping) using Gammon's "Sketch I" and down to 125nA using Gammon's "Sketch J", though it would require an external interrupt to ever wake up from "Sketch J" because the WDT is turned off.  I couldn't get below 17uA using the LowPower library.  Not sure what the difference was.   I did my current measurements with a uCurrent Gold in conjunction with a Fluke 87V.

I'm not sure how to measure currents separately on the Moteino, because the chips are soldered on.
« Last Edit: August 24, 2015, 10:24:03 PM by WhiteHare »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5303
  • Country: us
    • LowPowerLab
Re: Power Saving Techniques and Libraries
« Reply #35 on: August 24, 2015, 10:31:44 PM »
The libraries only put to sleep the MCU, anything else is your responsibility. For low power you have to power off all sensors and peripherals that might drain your battery.

javiercuellar

  • Newbie
  • *
  • Posts: 12
  • Country: bo
Re: Power Saving Techniques and Libraries
« Reply #36 on: May 23, 2016, 08:15:47 PM »
Hi Felix

The libraries only put to sleep the MCU, anything else is your responsibility. For low power you have to power off all sensors and peripherals that might drain your battery.


Using a basic example, I have connected a DHT11 to +VCC, GND and Pin 7 directly of the moteino, how can I power it off?

Regards

Javier



Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5303
  • Country: us
    • LowPowerLab
Re: Power Saving Techniques and Libraries
« Reply #37 on: May 24, 2016, 10:34:46 AM »
Switch power to any sensor or load via a transistor/mosfet/relay. If the load is low enough power (up to 15ma or so) then you can simply power it from a digital pin directly. I think for the DHT11 you might be able to do that.

XFVB56

  • Newbie
  • *
  • Posts: 2
  • Country: us
Re: Power Saving Techniques and Libraries
« Reply #38 on: October 07, 2016, 10:09:02 PM »
Way back in the thread someone asked about li-poly discharge rates. I just did some li-poly testing of hobby grade batteries and found self discharge to be 1%-2% per month at room temperature.  The discharge rate is temperature sensitive and if you're looking to minimize it, keep the batteries at room temperature or cooler. 

The bigger issue is that li-poly batteries degrade rapidly when stored at full charge so most manufacturers suggest storing them at 50% charge. I don't have any test data on that, but anecdotally I have experienced life spans in two year range when storing batteries fully charged.  If you are looking for maximum lifespan from the batteries, it is much better to configure the charger so that only charges to about 80% and use a larger battery if necessary for capacity.  For a standard voltage li-poly "3.7 volt" cell, this is a terminal voltage of about 3.98-4.00 v/cell  as opposed to the standard 4.20 v/cell.

EdM

  • Newbie
  • *
  • Posts: 29
Re: Power Saving Techniques and Libraries
« Reply #39 on: May 22, 2017, 11:18:37 AM »
Following up on Felix's comment about switching loads, I finally got around to de-powering my the SD cards on my data loggers.

https://edwardmallon.wordpress.com/2017/05/21/switching-off-sd-cards-for-low-power-data-logging/

I saved SD power control to the end of my quest for low power logging, because of all the potential weirdness that could arise with the Arduino SD libraries. But after a fairly thorough round of testing it seems to be working OK with a BJT switch on  the ground line.