🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Analog Read gives wrong value.

    Scheduled Pinned Locked Moved Atom
    3 Posts 2 Posters 6.2k Views 1 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
      mwtheplumber
      last edited by

      I am running a sketch on an ATOM Lite using GPIO 33 as an analog read pin. When connected to 3.3V (which actually measures 3.18V) it gives 4095 as expected. If connected to GND it gives 0 as expected. However if the voltage on GPIO33 is 3.11V it still shows 4095.

      By my maths at 3.11V it should show 4004.

      Any help appreciated.

      1 Reply Last reply Reply Quote 0
      • R Offline
        robalstona
        last edited by

        The adc readings is non linear at both ends of range (flat). So you can't measure voltage below ~0.17V and under ~3.15.
        Below is link with explain
        https://randomnerdtutorials.com/esp32-adc-analog-read-arduino-ide/

        1 Reply Last reply Reply Quote 1
        • M Offline
          mwtheplumber
          last edited by

          Thank you very much for your reply. Very helpful.

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