Question: I'm trying to control a heater coil (resistance ~0.9 Ohm) with PWM using a MOSFET. PWM modulator is based on LM393, MOSFET is IRFR3704 (20V, 60A).

![Current schematic](https://i.stack.imgur.com/HaVmd.png)

If I place 1k resistor in place of heater everything runs fine and waveforms at testpoints CH1 and CH2 are nearly square. But when I place an actual heater in the scheme, oscillation occurs on the falling edge of pulse at the moment when voltage crosses Vth (channels are mixed here: yellow oscilloscope channel is connected to testpoint CH2 and cyan channel to CH1). Oscillation amplitude is somewhat larger than battery voltage and reaches 16V at its maximum.
I'm mostly a microcontroller specialist and my knowledge of this kind of circuits is poor. Is it an effect of the heater inductance or something else? How to oppose it?

![Oscilloscope screenshot](https://i.stack.imgur.com/npaxF.png)

Answer: 
It's very probably the inductance.
The mosfet turns off really fast and you get a V = L(di/dt) voltage spike. 
This turns on the zener protection in your mosfet and then the current runs around the rest of your circuit

A fly-back diode might do the trick.

Put the diode in parallel with the heater element with the cathode connected to the positive terminal.

Now when it is turned off the current will find a harmless path via the diode.

Careful. The diode will heat up with each cycle.

From your oscilloscope trace the oscillation time is about 100us

Current = about 10A

V of diode forward biased = 0.7V

E = VIT = 700 uJ ( I know this calc is cheating, it probably less than half this amount)

P = E\*F (F = switching frequency)

if F = 1kHZ then P = 700mW

To select you diode multiply its power rating in Watts by your switching frequency in kHz.
![enter image description here](https://i.stack.imgur.com/adXOn.jpg)add small positive feedback (by resistor ) to provide litle hysteresis (in point setting by R3 on point line of sawtooth wafeform

for example resistor 10MB beetween node 3 and 1 U1
positive feedback for histerese - secure fluctuation on power suplly (batery)

add diode + filter RC on supply R3 

change voltage battery set another swithing point on R3 and generate flaping Q1

and in resultate positive feedback circuit by supply - frequency of oscilation

(sorry for language)

<http://en.wikipedia.org/wiki/Schmitt_trigger>