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

  • 100ampsolarchargerinvertercircuitHow to Make a Simple Solar Inverter Circuit
  • weldingMini Welding Machine Circuit for Small Welding Jobs
  • sg3525INVERTERCIRCUITWITHOVERLOADLOWBATTPROTECTIONCIRCUITSG3525 Inverter Circuits with Low Battery Cut-off and Overvoltage Regulation
  • Convert a Square Wave Inverter into a Sine Wave Inverter

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

Abhishek kumar says:
April 6, 2023 at 5:58 pm

Hlo sir my name abhishek kumar i am the polytechnic Electrical final sem student i want that this project will make what do you think this circuit will work perfectly for this project?

Reply
Swagatam says:
April 6, 2023 at 6:07 pm

Hello Abhishek, the author of this article has tested the circuit, so as far as I know it should work.

Reply
Abhishek kumar says:
April 7, 2023 at 6:35 pm

Excuse me sir can tell me about that circuit how much load it take

Reply
Swagatam says:
April 7, 2023 at 7:42 pm

Abhishek, the power will depend on the wattage of the transformer and the battery. You can select them as per your requirement. You can build a similar circuit without Arduino, which is much easier and efficient, as presented here:

https://www.homemade-circuits.com/modified-sine-wave-inverter-circuit-2/

Reply
Abhishek kumar says:
April 27, 2023 at 4:56 pm

Hlo sir i buy all components for that inverter but tranformer as diagram same rating 6-0-6 volt 15 amp is not available can I replace it with a low power amp and 12-0-12 volt transformer?

Reply
Swagatam says:
April 27, 2023 at 5:06 pm

Hello Abhishek, If you use 12-0-12V transformer then the output could be less than 200 V even 180 V, therefore if you cannot get 6-0-6V transformer try getting a 9-0-9V transformer. Current rating is not crucial, but for a low current transformer the output power will be proportionately lower.

Reply
Henry says:
July 19, 2021 at 1:16 am

Hi, can I use 12v center tap transform and 12v car battery to power the circuit. So what is the wattage that will be produced by the transformer.

Reply
Swagatam says:
July 19, 2021 at 9:13 am

Hi, yes a transformer and car battery are two important things required for this project. Multiplying the 12V side current rating of the transformer with 12V will give you the approximate wattage of the project!

Reply
SONU KUMAR says:
July 14, 2020 at 5:24 pm

Sir
I made the complete above circuit and tried to simulate the circuit on proteus 8.9 SP0 .
Chopper circuit is simulating properly.
Arduino output till nand gate output is also simulating properly.
But as soon as i connect the output of NAND gates to MOSFETS error comes and circuit stops.
If anybody has idea about the problem please suggest what is the proplem.

Reply
Swagatam says:
July 14, 2020 at 6:32 pm

Sonu, please build it practically, it will surely work as specified. If you have problems I’ll help you sort it out

Reply
balaji says:
December 20, 2019 at 9:17 pm

sir how can use (0-6v)/(0-230v) transformer in this circuit plz tell

Reply
Swagatam says:
December 21, 2019 at 9:12 am

0-6 is not possible here, you will need a center tapped transformer.

Reply
Balaji says:
December 24, 2019 at 7:22 pm

Any pure sine wave circuit diagram for (0-6v)/(230v) u having sir

Reply
Swagatam says:
December 25, 2019 at 7:35 pm

You can change the transformer to 6-0-6, and use BJTs like TIP142 instead of mosfets to convert the above design into 6V inverter

Reply
Reigneth says:
September 13, 2018 at 3:20 pm

Hi sir, do we need to include a feedback from the output of the transformer to the arduino board in order to have a better output voltage regulation on the system while loaded?

Reply
Swagatam says:
September 13, 2018 at 5:17 pm

Hi Reigneth, for this simple design it may not be required. Moreover since the PWM is fixed the output RMS would be also reasonably fixed, unless the load exceeds the maximum rating of the inverter.

Reply
Rahul Tribhuwan says:
July 10, 2018 at 1:29 pm

Can above power supply be used for desktop computer

Reply
Swagatam says:
July 10, 2018 at 7:16 pm

yes it can be used

Reply
VAMSI ANTYAKULA says:
July 3, 2018 at 8:26 pm

Can we use IC DM 7406 with IRF540N Mosfet in the circuit??

Reply
Swagatam says:
July 4, 2018 at 6:40 am

No it won’t work here, There’s one issue in the above design regarding the use of the IC 7408. All 74XX series ICs work with 5V and output 5V, which may be not sufficient for driving the mosfet. A mosfet will require at least 10 at its gate to function optimally. The same applies for your design also..You can try a replacing your 7406 with CMOS equivalent and check the results

Reply
VAMSI ANTYAKULA says:
July 4, 2018 at 10:17 am

Suggest some Driver for IRF540N ?

Reply
Swagatam says:
July 4, 2018 at 10:25 am

I am not sure what you mean by driver here, I cannot suggest until I see your circuit. Normally a mosfet can be driven directly from any oscillator IC as long as the IC is able to produce around 10 to 12V. If you are using a full-bridge mosfet configuration then you might require a special driver ICs.

Reply
VAMSI ANTYAKULA says:
July 4, 2018 at 2:27 pm

We are connecting 5 V pin on Arduino UNO Board to Mosfet driver IC and then connected the output of it to the gate of the N channel Mosfet IRF540N . As u said that mosfet requires 10-12 volts at Gate for working optimally, can u suggest IC which can provide us above 10-12 volts as Output ?
( Presently we are using DM 7406 )

Reply
VAMSI ANTYAKULA says:
July 5, 2018 at 10:53 am

Can we use IC 4047 instead of 4049 ?

Reply
Swagatam says:
July 5, 2018 at 1:31 pm

4047 is an oscillator IC, it cannot be used as a buffer…but if you intend to use it as an oscillator for driving the mosfets, then definitely you can go ahead with it….

Reply
Swagatam says:
July 4, 2018 at 5:15 pm

I have already suggested you, it is IC4049. connect the output from the Arduino to the input of the IC 4049, connect the Vcc of the 4049 to 12V, and connect the output from the 4049 to the gate of the mosfet

Reply
VAMSI ANTYAKULA says:
July 2, 2018 at 10:03 am

Hello..
I want to have a square wave pulse generation on an oscilloscope. I use IRF520N Mosfet and LM7406 Driver for the switching high frequencies. I only use one mosfet along with a driver. I followed the same circuit as yours. What should be the conditions and prerequesites for getting a square wave with no distortion? Presently i am getting distortion at the beginning. I am not able to find the reason. I want a frequency around 60kHz..Please help..

Reply
Swagatam says:
July 2, 2018 at 10:28 am

At what point are you getting the distortions, if it is at the transformer secondary then that’s normal due to transformer inductive spikes.

Reply
VAMSI ANTYAKULA says:
July 2, 2018 at 5:44 pm

We are designing a Dc pulse power supply. For switching the power at high frequency, presently we are using a mosfet ( IRF540N ) , but there is a distortion in the square wave pulse generated. So we are thinking to use some driver for switching at high frequency .. Please suggest some suitable driver for switching .

Reply
Swagatam says:
July 2, 2018 at 6:53 pm

which oscillator circuit are you using at the moment, I thought you are using the above explained Arduino circuit?? There are some very accurate oscillator circuits such as IC 4047, IC 4060, SG3525, LM567, etc which you can try as driver ICs

Reply
VAMSI ANTYAKULA says:
July 2, 2018 at 7:11 pm

Sir we are using Oscillator circuit DM 7406 as IC and Arduino UNO as microcontroller . Can we go on with above IC or should we change?

Reply
VAMSI ANTYAKULA says:
July 3, 2018 at 6:06 pm

I had experimented the above circuit discussed with power supply. For only 1 volt, its flowing 0.38 A ..so huge..What can be the fault and the problem? Please help?

Reply
Swagatam says:
July 3, 2018 at 6:44 pm

that’s impossible, such high current will be consumed only if the load is rated with that much current or if the pwm is not working. It is always important to check the stages thoroughly before implementing the final design in order to succeed without issues.

Reply
VAMSI ANTYAKULA says:
July 3, 2018 at 10:49 am

We should vary pulse frequency as well as duty cycle. So can we use microcontroller directly or we should employ any other circuit? Please share if you have any example regarding this.

Reply
Swagatam says:
July 3, 2018 at 11:20 am

sorry microcontroller is not within my range of expertise so suggesting this might not be possible for me at this moment. However I think controlling frequency and PWM together using a single Arduino should be possible.
By the way achieving the same may be possible, by using a couple of IC 555, very accurately as shown in the folowing example article

https://www.homemade-circuits.com/underwater-led-boost-converter-with/

R1 could be used for frequency control, and the 500 ohm preset for pwm control

Reply
Swagatam says:
July 2, 2018 at 8:55 pm

Vamsi, instead of an external IC for an oscillator you could try getting the frequency from an Arduino itself, an Arduino would provide better square waves than an external IC circuit according to me.

However all CMOS based oscillators are supposed to produce perfect square waves, you can try employing capacitors across the supply pins of the IC and see if that helps in improcving the distortions, and make sure all the linked connections are as short as possible.

Reply
VAMSI ANTYAKULA says:
July 2, 2018 at 4:26 pm

We are not using transformer. We are two electrodes cathode and anode for machining. We want voltage pulse at high frequencies ( 60KHZ ) on the oscilloscope. The pulses are distorted and are not square wave.We are using DM 7406N IC and IRF540N Mosfet for switching frequencies.

Reply
Swagatam says:
July 2, 2018 at 4:51 pm

If you use a PCB with proper grounding and capacitive filtering then the results will be perfect. The distortions are possibly due to parasitic inductance across the connecting wires. You can check the signal directly across the arduino outputs you may find a better response.

Alternatively try connecting a 100uF and a 0.1uF capacitors directly across the IC’s Vcc/Vss pinouts and check the response

Reply
steveob says:
January 3, 2018 at 4:20 am

wouldn’t you need at least 17 volts on the rail, so you can make 170v peak (120rms) output with that transformer?

Reply
Swagatam says:
January 3, 2018 at 6:37 am

instead you can go for a 9-0-9V trafo

Reply
steveob says:
January 4, 2018 at 9:47 am

That would work too. You might want to update either the 12v rail or the transformer in the diagram, cuz you have an 84v max rms output here instead of 120v.

Reply
Swagatam says:
January 4, 2018 at 1:46 pm

Thanks, I have updated the diagram accordingly with a 6-0-6V trafo…

Reply
Akshay says:
October 3, 2017 at 4:34 pm

How much load in watts can be connected to this circuit?
Can I use this inverter circuit for mobile charging and for CFLs?

Reply
Akshay says:
October 14, 2017 at 4:25 am

Thank u so mch

Reply
Swagatam says:
October 4, 2017 at 1:13 am

watts will depend on the specifications of the transformer, mosfet, battery…you can use it for charging cellphones and CFLs

Reply
RKILY says:
December 8, 2017 at 9:33 pm

how can this ciruit link with GTI?
how can the frequency of 555 can be changed?/

Reply
Swagatam says:
August 21, 2017 at 3:36 pm

transformer primary should be appropriately rated as per the required wattage…divide the required output wattage with battery voltage, that will give you the current rating for the trafo primary

Reply
ali says:
August 21, 2017 at 2:29 pm

and whats for transformer?

Reply
Swagatam says:
August 21, 2017 at 1:10 pm

will depend on the current and voltage capacity of the BJT, you can try TIP35/TIP122 together as Darlington to maximize current, and further you can add such pairs in parallel to further enhance the capacity.

Reply
Swagatam says:
August 21, 2017 at 1:08 pm

OK!

Reply
View Older Comments

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 9 Simple Solar Battery Charger Circuits
  • Gagana on 9 Simple Solar Battery Charger Circuits
  • Swagatam on Arduino 2-Step Programmable Timer Circuit
  • Swagatam on Simple Buck-Boost Converter Circuits Explained
  • Swagatam on IC IR2111 H-Bridge MOSFET, IGBT Driver IC: Full Datasheet, Circuit Diagram

© 2026 · Swagatam Innovations