ATX power ON/OFF for non atx power supply?
-
-
@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!