• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Get free circuit help 24/7

New Projects | Privacy Policy | About us | Contact | Disclaimer | Copyright | Videos 

You are here: Home / Inverter Circuits / Arduino Pure Sine Wave Inverter Circuit with Full Program Code

Arduino Pure Sine Wave Inverter Circuit with Full Program Code

Last Updated on November 15, 2022 by Swagatam 546 Comments

This article explains a simple pure sine wave inverter circuit using Arduino, which could be upgraded to achieve any desired power output as per the user's preference

Circuit Operation

In the last article we learned how to generate sine wave pulse width modulation or SPWM though Arduino, we are going to use the same Arduino board to make the proposed simple pure sine wave inverter circuit.The design is actually extremely straightforward, as shown in the following figure.

You just have to program the arduino board with the SPWM code as explained in the previous article, and hook it up with some of the external devices.

Arduino Pure Sine Wave Inverter Circuit
caution electricity can be dangerous

Pin#8 and pin#9 generate the SPWMs alternately and switch the relevant mosfets with the same SPWM pattern.

The mosfst in turn induce the transformer with high current SPWM waveform using the battery power, causing the secondary of the trafo to generate an identical waveform but at the mains AC level.

The proposed Arduino inverter circuit could be upgraded to any preferred higher wattage level, simply by upgrading the mosfets and the trafo rating accordingly, alternatively you can also convert this into a full bridge or an H-bridge sine wave inverter

Powering the Arduino Board

In the diagram the Arduino board could be seen supplied from a 7812 IC circuit, this could be built by wiring a standard 7812 IC in the following manner. The IC will ensure that the input to the Arduino never exceeds the 12V mark, although this might not be absolutely critical, unless the battery is rated over 18V.

If you have any questions regarding the above SPWM inverter circuit using a programmed Arduino, please feel free to ask them through your valuable comments.

Waveform Images for Arduino SPWM

Arduino Pure Sine Wave Inverter Circuit SPWM waveform

Image of SPWM waveform as obtained from the above Arduino inverter design (Tested and Submitted By Mr. Ainsworth Lynch)

UPDATE:

Using BJT Buffer Stage as Level Shifter

Since an Arduino board will produce a 5V output, it may not be an ideal value for driving mosfets directly.

Therefore an intermediate BJT level shifter stage may be required for raising the gate level to 12V so that the mosfets are able to operate correctly without causing unnecessary heating up of the devices,. The updated diagram (recommended) can be witnessed below:

simple Arduino sinewave inverter circuit using SPWM
The above design is the recommended one! (Just make sure to add the delay timer, as explained below!!)

For the full Program Code please visit the following link: Arduino SPWM Generator Circuit

Video Clip

Parts List

All resistors are 1/4 watt, 5% CFR

  • 10K = 4
  • 1K = 2
  • BC547 = 4nos
  • Mosfets IRF540 = 2nos
  • Arduino UNO = 1
  • Transformer = 9-0-9V/220V/120V current as per requirement.
  • Battery = 12V, Ah value as per requirement

Delay Effect

To ensure that the mosfet stages initiate with a delay during the Arduino booting or start up, you may modify left side BC547 transistors into delay ON stages, as shown below. This will safeguard the mosfets and prevent them from burning during power switch ON Arduino booting.

PLEASE TEST AND CONFIRM THE DELAY OUTPUT WITH AN LED AT THE COLLECTOR, BEFORE FINALIZING THE INVERTER.
FOR INCREASING THE DELAY YOU CAN INCREASE THE 10K VALUE TO 100K

A More Reliable Delay ON Timer

If you are not comfortable with the response of the above passive delay ON timer circuit, you can employ the following configuration using BJTs and a relay. This design is extremely reliable and will effectively protect your Arduino and the inverter from burning due to a malfunctioning delay effect.

Just add this to the above inverter configuration.

Adding an Automatic Voltage Regulator

Just like any other inverter the output from this design can rise to unsafe limits when the battery is fully charged.

To control this an automatic voltage regulator could be employed as shown below.

The BC547 collectors should be connected to the bases of the left side BC547 pair, which are connected to the Arduino via 10K resistors.

Arduino sinewave output correction automatic

For an isolated version of voltage correction circuit we can modify the above circuit with a transformer, as shown below:

Make sure to join the negative line with the battery negative

How to Setup

To set up the automatic voltage correction circuit, feed a stable 230V or 110V as per your inverter specs to the input side of the circuit.

Next, adjust the 10k preset carefully such that the red LEDs just light up. That's all, seal the preset and connect the circuit with the above Arduino board for implementing the intended automatic output voltage regulation.

The Complete Circuit Diagram

The complete diagram using the automatic voltage regulator and the delay ON timer would look like this:

Using CMOS Buffer

Another design for the above Arduino sinewave inverter circuit can be seen below, the CMOS IC is used as an aided buffer for the BJT stage

SPWM Arduino inverter

Important:

In order to avoid an accidental switch ON prior to Arduino booting, a simple delay ON timer circuit may be included in the above design, as shown below:

Arduino with switch ON delay

You'll also like:

  • 1.  Over Current Cut-off Power Supply Using Arduino
  • 2.  3 Simple DC UPS Circuits for Modem/Router
  • 3.  Transformerless AC Voltmeter Circuit Using Arduino
  • 4.  4 Simple Uninterruptible Power Supply (UPS) Circuits Explored
  • 5.  Sinewave UPS using PIC16F72
  • 6.  Arduino Tachometer Circuit for Precise Readings

About Swagatam

I am an electronic engineer (dipIETE ), hobbyist, inventor, schematic/PCB designer, manufacturer. I am also the founder of the website: https://www.homemade-circuits.com/, where I love sharing my innovative circuit ideas and tutorials.
If you have any circuit related query, you may interact through comments, I'll be most happy to help!

Have Questions? Please Comment below to Solve your Queries! Comments must be Related to the above Topic!!

Subscribe
Notify of
546 Comments
Newest
Oldest
Inline Feedbacks
View all comments

Primary Sidebar

Categories

  • 3-Phase Power (15)
  • 324 IC Circuits (19)
  • 4017 IC Circuits (52)
  • 4060 IC Circuits (26)
  • 555 IC Circuits (99)
  • 741 IC Circuits (20)
  • Arduino Engineering Projects (83)
  • Audio and Amplifier Projects (115)
  • Battery Chargers (83)
  • Car and Motorcycle (94)
  • Datasheets (73)
  • Decorative Lighting (Diwali, Christmas) (33)
  • Electronic Components (101)
  • Electronic Devices and Circuit Theory (36)
  • Electronics Tutorial (120)
  • Fish Aquarium (5)
  • Free Energy (34)
  • Fun Projects (13)
  • GSM Projects (9)
  • Health Related (20)
  • Heater Controllers (29)
  • Home Electrical Circuits (103)
  • How to Articles (20)
  • Incubator Related (6)
  • Industrial Electronics (28)
  • Infrared (IR) (40)
  • Inverter Circuits (98)
  • Laser Projects (12)
  • LED and Light Effect (93)
  • LM317/LM338 (21)
  • LM3915 IC (25)
  • Meters and Testers (66)
  • Mini Projects (149)
  • Motor Controller (67)
  • MPPT (7)
  • Oscillator Circuits (26)
  • PIR (Passive Infrared) (8)
  • Power Electronics (34)
  • Power Supply Circuits (79)
  • Radio Circuits (10)
  • Remote Control (48)
  • Security and Alarm (61)
  • Sensors and Detectors (121)
  • SG3525 IC (5)
  • Simple Circuits (75)
  • SMPS (29)
  • Solar Controllers (61)
  • Timer and Delay Relay (53)
  • TL494 IC (5)
  • Transformerless Power Supply (8)
  • Transmitter Circuits (41)
  • Ultrasonic Projects (16)
  • Water Level Controller (45)

Calculators

  • AWG to Millimeter Converter
  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Small Signal Transistor(BJT) and Diode Quick Datasheet
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator

© 2023 · Swagatam Innovations

wpDiscuz