• Skip to main content
  • Skip to primary sidebar

Making Easy Circuits

Learn and build electronic circuits

You are here: Home / Inverter Circuits / Inverter Circuit Using Arduino

Inverter Circuit Using Arduino

Last Updated on May 21, 2019 by Admin 13 Comments

In this post we are going to construct a very simple inverter using Arduino Uno. The proposed project can be easily accomplished by beginners, but care must be taken since we are working with high voltage situation.

The project is made for arduino enthusiast; similar project can also be accomplished with transistors or IC 555 or IC 4047 etc. The advantage of using arduino is we can customize the output parameters, and mainly we can upgrade this square wave inverter to pure sine wave inverter by just writing a new code without any hardware changes (Program only given for Square wave).

If you are intermediate in arduino projects, you can easily tweak the hardware and code to add more features like low battery warning, automatic voltage correction, and quick automatic mains changeover and even you may add LCD display to show voltage readings and on-going status.

The Circuit:

 Simple Square Wave Inverter Circuit Using Arduino

The simple inverter circuit consists of Arduino and you may choose your favorite arduino board. A voltage regulator LM 7809 which give constant voltage to arduino board regardless of battery voltage (Battery voltage must not drop below 11.90V).

The two capacitors connected to voltage regulator gives stability. The input capacitor 1000uF helps the inverter to start softly and provide immunity against sudden input voltage fluctuations.

Two MOSFETs are employed which can handle around 300 Watt power with heat sink mounted. If you want to more power you may choose more powerful MOSFET.

The transformer is a step down one, which is used in reverse to step-up the voltage and it its centre tapped. The transformer’s voltage and current parameter also decides maximum output power. You will need 30A transformer to get 270 watt power without considering efficiency loss.

You may also convert a microwave transformer and wind coils with experienced technician, but it is not recommended though.

Program:

  • //-------------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(20);
  • digitalWrite(out1,LOW);
  • digitalWrite(out2,HIGH);
  • delay(20);
  • }
  • //-------------Program developed by R.Girish----------//

You'll also like:

  • 1.  No Load Detection Shut Down for Inverters
  • 2.  Make this 300 Watt Solar Inverter Circuit
  • 3.  Build this 3 Phase Inverter Circuit with Arduino: Full Program Code
  • 4.  Small Solar Inverter Circuits Explained
  • 5.  Easy 150 W Full-Bridge Inverter Circuit [Tested]
  • 6.  12V to 120V Inverter Circuit

About Admin

Hey friends, Thanks a bunch for stopping by this site! I am an engineer with a Bachelor of Engineering in Electronics and Telecommunication. One of my passions is gathering information from all sorts of electronics books and tutorials. I then take that information and compile it into a language that is super easy to understand. My goal is to make those complex electronics circuit concepts and technical terms much more accessible for all the new and budding electronics engineers out there. I can also design customized circuit diagrams as required by the users.
If you have any questions related to this field, please do not hesitate to drop a comment! I am always here and ready to help you out with any queries you might have. I cannot wait to hear from you!

Reader Interactions

Comments

  1. Gabriel peter says

    March 16, 2025 at 12:39 am

    I like your explanation, thanks

    Reply
    • Admin says

      March 16, 2025 at 11:22 am

      Thank you Gabriel!

      Reply
  2. Marco Silva says

    February 2, 2021 at 6:17 am

    Mr. Swagatam, thanks for your awesome works!
    please, I’ve seen the transformer is iron cored, isn’t it? Any modifications in circuitry and program lines, if I try to use ferrite cored pulse transformer, like pc switched power supplies? I intent to use IRF3205 or IRF260 MOSFET.
    Again, thanks a lot

    Reply
    • admin says

      February 6, 2021 at 10:04 am

      For ferrite core, the frequency will need to be above 20 kHz

      Reply
  3. TSHERING DORJI says

    July 7, 2020 at 6:35 pm

    How can we get the pure sine wave though the main function of the arduino here is to generate the pulse?. i would be grateful if the author could send us that code for improving the sine wave.

    Reply
    • admin says

      July 7, 2020 at 7:22 pm

      Sorry we don’t have the code for a sine wave inverter

      Reply
  4. monojit halder says

    July 25, 2019 at 8:43 am

    My transformer has two wire in the primary coil and two wire in the secondary coil. Can i use this kind of transformer for making inverter? Thank you.

    Reply
    • jq says

      October 1, 2024 at 11:11 am

      Hi, thank you for this projects, just one question, in the program you have delay on 20ms and delay off 20ms, so 40 ms per period which is 25Hz. For 50Hz the delays should be 10 ms, right?

      Reply
      • admin says

        October 7, 2024 at 12:18 pm

        Yes you seem to be right, please make it 10ms in the program code.

        Reply
  5. baruti says

    June 12, 2018 at 1:47 pm

    /*
    This code was based on BARUTI SPWM code with changes made to remove errors. Use this code as you would use any other BARUTI ,s works.
    11/6/2018
    */
    const int sPWMArray[] = {500,500,750,500,1250,500,2000,500,1250,500,750,500,500}; // This is the array with the SPWM values change them at will
    const int sPWMArrayValues = 13; // You need this since C doesn’t give you the length of an Array
    // The pins
    const int sPWMpin1 = 10;
    const int sPWMpin2 = 9;
    // The pin switches
    bool sPWMpin1Status = true;
    bool sPWMpin2Status = true;

    void setup()
    {
    pinMode(sPWMpin1, OUTPUT);
    pinMode(sPWMpin2, OUTPUT);
    }

    void loop()
    {
    // Loop for pin 1
    for(int i(0); i != sPWMArrayValues; i++)
    {
    if(sPWMpin1Status)
    {
    digitalWrite(sPWMpin1, HIGH);
    delayMicroseconds(sPWMArray[i]);
    sPWMpin1Status = false;
    }
    else
    {
    digitalWrite(sPWMpin1, LOW);
    delayMicroseconds(sPWMArray[i]);
    sPWMpin1Status = true;
    }
    }

    // Loop for pin 2
    for(int i(0); i != sPWMArrayValues; i++)
    {
    if(sPWMpin2Status)
    {
    digitalWrite(sPWMpin2, HIGH);
    delayMicroseconds(sPWMArray[i]);
    sPWMpin2Status = false;
    }
    else
    {
    digitalWrite(sPWMpin2, LOW);
    delayMicroseconds(sPWMArray[i]);
    sPWMpin2Status = true;
    }
    }
    }

    Reply
    • Ashish Patel says

      December 4, 2020 at 5:07 pm

      Dear monojit halder

      you can use this code and you have to use L298N Motor Driver as switching mosfet

      connect transformers primary wire to motor1 + and motor1- in L298N and the arduino output pin connect to the logic pin on L298N in1 in2 and try to power all this things and also you have to connect 5v ang gnd from arduino to L298n may be this will works hope fully.

      Reply
  6. Arch-Emeritus says

    December 31, 2017 at 2:49 pm

    This will only generate a square wave signal.have done dis kind of design some years ago it keep heating up my mosfet and because of the lacking of feedback control the output will be very low less than 110v instead of 220v except you wind the transformer excessively at the secondary side

    Reply
    • admin says

      January 3, 2018 at 12:50 pm

      it is a square wave inverter, and mosfet will eat up if the output is overloaded or if the mosfet is not mounted on proper heatsink,
      output will never be low if the trafo selection is as per the battery specs

      Reply

Leave a Reply Cancel reply

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

Primary Sidebar

Categories

  • 3 Phase (4)
  • 8051 Microcontroller (1)
  • Arduino (11)
  • Audio and Amplifier (102)
  • Automation (8)
  • Battery Chargers (64)
  • Bicycle Projects (4)
  • Car and Motorcycle Projects (39)
  • Datasheets (10)
  • DIY Projects (5)
  • Electrical (15)
  • Free Energy (6)
  • Games Projects (2)
  • High Voltage (14)
  • Hobby Projects (30)
  • Household Circuits (2)
  • IC 555 Circuits (5)
  • Ignition Circuits (2)
  • Indicators (50)
  • Infrared (6)
  • Inverter Circuits (29)
  • Lights and Lamps (97)
  • Medical (8)
  • Meter and Tester Circuits (38)
  • Motor Driver (17)
  • New Circuits (56)
  • Oscillators (30)
  • Pets and Pests (5)
  • Power supply (80)
  • Protection Circuits (25)
  • PWM (9)
  • Remote Control (20)
  • Security and Alarm Circuit (48)
  • Sensors and Detectors (66)
  • Signal Processor (23)
  • Solar Controller Circuits (62)
  • SSR (3)
  • Temperature Controller (20)
  • Timer (25)
  • Transformerless (7)
  • Transmitters (12)
  • Tutorials (45)
  • UPS (2)
  • Voltage Regulators (57)
  • Water Sensor and Controller (29)
  • Home
  • Privacy Policy
  • Contact
  • Disclaimer
  • Copyright

© 2025 · Making Easy Circuits