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



Comments
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.
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.
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
…You can use two of these MOSFETs in parallel for the P channel MOSFETs.
https://www.mouser.com/datasheet/2/308/FQB4P40-1192331.pdf
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.
Could you just use a stepper motor driver card and get square wave or sine by selecting microsteps?
Sorry, I am not sure if that’s possible or not.
Amazing article sir ! And how much the wattage of your design sir ? Thank you very much
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.
The frequency is s 50Hz I’m using iron core for the transformer.
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
Sorry, calculating a 6000 watt transformer can be difficult, I do not have the formulas for calculating such a huge transformer.
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?
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.
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
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.
Thank you sir
You are welcome Anooshka
And can I connect IC4093 Vdd to 12V directly?
Thank you in advance for your prompt reply
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
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.
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.
Thank you for your prompt response, lastly how is the 0.1uF capacitor across 7812?
The 0.1uF is shown for the 4093 IC which must be also supplied from the 7812 IC.
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.
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!
So these protection elements will all come in series with Vdd of IC 4093 or is it connected between Vdd and ground?
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
Thank you sir
You are welcome!!
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?
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.
Thank you for your response
How do I get good Inverter board and software
You can get it from online stores like amazon.
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
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
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
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
hello dear sir project is isolated bidirectional dc dc converter kindly share circuite diagram
I don’t have it at this moment, if I find it will surely share it with you.
How to get Arduino code??
Code is already given in the above article.
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
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.
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
Thank you Tiaan,
You only have to change the battery to 12V, that’s all, nothing else needs to be changed.
I want to follow your designs
Thank you, sure you can!
Thank you for sharing your concern, yes the output of the inverter will be a push pull type and not split phase.