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

    Mini 5+ and DHT21 sensor

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    6
    33
    1.6k
    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

      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
                    • oc_geekundefined
                      oc_geek
                      last edited by oc_geek

                      no i do not use any Temp DB as the mini 5+ has direct support for DHT21

                      i was using the Temp DB plug to get the cs pin but it doesn't work so..

                      now I'm using the IO4 5 pin receptacle and with the Y cable (in and out bridged to signal) it works (with rel 3.3 beta1)

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

                        @MikeS the SPI appears to do not support interrupts, yes

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

                          @dc42 I have to report that it seems there are still some issues in the Rel 3.3 Beta 1
                          as by time to time the sensor reports 2000*C , not sure if there are better fixes in the works..

                          0c46f0ca-9cb3-40e2-a4e1-c6859a00ba8a-image.png

                          ..it MIGHT be related to the fact that the steppers go in stand by...but not sure really... it either works very well or read 2000*C

                          it is doing it all the time...

                          e0555021-a4f4-4edb-8650-40f3113d2a8c-image.png

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

                            now she is printing and the sensor appears fine ... weird really werid ....

                            4400bd62-96de-4758-b082-d70d8f79db14-image.png

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

                              Are you using shielded cable to connect the DHT21? The one-wire bus is sensitive to noise (like I2C) so if you use unshielded cable then it is very likely to pick up interference from any stepper motor cables that it runs close to.

                              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 oc_geek

                                @dc42 nothing related to interference sorry

                                the issue appears it seems when the printer is resting. No prob when it is printing it has been 3 hours and not a single glitch ... something in the FW isn't right; the issue present itself at rest status

                                ac23cf56-bfc2-4039-bf4a-f2a5821e6f0b-image.png

                                Will an external feed of 5V DCC make a difference ?
                                It seems something changes when the board is resting...

                                This is what happens after a print of 7h with zero problems with the sensor...
                                ...print finishes and there it is the sensor goes crazy...again...

                                87ecca7d-bc38-42fb-9799-40dfd12686c6-image.png

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

                                  @oc_geek said in Mini 5+ and DHT21 sensor:

                                  Will an external feed of 5V DCC make a difference ?
                                  It seems something changes when the board is resting...

                                  I doubt that providing external 5V power will make any difference. I don't have a DHT21, but I have a DHT22 that I can leave attached to an idle Duet 3 Mini to see if I get any temperature jumps.

                                  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 2 Replies Last reply Reply Quote 0
                                  • oc_geekundefined
                                    oc_geek @dc42
                                    last edited by

                                    @dc42 thanks. Yes please if you can that would be really appreciated.
                                    It's a pity because in print time it is rock solid and works great

                                    I'll try the 5V external power too; it does not hurt and i'm rotating the PSU as i made a more solid bracket

                                    thanks for keeping me posted

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

                                      @dc42 it appears that adding the external 5V DCC EXT power actually solved the glitches.
                                      Yesterday it was fine all day
                                      and i'm just out of a 17hours night print and it seems fine again.
                                      I hope that's how it stays 🙂
                                      thanks

                                      9817a746-a9b0-4d1c-982e-4af386f1ef9d-image.png

                                      and again later 2h all seems fine

                                      9c6b54b7-60ad-4cae-9296-2ad3f2d9eb04-image.png

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

                                        That's interesting, I didn't expect it to make any difference.

                                        I powered up a Duet 3 Mini yesterday and left it idle all day, and I didn't see anything unusual about the DHT22 readings or the temperature graph that they were displayed on.

                                        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 don't know...however now it works very well
                                          It might be that my Duet 5+/2+ is fully loaded (i used all connectors)

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

                                            @oc_geek said in Mini 5+ and DHT21 sensor:

                                            @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

                                            What command do you use to get the humidity?

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