simulate this circuit – Schematic created using CircuitLab

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.

closed as unclear what you're asking by Andy aka, Voltage Spike, Bimpelrekkie, RoyC, Sparky256 Aug 26 '18 at 20:33

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ I'm thinking I might need a diode between the R2 wiper on the voltage regulator and ground. My suspicion is that some of the current flowing out of the MOSFET might be throwing off the voltage reference on the LM338K resistor pair. \$\endgroup\$ – Max Aug 17 '18 at 10:57
  • 1
    \$\begingroup\$ Do you have any capacitors? Please show on the schematic if so :) \$\endgroup\$ – awjlogan Aug 17 '18 at 12:19
  • \$\begingroup\$ Do you have an oscilloscope? The waveforms at the regulator output and MOSFET drain would be of interest. (Unrelated to your issue) What's the intended purpose of R4? The MOSFET gate is getting rather marginal drive voltage as it is (2.2V nominal for a MOSFET characterized at 4V). \$\endgroup\$ – Spehro Pefhany Aug 17 '18 at 12:35
  • \$\begingroup\$ No capacitors in this circuit. It's exactly as indicated in the schematic. R4 is a pulldown resistor for the Raspberry Pi gpio. The GPIO outputs 3.3 volts when ON and on system startup, is floating around 2 volts. The purpose of R3 and R4 are to pull the floating voltage down below the MOSFET ON threshold, thus eliminating an ON state for the MOSFET. I know what you're talking about with the marginal drive voltage. This particular MOSFET is a logic level one with a VGS(th) of 1 to 2 volts. \$\endgroup\$ – Max Aug 17 '18 at 13:25
  • 1
    \$\begingroup\$ Caps may not be required by the linear regulators datasheet, but it doesn't mean that they are not good practice. If your FET doesn't shut off with a floating GPIO and a 10K pull-down then maybe that's a clue that something else is wrong with your circuit. You shouldn't need a 2K variable resistor to tune the pull-down if the GPIO is tri-state. \$\endgroup\$ – John D Aug 17 '18 at 16:39

PCB error caused the problem. Circuit works fine as drawn above.


Not the answer you're looking for? Browse other questions tagged or ask your own question.