Powering stuff when there is a power outage





Have you had a power outage and wished you didn’t have a power outage?! You might have the tools to help the situation:




Well I guess the UPS (Uninterruptable Power Supply) devices are not super expensive nowadays, and if you live somewhere that power outage is common, I really recommend you get one. They are always plugged in, so always keep their battery charged and when the power fails they automatically power on and keep things on.

But hey! you may get surprised by an outage outside home like happened to me. At the end of the party I realized I had an inverter in my car. I asked the host for a drill battery and he had an 18V one. Unfortunately it was too high and my inverter started complaining. I thought maybe I connected it backwards, and being so sure that an inverter design must have adequate reverse polarity protection, I connected it backwards and it blew up!!!! DAAAAMMNNN!

I mean what the hell man! In any product where they leave it to the user to connect the power lines, they MUST make sure that their device can withstand a reverse polarity connection! Isn’t that obvious?! I mean probably they get half of their products returned because some dude like me connects it backwards. And the solution is so simple too.

Below is the circuit they had in their design. The fuse is made of 2x 25A fuses in parallel. The diode is a general purpose power diode. I have seen this in some designs before and is a dirty way of doing reverse polarity protection.

Reverse Polarity Protection Using a Fuse

Reverse Polarity Protection Using a Fuse

The thought behind it is that if somebody connects the supply backwards, the diode will be forward biased and clamps the voltage across the circuit to a small negative value, like -0.7V to -1V, and that should be enough to save the circuit. In return this shorts the supply and so there will be a large current that blows the fuse. So the circuit is saved and you just need to replace the fuse.

Sometimes the designers use the resettable fuses instead (thermal or PTC) or breakers, so that the user won’t have to replace the fuse. Still, this method is generally good for low power circuits.

For a high power circuit like an inverter where there could be large nominal operating currents, the fuse has to be rated much higher like 50A in my case. So to blow the fuse in time, the current has to be well over 50A. This, through a regular diode, will generate a large negative voltage above -2V. Such higher negative voltage can damage the circuit. So although they have a protection, it is not protecting anything, and they mention that in their datasheet too!

The text below is taken from a Stanley inverter datasheet:

Inverter Datasheet on Reverse Polarity

Inverter Datasheet on Reverse Polarity

In my experience, a type of rectification works much better than this circuit. You might suggest a regular diode, which is fine for low power circuits. But for a high current circuit the diode would waste a lot of power (Vdiode x Current) and would need power diode and large heat-sinking just for normal operation. I rather use the following circuit which utilizes a MOSFET for reverse polarity protection.

Proper Reverse Polarity Protection

Proper Reverse Polarity Protection

We still keep the fuse, in case there is a short on a failing circuit or an output short. The fuse would only open in cases of catastrophic failure.



D1 diode is a TVS (Transient Voltage Suppressor) diode, which is like a zener diode that starts conducting at a defined reverse voltage. What I suggest here is a bidirectional one, which means for example a 40V TVS won’t conduct until it is above + or – 40V. It is there to absorb low power transients and spikes, like ESD or low power engine power transients. It conducts at high voltage and with the help of the transient source output resistance, clamps the voltage below a certain level to protect the circuit.

Now the Q1 MOSFET circuit is what does the rectification for us. In this example Q1 is a P-Channel MOSFET. How it work is like this:

  • Imagine everything is off and the output voltage is zero at the beginning.
  • When input is applied correctly, the supply voltage passes through the body diode of the MOSFET raising the output voltage.
  • As the output rises the gate-source voltage of the  MOSFET rises through R1-R2 resistors and so Q1 MOSFET turns on.

Having a MOSFET on is much better than just a diode, because it can be chosen to have very small ON resistance and so wastes very little power compared to a diode.

Now in case of a reverse polarity, if the MOSFET was already off, the body diode of MOSFET also blocks the output from the reverse voltage. R1 keeps the gate-source voltage at zero and the MOSFET remains off. And so the output is blocked from the reverse input.

If we start from a positive supply and then the supply goes negative:

  • MOSFET starts from ON state
  • As the input drops, the output drops too as MOSFET is on, and so does the gate-source voltage of MOSFET through R1-R2 resistor
  • The MOSFET turns off as input is passing zero  and gate-source voltage is zero
  • When input is below zero, MOSFET is off and blocks the circuit from reverse voltage

The gate-source voltage of MOSFETs is usually rated for 20V or below. This is the reason for having D2 zener added to R1-R2 resistors, so that it can clamp the gate-source voltage below 20V. An example of good values is a 16V zener, 47k for R1 and 10k for R2. The MOSFET should also have a drain-source voltage rating above the maximum reverse voltage.

If your input NEVER rises above 20V gate-source rating, then you can ideally eliminate R1, R2 and D2 and directly connect the MOSFET gate to input negative line.

Also, the MOSFET circuit can be flipped to the ground side using an N-Channel MOSFET. The benefit of N-Ch is that the ON resistance of N-Ch MOSFETs can be much lower than P-Ch, and so can handle much higher currents.

Now every MOSFET has some input capacitance that combined with gate resistors, slows the response time of MOSFET. So if the input switches from positive to negative super quickly, the MOSFET can conduct for a while in negative voltage as long as it takes to turn the gate-source voltage off. This could damage the circuit, so:

  • Pick R1-R2 that combined with input capacitance of MOSFET, results in a time constant much faster that a negative going transient edge.
  • Have large capacitors on the output to absorb high-speed low-power negative transients.
  • You can have a reverse diode on the output of the MOSFET, so that it conducts for a very short period of time it takes for the MOSFET to fully turn off. Such diode won’t blow a fuse as the time it conducts is very short.

One last note on this circuit, if you have large capacitors on the output of the MOSFET, make sure the MOSFET can take the in-rush current required to charge the capacitors.

Wow! I didn’t even know I was going to talk about this subject until my inverter blew up! But I guess that’s out of my system now. Let’s talk about powering a home using an inverter.

Like shown in the following picture, the output of an inverter (green pulse shaped wave) is not a nice sine-wave like the outlet voltage (yellow). The city voltage is created by actual generators like water or wind turbines and those create sine-wave voltages. But in an inverter, they simulate the AC by switching the battery voltage across the primary of a transformer, and the transformer amplifies the voltage to 120VAC. Maybe I should make one myself.

AC Waveform ComparisonThey both have the same RMS value of around 120VAC. But they don’t have the same exact frequency as their frequency sources are different. That results in them being out of phase as they keep moving relative to each other. So when one is high, the other one can be low. Connecting them will short them and result in a large spike. So even if they were both sinusoidal and in the same frequency, if they were not in phase, it would cause a high current short circuit connecting them.

So you might wonder, how can those houses with solar panels feed power back to the power grid? Well now you know that it is a tricky business. Those inverters create voltages that are sine-wave, and have the same frequency and match their phases to grid voltage, and are slightly higher voltage so the power flows from them into the grid.

And this is why powering a room through an outlet using a regular inverter, the breaker feeding to that room must be opened. That way after the outage is resolved, city power doesn’t short to the inverter power.

Anyways, it might just be better if you have everything you want to power connected to a power bar and just plug that into the inverter, or just by a UPS!