Author Topic: My Moteino are using ~90uA during powerdown (SOLVED)  (Read 8390 times)

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: My Moteino are using ~90uA during powerdown (SOLVED)
« Reply #15 on: August 01, 2016, 09:52:22 AM »
Felix, did we ever come to a conclusion whether the MCP1703 would actually work below 3.3V but with an output resistance of a few ohms instead? This is how normal LDOs generally work, however there are indications this regulator might not be as 'normal' as others, taking excessive current when powerd by its output for example. You'd expect the pass transistor diode to power up the input, and then it would turn on hard (if below 3.3V) so you should just get the quiescent current but they appear to take significantly more. It also has other circuitry like current limiting and a soft turn on characteristic.

Mark.
« Last Edit: August 01, 2016, 10:00:23 AM by perky »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: My Moteino are using ~90uA during powerdown (SOLVED)
« Reply #16 on: August 01, 2016, 12:08:25 PM »
Mark,
Not sure I follow, you mean if there was a series resistor on the VOUT of the LDO? Was this suggested somewhere that I missed?
I have not tried this. What folks have been doing is lift the LDO so they could power from less than 3.3V if that's what they really needed.
The 'normal' way of powering through the VIN (stock, as designed) is to provide at least 3.55v to be above the LDO drop voltage. That allows for the 7uA I am able to get.

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: My Moteino are using ~90uA during powerdown (SOLVED)
« Reply #17 on: August 01, 2016, 01:47:26 PM »
No, what I mean is an LDO usually works by modulating the P-FET pass transistor resistance so that the output voltage stays at a fixed value. That P-FET has a small resistance even when fully on, and this minimum resistance is what actually determines the dropout voltage which itself is therefore linearly dependent on current. If the input voltage is above this dropout voltage then the output is fully regulated because the P-FET's minimum resistance is less than that needed to achieve the desired value. However if you provide the regulator with an input voltage below that dropout voltage then the P-FET is either partially or totally hard on, which is usually a few ohms.

If you look at the regulator spec there's a minimum voltage specified which is 2.7V, this is actually the voltage at which the internal logic is fully functional and the P-FET can be driven properly internally.

In other words, the regulator should allow the voltage through but with a small resistance in series if the input is below the dropout. The output voltage might then be modulated itself by the current it's taking, but that might only be a few hundred millivolts or so, so if the minimum voltage you need to keep things working can cope with those dips then it's entirely possible to use voltages below 3.3V. In theory if the output was taking very little current this would work with an input voltage right the way down to 2.7V.

Mark.

Edit: Here's an example of an LDO doing this, see Figure 6. It's curious why the MCP1703 is not specified like this and has no equivalent graph, but this is generally how LDOs work. That's why I thought it might possibly be a bit quirky, but I'm willing to lay odds on it actually doing this:
http://www.st.com/resource/en/datasheet/stlq015.pdf

Also this explains why the dropout voltage changes with input voltage. The higher the input voltage the harder on the P-FET is driven (larger Vgs), this reduces the minimum on resistance which reduces the dropout voltage. It all fits ;-)

BTW if this is correct then it's OK to run a Moteino from 2 lithium AA cells into Vin, or 3 alkaline AA cells into Vin with a termination voltage of 1V per cell at full TX power.
« Last Edit: August 01, 2016, 03:07:28 PM by perky »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: My Moteino are using ~90uA during powerdown (SOLVED)
« Reply #18 on: August 01, 2016, 04:15:15 PM »
I see what you mean now.
For the MCP1703 the DS doesn't show much graphing for 3.3vout and always assumes the VIN > Vreg, so the part we're interested in is not shown.
So it's left to experimentation and measurement to see how this works. I'll try to play around with this when I get some time.

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: My Moteino are using ~90uA during powerdown (SOLVED)
« Reply #19 on: August 01, 2016, 04:53:31 PM »
It'll be interesting see what results you get. I can fully understand a reluctance to use a device 'off label' though for production, generally we'd like to prove correct operation by specification but my hunch is this is a safe bet if it behaves this way.

Mark.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: My Moteino are using ~90uA during powerdown (SOLVED)
« Reply #20 on: August 02, 2016, 03:23:19 PM »
Ok here's what I did - I loaded the DeepSleep sketch on a stock Moteino. This yields a ~6.5uA power consumption using LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); from a 5V FTDI-Adapter source.

Then I fed a 2xAA pack (~3.15v) into VIN. This jumps the Moteino to a 88uA consumption. So maybe this REG doesn't fit the theory?

Anyway, Hey that's not too bad compared to an Adafruit Feather which is declared "ultra-low-power" at 300uA  :-X

ove

  • NewMember
  • *
  • Posts: 8
  • Country: se
Re: My Moteino are using ~90uA during powerdown (SOLVED)
« Reply #21 on: August 02, 2016, 03:28:24 PM »
I modified my test sketch a bit so it can use a 32.768kHz crystal...

If CLOCK_XTAL is not defined and a unmodified Moteino R4 with RFM69W and flash is connected to two AA batteries on VIN the current is ~85uA.
If a 8V powersupply is connected to VIN the current will drop to ~6.5uA... so Felix was right :)
If I remove the regulator and use two AA batteries it will drop to ~4.2uA.  :D
If I define CLOCK_XTAL and use internal 8MHz clock and connect a 32.768kHz crystal to the clock pins then the current drops to 1.3uA  ;D

So you have to remove the voltage regulator if you want to use two AA batteries for power... it is not enough to connect it to the 3.3V pin.

Code: [Select]
#include "LowPower.h"
#include <RFM69_ATC.h>
#include <SPI.h>
#include <SPIFlash.h>

#define NODEID        100
#define NETWORKID     100
#define GATEWAYID     1
#define FREQUENCY     RF69_433MHZ
#define ENCRYPTKEY    "SampleEncryptKey"
#define FLASH_SS      8
//#define CLOCK_XTAL

SPIFlash flash(FLASH_SS, 0xEF30);
RFM69_ATC radio;

// Timer2 overflow interrupt handler
SIGNAL(TIMER2_OVF_vect){
}

void setup() {
  radio.initialize(FREQUENCY,NODEID,NETWORKID);
  radio.encrypt(ENCRYPTKEY);
  radio.enableAutoPower(-70);
  radio.sleep();
 
  if(flash.initialize()) {
    flash.sleep();
  }
  #ifdef CLOCK_XTAL
    // Setup TIMER2 for 32.768 kHz crystal
    TIMSK2 = 0;                                                      // Stop timer2 interrupts while we set up
    ASSR = _BV(AS2);                                                 // Timer/Counter2 clocked from external crystal
    TCCR2A = 0;                                                      // Override arduino settings, ensure WGM mode 0 (normal mode)
    TCCR2B = _BV(CS22) | _BV(CS21) | _BV(CS20);                      // Prescaler clk/1024 -- TCNT2 will overflow once every 8 seconds
    TCNT2 = 0;                                                       // Start the timer at zero
    while (ASSR & (_BV(TCN2UB) | _BV(TCR2AUB) | _BV(TCR2BUB))) {}    // Wait for the registers to be updated
    TIFR2 = _BV(OCF2B) | _BV(OCF2A) | _BV(TOV2);                     // Clear the interrupt flags
    TIMSK2 = _BV(TOIE2);                                             // Enable interrupt on overflow
  #endif
}

void loop() {
  radio.sendWithRetry(GATEWAYID, "Ping", 4);
  radio.sleep();
  #ifdef CLOCK_XTAL
    LowPower.powerSave(SLEEP_FOREVER, ADC_OFF, BOD_OFF, TIMER2_ON);
  #else
    LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
  #endif
}

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: My Moteino are using ~90uA during powerdown (SOLVED)
« Reply #22 on: August 02, 2016, 06:49:41 PM »
OK, this LDO is a bit quirky! Good to know, thanks to both you and Felix for trying this out. I wonder what the mechanism is that makes this regulator take that current. These results fit in with others who have powered the board from the 3.3V line without removing the regulator, they were getting similar results - that would have seen Vin either the same or up to a diode drop below Vout. These results could explain why this regulator isn't specified for this condition.

Mark.