Home » 12V DC to 220 AC Power Converters » Arduino 3 Phase Inverter Circuit with Code
Arduino 3 Phase Inverter Circuit with Code

Arduino 3 Phase Inverter Circuit with Code

In this post we learn how to make a simple microprocessor Arduino based 3 phase inverter circuit which could be upgraded as per user preference for operating a given 3 phase load.

We have already studied an effective yet simple 3 phase inverter circuit in one of our earlier posts which relied on opamps for generating the 3 phase square wave signals, while the 3 phase push pull signals for driving the mosfets was implemented using specialized 3 phase driver ICs.

In the present concept also we configure the main power stage using these specialized driver ICs, but the 3 phase signal generator is created using an Arduino.

This is because creating an Arduino based 3 phase driver can be extremely complex and is not recommended. Moreover, it is much easier to get off-the-shelf efficient digital ICs for the purpose at much cheaper rates.

Before building the complete inverter circuit, we first need to program the following Arduino code inside an Arduino UNO board, and then proceed with the rest of the details.

Arduino 3 Phase Signal Generator Code

void setup() {
// initialize digital pin 13,12&8 as an output.
pinMode(13, OUTPUT);
void loop() {
int var=0;
digitalWrite(13, HIGH);

Original Source: http://forum.arduino.cc/index.php?topic=423907.0

The assumed waveform using the above code could be visualized in the following diagram:

3 phase square wave image

Once you have burned and confirmed the above code in your Arduino, it's time to move ahead and configure the remaining circuit stages.

For this you will need the following parts which hopefully you might have already procured:

Parts Needed

IC IR2112 - 3 nos (or any similar 3 phase driver IC)
BC547 transistors - 3 nos
capacitor 10uF/25V and 1uF/25V = 3 nos each
100uF/25V = 1no
1N4148 = 3nos (1N4148 is recommended over 1N4007)

Resistors, all 1/4 watt 5%
100 ohms = 6nos
1K = 6nos

Constructional Details

To begin with, we join the 3 ICs to form the intended 3 phase mosfet driver stage, as given below:

Arduino 3 phase driver

Once the driver board is assembled, the BC547 transistors are hooked up with the HIN and LIN inputs of the IC, and illustrated in the following figure:

arduino 3 phase inverter driver

Once the above designs are constructed, the intended result could be quickly verified by switching ON the system.

Remember, the Arduino needs sometime to boot, therefore it is recommended to switch ON the Arduino first and then switch ON the +12V supply to the driver circuit after a few seconds.

How to Calculate the Bootstrap Capacitors

As we can see in the above figures, a circuit requires a couple of external components near the mosfets in the form of diodes and capacitors. These parts play a crucial role in implementing precise switching of the high side mosfets, and the stages are called bootstrapping network.

Although already given in the diagram, the values of these capacitors could be specifically calculated using the following formula:

full bridge bootstrap capacitor formula

How to Calculate the Bootstrap Diodes

The above equations can be used for calculating the capacitor value for the bootstrap network, for the associated diode we have to consider the following criteria:

The diodes activate or are enabled in the forward bias mode when the high side mosfets are turned on and the potential around them is almost equal to the BUS voltage across the full bridge mosfet voltage lines, therefore the bootstrap diode must be rated enough to be able to block the full applied voltage as specified in the specific diagrams.

This looks fairly easy to understand, however for calculating the current rating, we may have to do some math by multiplying the gate charge magnitude with the switching frequency.

For example if the mosfet IRF450 is used with a switching frequency of 100kHz, the current rating for the diode would be around 12mA. Since this value looks quite minimal and most diodes would have a much higher current rating than this normally, specific attention may not be essential.

Having said that, the over temperature leakage characteristic of the diode can be a crucial to be considered, especially in situations where the bootstrap capacitor may be supposed to store its charge for reasonably sustained amount of time. In such circumstance the diode will need to be a ultra fast recovery type to minimize the magnitude of charge from being forced back from the bootstrap capacitor towards the supply rails of the IC.

Some Safety Tips

As we all know that mosfets in 3 phase inverter circuits can be quite vulnerable to damage due to many risky parameters involved with such concepts, especially when inductive loads are used. I have already discussed this elaborately in one of my earlier articles, and it is strictly advised to refer to this article and implement the mosfets as per the given guidelines.

Using IC IRS2330

The following diagrams are designed to work as a 3 phase PWM controlled inverter from an Arduino.

The first diagram is wired using six NOT gates from the IC 4049. This stage is used for bifurcating the Arduino PWM pulses into complementary high/low logic pairs so that the a bridge 3 phase inverter driver IC IC IRS2330 can be made compatible with the fed PWMs.

The second diagram from above forms the bridge driver stage for the proposed Arduino PWM, 3 phase inverter design, using the IC IRS2330 bridge driver chip.

The inputs of the IC indicated as HIN and LIN accept the dimensioned Arduino PWMs from the NOT gates and drives the output bridge network formed by 6 IGBTs which in turn drive the connected load across their three outputs.

The 1K preset is used for controlling the over current limit of the inverter by suitably adjusting it across the shut down pin of the I, the 1 ohm sensing resistor may be reduced appropriately if the current a relatively higher current is specified for the inverter.

Wrapping it Up:

This concludes our discussion on how to build an Arduino based 3 phase inverter circuit. If you have any further doubts or questions on this subject please feel free to comment and get the replies quickly.


About the Author

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!

7 thoughts on “Arduino 3 Phase Inverter Circuit with Code”

  1. Howdy, Friend! Interested to Learn Circuit Designing? Let's Start Discussing below!
  2. hi sir can u plz explain if the VSS pin and COM.pin of ic ir2110 are connected to the ground of input dc voltage…I’m confused because my igbts r getting hot even on 12 CDC

    • Hi Ahmed, yes all the common grounds must be joined together according to the datasheet, otherwise the devices will not conduct.

      You can disconnect the grounds and check whether your IGBTs work or not.

  3. sir can u tell that is the pin VSS and pin COM..from ic ir2110 are corrected direct to the input ground of igbt?…I’m confused because my igbts r getting hot even on 12vdc input…

  4. Good day sir.. Please sir I need your assistance I want to produce a pure sinewave solar inverter that can carry 5 air conditioner of 5horse power for up to 8 to 12 hrs…. Please Sir I need the diagram and the quantities of solar panels with the watts and the batteries with the current ratings….. Thanks sir and God bless you

Leave a Comment

Do NOT follow this link or you will be banned from the site!