stm32duino / STM32LowPower

Arduino Low Power library for STM32
183 stars 52 forks source link

Minimun achived current is 1.4 mA #62

Closed mateuscelio closed 2 years ago

mateuscelio commented 2 years ago

I am trying to use this library but the minimum current that I am getting with shutdown mode is 1.4 mA. The same result was observed in Platform.IO and Arduino IDE.

I flash the program using serial mode.

The board is a blackpill with stm32f103c8t6

#include <low_power.h>
#include <STM32LowPower.h>

void setup() {
  LowPower.begin();
  LowPower.shutdown(15000);

}

void loop() {

}
fpistm commented 2 years ago

Hi @mateuscelio How did you made your measure ?

mateuscelio commented 2 years ago

Hello @fpistm , I tried two connections types.

In one, another MCU's (ESP32) Voltage regulator output was used to power the blackpill with 3v3 and an amperemeter was placed in series with blackpill.

The other, I connected the amperemeter in series between blackpill's microUSB input and voltage source of 5V.

yetoo commented 2 years ago

Hi @mateuscelio you are using devboard, and also, which is, by the way, not supported by ST as it is designed and produced by other than ST or ST's partners. First : There is too many extra components. I suspect that even the capacitors are of a bad quality which lead to too much leacking current. Second : The regulator on the blackpill vary from manufacturers to another. Some boards have a regulator suited for low power, others not. So the 1.4mA you are getting is quiet normal. For info : with a bluepill I reached as low as 1mA, but never less than that. My bluepills have RT9193 regulator which has very good lowpower specs, but I suspect the rest of the components that lead to (the still high) 1mA

fpistm commented 2 years ago

Hi @mateuscelio I've measured the IDD of a Nucleo F103RB using your sketch and I have 4µA. As stated by @yetoo it is linked to your board. Other topic on this subject: https://www.stm32duino.com/viewtopic.php?p=8838#p8838

mateuscelio commented 2 years ago

Thanks @yetoo and @fpistm, I found the problem and it was the power LED (:man_facepalming:). Removing it, the consuming current now is 70uA in shutdown mode.