Inverters and Isolation

Take a look at the picture blow, of a 400 watt inverter I garbage picked a while ago:

Common mode voltage on the inverter output.

The inverter is running off a 12 volt battery, and is switched on.  Notice anything interesting, particularly with how the meter is connected and what it’s reading?  (You may have to click to embiggen, so you can see the display.)

The meter is connected between the negative (black) battery post, and one of the legs of the 120 volt output, and is reading about 67 volts AC.  This works between that post and either leg of the output, as well.  Going between the two legs gives 117 volts, which is the output we want.

So what’s going on here?  The problem has to do with grounding and isolation.  Inside the inverter, there’s a circuit that looks something like this:

Simple H-bridge inverterThat’s an H-bridge, a switching arrangement that lets you supply a load (on what I have labeled here as the AC out wires) with either normal or reversed polarity, or none at all.  This is very simplified; you’d want to drive the switches (MOSFETs in this case, could be something else like an IGBT) with some sort of switching scheme of some sort.  However, this is the basic mechanism by which the inverter makes alternating current.  (There are other ways to do this, including one with just two switches, but this is the basic idea.)

Notice the ground symbol on the low-side of the H-bridge?  That’s our problem – imagine that the MOSFET just above it (the lower left-hand one) is on, as is the one diagonal from it in the upper-right.  The other two are off.  If we measured between the AC out leg from the left-hand side of the bridge to the ground node, we’d see 0 volts, because it’s the same node – the transistor shorted that leg to ground.  But, milliseconds later (about 8.3 if we’re at the beginning of the cycle) the transistors switch – now, that same leg of the AC out is at the voltage of the DC source (could be battery voltage, or could be from a DC-DC converter), and that’s what we’d read on the meter.  It would be in this state half the time, and with the meter set to AC voltage we’d read something like the 67 volts in the first picture.  The AC output is floating with respect to the ground point.

The problem, then, is if at any point in your AC wiring the ‘neutral’ conductor is tied to ground, and that ground is also tied to Battery-, you have a short-circuit path!  This depends on the design of the inverter as far as whether or not it’s a pure short circuit (the DC source would have some impedance to it, so it might not necessarily be like a dead short on the battery), but it could still damage your inverter.  Not to mention that having a voltage between Battery- and the AC neutral or ground would be a safety hazard.

So, how much of a problem is this, really?  Well, in the picture the inverter is running a laptop charger, which is encased in plastic and I think actually provides isolation between its input and the laptop.   So, here I’m not worried about it.  However, say you wanted to provide some backup power to your house in a power failure.  It’s not uncommon for people with a generator to backfeed their circuit breaker panel (either with into a normal outlet with an aptly-named suicide cable or with a proper receptacle and transfer switch).  So what if we did this with this inverter instead?

In the US homes typically have the neutral and ground bonded together in the circuit breaker panel.  Now, say you have a little system with some solar panels and a big battery to run the inverter, and you happen to have the negative side of the battery grounded on a watter pipe in your basement, or maybe even the ground wire in your house wiring…  Even if you drive in a separate ground rod for the DC side, you’ll wind up with a current path, and a potential safety issue.

Now, a 400 watt inverter is a little small for backing up your whole house, but there are larger, cheapy inverters like this one that probably have a similar design.  If you find a 2000-3000 watt inverter at your local hardware store for a few hundred dollars, this is probably the case.

So, how can this be fixed?  Take a look at this update to the schematic from above:

Inverter with a transformerNotice that there’s a transformer on the output of the bridge – now the AC output is isolated from the DC side!  So you can use the same ground on the DC and AC sides.  There isn’t an electrical connection, there’s a magnetic one, so we just transfer the energy across.  There is a small section where the AC is floating, but it can be safely enclosed in the inverter chassis, and insulated appropriately.  Of course, there are other solutions; the DC source could be fully isolated itself, and the low-side of the H-bridge could remain ungrounded.  This way you could still reference the output to the inverter’s DC input safely.

You could also get an isolation transformer and put it between the inverter and your loads.  This would solve the problem, but would give you a little drop in efficiency – it’s not the same as if the transformer is designed into the inverter.  Also, the cheap inverters that don’t isolate input from output tend to be modified sine wave (really modified square wave), and so could cause an off-the-shelf isolation transformer to run with even less efficiency.  (A true sine wave inverter could also have this problem; the difference is in how the switching is done.  But, a lot of high-end sine wave inverters tend to take the isolation problem into account, it seems.)

On another note, those working with renewable energy will tell you that building a solar power system just for the off chance your grid power is out for a few hours a few times a year isn’t very economical.  This is true, but I imagine that there are people out there who will think of attaching a big, cheap inverter to their home’s wiring, which is why I threw this together.  The moral of the story is, if you’re going to distribute the AC from your inverter in a more complex fashion than an extension cord and power strip, check for voltage between each AC leg and the negative DC input.  If you’re looking at buying an inverter, see if you can go to the store and try this with a multimeter.  Or, call the manufacturer, and see what they say about hardwiring it.  If it’s designed to be wired into an electrical system, there’s a good chance they’ve thought of this problem.

Power Inverter

I have a terrible habit of thinking of projects that would be neat, starting to work on them, then forgetting about them or otherwise leaving them until some point in the future at which I remember them, and then the cycle repeats.  Well, I’ve been mulling one particular project over in my head for a couple years, and now I’m going to declare my intention to start it and hopefully share it with the world: I am planning to build a power inverter.

Now, the truth is I have started on this project a little bit, mostly by sketches on paper and in LTspice, an excellent,  free (but not open source) circuit simulator.  For those unaware (and who didn’t feel like reading the Wikipedia entry), a power inverter (I’ll probably just refer to it as an ‘inverter’) is a device that converts direct current (DC) to alternating current (AC).  There are a number of applications for this…

  • Running household appliances in your car (shave while you drive!)
  • Backing up servers, medical equipment, or whatever else you want to keep running when the power goes out (UPS)
  • Running normal household appliances on a small renewable energy system
  • Connecting your small renewable energy system to the grid

And so on.  Inverters range from small ones you get at a hardware store, to big ones that can run small villages.  I’m not trying to run a village with this project, nor am I trying to power a significant portion of my apartment.  I would, however, like a small, high-quality inverter, and to really learn how it works.  And, I would like to publish instructions for this online, so that hopefully they will be useful to other people and the design can possibly evolve.

Here are my objectives for this project:

  • Output of 120 VAC, 60 Hz (nominal), 300 watts
  • Input of 12 VDC (nominal)
  • Sine wave output
  • Bidirectional: can also function as a battery charger with a transfer relay, similar to an uninterruptible power supply (UPS)

Now, this isn’t really anything novel.  As I mentioned, there are smaller inverters around, and you might be wondering why this would be worthwhile compared to say buying a small inverter at the hardware store for less than $100.  Well, as I mentioned, I’d like to learn, but that’s not all.  Note the ‘Sine wave output’ requirement.  Most of those cheap inverters won’t have this and will thus produce dirtier power.  Also, I haven’t really found a smaller unit that can act as an inverter/charger, which is something that would come in handy for me – while I do have a largish battery with some solar, it would be nice to be able to charge from the grid with this unit and essentially have a UPS.  Of course, I could get a UPS too, but they’re not really designed for continuous usage, they tend to have dirty outputs, and are designed for charging smaller batteries (usually big enough to allow you to shutdown your equipment, or start up generators or whatever).  Also, for safety reasons, I will NOT being setting this up as a grid tie inverter, meaning it won’t sell power back to the power company.

Now, I would also like to point out that I am not sure how well the design I’m considering will scale.  By this, I mean that were I to build a bigger unit (>1kw), I might approach it differently – this is kind of an experiment.  So, if you’re thinking of building something that you can use to power a chunk of your house when the power’s out in the next hurricane, I’d advise pursuing other options at this point.  (Hey, hopefully this can evolve…)  There are actually several commercial manufacturers that make products (inverter/chargers) that are similar to what I’m building, but work at higher power levels.  I have not used any of those companies’ products, but they do have decent reputations.  Also, if your power doesn’t go out very often, and you just want some quick, cheap backup, a normal gas-powered generator isn’t a bad idea.

I should note that I would not consider this the ideal beginning electronics project; while not impossible it will be somewhat challenging, and will involve high (lethal) voltages.  If you’re unsure of things, feel free to ask here (I’ll try to answer as best I can), and go brush up on power electronics (there are plenty of books on this subject, as well as college classes).  I’ll be saying this again, but whatever you try must be at your own risk.  I’ll try to keep up with this and post more as I go, so stay tuned.  It should be fun.

Projects

I’ve mentioned before that I’m into solar power, and that there are a couple projects I’m getting into.  Well, I’ve been thinking about a couple things for a long time, but I’m just now starting to get into serious development.  There are two things: a maximum powerpoint tracking (MPPT) charge controller, and a sine wave inverter/charger.  The first of these is a good tool for extracting extra power out of solar panels, while the second is instrumental in interfacing the DC and AC sides of a power system.  That is, the inverter/charger will allow you to get clean AC from your batteries, or charge them from a source already available.  Think computer UPS, but designed for a slightly different purpose.

There are various homebrew projects like these floating around the Internet, and I hope to contribute something.  By posting about these here, I hope that I remain focused on them :).  This should be interesting, and maybe even useful to someone.  I’ll try to give an update here and there as I come up with more of a solid design for both.

Thanksgiving

Things have been a little strange for me for the past couple weeks, and honestly posting here has not been at the top of my mind.  For one thing, I lost one of my cats, Lilly, who has been with me for about seventeen years.  That was a difficult week for me.  For another, I just haven’t had much to say.  I have been working on some things, though, and soon would like to share them.  I plan to make a wiki, which only I will be able to edit, but which will be a better format for posting projects and the like.  One thing I am working on is a true sine wave inverter, a simple one at first.  If you’re not sure what this is, check back eventually :).

In the meantime, though, I had a great dinner last night with my family.  I am in the USA, but I wish you all the best on our Thanksgiving holiday, no matter where you are.  Life can suck sometimes, other times it can be amazing.  Many of us have a lot to be thankful for, so take the time to reflect while you’ve got it.