How To Build An Inverter, And Why Not To Bother

It’s ridiculously easy to lay hands on a cheap DC-to-AC inverter these days. They’re in just about every discount or variety store and let you magically plug in mains powered devices where no outlets exist. Need 120- or 240-VAC in your car? No problem – a little unit that plugs into the lighter socket is available for a few bucks.

So are these commodity items worth building yourself? Probably not as [GreatScott!] explains, but learning how they work and what their limitations are will probably help your designs. The cheapest and most common inverters have modified square wave outputs, which yield a waveform that’s good enough for most electronics and avoids the extra expense of producing a pure sinusoidal output. He explains that the waveform is just a square wave with a slight delay at the zero-crossing points to achieve the stepped pattern, and shows a simple H-bridge circuit to produce it. He chose to drive the output section with an Arduino, to easily produce the zero-crossing delay. He uses this low-voltage inverter to demonstrate how much more complicated the design needs to get to overcome the spikes caused by inductive loads and the lack of feedback from the output.

Bottom line: it’s nice to know how inverters work, but some things are better bought than built. That won’t stop people from building them, of course, and knowing what you’re doing in this field has been worth big bucks in the past.

30 thoughts on “How To Build An Inverter, And Why Not To Bother

  1. Ah ha, good post. All sorts of issues with switch mode inverters. I designed the “Mypower-200” automotive unit circa 1990. ie cig lighter plug to basic modified sine offering 200w surge mode around 150w sustained for 50Hz output peak volts on cycle 330v with ideal 12v input connections. Sold just over 4000 of them mostly Australia through Solartronics Australia head office Perth Western Australia. Did our own extrusion assembled in Perth. Key issue for DC to DC stage was ‘gentle’ gate drive to mosfets (slow turn on/off) from a lucky find being a CMOS bistable chip easy to control deadtime. Ran at about 60KHz or so. Lot of attention to the transformer, our first big Chinese purchase. The core and winding took a couple of iterations, 3 turn wide foil primary push pull. Manufacturer did the right thing with consistent production quality. We tested it for 250w and got about 96% efficiency 20C in first 10 secs operation at 150w then drooped to 92% or so. Few customers overloaded the things, tech repairs let us down with negligible attention to static control measures. Good experience, we used bootstrap mode on output bridge drive, MOVs and simple filter, might publish the circuit diagram, have to find it since I moved an A3 sheet plotted on my 7586B hp grit wheel vertical plotter…

    1. I would love to see the circuit diagram for these. I find it amazing that its half diagram and half black magic in transformer design and weird perfect points with soft gate drives. You would think hard gate drive with high current source/sink would be ideal with a capacitive load.

      1. The faster we turned on/off the input MTP50N05 the more problems we got with all sorts of supply rail noise even with best closest lowest esr/esl devices, the harmonics caused all sorts of regulation issues in the four IRF840 output H bridge mosfets also coupling into the SG3526 pwm driver and filter, ie that had a 100hz drive to the bridge but needed to sense the 330 DCv on a 100uF electrolytic. All sorts of control oscillations caused erratic operations. Similar issue with output bridge too…
        Once we added series gate drive resistors we could tune out almost all the high frequency coupled noise and better yet when we also added a twin tee filter between the hi voltage bridge to electro with ground connection to centre of mosfet’s ground return (we kept to MEN convention too). The difference in switching efficiency was less than 6% which was a bit of a surprise as the change in gate drive shape appeared very significant ie typical rough area under curve differential. So a little more heat from those mosfet’s were tolerable and more than acceptable for our parts reduction.
        Then found a CMOS MOSFET driver with less grunt happily close enough to what we arrived at with series resistors. We didn’t even bother with buffer transistors – the CMOS output direct to the MOSFET gates And we were ok with hiding the cmos drive chip under the ferrite core :-) So we dispensed with the resistors and also lucky we didn’t need them on the output bridge, then we found the twin tee filters could be cut in half with minor cap amendment saving even more stuff.
        With a fully stabilised SG3526 output stage, couple of good (precise) MOVs (which did get quite warm) we could happily drive a 200W 240v AC universal commutated motor despite comparatively high inductance just fine with a couple of layout alterations nestling a 3 pin Australian socket between bridge parts. Still have about a dozen or so units from almost 30 years ago. Have been tempted to redo the design with modern HF cores and other ‘things’ just to see how small I could make it these days but, now delving more into food science and diverse instrumentation issues with electronics back to hobby status of mid 1970’s but, still really enjoy musing on these things… Oddly have never seen the inverter design copied anywhere as the Chinese inverters of that era were only a little cheaper yet no where near as reliable or able to handle our surge capacity.

        1. > couple of good (precise) MOVs (which did get quite warm)

          The getting warm part is bad as MOV wears out if you repeatedly expose them to surges. Might want to read the datasheetapp notes.

          “MOV technology exhibits an inherent wear out mechanism within the structure. As the device absorbs transient energy (surges) the electrical characteristics tend to drift. IR (Leakage) and BVR (Breakdown voltage) can move away from their original specifications.”

          1. Thanks tekkieneet,
            We were well aware of that and any consequent temp rise also well within SOA for the units temp and thermal resistivity on those specific leads too for max ambient 45C and also mounted on the Australian GPO too so well sinked thermally as the leads 2.5mm into pcb – in other words all classic engineering issues full apprised for worst case inductive loads correctly affirmed by supplier in writing :-)
            Suffice to say feedback from the manufacturer qualified their usage, it is standard practice to inform the manufacturer with design specifics in such bulk usage to ensure any failure rate below the quoted guideline which iirc was less than 1% for sustained inductive exposure transients approaching one joule per half cycle with so called relax time. It was almost 30 years ago, bear in mind best practice is always advise manufacturer of duty cycle under ambient temps re worst case as well as error margin too – which is exactly what we did with appropriate feedback :-)
            Cheers

  2. I have sometimes done the opposite, buy a cheap inverter and strip it for the transformer. At times you can pick up a system for half the price of the transformer inside. One thing that may be worth doing is buying a cheap transfer based modified sinewave system, and driving it via an inductor and PWM control to yield true sine wave outputs. Perhaps one of those ridiculously cheap class D amplifiers would make a ridiculously low distortion inverter.

      1. Ah ha !
        Don’t think it’s a true ASIC at all (co name very familiar though used to be in USA/UK) more likely a CPU such as an Atmel variant eg 89s53 etc. Few co’s tried that on since start of single chip processors in mid 1980’s heck I even did that 1984 with the MC69705S2 by bending the pins upside down (it was a 0.6inch dip not anything like a plcc) and making a PCB to suit the mirror pinout so nicely obfuscated and issuing an appropriate chip ‘spec’ with re labelled pins to obfuscate even further – even shaving a ttl for the quadrature to binary interrupt generator for bilateral optical encoder to quadrature machine tool position indicator to 4 digit 7 segment led display – range -99.9mm to 999.9 mm. The nmos chip’s uv window was then upside down on cct board so from the normal view looked like an ASIC in that no one saw it – bit cute but worked a treat and no one knew or copied the CPU especially in those days when there were no true security it’s meaning the EPROM could easily be copied…

        1. Thanks for the anecdote, but TLDR what you came to say was:

          “Don’t think it’s a true ASIC at all”

          Which you stated without any proof other than a vaguely related example.
          Thing is. No one cares if it is an ASIC or not. That’s what the datasheet says and I C&P’d it.
          I didn’t even know what it stood for. Really didn’t care (but had a vague idea).
          Probably because it didn’t matter but I’ve since looked it up and yep, it still doesn’t matter.
          More importantly (and dare I say relevantly) the part is being used in many successful true sine inverter builds and commercial products.
          And there are plenty of others to choose from that do a similar job for a low cost.

          1. Np Dave, for what it’s worth sure it can be a simple quick solution for so many if you don’t have an engineer on your team many could be fine with that and your suggestion of cost could be fine too for low cost entry to that market at some minimal level. Once you realise it’s not some obfuscated no-name chip but really a common CPU and you have an engineer then you can arrange to craft the sinewave table from simple geometric inspection (and with more modern chips too) and using code for your own pwm queing to achieve the same things with perhaps more sophistication. From a commercial perspective and depending on your mandate in respect of intellectual property issues as part of co risk assessment for final products and liability in regard to suppliers it’s useful to assess whether you want to be dependent to a single supplier for which most of the IP is bound (and often without much responsibility or insularity) or you install sinewave tables under your co control using simple code offered by the CPU manufacturer’s application examples in the first place. In other words it all depends. These days of course a lot of methods are various some better and the option is still there for knoeing dependencies. Your CEO or the general tech manager if fully switched on will do the numbers depending on short return or market positioning long term. I’m not denigrating your link, the part is fine and likely with fair support, its the obfuscation re it being an ASIC that raises a minor heckle as it can so easily dissuade and mislead newer entrants to best returns from these sorts of markets as knowing it’s not that hard to grow your own. In hobby circles there is a bit more satisfaction in exploring this too at a more fundamental level as that is more focused than a quick fix it part off the shelf…

          2. The manufacturer EGmicro also makes specialized microprocessors, like MCS51 derivatives for motor control. Unfortunately the website is in Chinese. But it is possible, that it is a microprocessor, although they market it themselves as an ASIC. But the borders get blurred anyway. The IC can drive a display or output voltage, current or power at a slow (2400bps) serial port. -> could be a µC
            The block diagram looks more like a dedicated ASIC with some state machines and digital logic.

          3. Ah, the block diagram appears (a wee bit) contrived to further give impression it’s some special unit (as in one must get from them) not a base common industrial grade cpu one can simply program easily with mcs51 code. I write that as one co I advised got burnt a bit re some FPGA/ASIC for mil use but, turned out to be less than industrial with difficulty in sustained 75C operation under load and close inspection found it was an 82s53 copy or knock off or even a batch failing original full quals. Suffice to say few odd issues though mostly minor did not stack up. Unfortunately been there a few times and co’s such as that make claims too easily their chips are somehow really “special” are far less likely to be true than ever before. These days it’s also far easier to fudge chip Provenance as some fabs and supply chains via more than one obvious fab allow custom numbering too – minus trade mark graphic logos of course – one Must be aware of claims vs Evidence for sizable qty’s – ie Apprise oneself of Microscopy with benefit of dimethylsulfoxide if need be if ordinary epoxy if any doubt and read the die id ;-)

          4. @Mike,

            As it happens I have worked in the field of manufacturing and been responsible for directing engineers along with various other jobs in bringing product to market.
            The reality of the modern world is that you need to get solutions out there quickly. So you dont have engineers reinventing the wheel when there is a suitable one already, unlesss you feel you can add significant value, save significant cost and thus make more profit. Of course this depends on which market you are in but it’s a pretty ready recipe for all.

            Keeping engineers on track and focus on the end goal and not their view of the ideal goal is like hurding cats.
            Having to deal with the stereotype “must be kept in isolation” types is pretty much daily bread as then tend to be very good at their job (when focused) and in demand, but need steerage and control.
            It takes quite a few skils to translate the engineer speak to management speak, to keep everyone on focus and not at war within a company. Especially when most of the above mentioned “engineer types” actively and arrogantly look down on anyone who isn’t an engineer (by qualification, not aptitude) and dares to try to hold a conversation with them without accepting their view of the universe and gospel.
            Then they wonder why they dont get promoted and end up bitter.

            I’d also expect the supply manager to be on the ball to mitegate many of the problems you list and not have an engineer wasting his time thinking about it, and by that I mean having the suppliers balls in the palm of his hand.
            My experiences with CEO’s is that they dont roll up their slevees and get involved unless its’ a company of sub 20 people with grandiose titles. Any more than that and they aint got a clue what is really happening.

  3. i have built a number of inverters, it’s important to pick the right mosfets, use the right h-bridge mosfet driver and get a driving transformer designed for the task
    picking the right mosfets are generally where people screw up, but in this case it looks like the wrong type of transformer was chosen

    but when you have all of those things researched its a fairly trivial and fun project that looks real nice on your resume
    but i do recommend 4 step and/or filtered designs to reduce output noise and improve longevity of what you have it connected to giving some semblance of a sine wave

    bridge rectifiers are generally not happy with large inductive spikes 60 times a second if your not careful. honestly if your end device is switching with a bridge rectifier, using just a 165v DC (in america) power supply is a simpler task and works just as well … just dont plug a transformer or motor in to it

  4. I think it will be difficult to generate a high quality modified sine output using a 50Hz transformer. It would be easier to just create ~350Vdc and then use your H-bridge to generate the output waveform.

    I think if you would create a PWM’ed 50Hz sinewave through your inverter and then applied it to the transformer it would work much better.

  5. I’d be interested in buying an inverter for portable operation with a Lithium-Ion (or LIPO) battery pack. Car inverters are typically designed to work with a minimum of 10.5V or 11V (deep-discharge protection for lead-acid-batteries) and a maximum of e.g. 15V (maximum charge voltage). For a 3S lithium battery the deep-discharge protection would turn it off far too quickly when the battery is still half full or so (for example, the NCR18650B only reaches ~1300mAh instead of 3400mAh with a 1C discharge and 3.5V cut-off voltage per cell => 10.5V for 3S). On the other hand, a 4S pack fully charged to 16.8V might be a little bit too much for a 12V inverter and damage it (wouldn’t be surprised to find 16V input electrolytic capacitors in a 12V inverter). Anyone has a hint/model recommendation for a suitable 230V inverter for 4S operation?

    1. I had the same problem. I found one brand that made a LiPo version but it was very expensive and aimed at the professional market. I still have the quote somewhere so can look it up if you want. In the end I modified an off the shelf lead acid inverter by changing the battery measurement voltage divider.

      1. This is the answer right here. I am currently working with LTO battery backs which have a fairly wide voltage range of 1.9 to 2.6 volts per cell, so an inverter that works across this range has been proving hard to find. The best solution so far are the simple inverter kits from ebay using SPWM, they seem to be amazingly flexible regarding input voltage, as the output voltage is simply scaled from the hard coded SPWM waveform in the driver chip. All you have to do is make sure that at minimum voltage you can still get your 110/230vac from the transformer, and as the input voltage rises, the controller chip just scales the SPWM signal back.

        1. Just taken a look at these boards (EG8010) but I’m not too happy with it since it will require a bulky 50Hz transformer to generate the 230V output voltage. With a 1000W power rating, this transformer will weight at least about 8 kg for a modern ring transformer (or rather 12-15 kg if you want to go with a cheap surplus standard/no-ring transformer from ebay). This is not acceptable for a portable LIPO-powered inverter. Commercial inverters use a high-frequency transformer (similar to what you’d find in a PC power supply), which can be an order of magnitude smaller/lighter than a 50Hz transformer with the same power rating.

  6. I have a cheap chinese pure sinewave inverter. Strangely enough it uses two separate transformers with the two secondaries connected in series (before the bridge rectifier) to produce the required 360V. And the intermediate voltage is unregulated, so with battery voltages near 15V it rises above the 450V rating of the electrolytics. This increases the standby current consumption above 2A. There was some kind of hysteretic control loop implemented, but the setpoint was 660V. Probably because it causes tremendous current spikes when recharging the HV electrolytics in a puls skipping mode. Despite this I changed it to something like 380V to reduce standby current to something like 0,25A and avoiding overvoltage at the electrolytic with a fully charged battery (solar application). It males ticking noise in standby, but I decided to use it until it breaks.
    The output regulation is quite good in steady state, but its 600W / 1200W(peak) rating is also quite optimistic. A 600W hedge trimmer with universal motor stays in a voltage foldback limit state at 100V and 0,3A instead getting up to full power at 230V. A handheld wood planer with 600W takes about 30s to spin up :-)

    1. Hmm, 339v is sqrt 2 times 240v so 360 IS a bit too high, ie normal to add around 1.5% for switching losses. The two transformers in series odd though their production batch might have used bulk parts from other leftovers from several devices for different markets in that those two offer other addition options, unusual but not uncommon, the dynamism in some Chinese manufacturers can be extreme with all sorts of stock levels from failed orders so often to juggle current paid orders to save time…
      To regulate input a bit can use zener in series with resistor so branch point reduces output on pwm drive cap oscillator, bit of a hack but, can work well ie reduces pwm by ratio above 14.5v which is average max alternator charge volts on most standard alternator cars. Could have used an ntc thermister to manage current spikes into caps with suitable ntc thermal sink. The ticking is load searching ie won’t turn fully on until more than a minimal load exists ie low power auto turn on mode used to be pretty common, better ways these days with processor options for very narrow pulses alternating and summing power for 100ms as guess for a load properly on. Could possibly add sizable capacitor across load resistor sense so it takes longer to provide max power before rolling back – have done that a couple of times with the odd UPS driving bad power factor SMPS loads…
      Can be fun investigating various SMPS designs with minor hacks, safety beware have been bitten a few times – once knocked out across room for few minutes and that was only a 100uf capacitor with 340v on it !

      1. I think you are right in the “leftovers” parts theory. Although the seller called it a “new, improved design” which allows to build the unit smaller. :-) I would say, at least cheaper.
        No, the converter does not do any load searching. In my opinion the only possibility to improve the design of the step up converter would be to change it from a pure transformer design (center tapped primary at BAT+, NFETs pulling each side to ground every other cycle with 30kHz and a fixed duty cycle ~90%) to a forward converter for PWM regulation by adding a storage inductor between transformer and HV bridge rectifier.
        The ticking is reloading the intermediate voltage capacitor. The output voltage of the transformer is higher than the setpoint of the regulation, so basically when the cap voltage falls a little, the transformer switches something like 420V to a cap with 360V. The current is only limited by the impedance of the feeding source. It was not so bad with a 16A PSU while testing, but with 100Ah LiFePO4 battery connected by 0,5m of 16mm² cable the spikes increased substantially and let the “error” LED of the inverter flash.
        I thought about adding an inductor, but the case is quite full and I would have to design a stable regulation loop. I think without an inductor no PWM regulation is possible, at least I do not know a way for it.. The 2-transformer design also made an attempt to simulate the thing in LTSpice much more complicated. Any resistive limit of input current increases losses in operation with up to 50A of input current.

  7. I had a brainstorm way back when:
    Record a 60Hz tone onto a cassette tape.
    Reverse wire a large 12v transformer to the speaker of my cars existing JSE-1010A “120W” stereo amp .I did get some voltage out, but not much…..probably an impedance mismatch. It didn’t fry the amp thank the amp gods. Holy S*%# Batman, I just figured it out, shoulda used a higher voltage xfmr !

    1. My idea, back in ’79, was to take a variac core and wind a low voltage winding using some hookup wire, then drive it with a 555 driving a pair of power transistors. The low voltage side would double the 6 volts from my old VW so I could run modern electronics and the 120 volt side was sometimes useful. The 6V to 12V function worked fine, but the 120V pure square wave output was less than ideal.

  8. Interesting article and comments!

    I need about 500v DC @ 50 mA for a 15 W surplus tube HF transmitter, and one of the approaches I’m thinking about is to modify one or two 50 to 75W “cigarette-lighter” inverters to produce that voltage – using an additional step-transformer if necessary… which would allow the occasional mobile use of that transmitter as well.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.