Analog (ADC) Inputs on the Raspberry Pi Pico with MicroPython

แชร์
ฝัง

ความคิดเห็น • 25

  • @run4yourlife12
    @run4yourlife12 3 ปีที่แล้ว +2

    Very interesting stuff Brad! I always learn something new with your videos. Can’t wait to learn about controlling the brightness of an LED!

  • @nuggetteam7
    @nuggetteam7 2 ปีที่แล้ว

    Great production quality! subbed!

  • @aem870
    @aem870 2 ปีที่แล้ว

    Good job, clear to understand 💯

  • @hindenberg25557
    @hindenberg25557 3 ปีที่แล้ว

    Concise and helpful! Currently trying to read from a strain gauge that maxes out at 3.5V, so hopefully not damaging the pico.

    • @hensonbl
      @hensonbl  3 ปีที่แล้ว

      Thank you. I think you will be okay, but something to consider is using a voltage divider to limit the voltage being read into the ADC pin.

    • @hindenberg25557
      @hindenberg25557 3 ปีที่แล้ว

      @@hensonbl Thanks for the tip! Also wanted to suggest a video topic if you think others would find it useful. If you are powering the pico from a PI4 or similar via USB, it would make sense to consider also sending/receiving data over USB. There's some forum discussion about it but no decent tutorial that I'm aware of.

  • @user-xx5kw3wt1l
    @user-xx5kw3wt1l 3 ปีที่แล้ว +1

    Nice video !

  • @allthegearnoidea6752
    @allthegearnoidea6752 ปีที่แล้ว

    Great video thanks very interesting and enjoyable

    • @hensonbl
      @hensonbl  ปีที่แล้ว

      Glad you enjoyed it

  • @zz3709
    @zz3709 ปีที่แล้ว

    Why the low end limit of 400? It's this a limitation of the Pico's ADC HW? Or micropython? Or... ?

  • @contextualcoding1884
    @contextualcoding1884 3 ปีที่แล้ว

    awesome!

  • @lastdraco1
    @lastdraco1 3 ปีที่แล้ว

    I like it.

  • @miladiouss
    @miladiouss 2 ปีที่แล้ว

    Can I send the data to a local script to plot the voltage on my PC?

  • @kaggavin1007
    @kaggavin1007 3 ปีที่แล้ว

    Hi Brad, please assist on how to add a command that enables an output GPIO when the voltage(ADC(26)) is above 2.3 V and disables when the voltage is or below 2.2 v

  • @deniszawad
    @deniszawad 2 ปีที่แล้ว

    interesting but at 2.35 in the video you show a misleading representation of the pin 26 location on the pico it would be nice to get abtter appreciaton of the position an an ID of the pin. keep on your good work.

  • @MatthewHarrold
    @MatthewHarrold 3 ปีที่แล้ว +1

    Liked and sub'd. How could I not?

    • @hensonbl
      @hensonbl  3 ปีที่แล้ว

      That's awesome, I'm glad to hear that.

  • @user-xx5kw3wt1l
    @user-xx5kw3wt1l 3 ปีที่แล้ว +1

    from machine import Pin, ADC
    import utime
    POT_Value = ADC(26)
    conversion_factor = 3.3 / (65536)
    while True:
    print(POT_Value.read_u16() * conversion_factor)
    utime.sleep(0.1)
    thanks me later :p

  • @warandv6614
    @warandv6614 3 ปีที่แล้ว

    Could you make a video on how to control LED strips (Red to Violet) using a potentiometer ? Most LED strups are 5V so the 3.3 GPIO output wouldn't work

    • @hensonbl
      @hensonbl  3 ปีที่แล้ว +1

      I will look into doing a video on that. The quick answer is to use a MOSFET with a really low Gate Threshold Voltage. The IRLB8721PbF MOSFET would be a good choice since it has a threshold voltage of 2.35 and it is in a TO-220 package for greater current capability.

    • @warandv6614
      @warandv6614 3 ปีที่แล้ว

      @@hensonbl i see, is there a way to convert the potentiometer input to RGB (x,x,x) values ? think that would be faster considering we already have the ws2812b library

    • @hensonbl
      @hensonbl  3 ปีที่แล้ว +1

      I was thinking about the hardware hookup, and if you are only controlling 30 or less ws2812b LEDs, you could simply use Pin 40 (VBUS) on the pico as the 5V source for the LED strip. As for mapping an RGB value based on a potentiometer input, I don't have a quick and easy solution. You could look at using the matplotlib python library, but I don't know if the pico will support it.
      stackoverflow.com/questions/39357633/how-do-i-convert-a-single-potentiometer-value-to-r-g-b

  • @jyvben1520
    @jyvben1520 3 ปีที่แล้ว

    nice, only 3 typo's, luckily not in the code
    thonny user : print(dir(umachine)) shows all the options or do help(umachine)
    umachine, utime, micropython, rp2, uos or any library name (or part of) you imported,
    e.g. part => I2C, SPI, softI2C, softSPI, Pin, sleep, sleep_ms, const, localtime

  • @caltick
    @caltick 2 ปีที่แล้ว +1

    you should have shown how stable the value is over at least 0.111111 Secs, c'mon man my experience shows it is noisy. secondly how do you get 16 bits from 12 bits, c'mon man

  • @tubeDude48
    @tubeDude48 ปีที่แล้ว

    The conversion factor, (3.3), needs to be adjusted per each board.