• 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 | Hire Me | 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:

Table of Contents
  • Using P-Channel and N-Channel Mosfets
    • Gates N1-N4 Logic Operation
  • How it Works
    • Battery Specifications
    • 4093 IC pinouts
      • IRF540 pinout Detail (IRF9540 will also have the same pinout config)
    • An Easier Full-Bridge Alternative

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:

  • Pure Sine Wave Inverter Circuit Using IC 4047
  • Modified Inverter Circuits using 4049, 4093 ICs
  • IC IR2111 H-Bridge Inverter Circuit with Shut Down
  • microupscircuit 1 1Automatic Micro UPS Circuit

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

Questions & Answers

Total Posts: 183
Newest Oldest
Nitonito
April 19, 2018 • 8 years ago #59890

thanks Swag for the update and correction in diagram i’v tried the simulation with TL494 an the input cd4093 and it works fine as a modified sine so am gonna build this and see sine i like h-bridge more than centered type.

pics attached
http://www.mediafire.com/?96fb9vdahpidh

Reply
SwagatamAdmin
April 20, 2018 • 8 years ago #59898

Thank you very much Nito, I hope you succeed with your project, but remember TL494 is specified to work with minimum 1000 Hz so it might not work correctly below this frequency

Reply
Nitonito
April 24, 2018 • 8 years ago #59987

Thanks once more for the info. Will SG3525 be okay if i use, from the data sheet it’s frequency is 100 Hz to 400 kHz and i already have one circuit built as well as the TL494.

am yet to get 4093 ic to test the whole project

Reply
SwagatamAdmin
April 24, 2018 • 8 years ago #59993

yes SG3525 will be OK, alternatively IC 4047 can be even better

Reply
Dylan
May 8, 2018 • 8 years ago #60359

Hi Swag, do I have to bridge the paired inputs on the 4093, Ie Pin’s 1 & 2; 5 & 6 etc?

Regards D

Reply
SwagatamAdmin
May 8, 2018 • 8 years ago #60362

Hi Dylan, yes the inputs of all the gates will need to be shorted.

Reply
Dylan
May 9, 2018 • 8 years ago #60376

Thank you Sir!

I built it this morning: https://imgur.com/a/xrMajrw

Will connect it up tonight after I get home from work

Reply
SwagatamAdmin
May 9, 2018 • 8 years ago #60378

That’s great Dylan, I wish you all the best, just make sure the mosfets are correctly connected before you apply power….

Reply
Dylan
May 14, 2018 • 8 years ago #60516

Hi Swag, I built the system and it seems to be working. I used a 12V power supply boosted up to 24V in place of the batteries and I was able to get an AC reading on both sides of the transformer. The problem is I am only getting 4V there. Is this because of the power supply?

Thanks again for taking the time to help me out 🙂

Reply
SwagatamAdmin
May 14, 2018 • 8 years ago #60518

Hi Dylan, yes it could be due to power supply, however the secondary should have shown higher voltage if both side mosfets are conducting correctly.

you can confirm the design with a 12V transformer and 12V power supply and check the response. Once confirmed you could then go ahead with 24V

Reply
vhafuwi
May 29, 2018 • 8 years ago #60708

Hi Swagatham , you blew my mind, I have a couple of none center tapped trafo`s from damaged driver inverters ranging from 24V, 36V , always love full bridge , I will try 24V , then 36V for 48V input output 240VAC
Thanks again

Reply
SwagatamAdmin
May 29, 2018 • 8 years ago #60709

You are most welcome vhafuwi, keep up the good work.

Reply
vhafuwi
June 16, 2018 • 8 years ago #61003

Hello Swagatham , what is the alternative to IC4093

Reply
SwagatamAdmin
June 16, 2018 • 8 years ago #61004

Hi vhafuwi, you can try IC4584B, and use 4 out of 6 available gates, and terminate the inputs of the unused 3 gate appropriately

Reply
Vhafuwi
June 16, 2018 • 8 years ago #61005

Thanks for the prompt reply , Due to the simplicity of the circuit , I am constructing after testing I will design the PCB layout and order few boards ,

One question Though
For the SPWM output , what will be more efficient comparing Aduino Atmega328P / IC4047 /SG3525 , I have been considering IC4047 for its straight forward use ,

Any Idea how to get Puse Sine Wave out of IC4047 to feed in the above circuit.
Trying to get this circuit cheaper and efficient as possible

Reply
SwagatamAdmin
June 17, 2018 • 8 years ago #61014

4047, 3525 cannot be used directly for creating SPWM, you may have to apply an external SPWM chopper to enable sine waveform from these ICs.
If Atmega is coded with SPWM just like the Arduino, then it might also work as effectively as the Arduino.
for 4047 yo can refer to the following post
https://www.homemade-circuits.com/pure-sine-wave-inverter-circuit-using/

Reply
Ethan
June 23, 2018 • 8 years ago #61134

Thanks Swag, I have a question, why you use or for what is use the IC 4047 in this circuit, I am a noob on electronics and I would like to know more about the IC 4047

Reply
SwagatamAdmin
June 23, 2018 • 8 years ago #61139

Hi Ethan, IC 4047 is an oscillator IC, which has two outputs for generating a frequency with alternate ON/OFF switching, meaning when one of the two outputs is ON the other will be OFF and vice versa, the oscillation rate depends on the adjustment of an external resistor/capacitor values connected with another set of pinouts of the IC

Reply
Ethan
June 24, 2018 • 8 years ago #61145

Ok thanks, and I have a big question, what pin are conectted to which mosfet, can you explaine me, for example “pin 12 its conected to IRF9540”, like I said im a noob on this

Reply
SwagatamAdmin
June 24, 2018 • 8 years ago #61148

The mosfet gates are connected to the NAND gates from the IC 4093, you can see the IC pinout diagram at the bottom section of the article, you can see which pins are internally connected with its internal NAND gates. Just compare the IC layout with the gates shown in between the Arduino board and the mosfets, you will get an idea how the IC 4093 needs to be configured

Reply
ENGR BASHIR
July 14, 2018 • 8 years ago #61683

Sir is there any programming code require for this circuit

Reply
SwagatamAdmin
July 14, 2018 • 8 years ago #61684

link for the code is given in the article, please check it.

Reply
ENGR BASHIR
July 15, 2018 • 8 years ago #61693

Sir we realy appreciate with ur effort. please sir can u help me with pure sine wave inverter circuit using ATMEGA32 IC that include LCD DISPLAY

Reply
SwagatamAdmin
July 15, 2018 • 8 years ago #61698

Hi Bashir, I do not have this design at the moment, if I happen to find it I’ll let you know…

Reply
ENGR BASHIR
July 15, 2018 • 8 years ago #61703

thank u sir

Reply
Mehedi Leon
July 21, 2018 • 8 years ago #61833

Sir how r u? I have a duestion

we know sine wave inverter hard to design,
so what kind inverters are best for our normal house hold appliances? ( light, fan only)
Modified sine wave or PWM what is best?

Reply
SwagatamAdmin
July 21, 2018 • 8 years ago #61836

Hi Mehedi, both will work, PWM inverter is also a kind of modified inverter but they are better than ordinary modified ones. If you apply proper filter stage at the transformer outputs both versions will work quite efficiently.

Reply
Luna
December 19, 2018 • 8 years ago #64619

sir how are u? i have a question. In your 4093 ic logic, when pin 9 give pulse (=1). N1 = 0 and N2 = 0, so P channel (N1) = OFF and N channel (N2) = ON. Is it right? thanks

Reply
SwagatamAdmin
December 19, 2018 • 8 years ago #64620

I am good Luna, thanks, When N1 input is high, its output is 0, this 0 is applied to the input of N2 causing its output to be “1” or high, this allows the opposite diagonally positioned fets to conduct simultaneously and keep the other diagonal fets switched OFF.

Reply
Luna
December 23, 2018 • 8 years ago #64681

Oh thanks sir. GBU

Reply
SwagatamAdmin
December 23, 2018 • 8 years ago #64682

You are welcome!

Reply
Raghib
March 13, 2019 • 7 years ago #65861

Thanks alot swag……can you mention? What ic and voltage regulator should i prefer when constructing same design for 45v dc supply…….

Reply
SwagatamAdmin
March 14, 2019 • 7 years ago #65863

Hi Raghib, the easiest way is to use a transistor emitter follower regulator. Please see how the BC546 circuit is in the following article, for getting 9V

https://www.homemade-circuits.com/48-v-inverter-circuit/

Reply
Raghib
March 14, 2019 • 7 years ago #65864

Will it work i have input supply from 45v dc solar panel rating 300W to get a spwm unipolar based inverter (230v ac, 50Hz)where losses is minimum.How can i do please suggest me.Can i go for your full bridge inverter?How can i fixed ic and regulartor for 45dc input voltages.

Reply
SwagatamAdmin
March 14, 2019 • 7 years ago #65865

Yes the mentioned emitter follower BC546 concept will work for 45V DC input. The base zener will fix the output voltage. The above Arduino is a bit complex so i wouldn’t recommend this to you since you are a newbie. Instead you can use your own unipolar design without issues.

Reply
Raghib
March 14, 2019 • 7 years ago #65866

Thanks swag……Will ic4093(maximum rating 18v) not burn?if we supply 24v dc.

Reply
SwagatamAdmin
March 14, 2019 • 7 years ago #65867

It will definitely burn even at 20V, a 7812 IC can be used for preventing this issue.

Reply
R Vignesh
April 4, 2019 • 7 years ago #66283

Reply.
The mosfets were connected the wrong way and after fixing that we got the pwm pulses.
Thank you for your kind cooperation.

Reply
SwagatamAdmin
April 4, 2019 • 7 years ago #66284

That’s great Vignesh, let me know if you have any further issues with the design

Reply
Dhams
March 17, 2019 • 7 years ago #65914

Please sir can u help me with cascaded H-Bridge 5 level inverter circuit using arduino

Reply
SwagatamAdmin
March 17, 2019 • 7 years ago #65916

Hi Dhams,
I’ll investigate, and If it’s possible, I will surely try to update it.

Reply
R Vignesh
April 4, 2019 • 7 years ago #66280

Hello sir,
We tried to build the circuit as shown on the breadboard,but unable to get the output as spwm. Can you suggest what probable mistakes we might have made.

Reply
SwagatamAdmin
April 4, 2019 • 7 years ago #66281

Hello Vignesh,

What kind of output are you getting? I have not yet tested this circuit practically but I believe if it’s built correctly it will surely work.

But on breadboard the mosfet may have a high possibility of blowing even with minor hidden issues

Reply
Serđ
April 8, 2019 • 7 years ago #66367

Hi Swag!
Did you test this circuit, with Arduino code, IC4093 and MOSFETS in bridge? is it necessary to use both, so P-channel and N-channel? If I understand right, P-channel and N-channel is here because of transition, when the first 10ms period ends and second 10ms period starts, so that transition between periods is not dangerous for MOSFETS? If I use delay and use relay on +12V line, then I could use just N-channels? Will be 9V/230V transformer ok for 12V battery, we calculated the rms value of 12V to 8,5V rms with Arduino signal, so it could be ok?

Thanks for answer, Serđ.

Reply
SwagatamAdmin
April 8, 2019 • 7 years ago #66372

Hi Serd, As per the standard transistor biasing rules the source or the emitter must get the “ground” reference for operating through a normal base/gate switching.
That’s why p-channel is used on top and n-channel on bottom so that p gets the required positive “ground” reference and the n gets the negative “ground” reference.
If all 4 n-channel fets are used then the situation gets complex and requires bootstrapping a explained here:
https://www.homemade-circuits.com/h-bridge-bootstrapping/

The p channel n channel will also work but the p channel might show some significant heating due to incompatibility with n channel switching and higher R(ds) than n-channel.

The transition is perhaps handled correctly here, with the help of a “LOW” between the Arduino code sets, and also by the use of Schmidt trigger NAND gates IC 4093.

I have not yet tested this design practically!!

Reply
Serđ
April 8, 2019 • 7 years ago #66374

Thanks for your answer. So I don`t have to change Arduino code, because there is “LOW” command for signal, at the end of first and second period. Now I understand better, why to use P-channel at top and N-channel at bottom.

Reply
SwagatamAdmin
April 8, 2019 • 7 years ago #66376

That’s right Serd, Glad it helped!

Reply
Serđ
April 8, 2019 • 7 years ago #66379

I will use 9V/230V – 200W or 300W transformer with 12V car battery. If I use 200W or 300W, I can expect the primary current of: 200W or 300W / 9V= 22A or 33A. Let`s say that I use 300W, that mean current consumption of max. 33A on battery side.
N channel IRF540 datasheet is (100V and 33A) and P-channel IRF9540 (100V and 19A). Are max. current limits of MOSFETS added together, so 33A+19A= 52A? Or is better to use N-channel IRF3205 (55V and 110A) and P-channel IRF9540 (55V and 74A) with that power of transformer?

Reply
SwagatamAdmin
April 9, 2019 • 7 years ago #66390

The 33A will be the maximum current delivering capacity of the transformer, but actually 33A will be consumed only when the load is 33 amp, so it will depend on the load.

Current will not add across the mosfets, it will be 33A only, so both the mosfets can be rated at around 40A, higher values than this will also do.

Yes the last two mosfets look good and can be used.

Reply
Serđ
April 9, 2019 • 7 years ago #66409

So, if I understand right, the current in that schematic is limited to 19A, because the P-channel IRF 9540 MOSFET has 19A max. current limit, this means about 200W with 9V transformer? It doesn`t matter, if IRF540 has higher current limit, max. current of IRF 9540 is 19A, so 19A is max. current through. The current limits for both MOSFETS should be closely together. Let me know, if I`m right.

Reply
View Older Comments

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

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

Primary Sidebar



Categories

  • Arduino Projects (95)
  • Audio and Amplifier Projects (134)
  • Automation Projects (18)
  • Automobile Electronics (103)
  • Battery Charger Circuits (88)
  • Datasheets and Components (109)
  • Electronics Theory (150)
  • Energy from Magnets and Earth (40)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (20)
  • Health related Projects (27)
  • Home Electrical Circuits (13)
  • Indicator Circuits (16)
  • Inverter Circuits (100)
  • Lamps and Lights (163)
  • Meters and Testers (72)
  • Mini Projects (28)
  • Motor Controller (68)
  • Oscillator Circuits (29)
  • Pets and Pests (15)
  • Power Supply Circuits (91)
  • Remote Control Circuits (50)
  • Security and Alarm (65)
  • Sensors and Detectors (107)
  • SMPS and Converters (46)
  • Solar Controller Circuits (61)
  • Temperature Controllers (43)
  • Timer and Delay Relay (50)
  • Voltage Control and Protection (44)
  • Water Controller (37)
  • Wireless Circuits (31)



Circuit Simulator

circuit simulator image



Subscribe to get New Circuits in your Email



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 |



Recent Comments

  • Swagatam on Phase Shift Oscillator Circuits – Wien-Bridge, Buffered, Quadrature, Bubba
  • Swagatam on PWM Inverter Using IC TL494 Circuit
  • Swagatam on Bicycle Generator Circuit
  • Swagatam on Digital Capacitance Meter Circuit Using Arduino
  • Swagatam on 7 Easy Voltage Doubler Circuits Discussed

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Stack Exchange
  • Linkedin

© 2026 · Swagatam Innovations