Raspberry Pi LESSON 25: Measure Temperature and Humidity with the DHT-11 Sensor

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ส.ค. 2022
  • Announcing the Most Awesome Raspberry Pi Lessons of All Times! This time we RUMBLE!
    In this class series, we will be using the most excellent Sunfounder Ultimate Raspberry Pi kit, available here: (Affiliate Link)
    amzn.to/3tSk9Mo
    or for our UK friends, amzn.to/3I5d401
    In this lesson I will show how to use the DHT-11 Sensor to measure Temperature and Humidity on the Raspberry Pi. I show how to connect the sensor, install the DHT-11 library, and then how to code up the system to make and print Temperature and Humidity
    If you want to grab those cool little straight jumper wires I am using to keep my breadboard builds neat and clean you can snag a box of them here:
    amzn.to/36NyfHq
    If you guys are interested in the oscilloscope I am using, you can pick one up here (affiliate link):
    amzn.to/3v13Mhl
    You guys get your hardware ordered so you can follow along at home!
    You will also need a Raspberry Pi. I suggest the Raspberry Pi 4. If you do not already have one, this is the most suitable gear I could find:
    amzn.to/3pBMfKm
    The Raspberry Pi's are sort of pricy right now, so you can look on ebay or elsewhere to see if there are any deals. You will need a SD card. If you do not already have one, this is a good one:
    amzn.to/3KcXTn2
    I like using a wireless keyboard and mouse to have fewer wires. You can certainly use your USB keyboard and mouse, but if you want a nice wireless one, this one works on the pi. We demonstrate this by using a button switch to control a LED.
    amzn.to/36Rv9Sk
    You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:
    / paulmcwhorter
    [Disclosure of Material Connection: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. ]
    #TUTORIAL
    #DHT-11
    #RASPBERRYPI
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    You are the only reason i keep my internet package a live.
    Thank you sir .

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

    I appreciate your graphical schematics. Makes following the wiring easier.

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

    Hello Paul, this was a great lesson I enjoy this RPI tutorials , it is appreciated all your effort. BLESSINGS !

  • @wilsonlittle4833
    @wilsonlittle4833 11 หลายเดือนก่อน

    Thank You! Another GREAT Lesson (this on for the DHT11 sensor). I've used the accumulated knowledge I obtained from your Arduino training to build an environmental chamber that uses a cobbled together chiller (old compressor and chill head) and resistive heater to control the chamber temperature. I switch to a oneWire Dallas Semiconductor temperature probe because I wanted the probe submerged in the glycol. It was however the knowledge and confidence I gain with your help that allowed for such an accomplishment. Thank You, Again! And, Keep up the Great Work...

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

    Thanks for a very clear explanation.

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

    Another great lesson. Short and sweet. Cool that they have a pip library for it. Looking forward to the LCD display next week.
    Thanks Paul for all you do!

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

    Thank you Paul!

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

    Another GREAT video Paul! I always take the time to view them when I get the notifications. I will be able to use the code from a lot of your lessons in my current project for remotely monitoring my RV up in the mountains (600 miles away) over the winter months, I reside in Florida. I have some DS18B20 Temperature sensors up an running, now to add the PIR sensor, temp/Humidity sensors and voltage monitors. I am still trying to get the VPN between the RV Pi to automatically connect to my home network and transfer the data and alerts throughout the day/night. RV has a 24/7 Public AP access. I may still go with collecting all the analog/sensor data on my Arduino Mega2560, saving it to the Pi and having the Pi connect to my home network and update the dB there along with a HDMI display. I will continue to need a LOT of coffee, so far it is a real challenge. A future lesson for you, that all can use is one that incorporates multiple (3,4,5....) DS18B20 sensors, maybe with automatically adding new ones to the existing base. Keep up the GREAT work!

  • @annexgroup6878
    @annexgroup6878 9 หลายเดือนก่อน

    Love This🎉🎉🎉🎉

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

    You are great 👍

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

    Thanks for another great lesson, Paul. I found that my dht11 from the Elegoo Arduino kit did not work with this RPi lesson. It must need 5 volts.

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

    Hi Paul,
    Great lesson as usual. I was searching for information on another tecnical subject on my phone and I was shocked to come across a website that has some of your new fusion 360 and raspberry pi lessons on it. They had lessons 26, 27, and 28, plus a few others of your new raspberry pi series that haven't even released on your youtube channel. This was something that I felt I should bring to your attention. I have the name of the website if you want to check it out.

  • @carol-lo
    @carol-lo 7 หลายเดือนก่อน

    This is so great , i am looking forward having a portable weather station !

  • @mattpollock2105
    @mattpollock2105 4 หลายเดือนก่อน

    Hello Paul, nice video.
    I'm having trouble getting the DHT-11 to work with the Raspberry Pi 5. I know the SunFounder site doesn't include a tutorial for the DHT-11 in the Rpi 5 course, just wondered if you had tried to get the sensor to work on a Rpi 5 at all?
    Thanks

  • @stephenlightkep1621
    @stephenlightkep1621 11 หลายเดือนก่อน

    Thanks Paul! My math skills are to weak to get a 3d printer.

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

    Any changes to the program if a dht22 is used instead of the dht11

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

    Takk!

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

    my christian mother loves your bible study videos!

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

    This is a lesson that covers a topic I've been working in for a while. I have an RPi 3B with a DHT22 in my detached garage. I have the DHT22 housed in a PVC elbow extending outside the garage in a shaded area. I transmit the reading to an RPi 4B via WiFi to an MQTT server running on an RPi 2. The DHT22 is read once a minute. The RPi 4B builds a web page so that It can display the Date, Time, Temperature and Humidity on a Sunfounder 10" monitor in our kitchen. My next project is to use an RPi Pico W to do what the RPi 3B is doing, power it with a battery pack so I can move it to a location where AC power is not available and install it in a Stevenson Screen. I have the Pico version working as a test unit at my desk. The local time and date is available at the World Time APi site. It uses your IP address to provide the local time. I update the RTC on the Pico once a day. I have a problem when I try to power it with a USB battery pack. The Pico W draws such little power that it shuts down after a short time. I've tried more than one battery pack, but they all shut down. The shut down time interval varies, but they do shut down. It looks like I'll have to build my own "battery pack".

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

      Hi William. Maybe you could add a LED and flash it on and off every minute or so to remind the battery pack it is being used... Just an idea...

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

      The new battery packs seem to all do that. We used the old one cell 18650 for small Arduino projects in my classes I taught before Covid and they were only a couple of dollars. Now if you can find them they are $15+.

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

    Paul, are you ever going to do a series of lessons on programming in C per chance? I'm taking intro to C at my university right now and my professor kindaaaa stinks

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

    I think my DHT11 is dead on arrival.
    I can't get valid info from it. If I remove the "if valid" line from the script it reports 0 for temp and 0 for humidity. I have rebuilt the circuit 3 times and rewritten the code as well. Very unfortunate as it looks like it will be required for a future lesson.
    irCrustyLawnchair

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

      Maybe it is a dud. These are fairly easy to damage if they are connected wrong as well. Anyway, inexpensive componet try to find another one.

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

      Bought a pack of 10 more. Same results with three more. I get the very first reading about 10% of the time. If I just let it run, it averages 1% good readings.
      I have multimeter'd all my connections. Re-done the circuit. Rewritten the code. Changed the GPIO pin being used. Changed to a new 3.3v10kout resistor. With and without the resistor. Used a different breadboard. Tried 5v instead of 3.3, "sudo pip3 install dht11" again (also installed from thonny), power cycle the RPi, there is nothing else I can think of.

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

      ok, I used an Adafruit library and am getting about 70% successful readings. not great, but good enough to use for these lessons. Really excited now to try lesson 28 to build a temperature setpoint alarm.

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

      @@billgregg Can you please send the link to the code that you used? I'm having a similar issue with the DHT11 and this code? Was it better on 5v?

  • @Bob-zg2zf
    @Bob-zg2zf ปีที่แล้ว

    The thumbnail says "Premieres in 42 days". Is this a bug? 42??

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

      No, I produce videos ahead. I can produce and release two quality instructional videos a week. I make them ahead of time and realease them one per week as always. It is not easy to switch back and forth between two topics . . . raspberry pi and fusion 360. Each class requires a specific configuration of my studio. So I make a batch of videos on one topic, then reconfigure and make a batch on another topic. Right now I am producing the rapsberry pi videos.

    • @Bob-zg2zf
      @Bob-zg2zf ปีที่แล้ว

      @@paulmcwhorter Thank you for your hardwork.

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

      @@paulmcwhorter Where is your Fusion Videos, the last ones I saw were "learn Fusion 360 or die trying" is there another one?

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

    Impressive. Only 14 lines of code and your reading temp and humidity.

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

    Thank you very much. But there is no such thing as a silly cat video