Automatic power supply management
-
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 -
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.
-
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 -
@dc42 Hi ! just wanted to know if it was a bit of news about that ?
-
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.
-
@Krohm-Koala oh I see i'll search about daemon.g thanks
-
@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
-
@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? -
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.
-
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
-
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
-
@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.
-
@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
-
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 -
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