12V DC to 220V AC Inverter

by Georg Böhmeke

The internet is full of such schematics, so this project is nothing special. I try to make it special by providing more explanations and oscilloscope pictures than usually given. The aim of all such DIY electronics is anyhow the knowledge and not the device, which you usually can buy cheap from China.

Operating principle

The principle is a rectangular output voltage shape with gaps in between. The sinusoidal wave is replaced by two blocks which have each half of the length of the sine half-wave. The output stage transistors are each conductive over 25% of the whole period time of 20msec (all for 50Hz). These 25% are proportionally adjustable. There are also schematics in the internet, which use a fixed division ratio, employing a counter IC.

Voltage control

The simple inverter here has so far no voltage control by varying the impulse/pause width. It is possible by a simple feedback loop. This option can be added later. It is needed if the voltage has to be stable under varying load and battery charge state. Because the pulse width is generated in an analogue manner, it is relatively easy to add a feedback loop.

Pulse shape features

The shape of 25% rectangles is insofar good, as both peak voltage and effective voltage are same as with sinusoidal voltages. So this voltage shape is often called “modified sine wave” in advertisements of commercial products.

With a sinus, the peak voltage is SQRT (2) * effective voltage, generally known mathematics.
230V effective gives 325V peak. If we use a rectangle of 325V over 25% of the full wave, our effective voltage is how much?

The pulse lasts 5msec and then comes 5msec zero voltage. After this, the same is repeated with negative voltage. We can divide the full 20msec wave into 4 portions. Positive pulse/pause/negative pulse/pause. The effective value is Ueff= sqrt((325^2*5 + 0^2*5 + (-325^2)*5 + 0*5)/20) =230V. So this is a good pulse/pause ratio.

Consumers

Operating switch-mode power supplies on the inverter will succeed because they charge with diodes to the peak voltage and handle this further. Operating bulbs or resistive loads as AC commutator motors also succeeds, as they react on the effective value. Induction motors will run only with special tricks, reduced power or not at all.

Device Probability of working Explanation
computer power supply 75% very sensitive with unnecessary serial data transfer between charger and computer which can be disturbed easily
mobile phone charger 90% the diodes need to be fast enough, they are just for 50Hz and not for a 1usec rise time
incandescent bulb 100% the most simple purely resistive load
energy saving fluorescents 80% internal electronics might get confused and start flickering or similar problems
coffee machine, toaster 98% Very high power, inverter needs to be large, but high power is usually made only with sine wave inverters
tacker with electromagnet 10% the magnetic circuit inside is optimized for sine wave only. Better use a compressed air tacker.
Hand-held drill, grinder, shaper 90% They work only if there is no built-in phase-cut control (dimmer-type) for speed control. If this is bridged and the tool is used in on/off mode, ok.
Motors, shaded-pole type 75% start problems possible, reduced power
capacitive auxiliary phase 75% capacitor to be optimised and switched between start and operation. Reduced power and higher losses
resistive phase refrigerator compressor motors 75% Strong inrush current needs about 5 times larger inverter than motor rated power. Motor needs to be compensated and the auxiliary phase needs an optimized start capacitor additionally.
Vibrating armature compressors, shavers, aquarium pumps 75% might need an L-C filter to get the voltage more in sinusoidal shape
electronically commutated DC motors, both permanent magnet and reluctance type 90% analyze the internal electrics if it does not run
Cheap oil-free compressor from Italy 90% mine has a high-speed AC commutator motor and a reduction belt drive inside (to my large surprise).

Inverter Schematics

The power part…

…is simple. Around the transformer we have two alternatively switching units, each consisting of the three parts power MOSFET, freewheeling diode, snubber. The MOSFETs do the main work, switching the transformer windings to the supply voltage alternatively. The current for 160W at 12V is

• I= 160/12= 13.3A but we have to increase by the efficiency of ca 80%, so it becomes
• I= 13.3/0.8=16.6 and once more by a normal power factor of the consumer, for example 0.9
• I= 16.6/0.9=18.5A and now this current flows only in half of the time of a full rectangular wave, and during the time of conduction the transistors carry
• I= 18.5 * 2 = 37A.

If the IRFZ44N has an ON-resistance of 20mOhm, one transistor would have a voltage drop of dU = 37 A * 0,020 Ohm= 0.74 Volt.

That is too much, as it creates a 6% loss (0.74V/12V). So I use 4 transistors in parallel and the loss of voltage drop comes to an acceptable 1.5%.

The freewheeling diode is necessary for such conditions where the load is inductive and the current lags behind the voltage. The transistor is already switched off and a current flows shortly through the opposite diode back to the battery. It is advisable to compensate all consumers exactly to avoid this unnecessary circulating current, it just causes losses. This is why the power of an inverter is given in VA and not in W.

Many power MOSFETs have an integrated freewheeling diode. I anyhow added some Schottly diodes for two reasons: to ensure the function, if someone uses a power transistor without built-in diode, and because a Schottky -diode will take most of this reactive current and relieve thermal stress from the power transistors.

The snubber is a combination of R, C and D. Goes like this: The transistor switches off. The transformer winding, which had been pulled to ground, is now free floating. The stray inductivity of the transformer generates a voltage spike of positive voltage to ground. This is fed into the capacitor through the snubber diode. The capacitor is charged to a certain voltage level, but the voltage spike is killed. Now, when the transistor is conductive again, the snubber diode opens and the capacitor is discharged slowly over the resistor and the conductive transistor. Compared to a simple capacitor, we avoid the current peak of discharging a charged capacitor. Compared to an RC-combination we can take the voltage spike better, as in this moment the R is bridged.

All power MOSFETs such as BUZ11 or IRFZ44 have an integrated avalanche Zener diode to protect from too high voltage. This reacts typically at some 60V for the above mentioned types. Theoretically we do not need the snubber. But practically we need it anyhow. First reason is that the MOSFETs become rather hot when they have to take away the voltage peaks, second is the bad experience that I had with a switch-mode device. The BUZ11 was damaged, which performed this overvoltage clipping with every pulse.

With a resistive load, there should be no such voltage spikes. An ideal transformer, loaded with a resistor, should behave like a resistor of just different value (you can transform it with the square of the winding ratio). But the transformer has its own inductivity, which results from the fact that low-voltage and high-voltage windings are not fully magnetically coupled. A part of the flux can go its own way, called leakage flux, and this makes an additional inductivity. This effect is strong and unwanted. A ring core transformer would be better, or a special transformer with mixed layers of primary and secondary windings.

In switch-mode power supplies, the voltage spike due to leakage flux is a notable problem, far more than with our simple iron-sheet 50Hz transformer, and there are tricks how to recover the energy. Very clever, and you can read all these tricks here: http://www.joretronik.de/Web_NT_Buch/Kap9/Kapitel9.html Thanks to the author! You might need the Google translator if the German language is too far away from your native language. Picture 9.1B shows the classical snubber as explained before.

The impulse generating part….

….allows a huge lot of variations. There is a circuit in the internet, which uses 200Hz and divides by four.

• Time step 1 = left transistor conductive
• Time step 2 = pause
• Time step 3 = right transistor conductive
• Time step 4 = pause

This is a good method, but does not allow proportional variation of the pulse length, which may be desirable for controlling the effective value of the voltage (peak is always same unless you switch the transformer windings).

The circuit which I used here is a rather classic basic circuit which is also suitable for generating pulse width modulation. At first, an oscillator generates a 50Hz square wave signal. This is then integrated using a simple RC lowpass. The output is a triangular shape with the middle at half of the square wave voltage. The method does not exactly make a clean triangle, but slightly curved flanks. This is not a problem here.

Now this signal is compared with two comparators. One comparator compares with the middle voltage PLUS a little bit, the other one MINUS a little bit. How much this little bit is, can be adjusted by the 50K poti in the voltage divider. The result is an adjustable pulse width for two channels. Critical is here the symmetry. If one pulse side (for example the plus side) has a little bit longer pulses than the negative side, the transformer will be magnetized in average into a certain direction. With each pulse the transformer is driven more and more into asymmetry on its magnetization curve, until it reaches saturation and the too long pulse is magnetizing equally well as the too short pulse because of saturation. This makes unnecessary losses and is to be avoided. Here is a slightly weak spot with the analogue circuit.

The poti determines the pulse width. In a follow-up version of this inverter, journal ELV offered an effective value coupler element, consisting of a small bulb and LDR to feed back the effective voltage of the secondary side and make wider pulses in case of too low voltage (and vice versa). This or a similar control unit can be added later.

The timer ICM7038A, generating 50Hz, is a very old IC and can be replaced by whatsoever other oscillator, making a 1:1 rectangular signal. It is irrelevant if you make 49 or 51 Hz, as long as the voltage is a rough disturbed rectangle. So forget about the crystal, is overdone, a good quality R and C will do.

To the voltage levels. Many believe that opamps need a plusminus 15V supply. That is ONLY true if your handled signal is plusminus 10V. The opamps here are fed with +12V and zero Volts (the “minus” of the battery). They can handle signals well in the range of 1 to 11Volts. The oscillator is fed with an especially stabilized 3.6Volts. The integrated signal oscillates with its triangular voltage around half of it, so around 1.8V. Unless we have amplitudes driving the signal too close to the negative supply, the opamps work fine. So-called rail-to-rail opamps handle signals very close to the supply voltage limits. Normal ones need a safety distance of one or two volts.

The reference for comparing with the two comparators is taken from the same 3.6V as the oscillator supply. Should this voltage change by tolerances or temperature influence, both triangular signal and its comparison values change in the same way, thus eliminating the drift.

There are even more ways to generate suitable pulses, for example triggering a monoflop all 10msec, then distributing the pulse width by a flipflop or binary counter alternating to the left and right channel. Such a schematic can be found in the book of Wolf-Günter Gförer “Wechselrichter für Solaranlagen”.

There are also ready IC’s for control of push-pull switch mode power supplies, and these offer voltage control by pulse width regulation and some protection functions as well. But I don’t like to use special parts:
* The main aim is not making an inverter, the aim is to understand an inverter, so a grass-root approach with basic parts is justified instead of a black-box approach.
* In the high-tech countries you get all special parts, but if you happen to live in other places of the world, you will get an Opamp or standard CMOS IC’s, but rarely a very special switch-mode control IC.

The output voltage surprise

We input a pulse and pause on the left side into the transformer, then the same on the right side. We would expect to see this pattern on the 230V side also.
But, it looks completely different!

In idling condition we can see, that the gap after switching the left side off, is filled with a voltage which looks like the right side has been switched on.
This “gap filler voltage” can easily be explained. If we switch off on the left side, the transformer winding will react with an inverse voltage due to the leakage inductivity. The left transformer winding, which has just been pulled down to zero Volts, develops a “Plus” voltage spike. This “Plus” on the left side would also happen when pulling the right side down to zero Volt.

Please take a look at the oscilloscope pictures, which I drew by hand, looking at the screen (my oscilloscope has no graphics output).

Some oscilloscope views

The gap filler voltage is soft and disappears when loading the inverter. As you can see, loading with a 40W bulb still leaves a notable part of this voltage, it disappears largely at a full power resistive load.

Reason for the effect is the leakage flux inductivity (stray inductivity) of the transformer. At low loads, this makes a rough and non-rectangular voltage shape, both bad for the load and the iron losses in the transformer.

This special effect speaks for a ring core transformer (which develops it less), or even for a different concept, in which a 325V DC level is at first generated, then chopped into 50Hz by high-voltage switching transistors.

• joribo

…it needs manual rework to avoid misunderstandings, especially with Japanese, and Korean is impossible to translate ( I dont know if the Koreans understand their own language, sooooo complicated it is). But in case you are interested in some German or Finnish texts I can translate them to english. Some chapters.

• KROKKENOSTER

Thanks Joribo I will try and use Google translate Have you ever seen the results of this “Machine” translations especially with synonyms?

• joribo

http://www.joretronik.de/ this one? He wrote a really great insider info on switch-mode power supplies. He should translate it to english to make it worldwide accessible. I can translate a chapter or two if you tell me which one (would need agreement of the author). Or maybe it can be copy-pasted into the Google translator for pure private use.
Till Eulenspiegel (Uhlenspeegel in low-german) was a funny guy, we had him in school also.

• KROKKENOSTER

I did go to the site link and my German is too rusted to be able to really grasp what Jurgen was discussing. I had six months as an extra subject and we were more listening to Uilspiegel stories and this was in 1961

• Zezo

Thank you very much, I learned a lot!

• suvarna

its very nice and useful to me and every one.
thank you.

• jitendra

Very interesting site ….. very educational

Looking for the latest from TI?