# Protecting DC power supply from accidental mains connection

Is there a way to protect a DC power supply from accidental mains connection on its outputs?

Edit: The protection should not require any service i.e. a fuse replacement. Protection should kick in when mains get connected and resume proper function once the mains have been disconnected. A resettable fuse or equivalent is acceptable.

Consider the circuit below. I have a 24V power supply supplying roughly 300 mA to the load. Load is connected between nodes A and B. I want to protect the PSU from getting permanently damaged if someone connects 220 VAC mains across nodes A and B.

I can think of putting a diode which protects the PSU from half cycle of mains but next half pulse will end up destroying it. If I put another diode between DC GND and node B, the DC PSU won't be able to give any power to the load. So far I have been thinking in terms of diodes. Is there a low cost (maybe 2 USD worth of components) and practical solution to this?

simulate this circuit – Schematic created using CircuitLab

Thanks

• Choosing the right sort of plug and socket goes a long way. Adding labels takes it a bit further but, you can't make anything foolproof. May 15, 2023 at 12:24
• Consider a user-replaceable, 300 mA, mains-voltage-rated fuse. The 24 V supply likely has some fairly large output capacitors; connection of mains AC will pop that fuse with little perturbation of the 24 VDC bus. May 15, 2023 at 12:35
• One option would be a fast acting fuse with a varistor placed across the A and B lines. A voltage surge would essentially create a short across the varistor which would blow the fuse. May 15, 2023 at 12:41
• @Andyaka Even worse, engineer proof. May 15, 2023 at 12:47

The classical solution here is to put a fuse in series with your supply, which will blow when too much current is drawn. To make sure a quickly fuse-blowing current is drawn when the voltage is higher than it should be, a so-called crowbar circuit is the usual way, unless the inrush currents to the capacitors would already suffice. (You'd still would add a diode that shorts negative supply voltage to ground to protect the capacitors from inverse voltage).

That crowbar circuit could be really simple: a single DIAC, or cheaper and probably also repeatedly usable, a simple diode that shorts the supply to ground if the input voltage happens to be lower than ground, and a MOSFET-based crowbar circuit that very quickly shorts the supply to ground when it exceeds some positive voltage (e.g., 30 V).

• Thanks for the answer Marcus. I apologize for not mentioning that I want the circuit to auto recover when mains are removed. There shouldn't be a need to replace a blown fuse or anything like that. I am trying to build upon your idea of crowbar and see if I can temporarily cut off the mains when it appears. If you have any suggestions, kindly help. A resettable fuse is okay. May 15, 2023 at 20:24
• yeah, resettable fuse would work here. May 15, 2023 at 21:38

I have used a circuit similar to this one. However the peak current through D2 is not well controlled and the fuse must be capable of protecting D2 by breaking the maximum fault current (out of your direct control) without exceeding what D2 can withstand.

Fault currents can be < 100A in a domestic environment to thousands of A in an industrial situation, even with relatively low voltage such as 240VAC. Glass fuses can literally explode in the latter case.

simulate this circuit – Schematic created using CircuitLab

Obviously your 24V supply must also withstand a brief connection to a small-ish negative voltage (a bit worse than a short circuit). A deliberately inserted small resistance (say a couple of ohms) can help control the fault current at the expense of a bit of voltage drop.. and the resistor may fail before the fuse - or you could use a fusible resistor, perhaps.

• Thanks for the answer. I apologize for not mentioning that I want the circuit to auto-recover when mains are removed. I don't want any fuse to blow up as a protection mechanism. This is the final fallback option though. May 15, 2023 at 20:21
• You might be able to use something like a high voltage MOSFET to block the voltage in one direction but it would be tricky to get it to break fast enough and would be expensive. I’ve done something like this in a case where it absolutely had to be idiot-proof and cost was of no consequence. May 16, 2023 at 2:31