No wakeup after deepsleep on Pytrack - Pytrack working as expected
I'm using a GPy with Pytrack for deepsleep.
The Pytrack powers down as normal but the GPy won't restart once the PIC powers it again after sleep. Only through pulling the GPy out and reseating it or by connecting P3 to GND manually do I get a reboot as expected.
I tested the exact same code with a WiPy and it worked, so I'm guessing this is a GPy problem? I tested with 2 GPYs with the exact same results.
jcaron last edited by
@Peter-Ehses Did you set
@crumble It seems like it was a brownout after all but what fixed it for me was disabling the bt, wifi and server directly before shutdown. I did disable them in boot.py but doing so again worked somehow.
Still, grounding P3 worked even with all telemetry on and resulted in only 20uA current leakage and only if the GPy was powered.
crumble last edited by crumble
You can send the GPS to sleep as well. So your ESP may not brown out during boot time. See the parameters for go_to_sleep()
Peter Ehses last edited by Peter Ehses
--- Edit 2 --- changed test code with error handling and visual feedback
@jcaron my problem also occurs with the USB power connected, with a psu that has so far accepted power draw up to 5A. I do see an increased power draw at startup but it is within spec for my battery I think.
--- Edit ---
I just tested with a 105 mAh lipo cell and it works no problem with the grounded P3. I have a deepsleep draw of about 18uA, peaks of 400mA with sustained 95mA.
Here's my test code:
from pytrack import Pytrack import time import pycom import os import network pycom.heartbeat(False) pycom.rgbled(0x0000ff) bt = network.Bluetooth() bt.deinit() uart = UART(0, 115200) os.dupterm(uart) ap = network.WLAN() ap.deinit() server = network.Server() server.deinit() print("wake") pycom.rgbled(0x007f00) time.sleep(10) def shutdownthings(): print("try pytrack") py = Pytrack() pycom.rgbled(0x7f7f00) done = False while not done: print("pin") try: py.setup_int_pin_wake_up(True) done = True except Exception as e: print(e) done = False pycom.rgbled(0x00ffff) while not done: print("time") try: py.setup_sleep(30) done = True except Exception as e: print(e) print("sleep") time.sleep(1) done = False pycom.rgbled(0xff00ff) while not done: print("goto") try: py.go_to_sleep(False) done = True except Exception as e: print(e) while True: try: shutdownthings() except Exception as e: print(e)
This issue seems similar:
jcaron last edited by
@Peter-Ehses I believe there have been several threads on the subject, though I'm not sure they're all related to the same base issue.
Here is one of them: https://forum.pycom.io/topic/2998/battery-operation-with-fipy-pytrack
That one points to the FiPy (and the GPy probably has the same issue) having a very high peak current (2.4 A in the case of the FiPy) when it starts up, and the battery not being able to provide it. Not sure if your issue is the same, though.
It seems like I solved this issue by soldering a connection from Pin3 to the wifi / lte module RF shielding next to it.
Can anyone confirm that this makes any sense? A grounding issue inside the GPy maybe?