Power consumption of Moteino R4 grows after FTDI adapter disconnected

Started by d00m178, May 23, 2016, 04:36:40 PM

d00m178

Hello,

I'm using Moteino R4 with LoRa module.
and this test code:
#include <RH_RF95.h>  
#include <SPI.h>  
#include <SPIFlash.h>  
#include <LowPower.h>  
  
RH_RF95 rf95;  
SPIFlash flash(8, 0xEF30); // flash(SPI_CS, MANUFACTURER_ID)
  
void setup()  
{  
   rf95.init();  
   rf95.sleep();  
   flash.sleep();  
}  
  
void loop()  
{  
   LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);  
  } 


Moteino powered from LiPo battery 4.2V to GND and Vin pins directly, also in this chain there is multimeter.
Also Moteino connected to FTDI-USB adapter, but without "+" pin (only GND, CTS, TX, RX and DTR)
FTDI adapter connected to USB in my laptop and I can write program to Moteino.
Everything works ok.
Also this code works ok and my multimeter shows about 1.1 uA of power consumption.

But if I disconnect FTDI adapter from my laptop USB port or disconnect it from Moteino - power consumption grows to 33.4uA!
Why it is happens?
Also the same thing happens with Anarduino - almost the same MCU as the Moteino.

What can I do to return low power consumption without FTDI?
I need power up my Moteino from battery and I don't want such big power consumption in sleep mode.


Please advice ASAP.
Thank you in advance.


TomWS

After you power up your module (without the FTDI cable), try placing a jumper wire between pins 1 & 6 of the FTDI connector.  See if that has an effect on power.

Tom

Felix

I think I've observed this before as well. The problem is the FTDI chip sinks current on the connected pins. There's no way around it except to disconnect FTDI.

TomWS

Quote from: Felix on May 23, 2016, 05:03:16 PM
I think I've observed this before as well. The problem is the FTDI chip sinks current on the connected pins. There's no way around it except to disconnect FTDI.
OP says it draws higher power even if the FTDI is disconnected from the Moteino.  This sounds like the 'no reset' syndrome, hence my suggestion.

Tom

d00m178

TomWS
Thank you. I connected GND and DTR with jumper wire - doesn't help.

Felix
Well... Thank you I just don't understand - a lot of people on this forum say that they managed to get power consumption around 1.6uA but it seems it just means that they measure power with FTDI adapter connected to USB?
I think this is useless.
We need such power consumption on battery powered variant. 
I can't believe it.. there are a lot а reports about devices that powered even from CR2032 and they work for years. How they work?

d00m178

Quoteit draws higher power even if the FTDI is disconnected from the Moteino.
Yes!
it draws 34uA when MCU connected only to battery.
but if I connect MCU to FTDI (and then FTDI to USB) - it shows good values.

d00m178

interesting - is someone also faced with this issue..
I'm totally stuck with it..

TomWS

I looked at your code again and noticed that you do not call flash.initialize() anywhere in your code.  You should do this before you use the flash object (including sleep).

I can't explain the discrepancy with cable attached or not, but if you want to save power, you should initialize the flash properly. 

Also, the numbers you are citing (1.6uA) are for Moteinos with RFM69 radios and possibly without flash.  I'm not sure I've seen any data on Moteinos with RF95 radios and I have no idea what to expect with these radios.

Tom

d00m178

Tom,  code with flash.initialize() works the same way.
consumption grows to 25-30uA after FTDI disconnected..
with FTDI - in consumes 1.1uA.

I have a question - is Moteino with RFM69 consumes 1.6uA in sleep mode WITHOUT FTDI adapter? I mean that in this measuring time all pins are floating - nothing connected to them?
It that - it means that Moteino with LoRa works in different way.. But it is really strange.

Also as I said I have Anarduino MCU.
Behavior the same - with FTDI adapter connected to USB it consumes about 0.004 mA or 44uA - it is more that Moteino but I can go further with it.
But If I disconnect FTDI - it start consume 0.11mA! It is really not good for my device..

So I don't know what can I do next.
I just wonder if I'm only one who faced with this issue..
Because all who used these MCU have to disconnect Serial adapter from its device in usual mode. And as I see - it should lead to unexpectedly high energy consumption.
So why no one complains like me ?

MikesTechBlog

I have a slightly off topic question concerning power consumption. I too can't seem to get low power like others have. Best I can do is 600 uA. I don't use flash on my Moteino's IDK  if that would make a difference or not.

Since I don't use the flash, I figured I shouldn't use flash.initialize();

Thoughts?
My Tech Blog:

Mike's Tech Blog

Felix

Mike,
You should be able to get way better than that. You need to ensure anything using power is being put to sleep, including the flash chip, although that one is already quite low power in IDLE, but more can be saved by sleeping it.

MikesTechBlog

Yes I have read several posts, all unused outputs are defined as OUTPUT as has been mentioned.

But since I have no flash chip, do I still need to "sleep" it. It seems to me that I shouldn't have to do that. Is that correct thinking?
My Tech Blog:

Mike's Tech Blog

Felix

Sorry if i wasn't clear, if the flash is not soldered you don't need to call anything related to SPIFlash, that would not make sense.

MikesTechBlog

Thank you for the clarification, that is what I thought. I shall keep digging though.
My Tech Blog:

Mike's Tech Blog