Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Warning about DHT22 sensors

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    2
    2
    738
    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.
    • dc42undefined
      dc42 administrators
      last edited by dc42

      One of our customers recently reported problems getting a DHT22 sensor working with RRF, even though the sensor worked when connected to an Arduino. We investigated the issue and discovered that the sensor did not conform to the specification of the DHT22 sensor as on the datasheet provided by Adafruit, which is the only (barely!) adequate datasheet I have managed to find on this device. In particular, it does not wait for the end of the START signal before transmitting its data. The reason it worked when connected to an Arduino was because of a lucky break that is not practical to replicate in a real-time system such as RRF.

      The customer's sensor looked materially different from our own. Here is a photo showing the customer's sensor above) and the one we purchased (below). Note that our sensor carries the identification "ADSONG AOSONG AM2302" whereas the sensor from the customer carries no markings at all. Perhaps the customer's sensor is a clone.

      DHT22_sensors.jpg

      When I search for DHT22 sensors on Amazon and eBay, the vast majority of images in the results do carry this part identification; but a few do not and look like the sensor received from the customer.

      Therefore, if you need a DHT22 sensor for your Duet-based system, please make sure to buy a genuine one bearing the correct part identification.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      deckingmanundefined 1 Reply Last reply Reply Quote 1
      • deckingmanundefined
        deckingman @dc42
        last edited by

        @dc42 For the sake of completeness, here is a link to a better data sheet that I found in the ESPhome integration for home assistant.

        https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf

        Note that its "AOSONG..." not "ADSONG".

        For additional completeness, here is a link to the esphome integration which handles all "flavours" of DHT sensors including DHT11, DHT22, AM2302, RHT03, and SI7012 with links to their various data sheets.

        https://esphome.io/components/sensor/dht.html

        Note also that there is a recommendation to use a pull up resistor (about 4k7) between data and 3.3.V - (not sure if Duet users are doing that but I thought I'd mention it in case it helps).

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        1 Reply Last reply Reply Quote 4
        • First post
          Last post
        Unless otherwise noted, all forum content is licensed under CC-BY-SA