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

    Duet3d DHT 22

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    5
    17
    1.1k
    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.
    • Sotidiiundefined
      Sotidii
      last edited by Sotidii

      Give an example code for DHT22 duet3 ( pi) .Тhanks

      Sotidiiundefined 1 Reply Last reply Reply Quote 0
      • Sotidiiundefined
        Sotidii @Sotidii
        last edited by

        M308 S10 P"io6.in" Y"DHT22" A"t" T? B?
        Don't work ((

        droftartsundefined 1 Reply Last reply Reply Quote 0
        • droftartsundefined
          droftarts administrators @Sotidii
          last edited by

          @Sotidii Move it to an SPI pin and try:
          M308 S10 P"0.spi.cs1" Y"dht22" A"Filament Temp" ; define DHT22 temperature sensor
          M308 S11 P"S10.1" Y"dhthumidity" A"Filament Hum[%]" ; Attach DHT22 humidity sensor to secondary output of temperature sensor

          See P"nnn" parameter for "dhthumidty" section of https://duet3d.dozuki.com/Wiki/Gcode#Section_M308_Set_or_report_sensor_parameters

          Ian

          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

          Sotidiiundefined A Former User? 3 Replies Last reply Reply Quote 0
          • Sotidiiundefined
            Sotidii @droftarts
            last edited by

            Thanks, it works!

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

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • A Former User?
                A Former User @droftarts
                last edited by A Former User

                @droftarts said in Duet3d DHT 22:

                @Sotidii Move it to an SPI pin and try:
                M308 S10 P"0.spi.cs1" Y"dht22" A"Filament Temp" ; define DHT22 temperature sensor
                M308 S11 P"S10.1" Y"dhthumidity" A"Filament Hum[%]" ; Attach DHT22 humidity sensor to secondary output of temperature sensor

                See P"nnn" parameter for "dhthumidty" section of https://duet3d.dozuki.com/Wiki/Gcode#Section_M308_Set_or_report_sensor_parameters

                Ian

                Sorry for entering this thread with a related question, but I didn´t want to open a new one for it:

                RRF3.1.1 running on a duet2ethernet-1.0.4 board

                Which SPI-Pin to use, there are so many:
                32) SPI1_SCK_BE
                33) SPI1_MOSI-B
                34) SPI1_MISO
                47) SPI0...
                48) SPI0...
                49) SPI0...

                Should be one of the MISO ("slave sending to master" - since I guess the board is the "master" and the sensor is the "slave"?)

                (Could not find "0.spi.cs1" on https://duet3d.dozuki.com/Wiki/Duet_2_Pinout_table, https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names_for_Duet_2_WiFi_Ethernet nor https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins#Section_Duet_2_WiFi_and_Duet_2_Ethernet)

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

                  See the Duet 2 wiring diagram at https://duet3d.dozuki.com/Wiki/Duet_Wiring_Diagrams. You can use any of the following pins:

                  On the daughter board connector (if you don't have a daughter board plugged in to it): SPI0_CS1, SPI0_CS2, CS3, CS4

                  On the expansion connector (if you don't have a DueX connected): E2_STOP, E3_STOP, E4_STOP, E5_STOP, E6_STOP

                  On CONN_LCD: ENC_A, ENC_B

                  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

                  A Former User? 2 Replies Last reply Reply Quote 0
                  • A Former User?
                    A Former User @dc42
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • A Former User?
                      A Former User @dc42
                      last edited by

                      @dc42

                      Thanks so much!

                      I mixed it up with "expansion" then! It is referring to "TEMP DAUGTHERBOARD" where there is a " 3) SPIO_CS1 ", guess that´s the one then! Thanks!

                      Now I connected it here, but still cannot get a signal:
                      cs1 3v3 gnd .jpg

                      The code snippets in my config.g is actually just copied out of the g-code-reference:

                      M308 S10 P"0.spi.cs1" Y"dht22"       A"Filament Temp"    ; define DHT22 temperature sensor
                      M308 S11 P"S10.1"     Y"dhthumidity" A"Filament Hum[%]"  ; Attach DHT22 humidity sensor to secondary output of temperature sensor
                      

                      Did I choose the wrong pins, or do I miss anything in the config.g?

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

                        Test whether your M308 commands are accepted, either by running them from the console of by running M98 P"config.g".

                        As you are running on Duet 2 you should use pin name "spi.cs1" not "0.spi.cs1".

                        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

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

                          @dc42

                          As usual - thanks! That was it!

                          changed to:

                          M308 S10 P"spi.cs1" Y"dht22"       A"Filament Temp"    ; define DHT22 temperature sensor
                          M308 S11 P"S10.1"     Y"dhthumidity" A"Filament Hum[%]"  ; Attach DHT22 humidity sensor to secondary output of temperature sensor
                          

                          and now it works 🙂

                          All nicely now in the monitor:
                          Bildschirmfoto 2020-11-09 um 15.52.32.png

                          (As a noob I am a little bit confused why with duet2 the "0." had to be deleted - hope the duet-team finds time to improve the explanation for beginners like me on the RRF3.x pin-structure and wording. For me it would maybe be nice to use the schematic https://d17kynu4zpq5hy.cloudfront.net/igi/duet3d/4k56ZjaaAHrTJI6Z.huge and add next to or replace the wording with the new pin-names in RRF3.x I know that is quite some work but maybe someone can help out?)

                          dc42undefined 1 Reply Last reply Reply Quote 0
                          • dc42undefined
                            dc42 administrators @A Former User
                            last edited by dc42

                            @LB said in Duet3d DHT 22:

                            As a noob I am a little bit confused why with duet2 the "0." had to be deleted

                            The "0." part is the CAN address of the board, with 0 being the address of the main board. As the Duet 2 doesn't support CAN, it doesn't need a CAN address.

                            On Duet 3 you can leave out the "0." and it will default to the main board.

                            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

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

                              @dc42 said in Duet3d DHT 22:

                              @LB said in Duet3d DHT 22:

                              As a noob I am a little bit confused why with duet2 the "0." had to be deleted

                              The "0." part is the CAN address of the board, with 0 being the address of the main board. As the Duet 2 doesn't support CAN, it doesn't need a CAN address.

                              On Duet 3 you can leave out the "0." and it will default to the main board.

                              Thanks so much!

                              Can we/I add this bit of info in the wiki like:
                              "boards prior to duet3 that can also run RRF>=3 have to omit "0." because these boards do not support CAN and do not need a CAN-address."

                              -> I have now 2 dht22 running successfully: 1 for the printchamber, 1 for the filamentbox. Do you plan to support up to 2 dht´s on the new duet3mini? There is an expansion port for the temp-daughter-boards, and since that is using spi...

                              Phaedruxundefined 1 Reply Last reply Reply Quote 0
                              • Phaedruxundefined
                                Phaedrux Moderator @A Former User
                                last edited by

                                @LB said in Duet3d DHT 22:

                                Can we/I add this bit of info in the wiki like:
                                "boards prior to duet3 that can also run RRF>=3 have to omit "0." because these boards do not support CAN and do not need a CAN-address."

                                Where in the wiki would you like to see this?

                                Z-Bot CoreXY Build | Thingiverse Profile

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

                                  @Phaedrux said in Duet3d DHT 22:

                                  "boards prior to duet3 that can also run RRF>=3 have to omit "0." because these boards do not support CAN and do not need a CAN-address."

                                  Thanks so much for coming back to it 🙂 , maybe here

                                  https://duet3d.dozuki.com/Wiki/Gcode#Section_M308_Set_or_report_sensor_parameters

                                  (there was no dedicated site that I could find with "https://duet3d.dozuki.com/Search?query=dht") :

                                  Maybe it even could be more general like:
                                  "boards without can-bus that run RRF>=3 have to omit "0.", since it would imply the can-address" or somthing similar...

                                  (I am running now:

                                  M308 S10 P"spi.cs1" Y"dht22"       A"Chamb Temp"     ; define DHT22 temperature sensor
                                  M308 S11 P"S10.1"   Y"dhthumidity" A"Chamb Humid[%]" ; Attach DHT22 humidity sensor to secondary output of temperature sensor
                                  

                                  and it works nice)

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

                                    BTW we already allow a redundant "0." prefix to be used in front of drive numbers on Duet 2. I will probably allow the same for port names in a future release.

                                    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

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

                                      @dc42 said in Duet3d DHT 22:

                                      BTW we already allow a redundant "0." prefix to be used in front of drive numbers on Duet 2. I will probably allow the same for port names in a future release.

                                      All working fine for me now - Thanks!

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