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

    [Solved] [Duet3] Incorrect readings from DHT22 after a move

    Scheduled Pinned Locked Moved
    General Discussion
    4
    19
    753
    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.
    • pkosundefined
      pkos
      last edited by pkos

      Hi everyone,

      I'm wondering if anyone ever noticed anything like this.
      My setup consists of a CoreXY machine running Duet 3 6HC (3.1.1) standalone and 3HC. In general, everything works perfectly, except for the DHT22.

      I have it connected to the temp daughterboard pins for vcc, gnd and signal (I tried cs0 and cs1). There is a 10k ohm resistor connected between the vcc and signal legs of the dht22 itself (problem appears without it as well).

      Readings come in perfect, until I start moving the motors.
      Even the smallest move causes the readings from the DHT22 to go bonkers and start displaying 2k C.

      I tried manually setting the location via G92 and even moving back on X by 1mm will cause the reading to go crazy.

      What's funny is that as long as I don't touch the motors - data is read correctly. I can heat up the machine, run fans, turn on relays and whatnot - nothing affects the DHT22. I tried switching that one out to a new one too in hopes of a faulty sensor - but even that did not help.

      Has anyone else seen anything like that? Any hints on what I should check? It's definitely not the wiring - I've changed that twice already.

      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

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

        Does the wiring run along with the motors?

        Z-Bot CoreXY Build | Thingiverse Profile

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

          Yes it does. I guess I should shield the DHT ones then, since serial is so susceptible to noise... This will be interesting since the wires run in a cable chain. 🙂

          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
          • dc42undefined
            dc42 administrators
            last edited by dc42

            Yes, signals using open drain outputs with pullup resistors (such as I2C and one-wire protocols) pick up noise very easily from stepper motor cables. You need to use shielded cable to connect the DHT22. Stereo microphone cable should work.

            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
            • pkosundefined
              pkos
              last edited by

              Just as an update - switching over to a shielded cable (I used exactly a stereo mic cable) did not solve the issue. I'll have to rethink and move the DHT22 to a different location and see if that helps.

              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
              • dc42undefined
                dc42 administrators
                last edited by

                Do you have a pullup resistor between the signal line and +3.3V?

                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
                • A Former User?
                  A Former User @pkos
                  last edited by A Former User

                  @pkos
                  Had something similar with temperature values going nuts every time any motor was "on" -> Had build a printer with a lot of conductive metal and it turned out I had to "isolate" the steppers because they brought so much noise into all the metal parts that the sensitive stuff just couldn´t cope with it...

                  E.g. if one of your motor sits directly metal to metal on a metal(-plate/-beam/-etc.) on which also your sensor sits, there is a high probability the strong field of your stepper will propagate through it and that´s it then...

                  To have a cheap solution to isolate your stepper while still having something strong, stable, that can handle high heat and is flame retardant try the base-material of pcb´s, like an "FR4" with "V0"

                  hope that maybe brings you to new ideas what to try...

                  I found this post because I also want to attach a DHT22, can you give me a hint how to start?

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

                    @LB Curious if you had your motors and metal work grounded.

                    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 A Former User

                      @Phaedrux
                      Well in the beginning no, then yes: I made 2 separate shielding-"trees", 1 for the motors directly connected to PE (earth in germany, do not know in UK/USA how to say) and 1 shielding-"tree" for the sensors. That was separate... Even then I had problems but less then before. Only after electrically isolate the motor (we just milled the same plate that was made out of metal out of a piece of sturdy quasi-non-conductive plastic) it was what you could consider "good"/"working"

                      But my understanding of all of this is far too low/weak to know if it was not just an unlucky combination of all those modern high-frequency-swithing-things, e.g. the cheap switching power supply, your fridge in the same room, some other machines in the room which may have some frequency or voltage or current switching not necisarrily not connected to earth, which all can (not necessarily have to) "pollute" your mains and or earth before you even had your printer and on top of it the crazy high-speed pwm-switching to drive your big stepper motors... will never find out because I have no equipment to be able to and understand to little about it

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

                        Bah I totally forgot this thread for a while.

                        So to answer @LB - not the case here, motors are mounted onto ABS printed parts and only those hook up to aluminum extrusions.
                        Also, my printer has the frame and the hotbed grounded.

                        @dc42 - yes, I do. I tried putting it in multiple places to be sure (I'm not that amazing with electronics) - no change regardless of whether they were next to the DHT22 or closer to the board.

                        I tried switching to a different spi port, but no difference there. The only other thing I didn't try was to move the sensor to a different place so that the wires don't run close to motor wires, but this will kinda defeat the purpose of what I want to achieve. I want the sensor to keep moving up along with the gantry to know if the temps at that height are also good enough.

                        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

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

                          @pkos, what value pullup resistor did you use?

                          One-wire buses rely on passive pullups, which makes them sensitive to noise (just like I2C). I think a combination of shielded cable (using the shield for the ground connection) and a pullup resistor of around 2k2 ought to work.

                          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
                          • A Former User?
                            A Former User @pkos
                            last edited by

                            @pkos said in [Duet3] Incorrect readings from DHT22 after a move:

                            So to answer @LB - not the case here, motors are mounted onto ABS printed parts and only those hook up to aluminum extrusions.
                            Also, my printer has the frame and the hotbed grounded.

                            Just for the sake of completness and to definetly have all possibilities checked you could just unwire/cut/deplug your PE/GROUND (frame+hotbed).

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

                              @dc42 - I used a 4k7 resistor.

                              @LB - will try. Currently need to figure out why he 3HC stopped waking up on power on after the latest beta firmware upload (probably just a coincidence, but need to figure this out)

                              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

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

                                @pkos said in [Duet3] Incorrect readings from DHT22 after a move:

                                @dc42 - I used a 4k7 resistor.

                                @LB - will try. Currently need to figure out why he 3HC stopped waking up on power on after the latest beta firmware upload (probably just a coincidence, but need to figure this out)

                                I just tried 4 different DHT´s, first the bare-ones (without housing...) now the "ASAIR AM2302" because of their double-house and pullout-safe wire-ends and screwhole on the outer housing for putting it somewhere, on a duet2ethernet1.0.4a & RRF3.1.1.
                                Looks good so far for me, had no troubles but to sort out how to wire them up (https://forum.duet3d.com/topic/14146/duet3d-dht-22/16?_=1605704384964)... and I like to see the humidity drop in the chamber... 🙂 hope you get yours running!

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

                                  So I finally got round to moving the DHT22 and played with wiring some more... only to find out the DHT22 does not work in 3.2.
                                  I see there's actually quite a couple threads on it 😮

                                  @dc42 shamelessly pinging asking for help 🙂

                                  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

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

                                    For everybody reading this most likely deals with the same/strongly-related issue:

                                    https://forum.duet3d.com/topic/21061/dht22-not-working-after-update-from-3-1-1-to-3-2-0/3

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

                                      Update then on the data disappearing after a move issue itself. After moving the DHT to a different place in the enclosure - problem is solved. Readings come in without a hitch now regardless of how I move the gantry. I suspect if I moved the motors anywhere close, the problem would come back, but that is not likely to happen.

                                      Let's consider this problem solved. Now just to figure out why DHT22 doesn't work on 3.2. 😉

                                      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

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

                                        @pkos

                                        🙂 -> We should start a thread how to print enclosures for the motors out of esd-filament 😁

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

                                          Totally 🙂

                                          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
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA