Measure Temperature Accurately with your PICO and the LM35 Temp Sensor

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

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

  • @robingeorge6672
    @robingeorge6672 หลายเดือนก่อน +1

    I'm a beginner in electronics, and I'm trying to understand where the value 0.00005 comes from in the code for converting the ADC reading to voltage on the Raspberry Pi Pico. The calibration offset is 550mV, and I calculated the step size as 3.3V/4096 = 0.000805 and can be rounded off as 0.0008, but I still don't understand how that specific value 0.00005 was derived. Please correct me if I'm wrong and clarify this for me.

    • @MakingStuffwithChrisDeHut
      @MakingStuffwithChrisDeHut  หลายเดือนก่อน +1

      Good morning robingeorge6672,
      While reading your question I recalled that .00005 value used as a constant. I looked at the source code to confirm, then I looked through my notes for that story. I cannot recall anything to indicate why that value was used. What is even more concerning is how I got correct temperature readings with that value. The difference between .00008 and .00005 would have a very large impact (13.4 C) on the output.
      Thank you for bringing that to my attention! I will have to update the source code and retest the results in an actual circuit.
      THANK YOU!
      Cheers!
      Chris

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

    I’ve watched many of your videos and learned much. Thank you.

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

      Hi Stephen, Thank you for being part of this community and for sharing your appreciation! Very much appreciated.
      Cheers!
      Chris

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

    Very professional videos Chris very accurate and well explained.

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

      Hi D Mark, thank you very much for the kind words! Very much appreciated.
      Cheers!
      Chris

  • @quaternion-pi
    @quaternion-pi ปีที่แล้ว +3

    Well explained, useful concise project. Have you considered sending the temp data via wifi to an MQTT broker (possibly running on a regular RPi) and either node-red or a web server (also running on the regular RPi) to graph the data on a web page and even store it in a database? A much bigger project for sure with lots of moving parts to master. You have a great teaching style and thoughtful content, thanks!

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

      Hi Quaternion, Thanks for the feedback, suggestion and kind words!!! Very much appreciated. I have a temp/humidity data logger in the works right now that sort of fills the bill. It is not as grand as you are suggesting but it should be a good starting point for more IOT type projects and videos. Thanks again!
      Cheers!
      Chris

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

    just perfect like your all other vidoes.

  • @ritgup2002
    @ritgup2002 2 หลายเดือนก่อน

    i am having difficulty in reading the data i used the same code and same hardware
    my reading are in range of 0.1-0.3 degrees Celsius
    please help Chris

    • @MakingStuffwithChrisDeHut
      @MakingStuffwithChrisDeHut  2 หลายเดือนก่อน

      Unfortunately it is pretty hard to diagnose a problem when the only thing you are provided is the symptom you experience.
      Check your wiring (most often the problem).
      Check your connection to PICO (easy to miscount pin numbers)
      Sensor could be bad (depending on source, frequent cause)
      If you typed in the code, double check it ( very frequently the cause)
      Certainly possible, something is wrong in the code I posted.
      Chris

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

    Another great building block tutorial, thank you!
    Please take this as the genuine feedback that it is: I found the green circle around your cursor distracting due to the other code under it being partially obscured. I also wouldn't mind the code font size to be increased a bit - but I am using a notebook (and old eyes!) and maybe others don't see a problem. Thanks again, please keep these up.

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

      Hi C G, Thanks for the feedback, suggestion, and kind words, VERY MUCH APPRECIATED!. Regarding your request I have a temp/humidity logger project in the works and will be out around early summer I think.
      Cheers!
      Chris

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

      Thonny has increase fontsize option in the menu, also the shell can be replaced with a movable shell, use tools/open system shell, but to run a file you will need to import it e.g. for demo.py then do import demo

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

      @@jyvben1520 Hi Ben, I think I need to leave the settings large all the time and stop switching back and forth. I noticed the font size not getting back to the "video size" several times now. Just too darn many things for me to keep track of when filming 🙂
      Cheers!
      Chris

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

      @@MakingStuffwithChrisDeHut would destroying the config file help ?

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

      @@jyvben1520 Ha, probably, but I think I will save that as a last resort!

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

    I've been using the DHT22 units. They occasionally return readings that are not consistent with previous readings (many degrees different). I read at one per minute. I'm trying to control the temperature in a greenhouse with a Raspberry pi 3B+. If I replaced the DHT22 with the Pico and LM35 "talking" to 3B+, it might solve a problem I have with the DHT22.

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

      Hi William,
      It might, but I have found most of these digital temp sensors can be a bit wonky at times. I have resorted to averaging in some other applications and that has smoothed things out there. Keep us posted on what you find if you get around to trying it.
      Cheers!
      Chris

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

      @@MakingStuffwithChrisDeHut I've thought about using a low pass filtering average. With either kind of averaging, it would take some time. I've read that less than 5 seconds between readings on a DHT22 is a problem. Instead of one reading per minute, it would mean multiple readings per minute to get an average.

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

      @@WilliamBurlingame Are you looking to get readings every minute for your project and then perform an action on that?

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

      @@MakingStuffwithChrisDeHut Yes that's what I do. I think I may start a thread to take a reading every 5 seconds and maintain an average during the one minute interval for the main loop to act on. I will still discard and not include any readings that are very inconsistent in the average calculation.. I'm trying to control the temperature in a small greenhouse.

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

      @@WilliamBurlingame Being that temperature changes slowly, is it really necessary to sample the data that quickly? I might be missing something so forgive my questions.