Lopy4 deepsleep power too high

I purchased a Pycom4 and Pytrack to see if I could use it for GPS tracking. I followed the tutorial on the Core Electronics site.

However I’m having difficulties putting the Pycom module to sleep using deepsleep. When the module goes to sleep power consumption is still at 140mA.

I have tried different code iterations with no success. The current stays high. I’d be interested in trying any code proven to work.

I have updated the firmware on both the Lopy4 and also the Pytrack board. All libraries are installed correctly and there don’t seem to be any errors. I have also tried using the machine library and the associated deepsleep method without success. Power consumption is still high.

On my mac I can monitor serial outputs and follow the execution of code using print statements.

I’ve also followed the performance of the device using a 3.7 Lipo battery connected in series with a multimeter to measure current.

Any help would be appreciated.

from deepsleep import DeepSleep
import deepsleep
import time
import pycom
pycom.heartbeat(True)
ds = DeepSleep()
print("Awake")
time.sleep(10)

print("sleeping")
pycom.heartbeat(False)
time.sleep(1)
ds.go_to_sleep(10)  # go to sleep for 10 seconds

I think I found a solution. This combination uses the lopy4 plugged into a Pytrack. Both units have their firmware updated.

The code below seems to work fine. I tested the sleeping current draw using a 3.7V LiIon battery and its approx 0.020mA.

I also added in some GPS code - similar code to that demonstrated in the Core Electronics Pytrack Tutorial - and it also works - no compatability issues.

from pytrack import Pytrack
from LIS2HH12 import LIS2HH12

import pycom
import time
import machine

py = Pytrack()
pycom.heartbeat(True)


time.sleep(10)
print("setup")


# go to sleep for 30 seconds
py.setup_sleep(30)

print("Going to sleep")
time.sleep(1)
pycom.heartbeat(False)
time.sleep(1)

# Finally go to sleep
py.go_to_sleep(False)
1 Like