Power consumption of PyBoard in stop mode

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
User avatar
Roberthh
Posts: 2758
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Power consumption of PyBoard in stop mode

Post by Roberthh » Tue Mar 15, 2016 9:27 pm

Hello all.
I have tried stop mode to reduce power. The lowest I can get it in stop mode is like 1.6 mA. A SD card is inserted, but taking that out does not change the picture a lot. No outputs are connected to the board besides Y4, which is set to low, driving a 220k resistor which is connected to GND. USB is not connected, all LED's are off. The CPU is told to consume about 500µA. The external regulator and the power switch are told to consume power in the 20-50 µA region each, the accelerometer could go up to 300µA, but I do not know whether it is enabled, if you do not use it. So what is still alive? Which component on the board is using the other ~1 mA?

Regards, Robert

B.T.W: In Standby mode, the current goes up to 4 mA.

User avatar
pythoncoder
Posts: 5273
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Power consumption of PyBoard in stop mode

Post by pythoncoder » Wed Mar 16, 2016 7:24 am

Roberthh wrote:...B.T.W: In Standby mode, the current goes up to 4 mA.
There's something very wrong here. I've done many measurements in standby mode https://github.com/peterhinch/micropyth ... opower.git and the current should be at least 100 times less, depending on whether you're using a V1 or V1.1 board. The V1.1 board should use about 6-7uA if no SD card is fitted. There is no magic to going into standby - just issue pyb.standby().

If you're seeing 4mA either the board is broken or some attached hardware is drawing current. There is a slight 'gotcha' in that the Pyboards have pullup resistors on the I2C buses which cannot be disabled. These can cause attached hardware to draw current even when the Pyboard is in standby.
Peter Hinch

User avatar
Roberthh
Posts: 2758
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Power consumption of PyBoard in stop mode

Post by Roberthh » Wed Mar 16, 2016 7:41 am

Hi @pythoncoder, I can redo the test at standby mode, but at that time nothing was connected to Pyboard but Y4, and the SD card was plugged. I've seen the pullups on the I2C busses. Taking these into account reduced my first attempt from 3 mA to 1.6 mA. Confusing too, that after a while, the current goes down from 1.6 mA to 1.1 mA. Either a temperature issue (CPU cooling down after being busy for about a minute), or something oscillating, or some other part going into sleep after a while. 1.6 or 1.1 mA is still pretty low for my application, but higher than expected. So it's more a "something interesting I'd like to understand"-issue than a real need.
I could use standby mode, since going through reset at wakeup is acceptable. There is no state to be remembered, and if, you have made this great µpower module for our all good.
Best regards, Robert
P.S.: I was doing these test as part of the intended changes to the TFT PCB. I wanted to be sure that the updated circuit works.

User avatar
pythoncoder
Posts: 5273
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Power consumption of PyBoard in stop mode

Post by pythoncoder » Wed Mar 16, 2016 4:04 pm

I'd very much like to know the reason too. My measurements were all entirely consistent with the boards' specs.
Peter Hinch

User avatar
Roberthh
Posts: 2758
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Power consumption of PyBoard in stop mode

Post by Roberthh » Wed Mar 16, 2016 6:03 pm

A few observations:
- 350 µA is taken by the SD card. If I use a lower capacity card, it's standby current is lower.
- without SD card, the current in standby mode goes down to 30µA. I guess that's because in standby mode the ports are floating. No option for me, because I need the card.
- in stop mode, the device is very touch sensitive. Just placing my finger on top op the CPU w/o touching any wire increases the supply current in stop mode by 500 µA. That was with a little main.py sketch, which just consisted of "import pyb" and "pyb.stop()". So most ports are switch as input and floating. Just moving my hand around the board cause +/-200µA fluctuations.
- No unexpected oscillations on the board. Just a 120MHz signal, which I can pick up here with any piece of wire.

So I guess the floating inputs are the cause. I could try to use the internal pull down mode to tie them.

Update: With X9,X10, Y9, Y10 set to input mode, pull-up and the other port pins to input mode, pull-down, the supply current decreases to 700µA and the touch sensitivity is reduced. Getting closer.

User avatar
pythoncoder
Posts: 5273
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Power consumption of PyBoard in stop mode

Post by pythoncoder » Thu Mar 17, 2016 6:34 am

Roberthh wrote:A few observations:
- 350 µA is taken by the SD card. If I use a lower capacity card, it's standby current is lower.
- without SD card, the current in standby mode goes down to 30µA.
That is in accordance with the spec and my measurements for the V1.0 board. The V1.1 board reads 6-7µA. One approach to the problem of SD card consumption is to use an external SD card with its power controlled by a P-channel MOSFET - there's an official driver for such cards and I've used this approach to good effect.

The issue with floating inputs in stop mode is known - I should update my write-up to mention this. Another option aside from using the internal pullups is to declare all unused pins as outputs which might reduce sensitivity still further.
Peter Hinch

User avatar
Roberthh
Posts: 2758
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Power consumption of PyBoard in stop mode

Post by Roberthh » Thu Mar 17, 2016 7:46 am

Another option aside from using the internal pull-ups is to declare all unused pins as outputs which might reduce sensitivity still further.
That was my other attempt, but then you have to be careful too what is connected to the ports. This is also true for using input mode with pull-ups. But in output mode the unintended currents may be much larger. On my first trial, I had a stop mode current of 50 mA, just because outputs were still driving some circuitry.
But for the moment I'm fine. The whole standby current of the set-up is now 1 mA. I plan to use a 10 Ah battery, and the internal leakage of that battery will be at least in that range. 50mA would have been too much. As said - more a matter of interest.

Post Reply