stop() current consumption (SOLVED)

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
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

stop() current consumption (SOLVED)

Post by pythoncoder » Sat Jul 14, 2018 9:35 am

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.
Last edited by pythoncoder on Sun Jul 15, 2018 7:05 am, edited 2 times in total.
Peter Hinch
Index to my micropython libraries.

chrismas9
Posts: 152
Joined: Wed Jun 25, 2014 10:07 am

Re: stop() current consumption

Post by chrismas9 » Sat Jul 14, 2018 4:58 pm

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.

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

Solved

Post by pythoncoder » Sun Jul 15, 2018 7:03 am

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.
Peter Hinch
Index to my micropython libraries.

Post Reply