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

    Always reading same battery voltage

    Scheduled Pinned Locked Moved LoPy
    lopybatteryadc
    24 Posts 4 Posters 10.8k 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.
    • robert-hhR Offline
      robert-hh @mmarkvoort
      last edited by

      @mmarkvoort The ADC of the esp32 is known to be very bad. If if you apply a perfectly good signal (stable, low impedance), the reading will fluctuate a lot. That's why in the sample code the average is used.
      A capacitor will only help if placed directly at P16. and it must be a low impedance capacitor (ceramic, short leads).

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

        @robert-hh

        Aha, so it isn't me :)
        Thanks, I thaught I did something wrong.

        Does it matter if you have sensors connected to the LoPy?

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

          @mmarkvoort Other sensors do not hurt. When USB is connected, the battery voltage is higher, since it will be charged at that time.
          And yes, if the voltage changes when you touch the connector, then you have a bad connector. By maybe that was just coincidence with the other fluctuations.

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

            @robert-hh

            Oke, will make a test program.

            When USB is connected it indeed has a higher voltage :').
            That was another mistake/issue I had :).

            Thanks a lot, again!

            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
            • 2 / 2
            • First post
              Last post

            Pycom on Twitter

            Pycom