Simple Arduino Inverter Circuit – Using MOSFET

In this post, we are going to see how to construct a simple inverter circuit using Arduino and MOSFETs and we will be learning the three important stages of an inverter and we will be inspecting the wave form and frequency using an oscilloscope of this Inverter.

The output power of any power Inverter is depends upon these three things:

  • The transformer’s power rating.
  • Output power rating of Driving stage i.e. MOSFETs / Transistor.
  • The ability of the battery to provide the power.

These 3 things will determine how powerful you inverter is.

Let’s see these three concepts in detail now.

Transformer’s power rating:

Image source: https://commons.wikimedia.org/wiki/File:Transformer-hightolow_smaller.jpg

The low voltage is step-up (Increased) by a transformer; in this project we are using a step-down transformer in reverse, which means we are inputting low voltage AC at secondary winding and taking high voltage AC via primary winding of the transformer.

By doing so, it act as a step-up transformer.

The power output:

The power output of this (any) inverter is limited by the transformer (One of the factor). We are using 9V centre taped transformer at secondary winding and 230VAC / 120VAC at primary.

We can calculate the power output of this inverter by multiplying the current and voltage of the secondary winding of the transformer (9V-0-9V/10A).

For example:

9V x 10A = 90 Watt maximum, but you will only get around 70 to 80 watts at output due to some losses.

If your transformer’s secondary winding is rated at 100 Ampere then you will get 9V x 100A = 900 Watt maximum, again there will be some loss.

Now you know the limiting factor with your transformer.

The MOSFETs:

We are utilizing MOSFETs instead of BJTs for better efficiency. MOSFETs have less internal resistance, which translates to less heat dissipated as per ohm’s law.

Image Source: https://www.flickr.com/photos/sparkfun/14187398264

Power BJTs mostly cannot be driven by the ICs or the microcontrollers directly because of the limited current capability of the microcontroller / ICs.

If BJTs are not properly biased at Base terminal, we will get less power at output, even though your transformer and battery can deliver enough power.

The proposed circuit is tested with IRF540N but, you can use any N-channel MOSFET. The IRF540N can handle maximum current of 33A (with its maximum temperature limit) as per the data sheet.

So, with a rough calculation this MOSFET can deliver: 12V (Battery voltage) x 33A = 396 Watt at best and again, there will be some loss.

So we can assume that it can deliver 150 watt to 250 watt with this particular MOSFET.

If you want more power at output, you can connect two MOSFET in parallel to double the power output, provided your battery and transformer can deliver.

Battery:

The ability of the battery to deliver current reflects the power output. The battery has certain limit to deliver current, if we force the battery beyond its limit, we will see sharp degradation in battery life and its capacity.

Image source: https://commons.wikimedia.org/wiki/File:12V_VRLA_Battery.jpg

The ability of the battery to deliver current depends on the internal “Equivalent Series Resistance”, which is, resistance of few ohm series with battery internally. Every battery has internal “Equivalent Series Resistance” (ESR).

But deep cycle batteries have the least “ESR” which made it suitable for high current applications.

A 12V 7Ah battery can provide enough current for 150 watts safely without any significant degradation.

But if you want to increase the backup time or power or both connect 2 or more 12V 7Ah batteries in parallel with similar charge level.

The battery is the one which delivers power your connected appliances; the inverter converts the battery’s “Low voltage / High current” into “High voltage / Low current” AC output.

Misconceptions:

If you think inverter is a magical device which delivers more power than your battery can, then you are wrong.

There is a common misconception with beginners that, they think they can charge a battery fully (say 7Ah) and run electrical appliances simultaneously with another 7Ah battery powering the inverter and after the battery exhausted, put the exhausted battery to charge and power the inverter with fully charged battery.

They didn’t understand a fact that “Energy is neither created nor destroyed” which means we cannot get more power at output than you applied at input.

An Inverter is an ohm’s law machine, let’s look at an example:

Consider two 100 Watt bulbs, one with 12V and another with 220V. Both give same brightness when respective voltage is applied.

We know that, Power = Voltage x Current

100 watt = 12 volt x current, rearranging the equation,

Current = 100 / 12 = 8.33 Ampere.

The bulb with 12V consumes 8.33A, we know that a deep cycle or automobile battery can provide this much current.

8.33A is the current consumption with a bulb of 100 watt, which runs at 12V. But we don’t generally run a bulb at 12V which has 100 Watt rating at home.

But we usually run 100 watt bulb with 220V,

100 watt = 220 volt x current, rearranging the equation,

Current = 100 / 220 = 0.45 Ampere

The bulb just needs 0.45A at 220V.

A 12V inverter consumes 8.33 ampere for glowing the bulb of 100 watt at 220V.

See no magic!

The conclusion of this misconception is that there is no free energy device and stop believing the videos on internet. Beginners are easily fooled by showing free energy inverter or something similar.

Circuit diagram:

Program code:

//-------------www<electronics-project-hub>com-----------//

const int output_1 = 2;

const int output_2 = 3;

const int buzzer = 4;

void setup()

{

pinMode(output_1,OUTPUT);

pinMode(output_2,OUTPUT);

pinMode(buzzer, OUTPUT);

digitalWrite(buzzer, HIGH);

delay(250);

digitalWrite(buzzer, LOW);

}

void loop()

{

digitalWrite(output_2,LOW);

digitalWrite(output_1,HIGH);

delay(10);

digitalWrite(output_1,LOW);

digitalWrite(output_2,HIGH);

delay(10);

}

//-------------www<electronics-project-hub>com-----------//

Wait! ….. You got the circuit diagram and program code, read the description before constructing.

Description:

Connect the components as per the circuit diagram. Use thicker wires to connect the MOSFET’s source terminal to battery and transformer’s centre tap to battery.

Fuse is a must for this circuit and there is good chance of short circuit as a beginner.

You can use any Arduino board you wish, but we recommend Arduino Nano or Arduino Pro-mini for soldering the Arduino permanently.

You should not use 24V battery.

Working:

The Arduino is the heart of the circuit as it generates 50Hz square wave at 50% duty cycle.

The two BC548 are the buffers for MOSFET IRF540N. The IRF540N or most of the MOSFETs need 10V to fully turn on, but the Arduino pins deliver only 5V.

The two BC548 takes the low voltage (5V Signal) from Arduino and delivers 12V at “gate” terminal, which is sufficient for turn the MOSFETs fully ON.

If the MOSFET is not fully ON there will be resistance between Source and Drain Terminal, which generated heat (a lot!) and affects the output voltage and current.

The Arduino oscillates the each MOSFET at time energizing the secondary side winding alternately, which produces stable 50Hz 230V AC at the output.

Arduino’s square wave output:

How to Operate this Inverter:

  • Upload the code to Arduino first and start constructing the circuit.
  • After completing the circuit, bring a fully charged 12v 7Ah battery for testing.
  • Turn the “Switch 1” first let the Arduino boot. Once the Arduino booted you will hear a beep.
  • Now you can turn on the “Switch 2” which powers the MOSFET and transformer.
  • Connect a 40 Watt bulb at output; it should glow with reasonable brightness. Walla! You are done!

NOTE: You should always wait for the beep; otherwise you will end up in short circuiting the battery / blow the fuse.

Advantage of this Inverter Circuit:

  • Simple microcontroller design.
  • Very stable output frequency.
  • Good efficiency around 75% to 80%.

Disadvantage of this Inverter Circuit:

  • Square wave is not suitable for many sensitive electronics equipments like: Medical equipments and Cheap Audio amplifiers
  • Output voltage reduces with increasing load or no automatic voltage regulation.

If you have any question, please ask us in the comment, you can anticipate a guaranteed reply from us.