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

    How to read the battery level of a Pytrack/Pysens

    Scheduled Pinned Locked Moved Discussion
    pysense batterypytrack batterypysensepytrackbattery monitor
    9 Posts 6 Posters 1.3k Views 6 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.
    • G Offline
      Gaby
      last edited by

      I am trying to read the battery level (between 0 and 100%) of the LiPo battery connected to my pytrack/Pysens trough the Jst connector. I didn't find how to do it. I managed to read the battery voltage but not its level (remaining charge).
      Can anyone help me put with that?

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

        @gaby actually not. Witz the XxPy, you can only read the voltage, tust allows only a rough estimate on the charge level of a typical battery. The best you can get is a warning, if the battery is almost empty, by montoring the voltage change. If it starts to decrease fast after bring almost constant for a while, then the battery is almost empy.
        And you have to determine the critical levels by testing.

        G S 2 Replies Last reply Reply Quote 0
        • G Offline
          Gaby @robert-hh
          last edited by

          @robert-hh Thank you for replying! I am a computer scientist, not an electrical engineer so this could be a stupid question but, are there a relation between the battery voltage and the remaining charge? is it possible to calculate the remaining charge of the battery using the current voltage?

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

            @gaby It's a complex question. The voltage is a function of the remaining charge, but also how much current you are drawing.

            All things being equal, the voltage will vary following a curve which starts but dropping relatively quickly, then remain pretty stable for quite a while, then drops again quickly when the battery is becoming empty. However, the exact curve will vary will the load, and if of course you have a variable load, this can be quite messy.

            Here's an example of the curves for various discharge rates for a type of battery:

            0_1552480772355_8NRI8.gif

            The curve can also vary with temperature and probably a few other things.

            If your load and environment is quite stable, you can monitor a battery while it discharges, and then use previous data points to find an estimate of the current charge level, but we aware that it can be quite approximate, especially when you are in the "flat" part in the middle.

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

              @jcaron Please note these curves are drawn for 5C (= 5 times rated capacity in chargecurrent) steps.
              If your application draws less current (say below 1C) you can expect that the dependency of voltage with dischargging current is also less pronounced.
              But anyhow it remains battery and temperature dependent. For discharge currents below 1C the effect of temperature might be more visible than of the discharge current.

              1 Reply Last reply Reply Quote 2
              • A Offline
                andrethemac @Gaby
                last edited by

                @Gaby Hi
                I'm using a Max17043 to read the State of Charge of a LiPo (https://datasheets.maximintegrated.com/en/ds/MAX17043-MAX17044.pdf)
                It uses I2C to get the state. Even wrote a library for it (https://github.com/andrethemac/max17043.py).
                André

                1 Reply Last reply Reply Quote 0
                • S Offline
                  svonbentzel @robert-hh
                  last edited by

                  @robert-hh

                  Hello Robert,

                  Can you tell me the minimum voltage the pycom runs „safe“?? 3.3 Volt or 3.2 Volt?

                  Actually I measure voltage and if battery voltage unter 3.3 I shut down the board.

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

                    @svonbentzel That depends. For the ESP32, the lowest recommended Vcc is 2.3 V. For the voltage regulator, it's 3.0V, for the SX127x of the Lopy's and SiPy it's 1.8 V, for the LTE chip I did not find a data sheet.
                    So, it's 3V

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      svonbentzel @robert-hh
                      last edited by

                      @robert-hh ah ok, thank you for explaining. so I set it to 3.28 V and I am on the safe side ;) thanks

                      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