• 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 Full-Bridge (H-Bridge) Inverter Circuit

Arduino Full-Bridge (H-Bridge) Inverter Circuit

Last Updated on December 17, 2020 by Swagatam 183 Comments

A simple yet useful Microprocessor based Arduino full-bridge inverter circuit can be built by programming an Arduino board with SPWM and by integrating a few mosfets with in H-bridge topology, I have explained the details below:

In one of our earlier articles I will comprehensively explained how to build a simple Arduino sine wave inverter, here we will see how the same Arduino project could be applied for building a simple full bridge or an H-bridge inverter circuit.

Using P-Channel and N-Channel Mosfets

To keep things simple we will use the P-channel mosfets for the high side mosfets and N-channel mosfets for the low side mosfets, this will allow us to avoid the complex bootstrap stage and enable direct integration of the Arduino signal with the mosfets.

Usually N-channel mosfets are employed while designing full bridge based inverters, which ensures the most ideal current switching across the mosfets and the load, and ensures a much safer working conditions for the mosfets.

However when a combination of and p and n channel mosfets are used, the risk of a shoot through and other similar factors across the mosfets becomes a serious issue.

Having said that, if the transition phases are appropriately safeguarded with a small dead time, the switching can be perhaps made as safe as possible and blowing of the mosfets could be avoided.

In this design I have specifically used Schmidt trigger NAND gates using IC 4093 which ensures that the switching across the two channels are crisp, and it's not affected by any kind of spurious transients or low signal disturbance.

Gates N1-N4 Logic Operation

When Pin 9 is logic 1, and pin 8 is logic 0

  • N1 output is 0, Top Left p-MOSFET is ON, N2 output is 1, the Lower Right n-MOSFET is ON.
  • N3 output is 1, Top Right p-MOSFET is OFF, N4 output 0, Lower Left n-MOSFET is OFF.
  • The exactly same sequence happens for the other diagonally connected MOSFETs, when pin 9 is logic 0, and pin 8 is logic 1

How it Works

As shown in the above figure, the working of this Arduino based full bridge sinewave inverter can be understood with the help of the following points:

The Arduino is programmed to genearte appropriately formatted SPWM outputs from pin#8 and pin#9.

While one of the pins is generating the SPWMs, the complementary pin is held low.

The respective outputs from the above mentioned pinouts are processed through Schmidt trigger NAND gates (N1---N4) from the IC 4093. The gates are all arranged as inverters with a Schmidt response, and fed to the relevant mosfets of the full bridge driver network.

While pin#9 generates the SPWMs, N1 inverts the SPWMs and ensures the relevant high side mosfets responds and conducts to the high logics of the SPWM, and N2 ensures the low side N-channel mosfet does the same.

During this time pin#8 is held at logic zero (inactive), which is appropriately interpreted by N3 N4 to ensure that the other complementary mosfet pair of the H-bridge remains completely switched OFF.

The above criteria is identically repeated when the SPWM generation transits to the pin#8 from pin#9, and the set conditions are continuously repeated across the Arduino pinouts and the full bridge mosfet pairs.

Battery Specifications

The battery specification selected for the given Arduino full bridge sinewave inverter circuit is 24V/100Ah, however any other desired specification could be selected for the battery as per the user preference.

The transforer primary voltage specs should be slightly lower than the battery voltage to ensure that the SPWM RMS proportionately creates around 220V to 240V at the secondary of the transformer.

The Entire Program Code is Provided in the following article:

Sinewave SPWM Code

4093 IC pinouts

IRF540 pinout Detail (IRF9540 will also have the same pinout config)

An Easier Full-Bridge Alternative

The figure below shows an alternate H-bridge design using P and N channel MOSFETs, which does not depend on ICs, instead uses ordinary BJTs as drivers for isolating the MOSFETs.

The alternate clock signals are supplied from the Arduino board, while the positive and negative outputs from the above circuit is supplied to the Arduino DC input.

You'll also like:

  • How to Build a 400 Watt High Power Inverter Circuit
  • H-Bridge Sine Wave Inverter Circuit using Arduino
  • 3000 watts3 Best Transformerless Inverter Circuits
  • Modified Inverter Circuits using 4049, 4093 ICs

Filed Under: Inverter Circuits Tagged With: Arduino, Bridge, Full, Inverter

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: « LM324 Quick Datasheet and Application Circuits
Next Post: PIR Sensor Datasheet, Pinout Specifications, Working »

Reader Interactions

Comments

Scott McKie says:
December 8, 2024 at 3:05 am

Hi — thank you for responding so quickly — and thank you for identifying the Arduino unit:
but your answer concerning using two P-types in parallel – was not my question.
Not being familiar with the P-type MOSFET – my question was — can I use a 4420 driver to power a P-type MOSFET – or do I have to use the 4429?

Thanks in advance.

Reply
Swagatam says:
December 8, 2024 at 8:03 am

I checked the datasheet of 4420 and 4429, they look exactly similar to me, so any of these can be used for driving the MOSFETs.
Also, these drivers can be used with P-Channel MOSFETs and N-Channel MOSFETs, both.
Please correct me if I am wrong.

Reply
Scott McKie says:
December 7, 2024 at 12:11 pm

Hi — I’ve got a question concerning the IRF9540 Mosfets.
I’ve been using IRF 741 MOSFETs / TO 220 Case driven by 4420 / 6 A Drivers with great success.
Pertaining to the IRF 9540 MOSFETs your calling for — is there a similar P-Type match that you would recommend to match the IRF741?

Also- do you know if I should use the 4429 / 6 A driver for the P type – or will the 4420 driver work for both.

To be honest – I have never worked with P-type MOSFETs before – and am aware that they are a little slower than the N type MOSFET.

Finally – is there a particular Arduino that you use for the full-wave H-Bridge inverter?

Thanks in advance for any info you can send me

Reply
Swagatam says:
December 7, 2024 at 5:19 pm

…You can use two of these MOSFETs in parallel for the P channel MOSFETs.
https://www.mouser.com/datasheet/2/308/FQB4P40-1192331.pdf

Reply
Swagatam says:
December 7, 2024 at 3:08 pm

Hi, thanks for your interesting question.
You can use either the 4420 driver or the 4429 with the Arduino output for getting the intended full bridge output results.
https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/21419D.pdf

The Arduino is the standard UNO board.

Reply
Brendan Glynn says:
July 28, 2024 at 10:26 pm

Could you just use a stepper motor driver card and get square wave or sine by selecting microsteps?

Reply
Swagatam says:
July 29, 2024 at 8:13 am

Sorry, I am not sure if that’s possible or not.

Reply
Tom_speed_garage says:
March 2, 2024 at 4:49 am

Amazing article sir ! And how much the wattage of your design sir ? Thank you very much

Reply
Swagatam says:
March 2, 2024 at 8:49 am

Thank you Tom, The power of the inverter will depend on the transformer, battery and the MOSFET specifications, which can be upgraded to any desired levels.

Reply
jboy says:
December 27, 2023 at 1:55 pm

The frequency is s 50Hz I’m using iron core for the transformer.

Reply
jboy says:
December 27, 2023 at 1:49 pm

I want to design a 6000W pure sine wave inverter using 48v battery. My challenge is how to calculate the wire size for both primary and secondary kindly help to explain how I can calculate the wire size for both primary and secondary.
Thanks

Reply
Swagatam says:
December 27, 2023 at 3:12 pm

Sorry, calculating a 6000 watt transformer can be difficult, I do not have the formulas for calculating such a huge transformer.

Reply
Frank says:
December 4, 2023 at 6:38 pm

I wanted to know if the transformer is a 50/60 Hz current transformer made of silicon steel sheets. I have my doubts because, since it is SPWM, the frequency is much higher than those 50/60 Hz of a normal transformer.

In this case, would it not be necessary to have an LC filter at the output of the transformer?

Reply
Swagatam says:
December 4, 2023 at 6:58 pm

Yes the transformer is an ordinary iron core step down transformer connected the other way round. Only capacitive filter becomes sufficient since the transformer secondary winding itself works like an effective inductor. I have added a 3uF/400V capacitor which converts the SPWM into pure sine wave.

Reply
Anooshka says:
May 11, 2023 at 11:00 am

Sorry for the continues questions, can supply be given from the DC power supply at the lab or should lead acid battery be used?
Thanks again, Mr.Swagatam

Reply
Swagatam says:
May 11, 2023 at 5:28 pm

You can use any 12 V DC supply for testing, it can be from a 12 V battery or from a 12 V SMPS, just make sure it has adequate current supply for the transformer and the load.

Reply
Anooshka says:
May 11, 2023 at 8:21 pm

Thank you sir

Reply
Swagatam says:
May 12, 2023 at 9:21 am

You are welcome Anooshka

Reply
Anooshka says:
May 11, 2023 at 10:53 am

And can I connect IC4093 Vdd to 12V directly?
Thank you in advance for your prompt reply

Reply
Swagatam says:
May 11, 2023 at 5:20 pm

Yes 4093 can be connected to 12 V DC directly, however I would recommend using a 100 ohm 1/4 watt resistor in series with the positive supply of the IC, and also connect a 12 V zener, and a 1N4148 diode right across the supply terminals of the 4093 IC along with parallel connected 100uF/25V and 0.1uF capacitors, all these will ensure that the IC is not affected by the voltage spikes from the transformer

Reply
Anooshka says:
May 11, 2023 at 11:46 pm

Also sir I wanted to know, while using 7812, it has 3 pins, input (12V/24V), ground and output. I had the following doubts.
How is 7812 output pin connected to the Arduino?
How is the 0.1uF connected?
It would be really helpful if you could explain the 7812 connection diagram.
Sorry for disturbing and thank you for your cooperation.

Reply
Swagatam says:
May 12, 2023 at 9:26 am

It is important to note that the battery for this project must be strictly a 12V battery, a 24V battery will not work and might burn the MOSFETs.
For the 7812 connection, the battery (+) will connect with the input of 7812, the battery (-) will connect with the ground of the 7812, the output (+) and the ground of the 7812 will go to the (+) and (-) of the Arduino socket respectively.

Reply
Anooshka says:
May 12, 2023 at 9:29 am

Thank you for your prompt response, lastly how is the 0.1uF capacitor across 7812?

Reply
Swagatam says:
May 12, 2023 at 9:32 am

The 0.1uF is shown for the 4093 IC which must be also supplied from the 7812 IC.

Reply
Anooshka says:
May 12, 2023 at 9:38 am

Across the input and output right sir? Because the middle pin will be grounded of 7812.
You have been a lifesaver, thanks a lot for your replies.

Reply
Swagatam says:
May 12, 2023 at 9:50 am

Anooshka,
The capacitor should be connected across the output and the ground of the 7812, one pin of the capacitor must always connect with the ground of the circuit or the device.
I am glad to help you!

Reply
Anooshka says:
May 11, 2023 at 8:20 pm

So these protection elements will all come in series with Vdd of IC 4093 or is it connected between Vdd and ground?

Reply
Swagatam says:
May 12, 2023 at 9:21 am

No, only the 100 ohm resistor will come in series with the (+) supply line of the 4093.
The zener diode, 1N4148 diode, 100uF, 0.1uF all these will need to be connected across the (+)(-) terminals of the 4093

Reply
Anooshka says:
May 12, 2023 at 9:29 am

Thank you sir

Reply
Swagatam says:
May 12, 2023 at 9:32 am

You are welcome!!

Reply
Anooshka says:
May 11, 2023 at 10:50 am

Hi, I am doing the above project but I am using a 12-0-12 (500MA) transformer instead. I inferred that changing to 12V supply would be enough. I have few more doubts
1) Would there be any change to circuit, am I to provide a delay, in that case how could I do so?
2) Would there be any change to the code?
3) Is there any way to replace transformer just by using RL load?

Reply
Swagatam says:
May 11, 2023 at 5:14 pm

Hi, If you use a 12-0-12V transformer and a 12 V battery, then with an SPWM Arduino code the output voltage from the transformer would be around 180 V only. You should use a 6-0-6V transformer instead.
Delay may not be required since 4093 IC has a schmitt trigger inside which will cause a slight delay in the operation of the two sides.
If you do not use a transformer then 220 V output may not be possible to achieve.

Reply
Anooshka says:
May 11, 2023 at 8:19 pm

Thank you for your response

Reply
Cyril Great says:
February 6, 2023 at 12:02 am

How do I get good Inverter board and software

Reply
Swagatam says:
February 6, 2023 at 8:39 am

You can get it from online stores like amazon.

Reply
Michael says:
November 2, 2022 at 8:31 pm

Good morning, thank you for your article.
I would like to increase the power by putting 4x mosfets in parallel in the H-bridge (IRF9540+IRF540).
Is that possible ?
Do you have a low battery cutout planned for your UPS?
Thanks
Michael

Reply
Swagatam says:
November 3, 2022 at 11:36 am

Hello, you can try with single mosfets first and confirm the working of the circuit. Once confirmed then you can try adding more mosfets in parallel to increase the power output.
For a low battery integration you can try integrating the following concepts:

IC 741 Low Battery Indicator Circuit
Low Battery Indicator Circuit Using Two Transistors Only

Reply
Tiaan says:
August 26, 2022 at 11:41 am

Best Swagatam

If looked at the circuit and would like to know where the 4093 IC draws its power from? It is rated at 15V max input and the design has a 24V battery.
The p-channel mosfets would have to get 24V to switch off and then assuming the 4093 IC uses a 24V supply (which it can’t) the Vgs of the mosfets would be 0 or 24V with 24V being above the maximum Vgs of the mosfets.

Regards Tiaan

Reply
Swagatam says:
August 26, 2022 at 5:46 pm

You are right Tiaan, the battery must be a 12V battery in that case! Thanks for pointing out the mistake.
The 4093 can draw the supply voltage from the 12V battery

Reply
anaskhan says:
August 12, 2022 at 2:12 am

hello dear sir project is isolated bidirectional dc dc converter kindly share circuite diagram

Reply
Swagatam says:
August 12, 2022 at 10:04 am

I don’t have it at this moment, if I find it will surely share it with you.

Reply
Jayanim Dilsha says:
June 15, 2022 at 6:45 pm

How to get Arduino code??

Reply
Swagatam says:
June 15, 2022 at 7:18 pm

Code is already given in the above article.

Reply
Tiaan says:
May 26, 2022 at 7:35 pm

Best Swagatam

Your projects are very helpful, I just want to know.
What should change in this circuit if I want to use a 12V/230V transformer and 12V battery?
Also should this circuit get a delay circuit and voltage regulation circuit like the 12V arduino inverter project you made?

Kindest regards
Tiaan

Reply
Swagatam says:
May 26, 2022 at 7:42 pm

Thanks Tiaan,

you don’t need to change anything except the battery. Yes, there should be a delay around 10 seconds before the Arduino output can be connected with the 4093 inputs otherwise the mosfets can burn.

Reply
Tiaan says:
May 26, 2022 at 7:30 pm

Best Swagatam

Your projects are very helpful, I just want to know.
What should be changed in the circuit if I want to use a 12V battery and 12V/230V transformer?

Kindest regards

Reply
Swagatam says:
May 26, 2022 at 7:40 pm

Thank you Tiaan,

You only have to change the battery to 12V, that’s all, nothing else needs to be changed.

Reply
Josta logo says:
May 26, 2022 at 6:44 pm

I want to follow your designs

Reply
Swagatam says:
May 26, 2022 at 7:19 pm

Thank you, sure you can!

Reply
Swagatam says:
October 4, 2021 at 8:52 am

Thank you for sharing your concern, yes the output of the inverter will be a push pull type and not split phase.

Reply
View Older Comments

Leave a Reply to Swagatam 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 (92)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (84)
  • Datasheets and Components (109)
  • Electronics Theory (148)
  • Free Energy (39)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (16)
  • Inverter Circuits (94)
  • Lamps and Lights (157)
  • Meters and Testers (71)
  • Mini Projects (28)
  • Motor Controller (66)
  • Oscillator Circuits (28)
  • Pets and Pests (15)
  • Power Supply Circuits (90)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (105)
  • SMPS and Converters (32)
  • Solar Controller Circuits (60)
  • Temperature Controllers (43)
  • Timer and Delay Relay (49)
  • Voltage Control and Protection (38)
  • 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 3 Laser Beam Controlled Circuits Explored
  • ken on 8X Overunity from Joule Thief – Proven Design
  • Kim on 3 Laser Beam Controlled Circuits Explored
  • Swagatam on Making an Adjustable Electromagnet Circuit
  • Swagatam on Make this DC CDI Circuit for Motorcycles

© 2025 · Swagatam Innovations