Это видео недоступно.
Сожалеем об этом.

Read the analog world: Use ADC's on Pi Pico

Поделиться
HTML-код
  • Опубликовано: 22 сен 2022
  • I explain how the principle (SAR) of the ADC (Analog Digital Converter) works in the Pi Pico. For this I use examples in Micropyhton for usw of ADC, temperature read out and how to read the V_SYS voltage. And i explain the electronics.
    In addition, I explain the limitations of the RP2040 used and the circuit on the Pi Pico. This is followed by examples of using a free ADC as well as the temperature and the V SYS voltage on the Pi Pico Board. Also i explain how to adjust the ADC reference voltage.
    -------------------------------------------------------------
    Tools i use:
    Wires: amzn.to/3Etm4Nl *
    bread board kit: amzn.to/3PvUTrk *
    LED set : amzn.to/3P94pzo *
    transisotrs: amzn.to/44LrEVZ *
    Pi Pico W: amzn.to/467nAR3 *
    *affiliate link
    ---------------------------------------------------------------

Комментарии • 23

  • @TOMTOM-nh3nl
    @TOMTOM-nh3nl 9 месяцев назад

    Thank You

  • @coderdojoAN
    @coderdojoAN Год назад

    Great content. Keep up the awesome work Lutz!!!!! Very well done mate.

  • @iblocstudios5563
    @iblocstudios5563 Год назад +1

    great video man nailed it the camera switching had a bit of delay and the lighting changes per camera switch but thats the only thing really

    • @lutz4tech
      @lutz4tech  Год назад

      Thanks a lot. It was a Lot of work, the 2 cameras are sadly hard to snyc in the coloring, because one ist just the Smartphone ;-)

  • @heighRick
    @heighRick Год назад

    Thanks for the video, helps a lot!

    • @lutz4tech
      @lutz4tech  Год назад

      Thanks for your Feedback 😀

  • @mahadotube
    @mahadotube Год назад +1

    20°c is still cold, at that temperature I'll be very heavy clothed.

    • @lutz4tech
      @lutz4tech  Год назад

      Hehe, erveryone has his own feelings for hot and cold 😂😂😂

  • @lbs4you
    @lbs4you Год назад

    i will do it, this way
    import machine
    import utime
    sensor_temp = machine.ADC(4)
    temp_arr = []
    def sysTemp():
    for x in range (0,20):
    conversion_factor = 3.3 / (65535)
    reading = sensor_temp.read_u16() * conversion_factor
    temperatur = 27 - (reading - 0.706)/0.001721
    temp_arr.append (temperatur)
    temperatur_result = sum(temp_arr) / 20
    return (temperatur_result)
    systemperatur = sysTemp()
    print (round(systemperatur,2))
    how can i read VSYS in code ? så i can finde 3.3V is true ?

  • @muf
    @muf Год назад

    You look like rick sanchez, billy bob thornton and Sam Rockwell. Thanks will watch again.

  • @juanzubi4762
    @juanzubi4762 Год назад +1

    Thanks por the explanations, they are clear and very interesting. Question: What is the aprox input impedance of the ADC channels in order to take into account when using resistive divisors with greater values than used in the examples?

    • @lutz4tech
      @lutz4tech  Год назад

      Thanks for your Feedback, i'm glad you like the Video.
      Also your question is very interesting: it should be something arround 1 meg Ohm or more. As a hint for V SYS they use 100k and 200k divider on the Board an i get aprox 5V. So ist Looks Like it works even with thos high values.
      But to be Sure i will Look it Up in the Datasheet, If ist defined (Not Always the case) i will Post it.

  • @andreasgerth3654
    @andreasgerth3654 Год назад

    All just theory.
    Can you agree on an illustration/description? You mention an anti-aliasing filter several times, and then the circuit diagram mentions a low-pass filter.
    You should be aware of the difference between these two filters if you throw such technical terms around here.
    This circuit is completely unsuitable for measuring an analog input voltage with such a low total resistance, especially if the output current of an analog sensor unit is less than 1 mA.
    And the next mistake in your theory is the assumption that the VRef = PIN 35 is always and exactly 3.3 volts, which you use in the voltage calculation formula.
    Then take a closer look at the circuit diagram, there is already a solution given how to stabilize the VREF on the board via an external reference voltage source. Especially since this voltage, measured at 3.25 V at PIN35, is also dependent on other switching loads (GPIO output uses).

    • @lutz4tech
      @lutz4tech  Год назад

      Thanks for your Feedback.
      This Video gives a start Point, for thos how are interessted. Yes you can do other Things but
      I don't get, how would you build Up a real world anti aliasing Filter If not with a Low Pass? So low Pass Filter is the structure anti alias is the function, whats wrong with it in your Optionen?
      All i explained ist for voltage measuring. If you have a Sensor with with current Output you need to Transform you current into a voltage and adapt the circuit.
      Well Show me system concept where you have a SW with one ADC, where you don't give a fixed ref voltage .

    • @andreasgerth3654
      @andreasgerth3654 Год назад

      @@lutz4tech The basic mistake, as the video begins, is that you assume a VRef that you have not checked yourself. The topic is only considered at the end of the video when it comes to this so-called temperature sensors. Okay Temperatures can be measured analogously with a NIC, but who still does that today? There are better and more reliable methods. That only marginally.
      If you don't want to or can't carry out a self-measurement of the VREF because the circuit is exposed to external influences, you use special components called reference voltage sources, then of course you have to enter this value for a voltage calculation, but this is then not subject to the influencing factors to the same extent .
      At the latest when several GPIOs are used as an output in the application in order to also switch loads, which may also be timer-triggered, e.g. contain an LED flashing function, then you will quickly notice that you cannot get any further with this internal VRef. It would be better to refer to the circuit diagram, where solutions in this regard are already mentioned. Whether this or an alternative solution of external feeding a VRef is an open question.
      On the question of what or how to use filters. For this purpose you will find, among other things, in the data sheets of the OPVs from the company Microchip MCP6002 / MCP6021 and other OPVs types sufficient material for the same reconstruction without having to carry out large calculations. Then refer to Filter!LAB from Microchip.
      On the subject of passive filters, here the capacitor capacitance plays a co-determining role. It probably won't be the factor with a 12-bit resolution / 16-bit interpolated, but passive filters always lead to a minimal shift / falsification of the nominal voltage.
      It probably doesn't matter here either, because you won't be able to get such an accurate OneShot (single measurement) with the Pico that accurately without a lot of effort. Here only considers the part, how exactly did I approach the actually applied voltage with a single measurement process.
      Finally, a word about the voltage divider. The total current flowing through a voltage divider is the same at all points in a series circuit. It's so.
      So when using sensors or other systems outputting analog voltages, the voltage divider over the total resistance to ground should never draw / consume more current than what this unit can supply, otherwise there will be a massive distortion of the output voltage.
      This can be calculated using Ohm's law.
      However, here is also the counterpart. If the total resistance of the voltage divider increases (transformation ratio remains the same), the measuring current decreases. This is good for the sensor, because it has to provide less measuring current.
      But as the total resistance increases, so does the susceptibility to interference.

    • @lutz4tech
      @lutz4tech  Год назад

      @@andreasgerth3654
      Your Points are right in some perspectiv but giving people a start Point thats to much and the wrong was in my Point of View. No one Cares about the Last Bit in a diy approch.
      To use a Diode as Temperatur measuring is Industrie Standard and used many Millionen Times as Long as you don't need it extremly ecaxt, beacause its cheap and it works ;-) also this is Part of the Datasheet. And to measure IC temperature its Standard on the only way it works.
      By the way quickly thought about your 1ma Sensor. Remeber the internal Résistance of your ADC. Thats the reason way the divider is some kOhm, which is also Industrie Standard.

  • @TanjoGalbi
    @TanjoGalbi Год назад

    What makes it a free ADC? If you mean free as in you don't pay for it then you are wrong! You pay for the Pico and it's part of the Pico. If you mean free as in available to use, that goes without saying. You do not need to specify it's free in that sense because its purpose is to be used by the user so it's bound to be available!

    • @lutz4tech
      @lutz4tech  Год назад +1

      You have 5 Signals available at the mux, 1 is used for Temperatur intern used, 1 on the Pico for VSys, 3 are free to use. So ist makes Sense in the context of the Video, If you Just Jumpe to a time without seeing the rest you May Not Unserstand the context.

    • @TanjoGalbi
      @TanjoGalbi Год назад

      @@lutz4tech So, it's 'free' as in 'available'. That does not change what I said though. The ADC's are available because they were designed to be, so specifying 'free' in the title is totally unnecessary unless you want people to mistake 'free' to mean costing nothing but that would make you dishonest!
      It's got nothing to do with context either because I provided both possible context uses of the word 'free'.
      BTW, considering the word free in the title is my only criticism you can take solace in the fact that I still found the video informative. 🙂

    • @lutz4tech
      @lutz4tech  Год назад

      @@TanjoGalbi i will double check this may i'm wrong with my understandig of the word "free" in my nativ langue the meaning of "available" and "free" is so close that ist doesn't make a differenz in this Case.
      But to make it clear i don't mean free of cost, i mean that it's not reversed for an other usage.
      Thanks for your Feedback know i Unserstand your point better 😉

    • @lutz4tech
      @lutz4tech  Год назад

      After some discussion with my english teacher, i changed the Title 😉 Thanks for the hint! This different was complete new to me.

  • @zoeyzhang9866
    @zoeyzhang9866 Год назад

    Nice explanation! Don't know if any PCB services are needed for your upcoming content, if so, would love to sponsor and achieve any coopeation together! (PCBWay zoey)

    • @lutz4tech
      @lutz4tech  Год назад

      Thanks for your Feedback. Please send me your contact data to Lutz.ebtec@gmail.com. I have different projects on the Roadmap, and i also plan some videos about PCB design training for next year.