I am trying to get a LoPy into a low power mode using machine.idle() but not getting any results.
The Lopy is on a breadboard. It is powered from a bench supply at 5V via a multimeter measuring current, and the only thing connected to it is a FTDI cable for comms. Both boot.py and main.py are blank so it is a minimal system.
Once at the repl prompt I am drawing about 95mA.
If I try machine.idle() I see no difference, still 95mA.
The documentation for machine.idle() suggests there may be a system timer interrupt every millisecond. I assume this is true, so try:
but my current draw rises to 106mA.
Am I doing something wrong?
Is there any example code of how to use machine.idle() so I can actually see a decrease in current draw?
What figures should I expect?
I have also tried disabling the wifi radio with no effect.
(sysname='LoPy', nodename='LoPy', release='1.11.0.b1', version='2ac6da2 on 2017-12-18', machine='LoPy with ESP32', lorawan='1.0.0')
OK. Thanks for your help.
All current Pycom devices
Thanks. I must have made a mistake when originally trying to turn off the wifi radio. No I draw about 37mA with the wifi off.
When you say machine.idle() doesn't reduce power on this platform, what do mean by platform? All Pycom devices, or just LoPy devices?
machine.idle() doesn’t currently reduce power draw on this platform.
However disabling WLAN will make a big difference, make sure you’re using the WLAN.deinit() function:
from network import WLAN
wlan = WLAN()