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

    INPUT ADC values and OUTPUT voltage

    Scheduled Pinned Locked Moved SiPy
    gpiosipy
    4 Posts 3 Posters 21 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
      Meric NESSANGE
      last edited by

      Hi there,
      3 noob questions about GPIO :

      • Voltage range of the ADC seems to be 1.1V, and can be extended to 3.3V playing with attenuation, right ?
      • What is the given values by the read method (val = apin()) : Is it from 0 to 1023, as an arduino ? Is it directly in mV ?
      • What is the output Voltage when output.value(True) ?

      I dont find these information in the manual...
      Thanks.

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

        @Meric-NESSANGE https://docs.pycom.io/firmwareapi/pycom/machine/adc/

        • Yes
        • You have functions to get either the raw value or the voltage directly

        https://docs.pycom.io/firmwareapi/pycom/machine/dac/

        • setting to 1 will provide 3.3V

        Note that the ADC at least is not very precise and quite noisy. Depending on your needs an external ADC may be a better idea.

        1 Reply Last reply Reply Quote 0
        • M Offline
          Meric NESSANGE
          last edited by Meric NESSANGE

          @jcaron Hi, and thanks for answer.
          OK, both are possible, I missed it ^^
          If I read with adcchannel.value() (so, not in mV), do you know the max value (or the value of 1 step) ?
          For the output, I use the digital way : a = machine.Pin('P2', mode = Pin.OUT)
          => Is the voltage is also 3.3V ?
          => Is the acceptable current draw is the same ?

          @jcaron said in INPUT ADC values and OUTPUT voltage:

          Note that the ADC at least is not very precise and quite noisy. Depending on your needs an external ADC may be a better idea.

          Wow.
          Worse or better than an arduino? Or the same order of magnitude ?

          Thanks

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            livius @Meric NESSANGE
            last edited by

            @Meric-NESSANGE said in INPUT ADC values and OUTPUT voltage:

            Worse or better than an arduino? Or the same order of magnitude ?

            If your arduion use ESP32 then the same.
            If you use digital output then it should be near max voltage 3.3.

            For the input read the docs, especially bottom green frame
            https://docs.pycom.io/firmwareapi/pycom/machine/adc/#app

            think about people first, then computers

            1 Reply Last reply Reply Quote 1

            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