Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    No wakeup after deepsleep on Pytrack - Pytrack working as expected

    Scheduled Pinned Locked Moved GPy
    7 Posts 3 Posters 201 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      Peter Ehses
      last edited by

      Hi,
      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.

      J 1 Reply Last reply Reply Quote 0
      • P Offline
        Peter Ehses
        last edited by

        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?

        1 Reply Last reply Reply Quote 0
        • J Offline
          jcaron @Peter Ehses
          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.

          P 1 Reply Last reply Reply Quote 0
          • P Offline
            Peter Ehses @jcaron
            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:

            https://forum.pycom.io/topic/4484/gpy-pytrack-startup-connection-issues

            C 1 Reply Last reply Reply Quote 0
            • C Offline
              crumble @Peter Ehses
              last edited by crumble

              @Peter-Ehses

              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()

              P 1 Reply Last reply Reply Quote 0
              • P Offline
                Peter Ehses @crumble
                last edited by

                @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.

                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  jcaron @Peter Ehses
                  last edited by

                  @Peter-Ehses Did you set pycom.wifi_on_boot to false?

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 1 / 1
                  • First post
                    Last post

                  Pycom on Twitter

                  Pycom