• 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 / Arduino Modified Sine Wave Inverter Circuit

DIY Circuits | Learn Basics | Arduino Coding




Arduino Modified Sine Wave Inverter Circuit

Last Updated on August 3, 2020 by Swagatam 104 Comments

In this post I will show how to construct a modified 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 

Difference Between Squarewave and Modified Squarewave Inverter

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 type 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:

Arduino Modified 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()
{
pinMode(out1,OUTPUT);
pinMode(out2,OUTPUT);
}
void loop()
{
digitalWrite(out2,LOW);
digitalWrite(out1,HIGH);
delay(10);
digitalWrite(out1,LOW);
digitalWrite(out2,HIGH);
delay(10);
}
//-------------Program developed by R.Girish----------//

For a Full Bridge version you can refer to this design: https://www.homemade-circuits.com/arduino-full-bridge-h-bridge-sinewave-inverter-circuit/

You'll also like:

  • 502Bwatt2Bmosfet2Binverter2Bcircuit2 Cool 50 Watt Inverter Circuits for Students and Hobbyists
  • Making an EGS002 Equivalent Board using Arduino
  • IC555invertercircuit6 Best IC 555 Inverter Circuits Explored
  • online UPS compressedSimple Online UPS Circuit

Filed Under: Inverter Circuits Tagged With: Arduino, Inverter, Modified, Sine, Wave

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!

Previous Post: « Regenerative Braking System in Automobiles (Circuit Diagram)
Next Post: Two Pipe Water Pump Valve Controller Circuit »

Reader Interactions

Comments

ali says:
August 21, 2017 at 4:45 am

sir if i use l298 to amplify 5v of a modified sine wave from arduino to 12V to feed mosfet will it work,
and if i use a center tapped transformer …. what should be its rating . 12V-0-12V,,,,,,,, 12amp ,,,,,, is enough?
i an intended to make a transformer of 350watts……

Reply
Swagatam says:
August 21, 2017 at 8:32 am

Hi Ali, I am not sure how you would configure the IC with the arduino, because the IC will need to be connected with a push pull signal, and also a PWM from the Arduino?

a simple BJT stage is all that may be required for raising the Arduino output from 5 to 12V, as shown in the following article:
https://www.homemade-circuits.com/2017/04/arduino-pure-sine-wave-inverter-circuit.html

Reply
ali says:
August 21, 2017 at 10:26 am

and is BJT going to give enough current for 350watt output

Reply
ali says:
August 21, 2017 at 10:19 am

i am now using tc4424 microchip for enhancing arduino output,,,,,,

Reply
ahsan ali says:
August 14, 2017 at 5:06 pm

hello bro…. i have made your circuit in proteus 8. but problem is the output before mosfet is a square wave but the output after mosfet becomes distorted…. why is it so….

Reply
Swagatam says:
August 16, 2017 at 3:01 am

use BJT buffers as shown below:

https://www.homemade-circuits.com/2017/06/sinewave-3kva-inverter-using-sg3525.html

ignore the lower PWM BC547, it is not required. use only the BC547/BC557 pairs

Reply
ahsan ali says:
August 15, 2017 at 7:48 am

l293d would work?

Reply
Swagatam says:
August 15, 2017 at 6:47 am

yes bro, if it is 5V then definitely that's not good for the mosfets, you can make it 12V by replacing the 74xx IC with a 12V variant

Reply
ahsan ali says:
August 15, 2017 at 6:00 am

bro i made the circuit as you describe, first thing i want to ask is that 5v square wave is going into mosfet,,,, is it necessary to give 10-12V to mosfet (by converting 5V t0 12V) as other circuits found on google do or i can work with 5V arduino.

Reply
Swagatam says:
August 15, 2017 at 5:02 am

Hello Ahsan, can you specify the exact location where the distortion is seen, most probably it could be due to the trafo inductive spikes, and that's quite normal in inverters, this can be finally corrected across the secondary of the trafo by adding a suitable filter

Reply
Prakash Nitesh says:
July 19, 2017 at 5:17 pm

can you tell the simulation software used for this project

Reply
GR says:
July 20, 2017 at 8:28 am

Hi prakash,

Use proteus for arduino simulation.

Regards

Reply
Zodiak Clan says:
June 4, 2017 at 6:29 pm

this is image
https://1.bp.blogspot.com/-LT2lUJrCXOc/WTRRTr1AJ3I/AAAAAAAAAKo/t4IvXelIc7sSiaIh8etwY-duvQNrIak3gCLcB/s1600/Untitled.jpg

Reply
Zodiak Clan says:
June 4, 2017 at 6:16 pm

Sir i've stringed up the above circuit on the proteus program but the result is not a sine wave but still a square wave, can you tell me using filter value to be a sine wave ?? If on proteus has changed into sine I will realize it please help me… thankyou

Reply
Swagatam says:
July 20, 2017 at 11:04 am

you can try putting a 0.45uF/400V capacitor across the transformer output winding and see if that changes the waveform i your simulation.

Reply
Swagatam says:
June 5, 2017 at 3:49 am

Zodiak, please check and verify the RMS voltage value and the peak value from the transformer output….if the RMS is around 220V, and the peak is around 310V then the results can be considered OK…

you won't get a sinusoidal wave for this design.

Reply
Swagatam says:
May 22, 2017 at 11:46 am

1000V? or 1000 watts

Reply
Ainsworth Lynch says:
May 15, 2017 at 11:07 am

Also I'm not able to get any and gate ic.
I only have not gate chips 4049.

Could I replicate the and gate action by using 2 npn transistors and some Resistors?

Reply
Swagatam says:
May 15, 2017 at 1:20 pm

the IC should be "Quad 2-input AND Gate" IC, others will not work, BJTs cannot be used easily…

Reply
Ainsworth Lynch says:
May 15, 2017 at 10:40 am

I'm aware that there is none in this circuit but wouldn't it be required
If I use a 12v battery and a 12v transformer?

Reply
Swagatam says:
May 15, 2017 at 1:16 pm

It's not required, once the PWM RMS is set correctly, the voltage will be set to the required 240V

Reply
Ainsworth Lynch says:
May 14, 2017 at 9:22 pm

Can this circuit use a bjt stage instead of using a automatic voltage regulator on the output?

Reply
Swagatam says:
May 15, 2017 at 8:59 am

there is no automatic voltage regulator in this circuit

Reply
Unknown says:
April 19, 2017 at 8:43 am

Hi,
According to the given Arduino program it has error in frequency the total time period is 20ms+20ms=40ms
so,frequency=1/40ms=25Hz

Reply
Swagatam says:
April 19, 2017 at 2:51 pm

Thanks GR, It's done!

Reply
GR says:
April 19, 2017 at 12:28 pm

Hi sir,

Yes it is 10ms, please modify delay(20); to delay(10); in two places.

Regards

Reply
Swagatam says:
April 19, 2017 at 9:09 am

dividing 1 by 50 gives 20ms per cycle, that's 10ms high, 10ms low

you can change it to 10ms instead

Reply
Koh Chun Yong Kenneth, 許俊榮 says:
March 30, 2017 at 5:58 pm

Hi, i tried to simulate this but when i chop my square wave with the high frequency waveform from the 555 timer, i am only chopping either the positive portion or the negative portion. So how do I get the 2nd diagram shown in this page? Do I have to add up both the waveform to get that?

Reply
Swagatam says:
March 31, 2017 at 4:06 am

Hi, only the positives are chopped, the negatives are at 0V, and therefore are not relevant.

The last diagram refers to the output from the transformer, where both the half cycles can be seen due to the push pull action at the primary side of the transformer.

Reply
GR says:
December 19, 2016 at 7:13 pm

Hi kikiloaw,

Yes it is possible! Different functions must written into single program and one function should not create bugs for another function.

Regards

Reply
David Cameron says:
April 2, 2017 at 10:21 am

When pulling high currents from batteries, the voltage should be monitored on-load. As an example, the ideal cutoff point for a 12VDC car battery would probably be about 10 VDC ON LOAD ! Measuring voltage off load doesn't give as accurate an idea of available power with lead/acid batteries (and some other types) because the battery will always try to restore to its nominal voltage or a bit above. Performing some experiments whilst taking measurements of voltage and current should lead to a clear understanding of the best monitoring choices for any given type of battery. Hope this helps.

Reply
GR says:
December 21, 2016 at 1:40 pm

Hi kilkiloaw,
The battery voltage must be monitored while inverter is working.

Reply
kikiloaw says:
December 20, 2016 at 12:07 pm

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?

Reply
kikiloaw says:
December 18, 2016 at 12:58 pm

hi,
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.??

Reply
GR says:
December 15, 2016 at 1:03 pm

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.

Regards

Reply
GR says:
December 17, 2016 at 1:42 pm

Hi,
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:

https://www.homemade-circuits.com/2013/04/how-to-modify-square-wave-inverter-into.html

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:

https://www.homemade-circuits.com/2013/10/modified-sine-wave-inverter-circuit.html

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

Regards

Reply
MIR says:
December 15, 2016 at 11:40 pm

https://drive.google.com/drive/folders/0B3ugaS2dUPGmQkcybmRvTk1tbVU?usp=sharing

GR 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.

Reply
MIR says:
December 14, 2016 at 8:02 pm

i have just create a simulation of this circuit Plz check it and advice for improvement. also tell me the transformer detail plz then i will make it :

https://drive.google.com/drive/folders/0B3ugaS2dUPGmQkcybmRvTk1tbVU?usp=sharing

Reply
Swagatam says:
December 15, 2016 at 11:31 am

I will forward the message to Mr.GR,

your question will be answered soon…

Reply
rafu says:
December 9, 2016 at 9:54 am

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.

Reply
Swagatam says:
December 9, 2016 at 11:51 am

the second waveform image above has 16 pillars on each block…multiplying it with 50Hz gives 800 so it's pretty close to 1000 Hz

Reply
Swagatam says:
December 9, 2016 at 11:48 am

Hi Mr. Rafu, that's not correct. You can check out the following article for seeing the waveform generated by an ordinary 555 IC circuit

https://www.homemade-circuits.com/2013/10/modified-sine-wave-inverter-circuit.html

Reply
kikiloaw says:
December 6, 2016 at 3:15 pm

https://www.dropbox.com/s/lpur0269jaomykp/Untitled.png?dl=0

check out the result.
is this okay?
i complie the code and simulated to proteus.,

Reply
Swagatam says:
December 7, 2016 at 7:18 am

I would suggest you build it practically and then check the output with a scope…because simulation may not be always right.

Reply
kikiloaw says:
December 7, 2016 at 4:21 am

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.,

Reply
Swagatam says:
December 7, 2016 at 2:50 am

please explain what exactly you are trying to achieve….the image only shows a mosfet/trafo stage with a square wave output…

Reply
MIR says:
December 5, 2016 at 8:39 pm

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

Reply
Swagatam says:
December 6, 2016 at 6:14 am

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

https://www.homemade-circuits.com/2011/12/high-current-10-to-20-amp-automatic.html

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.

Reply
Abhishek Sharma says:
December 4, 2016 at 12:17 pm

How to program an arduino board and can I do this project without arduino and chopper.

Reply
Swagatam says:
December 6, 2016 at 3:32 pm

there are two of them….one at top right and the other at bottom footer left

Reply
Abhishek Sharma says:
December 6, 2016 at 8:40 am

Sir on your website, I never found a search box let me know where it is?

Reply
Swagatam says:
December 5, 2016 at 5:03 am

I have explained many sinewave inverter circuits without MCU in this website, you can easily search them through the search box….

Reply
Ajay says:
December 1, 2016 at 9:18 pm

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.

Reply
Swagatam says:
December 2, 2016 at 4:16 pm

Ajay, according to me 3 LEDs cannot be driven through a 3V supply.

anyway you can try the following circuit, make sure the LEDs are connected in series

https://www.homemade-circuits.com/2012/04/how-to-make-led-bulb-circuit.html

Reply
Back to Newest

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

circuit simulator image



Subscribe to get New Circuits in your Email



Categories

  • Arduino Projects (93)
  • Audio and Amplifier Projects (133)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (85)
  • Datasheets and Components (109)
  • Electronics Theory (149)
  • Energy from Magnets (27)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (20)
  • Health related Projects (27)
  • Home Electrical Circuits (13)
  • Indicator Circuits (16)
  • Inverter Circuits (95)
  • Lamps and Lights (159)
  • Meters and Testers (71)
  • Mini Projects (28)
  • Motor Controller (68)
  • Oscillator Circuits (28)
  • Pets and Pests (15)
  • Power Supply Circuits (91)
  • Remote Control Circuits (50)
  • Renewable Energy (12)
  • Security and Alarm (64)
  • Sensors and Detectors (106)
  • SMPS and Converters (34)
  • Solar Controller Circuits (60)
  • Temperature Controllers (43)
  • Timer and Delay Relay (49)
  • Voltage Control and Protection (42)
  • Water Controller (36)
  • Wireless Circuits (30)





Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap



People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Stack Exchange
  • Linkedin



Recent Comments

  • Swagatam on 7 Best Touch Sensor Switch Circuits Explored
  • Swagatam on Tuned Radio Frequency (TRF) Receiver Circuits
  • Swagatam on Automatic Street Light Dimmer Circuit
  • Swagatam on Electronic Circuit Projects, Tutorials, and Practical Engineering Solutions
  • Ghulam Mohio Din on Automatic Street Light Dimmer Circuit

© 2026 · Swagatam Innovations