Switching DC power supply output off along with input AC - Page 1
Forum section: electronics / projects

author: progidek
author_rank: Newbie
timestamp: April 09, 2022, 05:42:34 pm
content: Hello everyone!I have a device supplied from a Mean Well LRS-100-24 PSU. Problem is that when I switch the AC power off, capacitors have enough charge to keep it running for at least few seconds. And the device displays trash and weird stuff on its display during this time until it's fully off. I'm looking for some other ideas from what I came up with.First idea was to detect AC input phase and disable the device right after it disappears but I cannot modify the device since it's already built.Second idea is to add some resistive load to the output to help discharge the capacitors faster. Problem is that the load had to be quite strong to do it fast enough and it would cause huge current consumption and heat generation during normal work.Third idea was to add a relay controlled with input AC with contacts connecting PSU output to the device when there's AC - but I cannot stand the clicking sound of the relay.Another idea and maybe the best, is to use double pole switch. Since I would like to power on and off the device using rocker switch, I can use double pole switch aswell. First pole would connect the AC input and the second pole would be for DC output. There's my concern about the insulation between poles.Would it be safe to connect mains AC and isolated DC ouput to the same switch? Maybe there are some switches with reinforced insulation between poles?Do you have any other ideas?Thank you

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 09, 2022, 07:26:03 pm
content: Typical switches for mains application have to handle at least the mains itself: typically 2.5kV or so when transient (surge) is included. Check datasheets to be sure, or if they doesn't say, ask the manufacturer.Note that, in case the switch contacts get welded or something, the resistor might get stuck on, creating the second scenario automatically. So, maybe still rate it appropriately, or maybe add a slow-blow or thermal fuse so the resistor will go open if it stays on for too long.Can the switch not also be used to hold the device in reset?And, does it really matter, is it just an annoyance, but it doesn't cause any wear of components, or data corruption or anything? (Not to invalidate the need for user convenience, mind; just feeling this out, here.)Tim

author: magic
author_rank: Super Contributor
timestamp: April 09, 2022, 07:45:11 pm
content: The right solution is to have a "power good" detector in the device so that it shuts down under insufficient input voltageIn absence of that, maybe build it externally. Some TL431 could detect input voltage being higher than 23V or whatever is the necessary minimum and pull the gate of a P-MOSFET to supply power to the device.

author: Ian.M
author_rank: Super Contributor
timestamp: April 09, 2022, 09:00:34 pm
content: Yes. Add a high value resistor from the MOSFET drain to part way up the potential divider feeding TL431 REF, to provide a little hysteresis so it switches cleanly and doesn't 'chatter'. The MOSFET gate - source voltage will also probably need limiting, but that's easy enough to do with another potential divider between +24V in and TL431 cathode, feeding the gate.

author: langwadt
author_rank: Super Contributor
timestamp: April 09, 2022, 09:14:18 pm
content: Quote from: T3sl4co1l on April 09, 2022, 07:26:03 pmbut surely there is a difference between the functional isolation needed by a mains switch, and the safety isolation needed if youput the isolated low voltage on the same switch

author: NiHaoMike
author_rank: Super Contributor
timestamp: April 09, 2022, 09:57:42 pm
content: Quote from: progidek on April 09, 2022, 05:42:34 pmWouldn't the click of the switch itself mask the sound of the relay? You could also consider an AC detection circuit, for example the open source one used in the Prusa MK3 series.https://github.com/prusa3d/MK3_Power_Panic

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 09, 2022, 10:34:31 pm
content: Quote from: langwadt on April 09, 2022, 09:14:18 pmYes. It would likely be okay for grounded secondary circuits, but iffy for isolated (for which Reinforced is needed).Tim

author: progidek
author_rank: Newbie
timestamp: April 10, 2022, 08:36:35 am
content: Quote from: magic on April 09, 2022, 07:45:11 pmPSU still regulates the output voltage for a few seconds or longer until the input filtering caps are discharged. I would like the device to turn off along with a switch. In this case the device turns off after these few seconds. Thanks anyway, because MOSFET is actually a solution here. I can built a simple circuit, somehow similar to whatNiHaoMikeshared.Here's link to it. Double optocoupler simulates the one with AC input. Gate capacitor charges for around 500 ms until the MOSFET is switched off.

author: magic
author_rank: Super Contributor
timestamp: April 10, 2022, 09:07:12 am
content: Quote from: NiHaoMike on April 09, 2022, 09:57:42 pmIs it meant to work with some sort of bidirectional optocoupler or does it avalanche the LED on every negative mains cycle?

author: NiHaoMike
author_rank: Super Contributor
timestamp: April 10, 2022, 12:43:58 pm
content: Quote from: magic on April 10, 2022, 09:07:12 amIf you look at the PDF, it is a bidirectional optocoupler.

author: Ron68
author_rank: Newbie
timestamp: April 10, 2022, 06:39:39 pm
content: You could have a 24VDC relay on the 24VDC output, driven by the output through a 24V zener or a voltage divider.

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 10, 2022, 06:56:33 pm
content: Just use a reset/power supervisor.Basically it reads the power and when over the min. level it starts a timer, if the power is still ok after ex. 200ms, the reset signal is released and the system boots.Falling the voltage below a certain level, reset is asserted again.This can be done even with basic parts (transistors, capacitors, resistors).