Page 1 of 1

stop() current consumption (SOLVED)

Posted: Sat Jul 14, 2018 9:35 am
by pythoncoder
I'd be very grateful if someone could try replicating this test (or comment on my method if I'm missing something).

It's a while since I worked on the micropower features but I'm sure I measured the current consumption of a Pyboard at <= 500μA as per the spec. Now I seem unable to achieve this.

To test, the Pyboard is connected only to a 5V bench power supply. There is no SD card fitted.

/flash/boot.py:

Code: Select all

import pyb
pyb.usb_mode(None)
/flash/main.py:

Code: Select all

import measure_i
/flash/measure_i.py:

Code: Select all

import pyb
led = pyb.LED(1)
led.off()
pyb.usb_mode(None)

for pin in [p for p in dir(pyb.Pin.board) if p[0] in 'XY']:
    pin_x = pyb.Pin(pin, pyb.Pin.OUT_PP)
    pin_x.value(0)  # EDIT: should be 1 here

pyb.stop()
led.on()
The LED does not come on, indicating that the board has gone to sleep and stayed in that state.

On a Pyboard V1.1 I'm reading 3-3.5mA. On a Pyboard Lite I'm seeing 1.5mA. Note that when running normally the board consumes at least 20mA, further confirming that it is in a sleeping state.

Re: stop() current consumption

Posted: Sat Jul 14, 2018 4:58 pm
by chrismas9
Damien did some tests before the release of pyb lite. From memory you have to set all pins to input with pulldown. The output driver had some leakage current.

Solved

Posted: Sun Jul 15, 2018 7:03 am
by pythoncoder
In the early hours I suddenly remembered the reason: the I2C pullups. Setting the value to 1 in the above code produced a result of 290μA.