Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Fan control with "ambient" temperatures

    Duet Hardware and wiring
    3
    15
    174
    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.
    • Nightowl
      Nightowl last edited by Nightowl

      I've installed my Duet3 MB6HC into an enclosure, like this:

      IMG_3820.jpeg

      ...and have fitted an intake and an exhaust fan so they turn on when the board is powered up, using this configuration:

      ; Fans
      M950 F0 C"out8" Q500	; create fan 0 on pin out 8 and set its frequency
      M106 P0 S0.5 H-1	; set fan 0 value. Thermostatic control is turned off
      

      ...but what I'd like to do is make them temperature controlled.

      Could I connect a PT1000 sensors to the board (Temp 0 to 3) and change the configured lines to take that into account?

      I'm assuming a sensor such as this would be fairly easy to get hold of and would be what I'd need.

      Config help would be appreciated, too 🙄

      Thank you

      EDIT: I'm assuming something like this would work?

      There are few things more dangerous than taking the advice of someone who thinks he knows what he's doing.
      I don't know what I'm doing - yet - so take anything I say with a pinch of salt!

      RatRig 1075, Duet3 MB6HC, Makita Trim Router, Hobbyist

      deckingman 1 Reply Last reply Reply Quote 0
      • deckingman
        deckingman @Nightowl last edited by deckingman

        @nightowl Yes, that'll work. But for what you want to do, a simple bead thermistor would be a lot lot cheaper. If you are uncomfortable with soldering, you could get a pre-wired one e.g. https://www.amazon.co.uk/Thermistor-temperature-sensor-Cylinder-Probe/dp/B01FC4U0JY/ref=sr_1_8?crid=P9WQCDGGM90M&keywords=bead+thermistor&qid=1659603291&sprefix=bead+thermistor%2Caps%2C141&sr=8-8

        That's £3.99 for a 5 pack but you can pick them up much cheaper if you shop around.

        Edit. Even cheaper still is to use the built in MCU on chip temperature sensor.

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/c/deckingman/

        Nightowl 1 Reply Last reply Reply Quote 1
        • Nightowl
          Nightowl @deckingman last edited by

          @deckingman said in Fan control with "ambient" temperatures:

          Edit. Even cheaper still is to use the built in MCU on chip temperature sensor.

          A fiver wouldn't break even this bank, but I'm assuming the one you've mentioned measures the temperature of the chip, rather than the ambient temperature?

          I'm probably splitting hairs, but...

          There are few things more dangerous than taking the advice of someone who thinks he knows what he's doing.
          I don't know what I'm doing - yet - so take anything I say with a pinch of salt!

          RatRig 1075, Duet3 MB6HC, Makita Trim Router, Hobbyist

          deckingman 1 Reply Last reply Reply Quote 0
          • deckingman
            deckingman @Nightowl last edited by

            @nightowl said in Fan control with "ambient" temperatures:

            @deckingman said in Fan control with "ambient" temperatures:

            Edit. Even cheaper still is to use the built in MCU on chip temperature sensor.

            A fiver wouldn't break even this bank, but I'm assuming the one you've mentioned measures the temperature of the chip, rather than the ambient temperature?

            I'm probably splitting hairs, but...

            It does measure the temperature of the chip. But isn't that what you want to keep cool? Is there a specific reason why you want to cool the ambient air within the enclosure?

            Ian
            https://somei3deas.wordpress.com/
            https://www.youtube.com/c/deckingman/

            achrn 1 Reply Last reply Reply Quote 0
            • achrn
              achrn @deckingman last edited by achrn

              @deckingman said in Fan control with "ambient" temperatures:

              It does measure the temperature of the chip. But isn't that what you want to keep cool? Is there a specific reason why you want to cool the ambient air within the enclosure?

              Possibly there is or will be other stuff in the enclosure too that wants cooling? I note the presence of a fan-cooled psu and some other small board in the photo.

              I have a MB6HC, a Pi, a PWM->analogue daughter board and a servo in my electronics enclosure, and all of those generate heat and don't want to get too hot. Monitoring just the temperature of one component on one of them and treating that as a proxy for everything else is a less direct input than the air temperature, I think.

              I use a thermistor in the electronics enclosure to control a fan that blows outside air into the enclosure (directly onto the MB6HC), and the CPU temperature to control a small centrifugal fan that blows enclosure air under the MB6HC. Both are also triggered by the drivers overtemperature flag. (At least that's the intent - I don't think my drivers flag has ever been set, so my config has not been tested).

              ; sensor 7: thermistor in electronics enclosure
              M308 S7 P"temp0" Y"thermistor" T4701 B4266 C1.048787e-7 A"electronics"
              ; sensor 8: mcu temperature sensor used as proxy for board temperature
              M308 S8 Y"mcu-temp" A"processor"
              ; sensor 9: overtemperature flag on stepper drivers
              M308 S9 Y"drivers" A"drivers"
              
              ; other cooling fans
              ; both following predominantly controlled by analogue sensors but also set if stepper drivers flag is set
              ; fan 2 is blowing air into electronics compartment
              M950 F2 C"!out4" Q25000                       ; fan 2 is 4-wire noctua on out4 (note inverse for 4-wire to work correctly) tacho not used
              M106 P2 S1 L0.25 B0.2 H7:9 T35:40 C"mainb"    ; cooling electronics space thermostatic on sensor 7 35 to 40C
              ; fan 3 is small centrifugal fan blowing under main board
              M950 F3 C"out9" Q100                          ; fan 3 on pin out9 and set its frequency
              M106 P3 S1 L0.4 B0.5 H8:9 T50:60 C"underb"    ; fan 3 for cooling mainboard underside thermostatic sensor 8 (mcu temperature) 50 to 60C
              
              deckingman Nightowl 2 Replies Last reply Reply Quote 0
              • deckingman
                deckingman @achrn last edited by

                @achrn The driver over temperature flag is quite high I believe. What I did once was to attach a small bead thermistor to a couple of the driver chips with a small dab of epoxy adhesive, then used a fan in thermostatic mode to blow air over the back of the board. I used something like T40:60 in the M106 for that fan so that it would start to turn at 40 and ramp up to full speed at 60. It gives a bit more granular control than simply on-off.

                Ian
                https://somei3deas.wordpress.com/
                https://www.youtube.com/c/deckingman/

                1 Reply Last reply Reply Quote 0
                • Nightowl
                  Nightowl @achrn last edited by Nightowl

                  @achrn said in Fan control with "ambient" temperatures:

                  Possibly there is or will be other stuff in the enclosure too that wants cooling? I note the presence of a fan-cooled psu and some other small board in the photo.

                  Yep, what you said!

                  The inlet fan is to the left of the enclosure, and the exhaust on the top. Both the fans have sponge filters to reduce dust/chips getting in...

                  IMG_4014_LowRes.jpg

                  EDIT: Of course, the door will be closed!

                  There are few things more dangerous than taking the advice of someone who thinks he knows what he's doing.
                  I don't know what I'm doing - yet - so take anything I say with a pinch of salt!

                  RatRig 1075, Duet3 MB6HC, Makita Trim Router, Hobbyist

                  1 Reply Last reply Reply Quote 0
                  • Nightowl
                    Nightowl last edited by

                    So, for whichever thermistor I go for, (probably these), is it a simple case of just changing the existing code to take account of the "activating" temperature and enabling the H1?

                    There are few things more dangerous than taking the advice of someone who thinks he knows what he's doing.
                    I don't know what I'm doing - yet - so take anything I say with a pinch of salt!

                    RatRig 1075, Duet3 MB6HC, Makita Trim Router, Hobbyist

                    deckingman 1 Reply Last reply Reply Quote 0
                    • deckingman
                      deckingman @Nightowl last edited by

                      @nightowl said in Fan control with "ambient" temperatures:

                      So, for whichever thermistor I go for, (probably these), is it a simple case of just changing the existing code to take account of the "activating" temperature and enabling the H1?

                      Yes, pretty much. You create the sensor using M308. https://docs.duet3d.com/User_manual/Reference/Gcodes#m308-set-or-report-sensor-parameters

                      You create the fan using M950. https://docs.duet3d.com/User_manual/Reference/Gcodes#m950-create-heater-fan-spindle-or-gpioservo-pin

                      Then you use the "H" parameter in M106 to enable thermostatic mode and assign the sensor that the fan will use. https://docs.duet3d.com/User_manual/Reference/Gcodes#m106-fan-on

                      Ian
                      https://somei3deas.wordpress.com/
                      https://www.youtube.com/c/deckingman/

                      Nightowl 1 Reply Last reply Reply Quote 1
                      • Nightowl
                        Nightowl @deckingman last edited by Nightowl

                        @deckingman Spiffing, thank you!

                        Whoops, I didn't add the links in my previous post...

                        These or these are the ones I'm considering.

                        Will the "thermistor" come with the values I will need to configure it, i.e.:

                        Tnnn  (for thermistor sensors) Thermistor resistance at 25°C
                        Bnnn  Beta value, or the reciprocal of the Steinhart-Hart thermistor model B coefficient
                        Cnnn  Steinhart-Hart C coefficient, default 0
                        Rnnn  Series resistor value. Leave blank to use the default for your board.
                        Lnnn  ADC low offset correction, default 0 (ignored if the hardware supports automatic ADC gain and offset calibration)
                        Hnnn  ADC high offset correction, default 0 (ignored if the hardware supports automatic ADC gain and offset calibration)
                        

                        I have a Duet3 MB6HC board.

                        Thanks

                        There are few things more dangerous than taking the advice of someone who thinks he knows what he's doing.
                        I don't know what I'm doing - yet - so take anything I say with a pinch of salt!

                        RatRig 1075, Duet3 MB6HC, Makita Trim Router, Hobbyist

                        deckingman 1 Reply Last reply Reply Quote 0
                        • deckingman
                          deckingman @Nightowl last edited by

                          @nightowl You only really need the "T" and the "B" value for your M308. The "C" value is a tiny number - useful to have but not essential for this application so the default of 0 should be fine. Both those links give the T value as 10k (10, 000). the first link gives you a B value but the second does not.

                          Ian
                          https://somei3deas.wordpress.com/
                          https://www.youtube.com/c/deckingman/

                          Nightowl 2 Replies Last reply Reply Quote 1
                          • Nightowl
                            Nightowl @deckingman last edited by

                            @deckingman
                            That makes things simpler, than you.

                            Do you think there may be a typo in the first example of the M308 command, in the link you sent me? The example value is T100000, which indicates a resistance of 100kOhm, as most people seem to be talking about a 10k resistance (@ 25C).

                            There are few things more dangerous than taking the advice of someone who thinks he knows what he's doing.
                            I don't know what I'm doing - yet - so take anything I say with a pinch of salt!

                            RatRig 1075, Duet3 MB6HC, Makita Trim Router, Hobbyist

                            1 Reply Last reply Reply Quote 0
                            • Nightowl
                              Nightowl @deckingman last edited by

                              @deckingman
                              Also, before you answered my question, I emailed the seller about these, and was told they're "...not suitable for CNC control boards."

                              There are few things more dangerous than taking the advice of someone who thinks he knows what he's doing.
                              I don't know what I'm doing - yet - so take anything I say with a pinch of salt!

                              RatRig 1075, Duet3 MB6HC, Makita Trim Router, Hobbyist

                              deckingman 1 Reply Last reply Reply Quote 0
                              • deckingman
                                deckingman @Nightowl last edited by

                                @nightowl A thermistor is a very simple device. Most are NTC which means Negative Temperature Coefficient. That is to say, as temperature increases the resistance decreases and vice versa. They can vary from a few ohms at ambient temperature, up to mega ohms. The most common type used in 3D printers are 100K which is why the example shows 100k. But there is no reason why you can't use a 10k, a 1k or any other value as long as you "tell" the firmware what the resistance is at standard ambient temperature by using the correct "T" value.

                                Did the vendor give a reason why that thermistor would not be suitable? I suspect that he probably simply did not understand what you want to do and may have made the assumption that a CNC control board might not normally have an input for measuring ambient air temperature.

                                Ian
                                https://somei3deas.wordpress.com/
                                https://www.youtube.com/c/deckingman/

                                Nightowl 1 Reply Last reply Reply Quote 2
                                • Nightowl
                                  Nightowl @deckingman last edited by

                                  @deckingman

                                  Thank you for explaining that. I think you've got it right; I'm not sure the vendor really understood what I was trying to achieve.

                                  I've ordered a pack of 5 from a different supplier, so I'll see how that goes.

                                  Thanks again for your help.

                                  There are few things more dangerous than taking the advice of someone who thinks he knows what he's doing.
                                  I don't know what I'm doing - yet - so take anything I say with a pinch of salt!

                                  RatRig 1075, Duet3 MB6HC, Makita Trim Router, Hobbyist

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