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

    LoPy 4 + Expansion board 3.1 power consumption in deep sleep mode

    Scheduled Pinned Locked Moved LoPy
    15 Posts 4 Posters 1.0k 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.
    • L Offline
      loth4in
      last edited by

      Re: LoPy 4 - Current consumption and Deep Sleep

      I am developing a rain gage that's usually in deep sleep, unless it sends a life sign (every 24 h) or gets a pin interrupt from the rain sensor. Using a time series of the past 20 years I estimated 99.97 % of a years time it would be in deep sleep, so that's where my main consumption happens. On pin interrupt I send on LoRaWAN and write the RTC time to an SD card (hence the expansion board). It's battery powered and should last as long as possible before needing a recharge.

      I went through the steps provieded by the thread mentioned above but am still stuck with 140 uA during deep sleep mode, which is way too much for any reasonable battery capacity.

      Unfortunately I can't try a regulated power supply on the 3.3 V pin. However, so far I disabled WIFI and Bluetooth on boot, pulled out all jumpers on the exp board and went through the VIN-pin for power supply with a 3.7 V LiPo battery and there still seems to be something drawing power where it shouldn't. Are there any other options? I'd need to get down to 50 uA tops during deep sleep to at least get through the main rainfall season at my test catchment (18.5 uA as advertized would be the dream).

      robert-hhR rcolisteteR 2 Replies Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @loth4in
        last edited by robert-hh

        @loth4in I just made a quick check with a bare LoPy4 and 4V at Vin and GND. Nothing else connected. Calling machine.deepsleep(), the current consumption drops to 18µA.
        machine.deepsleep() was activated through a telnet connection. So that is the baseline. Anything else comes from the environment. Hugh power sucker are often pull-up resistors. For instance, a 33k resistor at 3.3V will consume 100µA. So check all static voltages at you device, outputs which drive a load, and switch them to inputs, etc. There is a voltage divider on the Expansion board to an analog input pin, which can be disabled by pulling the BAT jumper. That one alone consumes 20µA.
        P.S.: NEVER use the 3.3 Pin for supplying the device. It's an output.

        rcolisteteR 1 Reply Last reply Reply Quote 0
        • rcolisteteR Offline
          rcolistete @robert-hh
          last edited by

          @robert-hh He/she is using LoPy4 + Expansion Board 3.1.
          So even the inserted microSD, not being used, consumes power (depending on the size and model), etc :
          MicroSD power consumption on Expansion Board, PyTrack, PySense, etc

          My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

          robert-hhR L 2 Replies Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @rcolistete
            last edited by

            @rcolistete Yes, I've seen that. I just wanted to tell that he/she can get to low power consumption. It might require to abandon the expansion board, if that is the major current sink. But that does not seem to be the case, according to: https://forum.pycom.io/topic/4336/new-v3-1-expansion-board-firmware-v0-0-11

            rcolisteteR 1 Reply Last reply Reply Quote 0
            • rcolisteteR Offline
              rcolistete @loth4in
              last edited by

              @loth4in Another option is to not use Expansion Board at all, but an external :

              • uSD powered by a low power MOSFET (so it's powered off during deep sleep);
              • I2C EEPROM, I2C FRAM or SPI flash memories, if needed powered by a low power MOSFET.

              Hint of a good low power MOSFET, SparkFun MOSFET Power Controller, consumes only about 1 uA (when turning off the load).

              My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

              robert-hhR 1 Reply Last reply Reply Quote 1
              • L Offline
                loth4in @rcolistete
                last edited by loth4in

                @rcolistete You are right. I found that post just recently and saw the difference in power consumption when I tested it (goes down to ~60 uA). Is there no way to deactivate the SD module on boot and only reinit it, when it's needed?
                This doesn't seem to work.

                from machine import SD
                
                sd = SD()
                sd.deinit()
                

                he, btw.

                @robert-hh thanks for the heads-up, I'll leave the 3.3 Pin alone. But how would I register a pin interrupt without using the pullup resistor. Is there a way to get a decent reading from a floating pin?

                robert-hhR J 2 Replies Last reply Reply Quote 0
                • rcolisteteR Offline
                  rcolistete @robert-hh
                  last edited by

                  @robert-hh But the uSD card (on Expansion Board) can consume 0.12-0.24 mA from my tests (with Expansion Board v2.1), even when not mounted/being used !

                  My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

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

                    @loth4in It's not that you must not have pull-up resistors. If the device driving the input has high level when sleeping, then there should be not substantial current flow. I just wanted to point out, that outputs driving even a higher impedance load may cause such an current drain. But, as @rcolistete said, most probable the SD is consuming that current. So you should consider switch off it's power when not used..

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

                      @rcolistete I do not like this sparkfun device for the purpose, because it uses a N-Channel MosFET to switch the -line (GND). Better use a P-Channel MosFET to switch Vcc.

                      rcolisteteR 1 Reply Last reply Reply Quote 1
                      • rcolisteteR Offline
                        rcolistete @robert-hh
                        last edited by

                        @robert-hh Any recommendation of good low power P-channel MOSFET ?

                        My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

                        robert-hhR 1 Reply Last reply Reply Quote 0
                        • J Offline
                          jcaron @loth4in
                          last edited by

                          @loth4in Did you try upgrading the expansion board firmware to the version in the post linked to by @robert-hh ?

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

                            @rcolistete From the offering of my local electronics shop I picked recently for this kind of tasks:
                            Vishay IRFD9024 and
                            Vishay SI2323DS
                            The first one is worse in matters of RDSon and GS threshold, but is easier for soldering. But there should be plenty of other transistors available.

                            1 Reply Last reply Reply Quote 1
                            • L Offline
                              loth4in @jcaron
                              last edited by

                              @jcaron yeah, LoPy4 and Expansion board are both running the latest stable firmwares

                              1 Reply Last reply Reply Quote 0
                              • L Offline
                                loth4in
                                last edited by loth4in

                                Okay, I checked on how much data I'll produce over the time and it turns out with a little tweaking I'll be happy enough with the 512 KB onboard storage. So, I guess I won't need the expansion board after all except for programming. That makes it a little tideous to read the data but we will think of a solution for that when we build the casing. Thanks however for all your help.

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

                                  @loth4in At the LoPy4, the flash file system has a capacity of 4 MB. And you can always connect by WiFi. So even if you do not have it enabled all the time, you could use a switch (reed contact) or button to tell the unit to activate WiFi. Then you can use ftp to access the data.

                                  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