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

    Monitor bed heating?

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    4
    8
    208
    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.
    • Elkoundefined
      Elko
      last edited by

      Hi
      there is a possibility to monitor the bed heating ?
      I only want to run the fan for the Mosfet of the bed heater when the bed heater is switched on

      1 Reply Last reply Reply Quote 0
      • botundefined
        bot
        last edited by

        Set up a thermostatic fan linked to the bed heater at a specific temperature.

        see: https://duet3d.dozuki.com/Wiki/Gcode#Section_M106_Fan_On

        *not actually a robot

        1 Reply Last reply Reply Quote 0
        • Elkoundefined
          Elko
          last edited by

          Hello bot
          I know that.
          But I would like a query whether the heating is ON or OFF

          1 Reply Last reply Reply Quote 0
          • Elkoundefined
            Elko
            last edited by

            void controllerfan_update() {
            static millis_t lastMotorOn = 0, // Last time a motor was turned on
            nextMotorCheck = 0; // Last time the state was checked
            const millis_t ms = millis();
            if (ELAPSED(ms, nextMotorCheck)) {
            nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s

            const bool xory = X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON;
            
            // If any of the drivers or the bed are enabled...
            if (xory || Z_ENABLE_READ() == Z_ENABLE_ON
              #if HAS_HEATED_BED
                || thermalManager.temp_bed.soft_pwm_amount > 0
              #endif
                #if HAS_X2_ENABLE
                  || X2_ENABLE_READ() == X_ENABLE_ON
                #endif
                #if HAS_Y2_ENABLE
                  || Y2_ENABLE_READ() == Y_ENABLE_ON
                #endif
                #if HAS_Z2_ENABLE
                  || Z2_ENABLE_READ() == Z_ENABLE_ON
                #endif
                #if HAS_Z3_ENABLE
                  || Z3_ENABLE_READ() == Z_ENABLE_ON
                #endif
                #if E_STEPPERS
                  #define _OR_ENABLED_E(N) || E##N##_ENABLE_READ() == E_ENABLE_ON
                  REPEAT(E_STEPPERS, _OR_ENABLED_E)
                #endif
            ) {
              lastMotorOn = ms; //... set time to NOW so the fan will turn on
            }
            
            // Fan off if no steppers have been enabled for CONTROLLERFAN_SECS seconds
            controllerfan_speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : (
              #ifdef CONTROLLERFAN_SPEED_Z_ONLY
                xory ? CONTROLLERFAN_SPEED : CONTROLLERFAN_SPEED_Z_ONLY
              #else
                CONTROLLERFAN_SPEED
              #endif
            );
            
            1 Reply Last reply Reply Quote 0
            • Elkoundefined
              Elko
              last edited by

              Just like in Marlin

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

                Using RRF3 you could do that in the daemon.g file.

                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

                whosrdaddyundefined 1 Reply Last reply Reply Quote 0
                • whosrdaddyundefined
                  whosrdaddy
                  last edited by whosrdaddy

                  Maybe I don't understand the question well,
                  but when the SSR is enabled (ie the bed is heating) you can simply setup a thermostatic trigger to enable the fan like
                  M106 P1 T40 H0 (change P1 to your actual fan output)

                  1 Reply Last reply Reply Quote 0
                  • whosrdaddyundefined
                    whosrdaddy @dc42
                    last edited by whosrdaddy

                    @dc42 : I don't find any docs for daemon.g except for this tweet of yours 😉

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