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
      last edited by

      Hi ! Just got my duet WiFi and I am using a relay to cut my power supply, but I've seen there is no automatic management, so here is my question, will there be an automatic power management like when you request a move or heating that toggle the relay and when nothing is moving and the heater goes cold, it cut the power ? 😁

      Have a nice day 🙂

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

        Using either an ATX PSU or suitable hardware (e.g. SSR) to control mains power to your PSU, you can use the M81 S1 command at the end of your print job to turn off the power when all thermostatic fans have stopped.

        The firmware reduces the motor current to the idle value when nothing has moved for 30 seconds. You can set the idle current percentage in the M906 command.

        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

          I've seen all of these thanks 🙂 but my printer make a bit of noise when idle (motors and PS) and (i know it's a marlin habit) the things that is missing (for me) is the autopowering when a mouvement or heating is ask to the printer 🙂
          If it can't be done i'll just throw away my relay and do with it, just some automatic habit that i'm missing a bit 😄

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

            Are you aware that stepper motors don't hold position when powered down? At the very least, they will move up to 2 full steps; and on some printer types they may move much more than that. We could implement auto power off/on, but after powering on you would need to re-home the printer before you can use it safely.

            If you don't care about the loss of position, you could set the idle current percentage to zero in the M906 command.

            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
              last edited by

              I am aware ^^ i was using this functionnality every day when i got my ramps and marlin (1.1.9 or 2.0).
              BTW every print you launch, you rehome the printer, so i think it doesn't matter if the powersupply shutdown and motors move a bit.
              And i wanna point a thing, i've seen that when i shut down my PS, my axis stay homed, the fact that there no power don't make them "unhomed" (Sorry for my english i'm french guy 😄 ) so the loss should be here, maybe make the M81 unhomed the axis too (i expect i said it right 🙂 ). For the moment i'll set the idle to 0 🙂

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

                @dc42 Hi ! just wanted to know if it was a bit of news about that ? 😄

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

                  As you are the only person who has asked for this, i think it would be best implemented using the daemon.g file that is supported in RRF 3.01-RC5 and later. Let me know if you need any additional object model variables in order to implement it.

                  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 @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