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

    Using chamber temp within a macro

    Scheduled Pinned Locked Moved Solved
    General Discussion
    3
    4
    198
    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.
    • medicusdkfzundefined
      medicusdkfz
      last edited by

      Hi,

      is it possible to use the global parameter "chamber temperature" - I didn't find it in the object model - within a macro?
      And is it also possible to use only one slider to control the pwm of 3 fans?
      I have 3 ambient fans inside my printer chamber to circulate the air inside for higher temps.
      For security reasons I want to switch the fans to half of the speed, when the chamber temp gets higher than 55°C...

      Thank you very much,
      Pierre

      Here is the defined sensor in my config.g:

      ; ==================================
      ; CHAMBER SENSOR (not installed)
      ; ==================================
      ; DHT21 (AM2301 von ASAIR)
      ; Humidity: 0-100% humidity readings with 3-5% accuracy
      ; Temperature: -40 to 80°C temperature readings ±1°C accuracy
      ; Sensing period: 0.5 Hz sampling rate (once every 2 seconds)
      ; Dimensions: 59mm x 27mm x 13.5mm
      ;
      ; Connect the DHT I/O line to either one of the SPI CS lines on the Temperature Daughterboard connector, or one of the IOx.OUT pins.
      ; Both of these connectors also provides +3.3V and ground.

      M308 S10 P"io4.out+io4.in" Y"dht21" A"Chamber Temp" ; define DHT21 temperature sensor
      M308 S11 P"S10.1" Y"dhthumidity" A"Chamber Hum[%]" ; Attach DHT21 humidity sensor to secondary output of temperature sensor

      dc42undefined 1 Reply Last reply Reply Quote 0
      • OwenDundefined
        OwenD
        last edited by

        The sensor reading is available from the "sensors" section of the object model.
        e.g.
        Screenshot 2023-01-15 at 04-51-19 3Dprinter.png

        You can create multiple fans and assign them all to the same sensor if you want them to be thematically controlled.
        So you could have them come on at 50% when the temp reaches 55C and scale up from there if you wish.
        In your case you would set the H parameter in M106 to all point to sensor 10

        M106 Pnnn C"Chamber Fan1" H3 L0.5 X1 B1  T55:70
        M106 Pnnn C"Chamber Fan2" H3 L0.5 X1 B1  T55:70
        M106 Pnnn C"Chamber Fan3" H3 L0.5 X1 B1  T55:70
        

        Change P to the pin for each fan and X to the maximum speed you want to reach.

        However, a thermostatically controlled fan does not appear with a slider.
        If you want a slider then you must use H-1
        But you will get one slider for each fan.
        To control them to come on when the temp reaches 55 degrees you would need to monitor the sensor in daemon.g and adjust the fan speed using M106

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

          @medicusdkfzP

          Is it possible to use the global parameter "chamber temperature" - I didn't find it in the object model - within a macro?

          You can use the chamber temperature in a macro as @OwenD says.

          And is it also possible to use only one slider to control the pwm of 3 fans?

          Is there any reason why you can't connect the three fans in parallel and connect them to a single output on the Duet?

          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

          medicusdkfzundefined 1 Reply Last reply Reply Quote 0
          • medicusdkfzundefined
            medicusdkfz @dc42
            last edited by

            @dc42 said in Using chamber temp within a macro:

            @medicusdkfzP

            Is it possible to use the global parameter "chamber temperature" - I didn't find it in the object model - within a macro?

            You can use the chamber temperature in a macro as @OwenD says.

            And is it also possible to use only one slider to control the pwm of 3 fans?

            Is there any reason why you can't connect the three fans in parallel and connect them to a single output on the Duet?

            Yes, you are right… One of the 24V fans needs 80 mA. Three of them in parallel are under the limit of 800 mA.

            The macro is working. Thank you very much!

            1 Reply Last reply Reply Quote 0
            • Phaedruxundefined Phaedrux marked this topic as a question
            • Phaedruxundefined Phaedrux has marked this topic as solved
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA