Author Topic: Switching DC power supply output off along with input AC  (Read 1096 times)

0 Members and 1 Guest are viewing this topic.

Offline progidekTopic starter

  • Newbie
  • Posts: 2
  • Country: pl
Switching DC power supply output off along with input AC
« on: April 09, 2022, 05:42:34 pm »
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 :)
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22434
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Switching DC power supply output off along with input AC
« Reply #1 on: April 09, 2022, 07:26:03 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7228
  • Country: pl
Re: Switching DC power supply output off along with input AC
« Reply #2 on: April 09, 2022, 07:45:11 pm »
The right solution is to have a "power good" detector in the device so that it shuts down under insufficient input voltage :P

In 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.
 
The following users thanked this post: Ian.M

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13119
Re: Switching DC power supply output off along with input AC
« Reply #3 on: April 09, 2022, 09:00:34 pm »
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.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4751
  • Country: dk
Re: Switching DC power supply output off along with input AC
« Reply #4 on: April 09, 2022, 09:14:18 pm »
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.

but surely there is a difference between the functional isolation needed by a mains switch, and the safety isolation needed if you
put the isolated low voltage on the same switch
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9232
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Switching DC power supply output off along with input AC
« Reply #5 on: April 09, 2022, 09:57:42 pm »
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.
Wouldn'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
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22434
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Switching DC power supply output off along with input AC
« Reply #6 on: April 09, 2022, 10:34:31 pm »
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.

but surely there is a difference between the functional isolation needed by a mains switch, and the safety isolation needed if you
put the isolated low voltage on the same switch

Yes.  It would likely be okay for grounded secondary circuits, but iffy for isolated (for which Reinforced is needed).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline progidekTopic starter

  • Newbie
  • Posts: 2
  • Country: pl
Re: Switching DC power supply output off along with input AC
« Reply #7 on: April 10, 2022, 08:36:35 am »
In 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.

PSU 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 what NiHaoMike shared.
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.
« Last Edit: April 10, 2022, 08:41:14 am by progidek »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7228
  • Country: pl
Re: Switching DC power supply output off along with input AC
« Reply #8 on: April 10, 2022, 09:07:12 am »
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
Is it meant to work with some sort of bidirectional optocoupler or does it avalanche the LED on every negative mains cycle? :o
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9232
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Switching DC power supply output off along with input AC
« Reply #9 on: April 10, 2022, 12:43:58 pm »
Is it meant to work with some sort of bidirectional optocoupler or does it avalanche the LED on every negative mains cycle? :o
If you look at the PDF, it is a bidirectional optocoupler.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Ron68

  • Newbie
  • Posts: 4
  • Country: no
Re: Switching DC power supply output off along with input AC
« Reply #10 on: April 10, 2022, 06:39:39 pm »
You could have a 24VDC relay on the 24VDC output, driven by the output through a 24V zener or a voltage divider.
« Last Edit: April 10, 2022, 06:44:15 pm by Ron68 »
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6254
  • Country: es
Re: Switching DC power supply output off along with input AC
« Reply #11 on: April 10, 2022, 06:56:33 pm »
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).
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf