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:

    1. 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).
    2. 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.
    3. 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).
    4. 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).
    5. 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).
    6. 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.

    Duet-PS_ON-Wiring.jpg

    So basic functionality:

    1. 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).
    2. 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).
    3. Duet starts up, and runs the config.g file, which should contain M80.
    4. 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 😉



  • @Jacotheron

    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.


Log in to reply