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

    Mini 5+ and DHT21 sensor

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    6
    33
    1.5k
    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.
    • oc_geekundefined
      oc_geek
      last edited by oc_geek

      I've configured a DHT21 sensor on the Mini 5+
      M308 S10 P"spi.cs1" Y"dht21" A"Chbr Temp [C]" ; Set DHT21 for chamber temp
      M308 S11 P"S10.1" Y"dhthumidity" A"Chbr Hmdy [%]" ; Set DHT21 for chamber humidity

      it is connected to the TEMP DB header for GND/3.3V and SPI2.CS1

      However it reads 2000 C and 2000 %

      86142ba8-9e3d-4160-886b-5eded04b3110-image.png

      1117d41a-acce-4ca0-8d51-beda98e51ff2-image.png

      1 Reply Last reply Reply Quote 0
      • pkosundefined
        pkos
        last edited by

        I haven't tried that on my mini 5+ yet, but are you sure it shouldn't read spi2.cs1 in your M308? You only have spi.cs1.

        Also - make sure you have the newest firmware (3.2.2). 3.2 had a regression bug that caused DHT2x to not work and show 2k all the time.

        Voron 2.4 (Duet 3 6HC + 3HC standalone), Voron SW (Duet 3 mini 5+ standalone), Voron Trident (Duet 3 mini 5+ standalone), Voron 0.1

        oc_geekundefined 1 Reply Last reply Reply Quote 0
        • oc_geekundefined
          oc_geek @pkos
          last edited by

          @pkos i thuoght SPI2.CS1 too but it tells me it does not exists... naming are a bit ...naive

          1 Reply Last reply Reply Quote 0
          • pkosundefined
            pkos
            last edited by

            Ah right. Then check 3.2.2 - it fixes the DHT problem 🙂

            Voron 2.4 (Duet 3 6HC + 3HC standalone), Voron SW (Duet 3 mini 5+ standalone), Voron Trident (Duet 3 mini 5+ standalone), Voron 0.1

            1 Reply Last reply Reply Quote 0
            • oc_geekundefined
              oc_geek
              last edited by oc_geek

              no it does not fix the issue 😠 🙇 👎

              4b89c80c-9a7f-4ed3-bfa3-b30daae70d26-image.png

              e6c4828d-9947-4a49-bbf2-c8950bddc994-image.png

              1 Reply Last reply Reply Quote 1
              • pkosundefined
                pkos
                last edited by

                I'll be working on my mini 5+ tomorrow. If nobody gives you any good hints before then I'll take a look to see if I can get the DHT to run.

                Voron 2.4 (Duet 3 6HC + 3HC standalone), Voron SW (Duet 3 mini 5+ standalone), Voron Trident (Duet 3 mini 5+ standalone), Voron 0.1

                oc_geekundefined 1 Reply Last reply Reply Quote 0
                • oc_geekundefined
                  oc_geek @pkos
                  last edited by

                  @pkos thanks !

                  1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators
                    last edited by

                    I confirm that there appears to be a problem with DHT sensor support on the Duet 3 Mini. I have configured a DHT22 on pin spi.cs2. I can see the firmware requesting a reading and the sensor responding, but it looks like the firmware isn't picking up the response.

                    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

                    1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators
                      last edited by

                      I found the problem. The spi.cs# pins on the 3 Mini don't support interrupts. I am looking for alternative pins to use.

                      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

                      1 Reply Last reply Reply Quote 0
                      • oc_geekundefined
                        oc_geek
                        last edited by

                        ok thanks... will be then the third time i redo the connector LOL

                        1 Reply Last reply Reply Quote 0
                        • dc42undefined
                          dc42 administrators
                          last edited by dc42

                          The solution will be to connect the DHT sensor to one of the 5-pin IO connectors. The signal wire will need to be connected to both the iox.in and iox.out pins. The Vcc and ground pins can be connected to 3v3 and GND on the same connector. The firmware support will be in RRF 3.3beta1, due to be released shortly.

                          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

                          1 Reply Last reply Reply Quote 0
                          • oc_geekundefined
                            oc_geek
                            last edited by oc_geek

                            ohh great that's where it was before... damn cut again and rewire

                            So i have to Y the signal to BOTH in and out pins ?

                            @dc42 and the configuration in firmware what pin would it call in
                            Sxx P"..." ?

                            P.S. I think you would concur that this a pretty weird wiring setup... wonder how come the cs pins are as they are...

                            thanks

                            1 Reply Last reply Reply Quote 0
                            • dc42undefined
                              dc42 administrators
                              last edited by

                              The issue is that on the MCU used in the Duet 3 Mini, only some pins have a pin change interrupt facility. We assigned the available interrupts to input pins. However, the input pins have a 10K series resistor to make them tolerant of high input voltages, so they can't be used as outputs in this application.

                              The configuration line you will need is this or similar:

                              M308 S10 P"io4.out+io4.in" Y"dht21" A"Chbr Temp [C]" ; Set DHT21 for chamber temp
                              

                              I have this working now.

                              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

                              MikeSundefined 1 Reply Last reply Reply Quote 0
                              • oc_geekundefined
                                oc_geek
                                last edited by

                                wow in + out LOL would never have thought about that

                                my wires are ready !

                                7a071397-3f4e-43fa-a014-3383c3bb92c5-image.png

                                thanks

                                1 Reply Last reply Reply Quote 0
                                • dc42undefined
                                  dc42 administrators
                                  last edited by

                                  This is now released, see https://forum.duet3d.com/topic/21597/reprapfirmware-3-3beta1-now-available.

                                  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

                                  oc_geekundefined 1 Reply Last reply Reply Quote 0
                                  • oc_geekundefined
                                    oc_geek @dc42
                                    last edited by

                                    @dc42 Thank you for the prompt feedback. Will check it out, test and report back

                                    1 Reply Last reply Reply Quote 0
                                    • MikeSundefined
                                      MikeS @dc42
                                      last edited by

                                      @dc42 just to clarify the daughter board cs pins can be used if 10k resistor is unsoldered and pads are bridged? or all daughter board cs pins can't handle interrupts?

                                      oc_geekundefined 1 Reply Last reply Reply Quote 0
                                      • oc_geekundefined
                                        oc_geek @MikeS
                                        last edited by

                                        @MikeS which daughter board do you ref to ?

                                        MikeSundefined 1 Reply Last reply Reply Quote 0
                                        • oc_geekundefined
                                          oc_geek
                                          last edited by oc_geek

                                          @dc42 said in Mini 5+ and DHT21 sensor:

                                          M308 S10 P"io4.out+io4.in" Y"dht21" A"Chbr Temp [C]"

                                          tested with Rel 3.3 Beta 1

                                          it is working now, thanks

                                          b3ab2f83-07da-4a63-bf26-acd90741ba44-image.png

                                          A Former User? 1 Reply Last reply Reply Quote 0
                                          • MikeSundefined
                                            MikeS @oc_geek
                                            last edited by

                                            @oc_geek i thought you were using the daughterboard connection for the DHT which is made to be used with this: https://duet3d.dozuki.com/Wiki/PT100_temperature_sensor_daughter_board. Now i saw that you used the 12864_EXP* one. I don't understand if all expansion / daughterboard SPI pins can't use interrupts, or maybe some have it but they have the 10k resistor. In the second case the resistor could be unsoldered and, with the pads bridged, only one pin used for I/O.

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