[solved] once again - using the PS_ON pin with a relay module

  • Hi all,

    i'm trying to switch the power side of things via the PS_ON pin inside the 5V connector. Accordingly, I have my Duet Maestro set up with a 5V and a 24V PSU, and want to be able to switch the 24V PSU using M80/M81.
    I read that the PS_ON pin is open drain, so I would have to wire a relay like this; 5V+ •---///----• PS_ON (imagine the relay coil in between the pins there). Right?
    However, the relay module I'm trying to use is one identical to this http://www.hobbytronics.co.uk/5v-relay-module, which has to be connected to its own 5V supply and is switched with HIGH level. It switches when I connect its "S" pin (signal pin) to 5V+.
    Long story short, is what I'm trying to achieve here possible or do I have to use another of the Maestro's switching facilities?
    Any pointers are appreciated.

    (I would have resurrected an old thread to ask this question, but since they're all locked you'll have to live with a new one)


    Best regards, Niklas

  • You have a few options in how you connect the relay module:

    Always powered:
    In this setup, you need the additional 5V power supply which gives the Duet and the relay module its power. The relay will then switch on the main PSU when it needs the full power. As 5V Sources, you can use USB (or USB charger that can provide enough power) or a separate power supply (in this case you would need to set the 5V source on the board to use the 5V_EXT pins, which is at the PS_ON pin).

    I did not want the Duet to be always powered, and decided I will usually just switch the machine off.

    Manual On Switch
    In this setup, I have a momentary bypass switch in parallel to the relay module's AC power (idea being, is I close that switch, the PSU get the power it needs to create its voltage output). The power supply is then connected to the Duet using the standard Vin connectors. As to a power source for the relay, there are a few 5V headers (at the Fan Voltage Select jumper and the big expansion header), which can be used. Alternatively you can have an external 5V regulator or buck converter board which can supply you with 5V

    The relay module would then be connected with S and + both getting the same 5V, and the - going to the PS_ON pin (only when PS_ON drains, power would flow through the relay).

    On my own setup, I have replaced the 5V relay on my module with a 24V one (usually with relays, higher voltage requires less current to turn on - though for the same model range of relays, the required power [W] is identical - the 5V relay drew about 500mA). I disconnected the LED indicator and transistor, and bridged it so that the + and - worked as normal (if both are connected, we have a triggered relay).

    Other setups:
    There are other options also available, which I believe is discussed in detail in older threads. I am not familiar with all of them, so not explaining things I am not familiar with.

  • Hi there,

    thank you for your detailed reply, and what should I say - it works! Very much appreciated.

    I didn't even consider the option of leaving the machine on all the time like you would a TV. I wanted to be able to
    a) implement a safe-fail mechanism (as opposed to fail-safe, were I would rule out all possible sources of error), so that the Maestro can switch off the 24V supply in case of thermal runaway etc. This is possible because all power consuments run off the board, even the heatbed.
    b) have a means to switch the power off after a longer print job without losing the control over the machine and the ability to check on it from time to time.

    I also like your second option, it's quite elegant!

    Best regards, Niklas

Log in to reply