Low power uses too much power...

Status
Not open for further replies.

MattH

Active member
Hello,

I was trying to reduce power consumption following the advice given here : https://www.pjrc.com/teensy/low_power.html
so I implemented this :

Code:
if (LOW_POWER_MODE) {
    Serial.end();
      for (int i=0; i<sizeof unusedPins/sizeof unusedPins[0]; i++) {
        pinMode(unusedPins[i], OUTPUT);
      }
  }

The problem is that the "low power mode" uses 3mA more that the default mode... Did I miss something ?

Cheers

M
 
That pages links to the AVR Teensy 2 - is that the Teensy in use? The Arm Teensy's are different. On T_3.x and T_LC the pins are in disabled state unless acted on with pinMode - setting to output will actually enable them.
 
Good point, I should have mentioned that I was using a Teensy 3.2

It makes sense then if I was actually enabling the pins...
What about Serial.end, is it worth it ?
Any other tip to save juice ?

Cheers
 
you can check out duff’s snooze library, for very low power states

yes, its possible to determine if a pin is used as input or output
 
There is a SNOOZE library that offers various 'sleep' options. Also search for "WFI" - that sleeps CPU between interrupts - it may offer some reduction.

I'm not sure what USB Serial does with .end()? If this is the code behind it:
Code:
void end() { };

Unless the CODE does a PinMode() - or an Analogxx() the pins unused will be disabled.
 
Status
Not open for further replies.
Back
Top