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 do i measure the battery voltage?

    Scheduled Pinned Locked Moved Discussion
    battery monitor
    4 Posts 3 Posters 731 Views 3 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
      misterlisty
      last edited by

      Can i just connect the + of the battery to a ADC input(with voltage divider). Any done this before? I'm using the pysense, pytrack boards but i assume this doesnt matter.

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

        @misterlisty Sure, you can. Please keep in mind that the voltage divider draws current too, so use high resistor values. If you go for e.g. 330kOHm + 100kOhm, the current drawn is about 10µA. Soi better go for even higher values. Also, add a capacitor of ~10nF between the ADC input and GND, to keep the dynamic impedance low for the measurement cycle.

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          misterlisty @robert-hh
          last edited by

          @robert-hh thank you

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

            @misterlisty If you are using a Pysense or Pytrack you don't need to use the ADC input or add a voltage divider. That's already done on the board, and you can read it using the read_battery_voltage method of the relevant library.

            I think it's also more accurate that the ESP32 ADC, though I haven't really compared them.

            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