I have a circuit that uses an LM338K adjustable power regulator to supply 14V to a electromagnetic loop coil for producing a pulsed square wave signal under 500Hz. The coil has approximately 10.5 ohms resistance and about 6.25 Henries.
The switching to generate the pulse is produced by a raspberry pi GPIO pin driving an N-Channel MOSFET (NTE2980). I have a flyback diode across the coil outputs to kill the ringing in the square wave.
Here's the problem I'm experiencing and I'm hoping someone can explain this observation and offer an option on how to correct it:
With the flyback diode in place, I get a variation of voltage coming out of the regulator (when the MOSFET is off). That voltage measures around 16.2 V and the regulator becomes only nominally adjustable. When I remove the flyback diode, the voltage returns to the 14V the regulator is set at. Of course, the diode is also protecting the MOSFET, which if the diode is removed, gets hot fairly quickly (~20 seconds).
So, why would the flyback diode be causing the power fluctuation and what is the right solution to fix it?
Here's a text representation of the circuit:
- 14V positive supply connected to one side of the electromagnetic loop.
- Other side of the loop connected to the drain of the mosfet
- MOSFET source connected to ground.
- PI GPIO driving gate of MOSFET
- Diode placed directly across the loop coil terminals.