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

    Root causes of high deep sleep current [LoPy1, WiPy2 and SiPy], all the new modules **do not have deepsleep issues**

    Scheduled Pinned Locked Moved Announcements & News
    deepsleep
    127 Posts 48 Posters 110.1k Views 57 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.
    • D Offline
      daniel
      last edited by daniel

      Hello everyone,

      We have been doing lots of deepsleep tests again on FiPy and GPy. Deepsleep works well and we measure values between 35uA and 45 uA which will be improved to ~20uA after firmware updates to the LTE radio. User experiencing high deepsleep currents are due to timing issues in the firmware when sending the LTE radio to airplane mode. We will be working on fixing that ASAP during the next few days.

      Cheers,
      Daniel

      D 1 Reply Last reply Reply Quote 1
      • D Offline
        derchris @daniel
        last edited by

        @daniel sounds good!
        Any news regarding the BLE sleep modes? AFAIK it‘s not possible to sleep and wait for BLE interrupts (because of the ESP32)

        1 Reply Last reply Reply Quote 0
        • T Offline
          Thosch42
          last edited by

          Hi all!
          Since a few days I'm working on a deepsleep issue. I have a Lopy with Deepsleep-Shield, powered from my Otii Arc. Just connected the UART RX, to see what's going on. No Expansionboard. Latest Firmware, and a pretty simple script:

          from deepsleep import DeepSleep
          import deepsleep
          from network import Bluetooth, WLAN
          
          bluetooth = Bluetooth()
          bluetooth.deinit()
          wlan = WLAN(mode=WLAN.STA)
          wlan.deinit()
          
          ds = DeepSleep()
          
          # get the wake reason and the value of the pins during wake up
          wake_s = ds.get_wake_status()
          print(wake_s)
          
          if wake_s['wake'] == deepsleep.PIN_WAKE:
              print("Pin wake up")
          elif wake_s['wake'] == deepsleep.TIMER_WAKE:
              print("Timer wake up")
          else:  # deepsleep.POWER_ON_WAKE:
              print("Power ON reset")
          
          ds.enable_pullups('P17')  # can also do ds.enable_pullups(['P17', 'P18'])
          ds.enable_wake_on_fall('P17') # can also do ds.enable_wake_on_fall(['P17', 'P18'])
          
          print("Go to sleep")
          ds.go_to_sleep(20)
          

          And my deepsleep power consumtion is 6.5mA.

          Am I doing something wrong?

          Cheers,
          Thomas

          1 Reply Last reply Reply Quote 0
          • sebS Offline
            seb
            last edited by

            Hi,
            Deep sleep using a LoPy an Deepsleep shield should result in a current draw of 530uA, could you please detail your setup for your current measurement and we can try replicate it? What voltage are you setting the Otii? Are you applying the voltage to Vin or 3.3V? Have you tried with the UART disconnected?

            T 1 Reply Last reply Reply Quote 0
            • T Offline
              Thosch42 @seb
              last edited by

              @seb
              Hi!
              I found the problem. My Otii Arc was defective. So, everything is fine.

              Thanks!

              Cheers,
              Thomas

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                dbrgn @Thosch42
                last edited by

                @thosch42 said in Root causes of high deep sleep current [LoPy1, WiPy2 and SiPy], all the new modules **do not have deepsleep issues**:

                My Otii Arc was defective.

                Oh, how did you find out? With the resistor test?

                T 1 Reply Last reply Reply Quote 0
                • T Offline
                  Thosch42 @dbrgn
                  last edited by

                  @dbrgn
                  Nope! A little bit harder ;-)
                  I stripped down my complete design, module per module, to find out who draws the 6.5mA. The last step was, to pull the cable from the output terminal of my Arc. And, oh wonder, I had still a current of 6.5mA ;-)

                  I contacted the support from Qoitech, and a replacement arrived next day!!!

                  Cheers,
                  Thomas

                  1 Reply Last reply Reply Quote 1
                  • L Offline
                    lj Pybytes Beta
                    last edited by

                    @Pycom

                    Will LoPy1 be redesigned to allow newer production bacthes to have a proper deesleep mode( ~5 and ~15uA) by its own ( at least this is what I undertood) , or will it need the deepsleep shield for ever?
                    migrating to Lopy4 is not an option because it is not priced the same.
                    Thanks for your reply.

                    robert-hhR 1 Reply Last reply Reply Quote 0
                    • robert-hhR Offline
                      robert-hh @lj
                      last edited by

                      @lj I would not expect that. Any new devices use ESP32 Rev 1, and the code as it is assumes PSRAM for a Rev1 device. Obviously, that could be changed, but not easily.

                      1 Reply Last reply Reply Quote 1
                      • J Offline
                        james_seth
                        last edited by

                        @Fred

                        I have two Lopy v1.0r boards. Due to the evolving ESP32 code set I benched the boards for a while and used an alternative product to accomplish the task due to time constraints and have now come back to redesign the product using the Lopy. As the product runs off a battery the low power capabilities is a must. I only saw this post now and the survey is closed.

                        Kind regards,
                        James

                        sebS 1 Reply Last reply Reply Quote 0
                        • sebS Offline
                          seb @james_seth
                          last edited by

                          @james_seth

                          Sent an email to salessupport@pycom.io if you need some deepsleep shields

                          1 Reply Last reply Reply Quote 0
                          • A Offline
                            akshayjames @incognico
                            last edited by

                            @incognico Hi
                            The high current during deepsleep is due to the LTE module. LTE is started automatically during boot. You need to deinit LTE separately before calling deepsleep as LTE is not stopped automatically during deepsleep.
                            I had the same issue. My FiPy module was drawing 49mA during deepsleep. After I called LTE deinit, the current draw reduced by a lot at that time itself. After that deepsleep worked as expected. :)

                            from network import LTE
                            lte = LTE()
                            LTE.deinit()

                            Hope this helps.

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              dmayorquin
                              last edited by

                              Hi @Fred, I need some help with the Pysense deep sleep mode. I have a SiPy + Pysense + 3.7 V LiPo battery (Using JST connector on Pysense). I'm testing Deep sleep mode from last version of Pysense library but I'm measuring high deep sleep current consumption.

                              My program disabled WiFi in boot.py. In main.py It blinks an LED for 5 seconds and then sleeps 20 seconds. These are my results:

                              SiPy firmware: 1.18.0
                              Pysense firmware: 0.0.8
                              Blinking: ~50 mA
                              Deep sleep: ~2.2 mA

                              main.py code:

                              from pysense import Pysense
                              import pycom
                              import time
                              
                              py = Pysense()
                              
                              #Turn-off heartbeat
                              if pycom.heartbeat() == True:
                                  pycom.heartbeat(False)
                              
                              #Blink the LED
                              for i in range(5):
                                  pycom.rgbled(0x1F)
                                  time.sleep(0.05)
                                  pycom.rgbled(0x00)
                                  time.sleep(1)
                              
                              #Sleep 20 seconds
                              py.setup_sleep(20)
                              py.go_to_sleep()
                              

                              boot.py code:

                              from network import WLAN
                              
                              wlan = WLAN()
                              wlan.deinit()
                              

                              I tried other SiPy firmware versions (1.13.0.b1, 1.15.0.b1, 1.17.3.b1, 1.19.0.b4) but results are the same. @daniel said a few months ago this Pysense issue was resolved, but can you confirm if there is still something wrong with Pysense? Or, am I missing some line of code to make deep sleep mode works as it should? Thanks in advance.

                              R 1 Reply Last reply Reply Quote 0
                              • R Offline
                                Radec @dmayorquin
                                last edited by

                                @dmayorquin I think you forget lines codes :
                                Example with timer :

                                import machine
                                machine.deepsleep(3600000 )  # 1 hours
                                
                                D 1 Reply Last reply Reply Quote 0
                                • D Offline
                                  dmayorquin @Radec
                                  last edited by

                                  Hi @radec, thanks. According to documentation, machine.deepsleep() works well when you are not using a shield or expansion board, but in my case I'm using SiPy + Pysense, so I must use the deep sleep methods of Pysense library. I've found a solution which I posted here:

                                  https://forum.pycom.io/topic/3594/how-to-deep-sleep-with-sipy-pysense-3-7v-lipo

                                  By the way, I also tried machine.deepsleep() with my setup, but didn't work (the deep sleep current was ~60 mA).

                                  1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    mattliddle
                                    last edited by mattliddle

                                    @Fred What do you need to do to accomplish that low of power consumption on the GPy with deep sleep? I'm getting about 18 mA when it's going into deep sleep..

                                    import machine
                                    
                                    # and later on in the code once my sensor is done running, I call this
                                    machine.deepsleep(30000)
                                    

                                    What could be going on? does the GPy 1.0 need a power saving board as well? I've looked around on the forum only to find no real solution yet, but other users with the same issue.

                                    M 1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      mattliddle @mattliddle
                                      last edited by mattliddle

                                      @mattliddle @Fred I discovered an important insight! When powering it through USB (I'm using the expansion board 2.1) there is an LED light that turns on and stays on even in deep sleep. I was measuring current draw and it was always at least 14 mA. I tried powering the device outside of the expansion board by a 3.7V source, and in deep sleep, sure enough it dropped into the microamp range. Even when it is on expansion board 2.1 and powered through battery instead of usb, the LED stays turned off, and therefore power consumption will drop into the micro amp range.

                                      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
                                      • 2
                                      • 3
                                      • 4
                                      • 5
                                      • 6
                                      • 7
                                      • 6 / 7
                                      • First post
                                        Last post

                                      Pycom on Twitter

                                      Pycom