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

    FiPy current consumption analysis

    Scheduled Pinned Locked Moved FiPy
    fipylorawan otaacurrent
    21 Posts 7 Posters 7.0k Views 9 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.
    • N Offline
      nalexopo @thomand1000
      last edited by

      @thomand1000 I forgot to mention that in the first case the current draw remained at about 200mA for as long as half a minute or less before going down to 20uA. I edit that too on original post

      1 Reply Last reply Reply Quote 0
      • D Offline
        Dylan @nalexopo
        last edited by

        @nalexopo I am also having problems getting the 20uA deepsleep current draw, would you be able to share any working code you had that achieved 20uA?
        So far I have gotten it down to 30mA (also tested it with MartinNs code and got the same).
        This is with a SIM card, I found that without a SIM I couldn't lte.deinit() at all.

        Cheers

        N 1 Reply Last reply Reply Quote 0
        • N Offline
          nalexopo @Dylan
          last edited by

          @dylan
          I came to the conclusion that in order to have a constant low current you have to use a working SIM that supports Cat-M or NB-IoT. I just used @MartinN 's code and a working sim. Pycom has to fix this.

          T D 2 Replies Last reply Reply Quote 0
          • T Offline
            thomand1000 @nalexopo
            last edited by

            @nalexopo @Dylan Same here. The minimum deep sleep current on average is around 12 mA in my experiments.

            1 Reply Last reply Reply Quote 0
            • D Offline
              Dylan @nalexopo
              last edited by

              @nalexopo Is there an easy way of checking if your SIM supports Cat-M1 or NB-IoT? I am following up with Telstra at the moment however it could be a few days until someone who knows gets back to me.

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

                I have had success connecting to LTE which has led to a deepsleep current of around 20mA. However still have not been able to drop to the 20uA.

                I am using bits and pieces of the code found in this discussion and I've tried it on different firmware versions as well. Does anyone see anything wrong with this code?

                import machine
                import network
                import os
                import time
                import pycom
                from network import LTE
                from network import WLAN
                from network import Bluetooth
                from network import LoRa
                
                # setup as a station
                lte = LTE()
                print("Line 15")
                lte.send_at_cmd('AT+CFUN=0')
                lte.send_at_cmd('AT!="clearscanconfig"')
                lte.send_at_cmd('AT!="addscanfreq band=28 dl-earfcn=9410"')
                lte.send_at_cmd('AT+CGDCONT=1, "IP", "telstra.internet"')
                lte.send_at_cmd('AT+CFUN=1')
                
                
                while not lte.isattached():
                    print("Attaching...")
                    time.sleep(0.1)
                print("Attached")
                
                lte.connect()
                
                while not lte.isconnected():
                    print("Connecting...")
                    time.sleep(0.1)
                print("Connected!")
                time.sleep(2)
                quit = False
                while quit == False:
                    try:
                        lte.deinit()
                    except OSError:
                        print('  Exception occured, retrying...')
                        pass
                    else:
                        quit = True
                print("Disconnected")
                
                print('Switching off WLAN')
                wlan = network.WLAN()
                wlan.deinit()
                
                print('Switching off Heartbeat')
                pycom.heartbeat(False)
                pycom.rgbled(0x000000)
                
                print('Switching off Server')
                server = network.Server()
                server.deinit()
                
                print('Switching off Bluetooth')
                bt = Bluetooth()
                bt.deinit()
                
                print('Switching off LoRa')
                lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.AU915, power_mode=LoRa.SLEEP)
                print("Going to sleep")
                machine.deepsleep(300000)
                
                A 1 Reply Last reply Reply Quote 0
                • A Offline
                  adrianbro
                  last edited by

                  The LTE doco at

                  https://docs.pycom.io/chapter/tutorials/lte/cat_m1.html states the following:

                  "IMPORTANT: Once the LTE radio is initialized, it must be de-initialized before going to deepsleep in order to ensure minimum power consumption. This is required due to the LTE radio being powered independently and allowing use cases which require the system to be taken out from deepsleep by an event from the LTE network (data or SMS received for instance).+

                  When using the expansion board and the FiPy together, the RTS/CTS jumpers MUST be removed as those pins are being used by the LTE radio. Keeping those jumpers in place will lead to erratic operation and higher current consumption specially while in deepsleep."

                  https://docs.pycom.io/chapter/firmwareapi/pycom/network/lte.html states the following

                  "lte.deinit()

                  Disables LTE modem completely. This reduces the power consumption to the minimum. Call this before entering deepsleep."

                  D 1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dylan @adrianbro
                    last edited by

                    @adrianbro I am using the Pytrack board, I must have made the assumption that the it was talking about the main expansion board, but that does seem possible. As for removing the RTS/CTS jumpers, would that be literally cutting the LTE_RTS and LTE_CTS pins from the FiPy :S.

                    A 1 Reply Last reply Reply Quote 0
                    • A Offline
                      adrianbro @Dylan
                      last edited by

                      @dylan

                      The LTE doco at

                      https://docs.pycom.io/chapter/tutorials/lte/cat_m1.html states the following:

                      "IMPORTANT: Once the LTE radio is initialized, it must be de-initialized before going to deepsleep in order to ensure minimum power consumption. This is required due to the LTE radio being powered independently and allowing use cases which require the system to be taken out from deepsleep by an event from the LTE network (data or SMS received for instance).+

                      When using the expansion board and the FiPy together, the RTS/CTS jumpers MUST be removed as those pins are being used by the LTE radio. Keeping those jumpers in place will lead to erratic operation and higher current consumption specially while in deepsleep."

                      https://docs.pycom.io/chapter/firmwareapi/pycom/network/lte.html states the following

                      "lte.deinit()

                      Disables LTE modem completely. This reduces the power consumption to the minimum. Call this before entering deepsleep."

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        adrianbro @Dylan
                        last edited by

                        @dylan
                        No problems Dylan let me know how you go - I work for the Metro Fire Brigade In Melbourne - We are about to start evaluating the FiPy board on Telstra so very keen to get feed back on how you went.

                        I am just waiting on our sim pack to arrive from Telstra and the boards.

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          davidchallender @thomand1000
                          last edited by

                          @thomand1000

                          Have been looking at power consumption and have similar issues to what is reported here have 200mA in main program then 190 to 150 mA for 30 sec before dropping to deep sleep. In first cycle deep sleep current is 200 micro amps. In subsequent cycles the deep sleep current is 30 mA. Have tried turning everything off without change. Have same issue with LTE but don't have a SIM. Agree that things should not be instantiated by default but as required.

                          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