Simple P channel power mosfet, how it works:

IN/PWM_IN is the signal from the microcontroller that drives the base of the transistor Q2.

Q2 chnages the R4 voltage drop that is the pull-up voltage of the MOSFET Q1 so when Q2 is low the voltage

across R4 is high, this puts the mosfet at low state, when Q1 is high the voltage across R4 drops really low

an the mosfet drives current. The transistor Q2 is necessary because the mosfet is a P channel type therefore requires

a gate voltage high as the drain-source voltage to remain in a non conductive state. 







 MG 2394