Preface, I'm a hobbyist not a electrical engineer, so please be gentle.
I was looking for a better than l298N motor control solution for higher currents and one that is similar price and size, but couldn't find one.
I searched the web for h bridge schematics to copy and make a PCB for my projects. So far this is the part of circuit that does the heavy lifting: The design is from Lewis Loflin http://www.bristolwatch.com/k150/port5.htm
5v control signals (ATMega 328p, 500Hz PWM frequency), motor is 24V/5A (windshield wiper motor), MOSFETs are IRF3205 (N) and AO4407A (P, only have SMD p-channel MOSFETs on hand and all of them are -30Vds), BC547 NPN. The problem is that the circuit does not have a voltage spike protection (to my limited knowledge, unless the body diodes count as one) and AO4407A is rated to -30V Vds which is probably lower than the voltage spike that might occur.
What should I change in the circuit to protect the MOSFETs from releasing the magic smoke?
Would using PWM to slowly ramp up and down the motor help? The solutions that I've read about consist of either: diodes, MOVs, low pass filters, capacitors, coils, gate resistors, but which solution is considered not overkill and "good enough"? I don't have a oscilloscope to measure the voltage spike, so I'm not sure of values that the protective components should have.
Also I've read that for PWM control, you should only use PWM on 1 of the MOSFET (N, P) pair, is that right?