Simple Arduino Sine Wave Inverter Circuit

In this post we are going to construct a sine wave inverter using Arduino. We will explore the methodology of the proposed sine wave inverter and finally, we will take a look at simulated output of this inverter.

By Girish Radhakrishnan

Inverters saved us from short term power cuts at home, industries and emergency rooms. The quality of power of delivered by inverters vary depending on what kind of inverter is used. Inverters are classified into three types: square wave, modified sine wave and pure sine wave inverters.

A square wave inverter has poor quality output and contains lot of harmonic noise which may not suitable for many electronic gadgets. Its wave form goes up and down peak. But, resistive loads such as incandescent bulbs, heater and some devices which employees SMPS don’t exhibit problem with square wave inverters.

A modified sine wave or modified square wave to be precise can run most of the electronic gadgets without much issue.

The wave form goes peak up and come down to zero volt and stays for some interval and goes negative peak and come back to zero volt and cycle repeats. It has harmonic noise but not as bad as square wave and can be filtered easily. This design is used in most of the inexpensive inverters.

A pure sine wave inverter has most sophisticated design and expensive one. It can run all electronic devices including inductive loads such as motors which have problems in operating with other mentioned designs. It has no harmonics and wave form is smooth sinusoidal.

By now you know the basic difference between sine, modified sine and square wave inverters.

 In this project we are constructing an inverter which can deliver output equivalent to sine wave inverter.
The circuit can be understood better by given block diagram below:

The proposed design consists of an Arduino which generates 50Hz constant square wave. An IC 555 chopper circuit generates high frequency pulse.

The actual chopping of these two signals is done by IC 7408, which is AND gate. The mixed signal is fed to gate of MOSFET. The frequency of IC 555 can be varied for adjusting the output voltage by tuning the variable resistor.

Circuit Diagram:

  Simple Arduino Sine Wave Inverter Circuit

The constant 50Hz square wave is generated across pin #7 and pin #8 of Arduino. This flip-flop signal is fed to pin #1 and pin #4 of IC 7408. These two pins are of two different AND gates.

The high frequency chopping signal is fed to pin #2 and #5. The AND gate allows only when two inputs are high, since the Arduino frequency output is lower and IC555 higher, we get chopped signal at the corresponding gate output.

The chopped output is fed to MOSFET with a current limiting resistor for limiting the gate capacitor charging rate.  A 12V 15A or higher rated transformer can be used if you need higher wattage output.

A 400V metal oxide varistor is utilized across the output for suppressing initial high voltage surge while turning on the inverter; it could be several hundreds of volts in magnitude.

A 9V regulator is used for arduino as constant voltage source. A 1000uF or higher capacitance can be used at battery input for smooth starting and to protect the inverter from sudden voltage fluctuations.

Chopper circuit:

The chopper circuit is simple variable frequency generator, and the circuit is self-explanatory.
Now let’s see how well the frequency from Arduino is chopped by high frequency generator circuit to achieve sine wave equivalent.

The above simulation describes the output from arduino. It’s a simple and stable 50Hz signal.

The above simulation shows the wave form after chopping the constant 50Hz signal. The width of the chopping ratio can be adjusted by tuning the variable resistor and which also determine the output voltage.

The above chopped signal may not look like sine wave. A real sine wave inverter’s chopped wave form increase and decrease exponentially across x-axis. But begin a simple design the chopping frequency stay constant and good enough to run most of electronic gadgets. 

Program for Arduino:

//————-Program developed by R.Girish———–//
int out1 = 8;
int out2 = 7;
void setup()
void loop()
//————-Program developed by R.Girish———-//

24 Replies to “Simple Arduino Sine Wave Inverter Circuit”

  1. Ajay

    Sir I have a LED light which has 60 LED's in it the converter driving it is all burnt, the sticker on the converter specifies output 3V DC input 220V AC, can you please help me build one from scratch, its a very small circuit with few Resistance total 6 one electrolytic capacitor, 4 diodes and a Polyester PF.

    All is burnt so badly no value can be identified.

  2. MIR

    Hello SWAGATAM . Thanks for another helpful Post, how much wattage can i get with this design and how to design it with a charging circuit for 260AH battery . actually few months ago i have loss my modified sine wave inverter, now i want to make a new one with batter equipment's or if i sent you my old inverter circuit pictures with fault detail's for diagnose it burnt the MOSFET within a day some time it happens after a week i have checked many components and found good

    1. Swagatam Post author

      Thanks Mir, You can try the above inverter design or some other design which are explained in this website

      Charger circuit can be built separately, you can make the following for your specific application

      the wattage of any inverter will depend on its mosfet, transformer power rating and the battery AH rating….you can increase these parameters appropriately for achieving any desired wattage from a given inverter design.

    1. kikiloaw

      i did create the circuit above including the chopper and the Arduino compiled with code.,,.
      that image shows the output from the transformer., and i can see is that most likely not a sine-wave., i tried to varied the variable resistor but having same waveform output.,

  3. rafu

    Hi M. Swagatam. I think Arduino, alone, is able to generate the modulated signal shown on the 2nd oscilloscope image. No 555, no add. gate. What is your opinion ? Arduino must have one (or more) counter and certainly a prescaler, as many small µ controlers have. Or maybe the freq. is too high ? It doesn't look more than 1kHz. Thx for your huge work and informative site.

  4. Girish Radhakrishnan

    Hi MIR,

    Please share wave form from your simulation.

    The transformer is 12-0-12V if you can't find in your simulator no problem (try similar specification), you have to focus on wave form than output voltage. when you try the circuit practically, you will get correct voltage.

    The chopped wave form shown in the article is from the GATE of the MOSFETs and not from the transformer. Two wave form from both MOSFETs is merged together(in the simulator), this what look like when you practically try on oscilloscope.

    I used "multisim" for simulation which is not arduino oriented, but I have used function generator in place of arduino, I excluded transformer and rest if the circuit is same.

    Don't always trust simulator they give incorrect results some time. When I tried it was giving error in during simulation and the culprit was transformer. The transformer was not optimized well in the software, so it forced me to exclude transformer. If you try it practically I am very sure that it works fine.


    1. MIR

      Girish Radhakrishnan Thanks for your prompt reply and also Thanks for Swagatam Majumdar . i have attached the wave form from my simulator Ch A+B is from transformer output and C+D is from IC7408.

      i don't have a oscilloscope to try it practically but ill try it in few days and pls advice me which MOSFET is Suitable for a 1000 Watts output and you are using an Arduino so can you make it more functional more powerful like builtin battery charger LED's indications etc.

      Warm Regards.

    2. Girish Radhakrishnan

      your simulation is correct, it may not look like a sine wave.
      If you want to know how chopped square wave match the properties of sine wave, take a look at this:

      MOSFET suitable for handling 1000W load: MOSFET RFP50N06, but i am not sure is it commonly available, (or) you can connect MOSFETs in parallel to achieve the same.

      You must add automatic voltage correction circuit to your inverter for 1000W loads, which is explained in this post:

      I am not sure weather it will work with this project and I am not sure weather simulator help to verify this.


  5. kikiloaw

    since this is an arduino. we can add more features like checking the battery for low voltage., but the question is., how can we check the battery voltage while the inverter having an high power laod.??

    1. kikiloaw

      i am confuse checking the exact voltage of the battery since the inverter is in load. the battery will eventually drop voltage. i know checking the voltage but no load in present. so how we can do while this inverter is working on load?


Leave a Reply

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