Home » 220V Inverters » Arduino Full-Bridge (H-Bridge) Inverter Circuit
Arduino Full-Bridge (H-Bridge) Inverter Circuit

Arduino Full-Bridge (H-Bridge) Inverter Circuit

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, let's learn the details below:

In one of our earlier articles we comprehensively learned 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.

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)

Using 4 N-Channel Mosfets

We are all aware of the dangers or disadvantages associated with p-channel mosfets when these are used as high side drivers along with n channel mosfets as the low side drivers.

The main factor is the RDS(on) incompatibility between the p and n mosfets, which necessitates the selection of the p-channel to be extremely precise and on par with the RDS(on) of the complementing n-channel mosfet. This results in the p-channel being relatively bigger in size than the n-channel mosfet.

To eliminate or avoid the above hassles H-bridge topologies are popularly based on 4 n-channel mosfets instead of p and n channels. However, this yet again does not come easy, and requires the stringent incorporation of a bootstrapping network.

After some study and research I could finally crack a rather simple H-bridge design using all n-channel mosfets, which could be incorporated with any square wave push pull IC.

The design could be also used with the above explained Arduino network. The design can be examined in the following diagram:

The alternate clock input terminals must be integrated with the NAND gate outputs which will act like level shifters here.

The input diodes and the bootstrapping diodes could be a 1N4148. The capacitor can be 0.22uF, having a voltage rating of 15 + the drain side voltage.

The PNP/NPN pairs can be made using BC557 and BC547 transistors

SHARING IS CARING!

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!






71 thoughts on “Arduino Full-Bridge (H-Bridge) Inverter Circuit”

  1. Good morning, Swag.
    I have a mini system transformer I would like to use as an inverter of 12v x 110v x 100w, but I only know that there are 2 wires in the secondary and 5 in the primary. I do not know which wires connect to make the 110v, its voltage or amperage.
    Could you help me identify the wires and fit the inverter design with only two wires in the primary of this inverter?
    I have in primary between pins 1 and 2: 39.4 ohms.
    Between pins 3 and 4: 26.3 ohms
    Between 3 and 5: 40.8 ohms
    Between 4 and 5: 37.3 ohms.
    On the secondary: 28 ohms.
    * approximate measures.
    Tanks

    • Hi Marcelo, You will need grid supply 110V to test the transformer. Plug in two wires into mains 110V socket, one wire having a 60 watt or 40 watt bulb in series. Now cautiously touch the wire ends randomly across the transformer pins. The pair of pins that allows minimum glow or zero glow on the bub will be your 110V winding of the transformer.

      Once confirmed connect the mains wires along with the bulb across those pins, and with a AC voltmeter start checking the outputs across the other pins of the transformer, and note down the corresponding data.

      • I did as you said, using a 40w bulb.
        1 and 2: very weak
        3 and 5: very weak
        4 and 5: weak
        3 and 4: strong.
        The other combinations did not signal the filament of the lamp. I’m sorry, but I still do not know which wire to connect.

        • From the winding which did not give any glow check there resistances, the one with lowest resistance will be 110V…connect the 110V AC with series bulb across this winding and measure the voltages from the other wires to know their details.

  2. Hi Swag, appreciate your effort, I have a question related to that circuit. How can I control the output voltage of this full bridge inverter? Have you done any study about that ? As I have researched a comparison between output and a reference voltage (feedback) is needed but I am not sure how to make it. Thanks in advance

    • Thanks Blendi, You can control the output by upgrading the code such that one of the Arduino pins accepts an input from a feedback to adjust the PWMs fed to the NAND gates. I am not good with Arduino coding therefore for me it may be quite difficult to accomplish this.

      • Hi Sir, I have used this full-bridge circuit with 2 P-channel and 2 N-channel mosfets (this one in the top of the page) and I have supply the circuit with 6V DC so as a result I have received approximately 4V AC (peak to peak) in the output. Have I received the right result or not (why it is lower than our 6V DC)? In addition I wanted to know if using bootstrapping circuit with 4 N-channel mosfets full-bridge (The last one) is safer than this one with 2 P-channel and 2 N-channel mosfets or not ? Which one do you recommend and why ? Thanks in advance

        • Hi Blendi, 4V is correct because the output from Arduino is PWM in the form ON/OFF 6V supply…therefore due to the OFF periods the average will be lower than 6V.

          The lower circuit has not been investigated thoroughly by me yet, but the first one looks fine in every respect, the only thing that needs to be considered is the selection of the p channel mosfet which must have an RDS(on) similar to the low side N mosfet. You can read more about it here

          https://www.homemade-circuits.com/how-to-implement-p-channel-mosfet-in-h-bridge-applications/

          • …by the 4V is not peak to peak, it’s the average value, the peak will be 6V…also this is not AC, it is pwm DC

            • Do you have any e-mail address in order to send my result (The oscilloscope output) to you ? Because I couldn’t understand you last sentence.

            • My email is homemadecircuits @ gmail.com
              the 4V that your are measuring in oscilloscope should have 6V peak for the PWMs, but the RMS or the average for this will be 4V.

              But I am not sure where exactly you are measuring it, because Arduino is supposed to work with 5V, and not 6V

  3. Hi Swag,
    So I don`t need to use delay ON timer and relay on positive wire, which is going to mosfets, if I`m using H-bridge configuration, or is better to use it?
    How can I use voltage regulator with opamp741 with IC4093? Use opamp741 output transistors in series with resistor connected to output pins 8 and 9 of Arduino and then connected to ground? – so when the voltage is to high, transistors will short the signal through resistor(10Kohm) to ground and there won`t be any signal on pins of 4093?
    Thanks for your help.

    • Hi Serd, delay ON will be required for this project also, because during initial switch ON, the Arduino outputs could be in an undefined status causing the mosfets to conduct abnormally and blow.

      You can connect the output of 7812 to the Arduino, 741 circuit and the 4093 circuit, all together commonly.
      The output from the following circuit (BC547s) can be connected to the IRF540 gates. Just make sure to use a 220 ohm between the IRF540 gate and respective NAND outputs

      • Hi Swag,
        I think, that is good idea to add delay ON to positive wire with relay too.

        “The output from the following circuit (BC547s) can be connected to the IRF540 gates.”
        So, if I understand right, I can connect opamp741 voltage limitor output directly to both bottom IRF540 and that will cause that the gate of IRF540 will be connected to ground when output voltage is too high and IRFs won`t conduct. I think, you meant that for previous design, with center tapped transformer, not this one with H-bridge. Correct me if I`m wrong. How to implement this with that design, so H-bridge?
        In my opinion, better idea is to connect Arduino output pins, with BC547 outputs (opamp 741 voltage limitor circuit) to ground. That will cause logical “0” on Arduino pins and so on IC4093 input pins and all MOSFETS will be closed.

        “Just make sure to use a 220 ohm between the IRF540 gate and respective NAND outputs.”
        It is generally a good idea to include a gate resistor to avoid ringing (parasitic oscillation). A low ohm resistor will solve the ringing. I think the typical value of 10-100 ohms from IC4093 outputs to each MOSFET gates in bridge, could be just ok. Why did you choose 220 ohm? It`s good idea to add a high value resistor (about 10Kohm) from the each gate of P-channel MOSFETS to positive voltage (pull-up resistors) and each gate of N-channel MOSFETS with 10Kohm resistor to ground (pull-down resistors). Anyway, the good thing is that there is IC4093 Schmidt trigger and it provides full switching of MOSFETS (fully open or closed) and there is no “floating” voltage on gates, thanks to Schmidt triggers.

        Thanks for helping me out. I will try to make this design practically when I get all components.

        • Hi Serd, Sorry I forgot add the opamp circuit diagram, here it is:

          https://www.homemade-circuits.com/wp-content/uploads/2019/03/Arduino-regulation.jpg

          I was referring to the full bridge only not the center tap. The BC547 collectors can be connected with the low side n-channel mosfet with the gate connected to N2/N4 through a 220 ohm resistor. The 220 ohm would also work since the frequency is only 50 Hz, enough time to discharge the mosfet capacitance through the 220 ohm also.

          If you are doubtful then you can add a BC547/BC557 buffer between N2/N4 and the mosfets, and then integrate this buffer with the volatge limiter as done here:

          https://homemade-circuits.com/wp-content/uploads/2016/04/ac2Binverter.png

          Shunting any circuit output is inappropriate, therefore Arduino output cannot be connected with the voltage limiter, this may lead to high dissipation and may be harmful to the Arduino.

            • Ok. So I must add gate resistor (10-220ohm) from N2/N4, to gates of lower N-channel mosfets and connect outputs with BC547 (opamp741 circuit), between gate resistors and mosfet gates. What about upper P-channel mosfets? Don`t they require gate resistor from N1/N3 too?
              Thanks.

            • If you use anything less than 100 ohm that will cause 4093 to heat up and dissipate, that’s why I recommend 220 ohm, alternatively you can use 220 ohm in series with 4093 Vcc (+) pin, and then use 10 ohms with N2/N4, this will do the trick.

              the upper and the lower mosfets are in series, so any one of them can be used for feeding the pwm.

  4. 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đ.

    • 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!!

      • 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.

          • 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?

            • 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.

          • 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.

            • The mosfet with lower current rating will start heating up fast and might ultimately burn. So for a 19 A device the load current cannot be increased above 19 amp, in fact not above 15 amp to avoid too much stress on the mosfet. The mosfet current rating must be sufficiently higher than the maximum load current you intend to use at the output.

  5. 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.

    • 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

  6. 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.

    • 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.

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

  8. 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

  9. 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?

    • 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.

  10. 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

  11. 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

    • 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

      • 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

        • 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

  12. 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

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

  13. 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

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

          • 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 🙂

            • 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

    • 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

      • 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

Leave a Comment