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

    Automatic power supply management

    Scheduled Pinned Locked Moved
    Firmware wishlist
    power management
    2
    17
    1.4k
    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.
    • Krohm Koalaundefined
      Krohm Koala @Krohm Koala
      last edited by

      @Krohm-Koala oh I see 😂 i'll search about daemon.g thanks

      1 Reply Last reply Reply Quote 0
      • Krohm Koalaundefined
        Krohm Koala @dc42
        last edited by

        @dc42 is there an object model variable for the state of the power supply ? Also as i'm totally noob in this type of programmation, can't do anything, as everything i try turns to nothing ^^ i'll just continue as it is and deal with it i think ^^ thanks anyway 🙂

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

          @Krohm-Koala said in Automatic power supply management:

          @dc42 is there an object model variable for the state of the power supply ? Also as i'm totally noob in this type of programmation, can't do anything, as everything i try turns to nothing ^^ i'll just continue as it is and deal with it i think ^^ thanks anyway 🙂

          There is a special status "off" which means that VIN power is not present. That's what you should get when you turn off VIN power. Alternatively, you can retrieve the VIN voltage directly.

          There is not currently an object model value to say what the state of PS_ON is according to the last M80 or M81 command. Do you need one?

          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

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

            Correction to above: there is a variable that says whether PSON on or off, only available if there has been a M80 or M81 command since reset. It's called state.atxPower.

            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
            • Krohm Koalaundefined
              Krohm Koala
              last edited by

              oh cool ! maybe i'll try something 😄 do you think there's a way to automatically turn on psu when an heater need power ? I think there's the only thing i want the most to do, for the other things i needed it at the beginning i overcome with M80 almost everywhere 🙂

              1 Reply Last reply Reply Quote 0
              • Krohm Koalaundefined
                Krohm Koala
                last edited by

                Also, how do you get the status of VIN or VIN voltage to do meta code ? Maybe easier than state.atxPower to be sure there's no false positive or can be using directly at the reset ? Or maybe i can add M81 at the end of my config.g to be sure it's ok since the reset 🤔

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

                  @Krohm-Koala said in Automatic power supply management:

                  oh cool ! maybe i'll try something 😄 do you think there's a way to automatically turn on psu when an heater need power ? I think there's the only thing i want the most to do, for the other things i needed it at the beginning i overcome with M80 almost everywhere 🙂

                  I'm not sure it will work because of the lag, but in your loop in daemon.g, if power is off you could iterate over the heaters and turn on the power if any target temperature is above 45C.

                  @Krohm-Koala said in Automatic power supply management:

                  Also, how do you get the status of VIN or VIN voltage to do meta code ? Maybe easier than state.atxPower to be sure there's no false positive or can be using directly at the reset ? Or maybe i can add M81 at the end of my config.g to be sure it's ok since the reset 🤔

                  07/04/2020, 16:47:43 	echo boards[0].vIn.current
                  24.5
                  

                  Yes you can use M80 or M81 in config.g.

                  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

                  Krohm Koalaundefined 1 Reply Last reply Reply Quote 0
                  • Krohm Koalaundefined
                    Krohm Koala @dc42
                    last edited by

                    @dc42 said in Automatic power supply management:

                    I'm not sure it will work because of the lag, but in your loop in daemon.g, if power is off you could iterate over the heaters and turn on the power if any target temperature is above 45C.

                    I think i'll try something like that ^^ just need to find how to check if the target temp is above some °C and it should be ok 😄 it'll be funny to try something like that as i'm a complete noob in coding, i had done an auto change filament script, i think i can do that too 😄

                    1 Reply Last reply Reply Quote 0
                    • Krohm Koalaundefined
                      Krohm Koala
                      last edited by Krohm Koala

                      Cant validate my code for now as i'm printing but, here is the code if you want to look at it 😄 i hope it'll work 😄

                      if boards[0].vIn.current < 23
                      ....if tools[0].active > 100
                      ........M80
                      ........break
                      ....else
                      ........break
                      ....else
                      ........break

                      1 Reply Last reply Reply Quote 0
                      • Krohm Koalaundefined
                        Krohm Koala
                        last edited by

                        So, i made some tests, this is the final version, better and also, look for the head temp or the bed 😄

                        while boards[0].vIn.current < 23
                        ....if tools[0].active[0] >= 100 || heat.heaters[0].active >= 40
                        ........M80
                        ........break
                        ....else
                        ........break

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