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

    Energy consumption in Fipy

    Scheduled Pinned Locked Moved FiPy
    10 Posts 2 Posters 62 Views 2 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.
    • M Offline
      muhammad Umair
      last edited by

      If I am continuously sensing temperature and sending it over physical layer after 10 sec, Will using power mode "always on" or "TX only" affect the energy consumption?

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

        @muhammad-Umair I suppose you mean you are going to use raw LoRa.

        “always on” mode is the equivalent of class C for LoRaWAN: at any time the device is not transmitting, it will be listening. That uses about 10 mA just for the radio (on top of what the ESP32 and other components may use).

        TX only is closer to LoRaWAN class A: when not transmitting, the radio is idle.

        In any case, continuously sending and sending data every 10 seconds nearly certainly means you won’t be able to use deep sleep much, if at all. This means you will probably have an average current around 50 mA, possibly a bit more, and running off battery is practically impossible, unless you plan to recharge the device every couple of days, so 10 mA more or less won’t make much of a difference.

        M 1 Reply Last reply Reply Quote 2
        • M Offline
          muhammad Umair @jcaron
          last edited by

          @jcaron Thank you for your well written response.
          Yes I am using raw LoRa.
          So, basically I have done 3 experiments with Temperature sensor for 3 different cases and measured their power consumption in mAh through USB Tester UT658.
          1st case: I only sense the temperature every 10sec continuously for 30 mins.
          2nd case: I sense the temperature and send it through raw LoRa every 10sec for 30min with the power mode ALWAYS_ON.
          3rd case: I sense the temperature and send it through raw LoRa every 10sec for 30 min with the power mode TX_ONLY.
          Results: I am getting exactly the same power consumption in mAh for all the 3 cases.

          Do you thing I did something wrong in the experiments or it is correct?

          J 1 Reply Last reply Reply Quote 1
          • J Offline
            jcaron @muhammad Umair
            last edited by

            @muhammad-Umair If you want to measure power consumption precisely, you should use a battery and measure between the battery and the device. The USB power path has additional stuff going on which may give incorrect results.

            Did you correctly switch off Wi-Fi, BLE, and LTE on the Wi-Fi? If you didn't the Lora current will probably be drowned by the others.

            Also what settings to you have for LoRa TX power, SF, bandwidth, etc? How much data do you transmit on each interval?

            How much did you measure? With the ESP32 + LoRa only I would expect around 30-40 mAh when measured via USB, maybe a bit more.

            Can you share your test code? The difference between the 3 tests should be small but measurable (at least on the battery power path, not so sure via USB).

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              muhammad Umair @jcaron
              last edited by

              @jcaron I am messaging you in private. I hope it is fine for you.

              J 1 Reply Last reply Reply Quote 1
              • J Offline
                jcaron @muhammad Umair
                last edited by

                @muhammad-Umair It's more useful for everybody (especially people facing similar issues in the feature) if you include all the information in this thread. Don't forget to redact any private info (network names and IDs, passwords, keys, etc.) of course.

                M 2 Replies Last reply Reply Quote 0
                • M Offline
                  muhammad Umair @jcaron
                  last edited by

                  @jcaron Actually I am using default parameters for raw Lora (so no need to define them in code) and just changing the power mode between ALWAYS_ON and TX_ONLY

                  For the moment I have to test it through USB tester

                  It the part of my work to use default parameters and just add power mode option and to use USB Tester.

                  The power consumption is 148mAh for all 3 cases, for running the experiment for 30 mins

                  J 1 Reply Last reply Reply Quote 1
                  • J Offline
                    jcaron @muhammad Umair
                    last edited by

                    @muhammad-Umair 148 mAh is a lot higher than expected, at least on the battery power path. For 30 minutes of operation that means nearly 300 mA @ 5V, that's a lot more. I know the USB power path is less optimised, but that seems really high to me even via USB.

                    Make sure you shut down/deactivate Wi-Fi, BLE, LTE and anything else you're not using.

                    What is the sensor you are using? How much should it draw?

                    Are you using a Pytrack, Pysense or other shield? Any other sensors or devices attached?

                    M 1 Reply Last reply Reply Quote 0
                    • M Offline
                      muhammad Umair @jcaron
                      last edited by muhammad Umair

                      @jcaron Here I have limit of writing only one post per 10 minutes until I have 3 quotes.
                      I am using Fipy with Pysense shield, with temperature sensor DS18S20.
                      I am not using the battery, I have to connect it to my PC. and Yes it draws 300mA current.
                      I am using the code from pycom tutorials, but just adding power_mode parameter. And also not using the receiving code. I am experimenting only with transmission.

                      https://docs.pycom.io/tutorials/networks/lora/lora-mac/

                      1 Reply Last reply Reply Quote 1
                      • M Offline
                        muhammad Umair @jcaron
                        last edited by

                        @jcaron I do not have any problem with current it draws for now. I am just experimenting with the power_modes "Always ON" and "TX_only" but it seems to have no difference at all in power consumption in both the modes but their should be some difference as far I know. I don't know if it should be the case or I have done something wrong.

                        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