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

    ADC voltage reference

    Scheduled Pinned Locked Moved GPy
    3 Posts 2 Posters 38 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.
    • L Offline
      lolloz
      last edited by

      Hi to all,

      I'm using a gpy with a pytrack 2 and I'm trying to calibrate it getting the voltage reference to P22. So, I run these commands:

      from machine import ADC
      adc = ADC()
      adc.vref_to_pin('P22')

      but when I go measure the voltage on P22 with a voltmeter I get almost 3V. That is not I expected, should be around 1,1V.

      So, anyone can help me about where I'm wrong?

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

        @lolloz Pytrack 2 uses P21 and P22 as SDA and SCL for the sensors, which means that the have a pull-up resistor connected. And P6 is used by the GPY LTE modem.
        So you cannot use vref_to_pin() in that set-up. Since you need a multimeter anyhow, you can get the calibration value by measuring a known voltage with multimeter and the internal adc, get the default vref and calculate the vref value from ratio of externally to internally measured voltage.

        L 1 Reply Last reply Reply Quote 1
        • L Offline
          lolloz @robert-hh
          last edited by

          @robert-hh thank you so much for your quickly answer.

          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