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

    [Solved] Power consumption deep sleep Pysense/Pytrack

    Scheduled Pinned Locked Moved Issues & Bugs
    pysensedeepsleepdeep sleeplopypytrack
    24 Posts 8 Posters 11.6k Views 10 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.
    • T Offline
      this.wiederkehr
      last edited by

      I guess it is due to the peripherals (all the sensors) which are not put into standby. also see the following post regarding the gps on the pytrack.

      https://forum.pycom.io/topic/1409/power-consumption-on-pytrack-with-sipy

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

        I am getting the same results. Latest PySense Library. Testing on 5v Input. Looks like we need to disable all the peripherals but I was hoping the PySense library would do that. This thing not sleeping well is causing me to not sleep well. Is that irony?

        main.py

        import time
        from pysense import Pysense
        
        time.sleep(10)
        
        
        py = Pysense()
        py.setup_sleep(30)   # setup a 10 seconds sleep time
        py.go_to_sleep()
        

        boot.py

        from network import WLAN
        from network import Bluetooth
        from machine import UART
        import os
        
        uart = UART(0, 115200)
        os.dupterm(uart)
        wlan = WLAN()
        wlan.init(mode=WLAN.STA)
        wlan.deinit()
        bt = Bluetooth()
        bt.deinit()
        
        1 Reply Last reply Reply Quote 2
        • E Offline
          Emmanuel Goudot
          last edited by

          According to specs of pytrack peripherals,

          GPS (Quectel L76-L):
          acquisition/tracking : 22/29mA
          standby: 0.5mA (after sending "$PMTK161,028\r\n")
          backup: 7µA

          Accelero (LIS2HH12):
          Normal: 50µA (ODR 10Hz)
          Power down: 5µA

          After setup_sleep(30) and go_to_sleep(), are GPS & LIS still powered ?
          What is the PIC doing concerning them with CMD_SETUP_SLEEP & CMD_GO_SLEEP ?

          1 Reply Last reply Reply Quote 1
          • P Offline
            Pwntus
            last edited by

            Thanks for the replies @jubbs @this-wiederkehr @jmarcelino
            It has been suggested that the peripherals are not put into "standby" while in deep sleep.
            Shouldn't this be done by the Pysense/Pytrack by default? In addition, we do not initialize/use any peripherals in our test program.

            We did some more testing with the Pytrack shield.
            LoPy firmware: 1.7.6.b1
            Pytrack firmware: 0.0.3

            Our test program disabled WiFi and Bluetooth in boot.py and ran a 30s normal sleep (time.sleep()) and a 30s deep sleep (py.setup_sleep(30) + py.go_to_sleep()).
            Here's our results:

            USB power
            Normal sleep: ~75-80mA
            Deep sleep: ~5.3mA

            3.7V LiPo battery
            Normal sleep: ~73mA
            Deep sleep: 18μA (!)

            It seems like the Pytrack gives acceptable readings while using a 3.7V LiPo battery while the Pysense still has some issues.

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

              I can confirm that the pysense does not seem to properly go into deep sleep.

              On a 3.7V LiPo, it still pulls 2.7mA in deep sleep mode. (Note, the USB cable in the photo below is not connected to any power source.)

              photo of multimeter

              Pysense firmware is at 0.0.3.

              1 Reply Last reply Reply Quote 3
              • B Offline
                bucknall @Pwntus
                last edited by

                @Pwntus (+ others) Thanks for raising this! We're now investigating this, it appears that the issue only pertains to the the Pysense. Thanks for your patience!

                Developer Evangelist - Pycom

                J 1 Reply Last reply Reply Quote 3
                • J Offline
                  jcaron @bucknall
                  last edited by

                  @bucknall Hi,

                  Have you made any progress on this? Any idea if this is hardware-related or just a firmware issue yet?

                  Thanks!

                  P 1 Reply Last reply Reply Quote 1
                  • P Offline
                    Pwntus @jcaron
                    last edited by

                    @jcaron issues with the Pysense should be fixed in the pysense_0.0.4.dfu firmware release, but we have yet to test it. I'll post the results tomorrow.

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

                      @Pwntus Ah, wondered about that, but didn't see anything in the chagelog that seemed to be related. Thanks for the (very) quick reply!

                      B 1 Reply Last reply Reply Quote 1
                      • B Offline
                        bucknall @jcaron
                        last edited by

                        @jcaron @Pwntus I'll double check with Daniel regarding the power concerns. I'll confirm if this is correct (I'm London based - Daniel works from the Netherlands).

                        Developer Evangelist - Pycom

                        1 Reply Last reply Reply Quote 1
                        • P Offline
                          Pwntus
                          last edited by Pwntus

                          @jcaron @bucknall (+ others) here's our new (unofficial) Pysense test.

                          LoPy firmware: 1.7.6.b1
                          Pysense firmware: 0.0.4

                          Our test program disabled WiFi and Bluetooth in boot.py and ran a 30s normal sleep (time.sleep()) and a 30s deep sleep (py.setup_sleep(30) + py.go_to_sleep()).
                          Here's our results:

                          USB power
                          Normal sleep: ~57.2mA
                          Deep sleep: ~7.35mA

                          3.7V LiPo battery
                          Normal sleep: ~49.1mA
                          Deep sleep: 2.2mA

                          It still appears that the Pysense has issues with deep sleep.

                          B 1 Reply Last reply Reply Quote 0
                          • B Offline
                            bucknall @Pwntus
                            last edited by

                            @Pwntus Ok I'll feed this back to Daniel again - apologies for getting your hopes up - I'll keep you in the loop with how this progresses.

                            Thanks for your patience,

                            Alex

                            Developer Evangelist - Pycom

                            J 1 Reply Last reply Reply Quote 1
                            • J Offline
                              jmarcelino @bucknall
                              last edited by jmarcelino

                              I saw the same results for the Pysense as @Pwntus

                              Also noticed that if you used the MPL3115A2 pressure sensor (not sure about the others) it goes into deep sleep with it in active mode increasing consumption by about 1mA. But I think this one can be solved in the Python library by setting MPL3115_CTRL_REG1 to 0x0 (to clear SBYB bit in CTRL1 register)

                              mp = MPL3115A2(py)
                              
                              mp.i2c.writeto_mem(MPL3115A2.MPL3115_I2CADDR, MPL3115A2.MPL3115_CTRL_REG1, bytes([0x0]))
                              

                              before entering deep sleep.

                              B E 2 Replies Last reply Reply Quote 1
                              • B Offline
                                bucknall @jmarcelino
                                last edited by

                                @jmarcelino Ah good catch! I'll test this out - Thanks!

                                Developer Evangelist - Pycom

                                J 1 Reply Last reply Reply Quote 0
                                • J Offline
                                  jmarcelino @bucknall
                                  last edited by

                                  @bucknall
                                  Just to be clear that 1mA is on top of the lingering 2mA... I'm not sure what's causing that one yet :)

                                  1 Reply Last reply Reply Quote 1
                                  • E Offline
                                    Emmanuel Goudot @jmarcelino
                                    last edited by

                                    @jmarcelino Are you sure sensors on the PySense are powered during deepSleep ?
                                    I have done tests on pytrack, and it looks like 3.3V is 'cut' for LoPy, LIS(accel) & GPS, explaining the ~17µA of the pytrack during deepsleep.

                                    J 1 Reply Last reply Reply Quote 0
                                    • J Offline
                                      jmarcelino @Emmanuel Goudot
                                      last edited by jmarcelino

                                      @Emmanuel-Goudot
                                      I see 2.6V on the MPL3115A2 Vdd pin during deep sleep so I guess it is active, for example on the Si7006-A20 (temp/humidity) I don't.

                                      My best guess is certain sensors can act as wake-up sources (e.g. pressure going above/below threshold) so they have separate power nets.

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

                                        Is there any ETA on the deep sleep fix? This is delaying the shipping of one of my projects. We simply can't send it to the customer if the battery only lasts a few days or weeks.

                                        1 Reply Last reply Reply Quote 2
                                        • D Offline
                                          dbrgn
                                          last edited by dbrgn

                                          Sorry for bumping this again, but now that a new LoPy firmware has been released, any news about the low power fix?

                                          The specifications of the PySense on the website still says:

                                          Ultra low power operation (~1uA in deep sleep)

                                          ...since that promise is still off by a factor of about 2500, at least an ETA would make me happy :)

                                          1 Reply Last reply Reply Quote 2
                                          • P Offline
                                            Pwntus
                                            last edited by Pwntus

                                            @dbrgn Not really any changes with 1.7.8.b1.

                                            LoPy firmware: 1.7.8.b1
                                            Pysense firmware: 0.0.4

                                            USB power
                                            Normal sleep: 48.8mA
                                            Deep sleep: 7.4mA

                                            3.7V LiPo battery
                                            Normal sleep: 40.2mA
                                            Deep sleep: 2.2mA

                                            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
                                            • 1 / 2
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom