Welcome! Log In Create A New Profile

Advanced

Using PS-ON to control a relay that switches power on/off

Posted by LarsK 
Using PS-ON to control a relay that switches power on/off
June 27, 2016 10:50AM
Hey,

I want my Duet to turn everything off with software. I am unsure how I do this the correct way.


I am thinking of doing this:



I take the 5V out and put that to the relay and then the ground goes to PS-ON. Is this correct?

Next, what would be a good option for a relay? I have the classic Arduino type mechanical relays, like this or I have the FOTEK SSR-25 DA .

More; I would like to make a mechanical emergency stop in with this. Is there any considerations about which side to put it ? On the DC + side, DC - side or AC upstream or downstream from the relay??? On the DC I am thinking the relay may lock in open and emergency stop wont work?

Any inputs appreciated.

Edited 1 time(s). Last edit at 06/27/2016 11:31AM by LarsK.
Re: Using PS-ON to control a relay that switches power on/off
June 27, 2016 12:55PM
The PS_ON output is a BSH105 mosfet (good for up to 20V and about 0.5A) on the Duet 0.6 and 0.8.5, and a PMV40UN2 mosfet (good for up to 30V and 3A) on the Duet WiFi. So you can drive a mechanical relay with a 5V or 12V coil directly from it, but you must connect a flyback diode in parallel with the relay coil. A mechanical relay is more suitable than an SSR for this application.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
PRZ
Re: Using PS-ON to control a relay that switches power on/off
June 27, 2016 01:11PM
This was discussed in this post [forums.reprap.org] , see others posts before this one.

You shall have a pushbutton shorting the relay output for the time needed to start the board (less then 2 seconds).

The emergency shutdown shall absolutely be on the mains, as an SSD can fails conductive (it occurred me after a short, which made the SSD permanently conductive and I did not noticed immediately..)

The power from ps-on is sunk by a BSH105 transistor on Duet 0.8.5. Its nominal values are 1A, 20V so it may be workable to use a mechanical relay instead of a SSD. I did not tested.

In principle the PS-on activate power supply when grounded so your schematic looks correct.


Pierre

- Safety [reprap.org]
- Embedded help system for Duet and RepRap Firmware [forums.reprap.org]
- Enclosed delta printers Lily [rouzeau.net] and Lily Big [rouzeau.net]
- OpenScad delta printer simulator [github.com]
- 3D printing on my site [www.rouzeau.net]
Re: Using PS-ON to control a relay that switches power on/off
June 27, 2016 06:01PM
You could probably use a SainSmart Relay board by Jumpering JD-VCC and VCC (default setting) and then supply VCC from 5V, GND from GNC, and IN1 from the PS-ON output. It has all the other stuff PRZ mentioned already baked in since it was intended to be driven by a GPIO pin from a Duet/Raspberry Pi or Arduino. The above configuration will not work for 3.3V logic though. I can tell you how I have a 3.3V setup wired if you want.
Re: Using PS-ON to control a relay that switches power on/off
June 28, 2016 02:58PM
Hey all,

Thank you for the inputs. It actually answered all my questions. I will use a Sainsmart (or similar) relay so it already have the diode.


I will also put the pushbutton to turn on power.

It is not so nice that I will have to hold the button for a few seconds, in a future project it would be cool if the push-button drives a Mosfet circuit powered by a small CR2032 battery until power kicks in. That way it is just a single click. That wont be now though.
Re: Using PS-ON to control a relay that switches power on/off
July 04, 2016 01:53PM
Hey,

Got the basics up and running. Like to share my experiences thus far. I am running on a Duet 0.6 with DC42 firmware 1.4.


1)

The Duet 0.6 is missing a resistor on the Mosfet which controls the PS_ON. If you don't put that, then the relay may turn on again when the Duet is trying to shutdown (or so I read)

Here is my implementation:


The fact that I was able to solder it on is a testament that it is easy to do smiling smiley - Just I think getting it as a 0805 is a must. I put a 4.7K.


2)

When there is no ATX 5V power (when using the DUETS 5V regulator instead of external 5V) the terminal next to the PS_ON is not powered. Meaning you can't actually connect it like I showed in my first post. On the pin header there is a 5V that you can draw from instead. The Mosfet grounding the signal is all fine. (Maybe this can be worked around with the jumper on the ATX but not sure about that???)


3)
My schematic was wrong anyways. On these relays you need a GND and a 5V (which can both be gotten from the header or from the PS_ON plug if actually using ATX_5V. The PS_ON actually need to be in "IN" on the relay pins.


4) A bigger setup is needed in the end.. I am used to the RAMPS, on that the USB is connected to the PC when I am doing "stuff" so I can call the power back on with M80. Now I am using the LAN and WebDuet so whenever resetting the Duet it kills the power and turns everything off. The work around is to put 5V on the Duet via the USB connector and a phone charger (USB charger). This will probably be my permanent solution. Then I wont need to put an ON button bypass anyways. Seems the DUET itself uses very little power and if the printer is to stay off for a while I can just pull the plug. The important thing is killing the power on the main PSU, modern USB chargers (at least the branded type) is very low energy.


Inputs, suplements and objections to the above obviously welcome smiling smiley

Edited 1 time(s). Last edit at 07/04/2016 02:02PM by LarsK.
Re: Using PS-ON to control a relay that switches power on/off
July 06, 2016 02:44AM
Why not use the 5VSB from the ATX power supply to power the microcontroller, and the PS-ON to turn on the PSU to power the heaters and fans and steppers ? No other external relay or SSR required.
Yes, the microcontroller will be always on while the ATX power supply is plugged in the mains, but it would be an advantage to have it turn off all the other power hungry devices once the printing is done, or when a hardware e-stop button is pressed (the button can be put in series with the PS-ON from the controller). I think this is the way it was designed to work from the very beginning, isn't it ?
Re: Using PS-ON to control a relay that switches power on/off
July 06, 2016 11:25AM
The only devices running from 12V are the heaters, fans and motors. You can turn all of those off at the end of the print. The stepper drivers will take only a very small current from +12V with the motors turned off. However, if you are using an ATX PSU then the PSU itself should take less current when you turn off the main outputs.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Using PS-ON to control a relay that switches power on/off
July 06, 2016 03:21PM
Hey,

I am not using a PC PSU. I am using one of those dedicated 12V. It does not have a 5V.

My low cost PC psu that I have been using on others printers do not turn off when the PS-ON was off by M81,, they actually still deliver some 3.5V, enough to have the fans turning slowly. I would not expect high end PC-PSUs to have that problem though.
Sorry, only registered users may post in this forum.

Click here to login