Hardware Pwm driver for inductive Loads..
Input from 5-12 volts, better 12v( + ~30% Efficiency ).
Added resistor in the gate, pwm Frequencies could vary, with values around 40Khz-200Khz, as good values..
At higher frequencies lets say 200Khz, the error is most pronounced( because of the time needed to charge the Gate capacitor of the mosfet ~9.636ns ), this time to charge, introduce a delay in the Switching Time, of the circuit..
it should be maximum of ~3-4%@5v/200Khz, the error is less pronounced at lower Frequencies..
A value of 40Khz is already a nice value since it his above [ 20hz - 20Khz ] sound envelope..