• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    oc_geek
    last edited by oc_geek 13 Feb 2021, 18:54

    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
    • undefined
      pkos
      last edited by 13 Feb 2021, 18:59

      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

      undefined 1 Reply Last reply 13 Feb 2021, 19:00 Reply Quote 0
      • undefined
        oc_geek @pkos
        last edited by 13 Feb 2021, 19:00

        @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
        • undefined
          pkos
          last edited by 13 Feb 2021, 19:02

          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
          • undefined
            oc_geek
            last edited by oc_geek 13 Feb 2021, 19:17

            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
            • undefined
              pkos
              last edited by 13 Feb 2021, 19:55

              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

              undefined 1 Reply Last reply 13 Feb 2021, 22:27 Reply Quote 0
              • undefined
                oc_geek @pkos
                last edited by 13 Feb 2021, 22:27

                @pkos thanks !

                1 Reply Last reply Reply Quote 0
                • undefined
                  dc42 administrators
                  last edited by 14 Feb 2021, 10:13

                  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
                  • undefined
                    dc42 administrators
                    last edited by 14 Feb 2021, 10:30

                    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
                    • undefined
                      oc_geek
                      last edited by 14 Feb 2021, 11:57

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

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        dc42 administrators
                        last edited by dc42 14 Feb 2021, 13:53

                        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
                        • undefined
                          oc_geek
                          last edited by oc_geek 14 Feb 2021, 16:09

                          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
                          • undefined
                            dc42 administrators
                            last edited by 14 Feb 2021, 16:19

                            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

                            undefined 1 Reply Last reply 14 Feb 2021, 17:55 Reply Quote 0
                            • undefined
                              oc_geek
                              last edited by 14 Feb 2021, 16:49

                              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
                              • undefined
                                dc42 administrators
                                last edited by 14 Feb 2021, 17:19

                                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

                                undefined 1 Reply Last reply 14 Feb 2021, 17:42 Reply Quote 0
                                • undefined
                                  oc_geek @dc42
                                  last edited by 14 Feb 2021, 17:42

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

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    MikeS @dc42
                                    last edited by 14 Feb 2021, 17:55

                                    @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?

                                    undefined 1 Reply Last reply 14 Feb 2021, 17:58 Reply Quote 0
                                    • undefined
                                      oc_geek @MikeS
                                      last edited by 14 Feb 2021, 17:58

                                      @MikeS which daughter board do you ref to ?

                                      undefined 1 Reply Last reply 14 Feb 2021, 18:08 Reply Quote 0
                                      • undefined
                                        oc_geek
                                        last edited by oc_geek 14 Feb 2021, 18:01

                                        @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

                                        ? 1 Reply Last reply 6 May 2021, 11:52 Reply Quote 0
                                        • undefined
                                          MikeS @oc_geek
                                          last edited by 14 Feb 2021, 18:08

                                          @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.

                                          undefined 1 Reply Last reply 14 Feb 2021, 18:18 Reply Quote 0
                                          6 out of 33
                                          • First post
                                            6/33
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA