ATX power ON/OFF for non atx power supply?
-
Hello,
can I use this output to control my power supply which in meanwell 600W 24V.
if is how?
i would like mainly just to turn off, i was thinking to do that way that i turn on printer with hardware button, and then if i am home to turn off with same hardware button or if I am away to turn off with macro or this output for ATX power.
Greatings Matej
-
Some other power supplies have a remote function to turn it on or off, if yours have it, read the manual on how to use it.
My own setup is similar to what you describe:
The parts:
- 1 Relay (I used a relay module, that is rated at 24V for the signal, and 10A Mains for the switching side).
- 1 Momentary Switch (this should also be mains rated, and at least 2A - the printer will startup through this switch).
How it is connected:
- On my printer I had an IEC (computer power cable) plug, with fuse and switch (this is how the power enters the printer, and this switch is also the master switch).
- From the IEC plug, the live wire splits into 2:
2.1. The first wire goes to the Common on the Relay; and a wire goes from the Normally Open on the Relay to the live input on the Power Supply.
2.2. The second wire goes to the switch, with once again a wire from the switch to the Power Supply live input. - The idea of this nr 2 is to provide a Relay and a Bypass line for the power (bypass allows the power supply to power on, supplying power to the Duet which in turn will enable and keep the Relay enabled).
- a +24V wire should then go to the Relay's signal/coil side (some of these modules have a Positive, Signal and Ground terminal; in this case, get 24V to both Positive and Signal).
- The Relay's Ground should run to the Duet's PS_ON pin (when this pin is enabled in software, it will become Ground potential, thus the relay is enabled).
- Further you wire everything like normal.
Note that the M80 command should be in your config, as otherwise the relay will not engage (when I upgraded to RRF3, I forgot about that - had to keep the switch pressed while sending M80, before I could edit the config).
As to the Macro, here is what I use to turn the printer off:
M291 P"Turn printer off? Move axis now or cancel." R"Shutdown Printer?" S3 X1 Y1 Z1 M81 ; Turn ATX Power Off
The idea is very simple: macros can be triggered by accident, and shutting down mid print is bad. The first line asks if you are sure to shut it down (while having the axis jog buttons on screen - useful to move the head, if you need to move it before shutting down), with a Cancel button that simply exists. If you select Ok, M81 is run, which release the relay, and the printer is off.
In my configuration, I only need to press the button for less than a second, and the printer is on.
Note that the firmware does not currently use the PS_ON for safety etc, but it may be implemented in the future (where the printer can shut itself down if a thermal runaway was detected).
-
Wow nice idea even better.
I would then like also to park actvie tool back to garage then i just add T-1 below M291?
Would you please skecth up this setup how did you connect together that configuration.Please @Jacotheron
Matej
-
I use it on my Meanwell SP-480-24, I use directly the pins RC with a pull-up to 5V, no need for a relay.
-
-
@matej1006 said in ATX power ON/OFF for non atx power supply?:
I have that one: https://www.meanwell-web.com/en-gb/ac-dc-single-output-enclosed-power-supply-output-hrp--600--24
This PSU don't have a remote control, so use a relay on main of the PSU
-
I have quickly created the image below showing the relevant wiring. The relay shown is rated at 5V, however I recommend a 24V (otherwise you will need to step the voltage from the power supply down). Also note that the relay module needs the fly-back diode for protection (if you implement your own relay, make sure the diode is in place).
Legend is at bottom left.
So basic functionality:
- Both the switch and the relay is between the IEC Mains input and the Power Supply on the Live wire. This allows either to allow power through (switch is meant as Bypass, so when printer is on, it have no effect).
- With the switch pressed, power supply starts up, gives 24V to Duet and Relay Module (note that at this time, PS_ON is in high-impedance, thus it lifts to 24V).
- Duet starts up, and runs the config.g file, which should contain M80.
- M80 force the PS_ON line to 0V/GND; causing a voltage over relay, thus enabling it. With the relay active, it close the circuit of the Live wire, taking over to supply the Power Supply.
-
@Jacotheron Thanks
-
The M80 in config file must be on the top I guess?
And if i press second time button then printer will turn off?or only way to turn off printer is with macro?
Matej
-
The M80 can be anywhere in the config.g, most times it takes very little time to process the config.g file (I had mine at the top and bottom and no noticeable difference).
As to the button being pressed more times: it does nothing. As can be seen in the diagram, it simply bypass the relay to start powering the power supply; when relay is engaged, and the button is pressed, the mains have 2 paths to get to the power supply. I typically switch off using the macro (have it numbered to display on the PanelDue).
A while back my PanelDue stopped responding (not sure what happened); that time something was also wrong with the networking, so did not have DWC access (started the print on PanelDue, before the not responding). This is why having a backup/master switch at the IEC is useful.
-
I wanted to go a step further and also have soft power control over the 5VDC portion.
https://www.randoprojects.com/2020/07/30/duet-2-soft-power-control/
-
Hello,
i have problem now after i did upgrade to 3.4.0.rc2, my printer won't stay turned on when i release button.
i did change to this in my M98"Turn printer on" and still won't work ? and is still same pin out for that or it's different.
where then i put Turn printer off code in config file?M81 C"pson" ; allocate the PS_ON pin to power control but leave power off M81 ; turn power off immediately M81 S1 ; turn power off when all thermostatic fans have turned off
My Turn printer on code :
M80 ; sets pin in the power on state M80 C"pson" ; allocates the pin and sets the pin in the power on state. M80 C"!pson" ; inverts the PS_ON output for Meanwell power supplies
-
@matej1006
You only need theM80 C"!pson"
M80in config.g, and do not include any M81 in config.g, otherwise it will turn off again.
The setup line with the pson in it should only appear once, ever, to define the pin.
After that, M80 turns power on and M81 turns it off etc. You do not need to repeat the setup for M81.
You would normally only use M81 in a shutdown macro or at the end of a print, in the slicer post-print gcode.
Put the M80 lines near the start of your config, so the power enable is set fairly soon after power-up.
-
This post is deleted!