• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Inverter Circuits / Class-D Sinewave Inverter Circuit

Class-D Sinewave Inverter Circuit

Last Updated on December 26, 2020 by Swagatam 37 Comments

A sinewave inverter using class-D amplifier functions by converting a small sinewave input frequency into equivalent sine PWMs, which is finally processed by an H-bridge BJT driver for generating the mains sinewave AC output from a DC battery source.

Table of Contents
  • What is Class-D Amplifier
  • Advantages of Class-D Inverter
  • A Practical Design
  • Electronic Switches as amplifiers
  • Sine wave Oscillator
  • PCB Design and Transformer Wiring

What is Class-D Amplifier

The working principle of a class-D amplifier is actually simple yet extremely effective. An input analogue signal such as an audio signal or a sinusoidal waveform from an oscillator is chopped into equivalent PWMs also called SPWM.

These sine equivalent PWMs or SPWMs is fed to a power BJT stage, where these are amplified with high current, and applied to the primary of a step up transformer.

The transformer finally transforms the sine equivalent SPWM into 220V or 120V sine wave AC, whose waveform is exactly in accordance with the input sine wave signal from the oscillator.

Advantages of Class-D Inverter

The main advantage of a class-D inverter is its high efficiency (almost 100%) at a reasonably low cost.

Class-D amplifiers are easy to build and set up, which enables the user to produce efficient, high power sine wave inverters quickly without many technical hassles.

Since the BJTs have to work with PWMs, it allows them to be cooler and more efficient, and this in turn allows them to work with smaller heatsinks.

A Practical Design

A practical class-D inverter circuit design can be witnessed in the following diagram:

warning message: electricity is dangerous, proceed with caution
class D inverter circuit compressed
The IC 74HC4066 can be replaced with IC 4066, in that case the separate 5V will not be required, and a common 12V can be used for the entire circuit.

The working of the pwm class-D inverter is fairly simple. The sine wave signal is amplified by the op amp A1 stage to adequate levels for driving the electronic switches ES1---ES4.

The electronic switches ES1---ES4 open and close causing rectangular pulses to be generated across the bases of the transistors T1---T4 bridge alternately.

The PWM or the width of the pulses is modulated by the input sine signal resulting in a sine equivalent PWMs fed to the power transistors,and the transformer, ultimately producing the intended 220V or 120V sine-wave mains AC at the output of the transformer secondary.

The duty factor of a rectangular signal produced from the ES1---ES4 outputs is modulated by the amplitude of the amplified input sine wave signal, which causes an output switching SPWM signal proportional to the sine wave RMS. Thus the on-time of the output pulse is in accordance with the instantaneous amplitude of the input sine signal.

The switching period interval of the on-time and the off -time together determines the frequency which will be constant.

Consequently, a uniformly dimensioned rectangular signal (square wave) is created in the absence of an input signal.

As a way to achieve fairly good sine wave at the output of the transformer, the frequency of the rectangular wave from ES1 should be at the very least two times as high as the highest frequency in the input sine signal.

Electronic Switches as amplifiers

The standard working of the PWM amplifier is implemented by the 4 electronic switches made around ES1---ES4. Supposing that the input of the op amp input at the zero level, causes the capacitor C7 to charge via R8, until the voltage across C7 attains the level that is sufficient to switch ON ES1.

ES1 now closes and begins discharging C7 until its level drops below the switch ON level of ES1. ES1 now switches OFF initiating the C7 charging again, and the cycle rapidly turns ON/OFF at a rate of 50 kHz, as determined by the values of C7 and R8.

Now, if we consider the presence of a sine wave at the input of the op amp, it effectively causes a forced variation on the charge cycle of C7, causing the ES1 output PWM switching to get modulated as per the rise and fall sequence of the sine wave signal.

The output rectangular waves from the ES1 now produces SPWM whose duty factor now varies in accordance with the input sine signal.

This results in a sine wave equivalent SPWM to be alternately switched across the T1---T4 bridge, which in turn switches the transformer primary to generate the required AC mains from the secondary wires of the transformer.

Since the secondary AC voltage is created in accordance with the primary SPWM switching, the resultant AC is a perfectly equivalent sine wave AC of the input sine signal.

Sine wave Oscillator

As discussed above, the class-D inverter amplifier will need a sine wave signal input from a sine wave geneartor circuit.

The following image shows a very simple single transistor sine wave generator circuit which can be effectively integrated with the PWM inverter.

pwm amplifier PCB transformer woring layout

The frequency of the above sine wave generator is around 250 Hz, but we will need this to be around 50 Hz, which can be changed by altering the values of C1---C3, and R3, R4 appropriately.

Once, the frequency is set, the output of this circuit could be linked with the C1, C2 input of the inverter board.

PCB Design and Transformer Wiring

pwm amplifier PCB transformer woring layout compressed

Parts List

parts list

Transformer: 0-9V/220V current, will depend on the transistors wattage and battery Ah rating

Specifications:

The proposed class-D PWM inverter is a small 10 watt test sample prototype. The 10 watt low output is due to the use of low power transistor for T1---T4.

The power output can be easily upgraded to 100 watts by replacing the transistors with TIP147/TIP142 complementary pairs.

It can increased to even higher levels by using higher BUS DC line for the transistors, anywhere between 12V and 24V

You'll also like:

  • 1.  3 Simple DC UPS Circuits for Modem/Router
  • 2.  Universal H-Bridge Circuit Module
  • 3.  How an Inverter Functions, How to Repair Inverters – General Tips
  • 4.  Arduino Pure Sine Wave Inverter Circuit with Full Program Code
  • 5.  Homemade 100VA to 1000VA Grid-tie Inverter Circuit
  • 6.  Arduino Modified Sine Wave Inverter Circuit

About Swagatam

I am an electronics engineer with over 15 years of hands-on experience. I am passionate about inventing, designing electronic circuits and PCBs, and helping hobbyists bring their projects to life. That is why I founded homemade-circuits.com, a website where I share innovative circuit ideas and tutorials. Have a circuit related question? Leave a comment.... I guarantee a reply!

Previous Post: « Understanding MOSFET Safe Operating Area or SOA
Next Post: How an Autotransformer Works – How to Make »

Reader Interactions

Comments

  1. Klaas Nel says

    April 19, 2023 at 10:17 pm

    Hi I am retired and from South African with load shedding. I try to build a pure sine wave inverter of around 3Kw with the stuff that is laying around. I got the first part with the sine wave and MOSFET working and the signal and hertz is correct. I have centre tap transformers from a square wave inverter and want to know if I can use that with sine wave. My tries so far blown a lot of MOSFETs.
    Please help with a solution.

    Regards

    Reply
    • Swagatam says

      April 20, 2023 at 9:00 am

      Hi, Yes you can use the center tap transformer as long as it is correctly rated for your MOSFETs and the battery voltage.

      Reply
  2. Chidon lite says

    January 18, 2023 at 1:39 am

    Please I need a help on, to step down 220v to 100v.
    Because power supply in our area is 220v, but I have a transformer that requires 100v????

    Reply
    • Swagatam says

      January 18, 2023 at 9:09 am

      There’s no easy way to do this. Instead you should change the transformer.

      Reply
      • Chidon lite says

        January 18, 2023 at 7:21 pm

        Maybe I will try using my variable stabilizer to do that thanks

        Reply
        • Swagatam says

          January 18, 2023 at 7:45 pm

          OK, good!

          Reply
  3. Doug says

    June 12, 2022 at 5:27 am

    with a low frequency inverter, is it possible to use a center tap output transformer to get a split phase type output as we use in North America (ie L1-L2 230v and L1-CT / L2-CT 115v)
    If this is possible, is it possible to balance the output lets?

    Thanks again for any advice you might be able to give.
    Take care
    Doug

    Reply
    • Swagatam says

      June 12, 2022 at 8:34 am

      Yes it is possible to use a center tap at the secondary side of an inverter transformer to create a split phase AC output. The center tap becomes the neutral and the two outer wires act like the phase (LIVE) outputs. The two phase outputs can be balanced by connecting similar loads across the two phase outlets and the common center tap neutral.

      Reply
  4. Peter says

    September 8, 2021 at 10:12 am

    Hi and thank you for all the inverter designs. I have build i thew and they work great. You don’t by any change have an H-bridge design working with the PWM board EGS002. The reason for my question is that i have build using the EGS002 with a 12vdc/240vac transformer. But i only get around 150vac . As soon as i try to increase my voltage via a variable resistor the EGS002 shuts down beacuse of “undervoltage” i like using the EGS002 because i get a beautifull signwave, at 50hz with a 50% duty cycle.

    Again thank you.
    Regards
    Peter

    Reply
    • Swagatam says

      September 8, 2021 at 11:08 am

      Hi, thanks, and glad you could make the above designs successfully.

      Sorry, I have not yet built an EGS002 based inverter, so would be difficult for me to solve your problem…

      Reply
  5. iw2fvo says

    December 28, 2020 at 2:14 pm

    OK, thanks.
    if the 220 vac from the net goes off, the inverter still produce 220 vac through the battery and the 5 Vac from the transformer is still generated and applied to the inverter input… It seems to be a dog that eats its tail ! Will you please clarify ? Thanks for all.
    Regards, iw2fvo.

    Reply
    • Swagatam says

      December 28, 2020 at 9:51 pm

      Actually I am not sure about the inverter output in the absence of an input grid sinewave signal….it seems it might keep generating the base rectangular frequency at the output.
      In that case we can apply a circuit for detecting a square wave and trip the inverter off
      However, in GTI is the inverter supposed to continue applying the AC into the grid line, when grid AC fails? or shut down?

      Reply
      • iw2fvo says

        December 29, 2020 at 1:12 am

        thanks,
        regulations requre that the there will not be any output from the inverter if the main grid fails.
        iw2fvo

        Reply
        • Swagatam says

          December 29, 2020 at 9:29 am

          OK, that makes things a bit easier. The square wave RMS from the inverter should be slightly lower than the sinewave RMS, this can be used for the detection of the grid AC presence or absence through an op amp, and for switching off inverter during a mains failure…

          Reply
    • Jan says

      April 20, 2021 at 8:45 pm

      Hi Swagatam,
      I have changed C1 & C4 to 470nF. A1 does not trigger with this combination, however if I hardwire C4 then A1 triggers, but still no PMW. I have disconnected R5 & R7. Also no PMW. I have tried different values for C5, C6, C7, R2, R3 & R4. Still no PMW & only rectangular wave forms. Is there not an alternative cct that I can use to produce the required PWM?
      Your assistance will be much appreciated.
      Regards
      Jan

      Reply
      • Swagatam says

        April 21, 2021 at 8:34 am

        Hi Jan, in all audio amplifiers we have a capacitor at the input sides, and the audio signal easily pass through them, so in this circuit also the presence of C1, and C4 should not pose any problems. I believe the circuit is tested and therefore the PCB had been finalized for this design. Are you using the same PCB as shown in the last image? In the original design the whole circuit was operated at 6V, so you try that also.

        Reply
      • Swagatam says

        April 21, 2021 at 8:39 am

        Hi jan, the above design was originally an audio amplifier which was modified into an inverter by me. You can find the original design in the following article:

        https://www.homemade-circuits.com/4-efficient-pwm-amplifier-circuits-explained/

        Reply
  6. BETO says

    December 26, 2020 at 6:31 pm

    Hi Swagatam, in the description of the circuit you talk about MOSFET transistors, but in the diagram BJT transistors are used, it would be a good idea to publish the circuit with MOSFETs since the values ​​of some components will have to change. Greetings from Argentina.

    Reply
    • Swagatam says

      December 26, 2020 at 8:20 pm

      Thank you Beto for indicating the mistake, I’ll correct it soon by replacing the MOSFET with BJTs.
      Actually I am not quite sure how the BJTs could be replaced here with FETs due to strange arrangement of the resistive dividers across the bases of the BJTs. This arrangement may work with the shown BJTs but may not with FETs.
      This will need to be experimented the wiring to exactly know how the MOSFETs could be used.

      Reply
  7. iw2fvo says

    December 26, 2020 at 2:58 pm

    how could I make this project a GRID TIE inverter please ?
    Thanks

    Reply
    • Swagatam says

      December 26, 2020 at 8:24 pm

      you could take a stepped down 5V 100Hz grid sample from a bridge rectifier and feed it to the input of the inverter and then configure the transformer output with the grid wiring….be sure to be extremely careful with the procedures, since the concept is only as per my assumptions and is not verified

      Reply
      • iw2fvo says

        December 26, 2020 at 10:08 pm

        Thanks for the reply,
        >100 Hz is the double of the grid freq… is it OK?
        >If the grid goes down , the invertyer must shut down: how to do it ?
        Regards,

        Reply
        • Swagatam says

          December 27, 2020 at 1:07 pm

          OK i that case you can connect the 5V AC source directly across the input…this could be from a small 220/120V to 4.5 V / 500 mA transformer.

          Reply
          • Jan says

            March 28, 2021 at 7:14 pm

            Hi Swagatam,
            I need the inverter to handle a 160W load. Can you please suggest a BJT pair that I can use to achieve this? I will be using 12V to power the circuit.
            Regards
            Jan

            Reply
            • Swagatam says

              March 29, 2021 at 11:23 am

              Hi Jan, You can try TIP35 and TIP36 pairs, and connect them with the existing BD132 and BD131 transistors as Darlington pairs, as shown below:

              comment image" alt="how to connect a Darlington to amplifier" />

              Reply
            • Jan says

              March 30, 2021 at 12:12 am

              Thank you for your reply. Does that mean that we now don’t have to use D3 – D6.

              Reply
              • Swagatam says

                March 30, 2021 at 7:49 am

                I forgot to show them in the diagram, they will still be required to protect the transistors against transformer back emfs.

                Reply
            • Jan says

              April 19, 2021 at 1:24 pm

              Hi Swagatam,
              I have built this circuit. First of all I had to bypass C1 & 4 to get A1 to trigger with the 50Hz signal from Sine Wave Generator. Everything else seems to work fine, except that the primary output to the transformer is a square wave signal instead of a AC sine wave. Can you please suggest what I should check?
              Regards
              Jan

              Reply
              • Swagatam says

                April 19, 2021 at 4:26 pm

                Hi Jan, I don’t think bypassing the input capacitors would be correct, instead you can try the increasing the values to 0.47uF.

                The output will be rectangular wave but modulated in accordance with the sine wave, meaning the output rectangular waves will slowly create wider PWMs as the sine wave amplitude increases and then the PWM will get narrower as the sine wave amplitude comes down or decreases.

                You will need an oscilloscope to check this..

                Reply
            • Jan says

              April 19, 2021 at 4:49 pm

              Thank you for your reply.
              I have checked it with my scope and it is definitely not PWM signal.
              I do get my sine wave out of A1-6 and into ES1-13.
              On ES1-1 I get a rectangular signal. It should be PWM correct?
              C7 is the only component which will produce the PWM signal?
              So I am just wondering if it is not the feedback R7 causing the problem. Can I disconnect R7 without blowing anything up to see if I then get PWM?

              Reply
              • Swagatam says

                April 20, 2021 at 8:59 am

                The PWMs should be available at ES3, and ES4, but I think the input capacitors are crucial, C1 and C4 cannot be replaced with wire links. The feedback is only for output voltage control, it is not related to sine PWM generation. But you can remove the feedback just to check what results it produces.

                Reply
            • Jan says

              April 22, 2021 at 12:46 pm

              Thank you Swagatam,
              I really appreciate your assistance.
              Best regards

              Reply
              • Swagatam says

                April 22, 2021 at 6:21 pm

                No problem Jan!

                Reply
          • jan says

            April 21, 2021 at 12:39 pm

            Hi Swagatam,
            I am confused now. I am getting a Square wave signal out of A1-6. Is that correct?

            Reply
            • Swagatam says

              April 21, 2021 at 4:49 pm

              Hi Jan, ES1 is the main sine PWM generator, while the other switches are buffers only, so yes, you should get varying PWMs at the output of ES1. Normally when there’s no sine wave at the input, the output from ES1 will be producing 50 kHz rectangular waves, but as soon as a sine wave is detected, the square waves become modulated by the sine waveforms and we get SPWM at the outputs of the ES1—ES4.

              Reply
            • Jan says

              April 21, 2021 at 6:32 pm

              Is A1-6 also PWM or just a amplified Sine Wave.
              If I can not get this to work can you suggest an alternative cct to replace A1 side of the cct and then interface remainder of the cct ie. ES1 – ES4

              Reply
              • Swagatam says

                April 22, 2021 at 9:27 am

                A1-6 is the sine amplified output, not PWM.

                you can try the following alternate concept, which has been tested by me:

                " rel="ugc">comment image

                Apply the sine wave to pin#5 of IC2

                THe N1—N6 can be removed, and the transistors can be directly hooked up with the pin#3 of the IC2.

                The motor can be replaced with the transformer primary

                Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Subscribe to New Circuits

Categories

  • Arduino Projects (87)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (83)
  • Datasheets and Components (104)
  • Electronics Theory (143)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (14)
  • Inverter Circuits (87)
  • Lamps and Lights (142)
  • Meters and Testers (69)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (27)
  • Pets and Pests (15)
  • Power Supply Circuits (108)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (101)
  • Solar Controller Circuits (59)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (37)
  • Water Controller (36)
  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

© 2025 · Swagatam Innovations