How to make simple H-Bridge from Mosfet ...

                     
                 Hi friends... in this tutorial we are going to learn how to make a simple H-Bridge using Mosfet.H-Bridge like L293D. L293D are easy to use but the limitation is more, they support only limited range of voltage and current , but if we use  Mosfet for H-Bridge we are full-flexed to use the circuit to wide range of voltage and current . 
                  In this tutorial we use IRF 540 and IRF 9540 (n - Mos and p -Mos) , they have high current  and voltage rating , you may use other Mosfet for your requirements and pc817 is the optocoupler for interfacing the circuit with micro controller and to switch the Mosfet correctly . if you don't use the optocoupler , then the High side Mosfet always be on and make the circuit prevent from working correctly.

  • Low-side MOSFETs are always N-channel ones, while on the high-side is P-channel . 
  • In this circuit, a high-side MOSFET(IRF9540) and a low-side MOSFET(IRF540) are combined to provide a clean digital logic output. 
  • If the input C is HIGH and  the input D is LOW. The output is A is + VCC (12V) of  high-side element and the  output B is GND (0V) of  low-side element.
  • If the input D is HIGH and  the input C is LOW. The output is B is + VCC (12V) of  high-side element and the  output A is GND (0V) of  low-side element.