MOSFET circuit:

I have the following MOSFET circuit to current limit battery charging from an alternator. The alternator is currently not connected. I'm using a DC-DC boost converter to provide 25V from the battery.

Gate voltage is between 0-25V.

Battery voltage is 12.6V.

Vgs is therefore ~ -13 to 13V.


simulate this circuit – Schematic created using CircuitLab

Driver circuit:


  • Q23 with pull-up provides 0-25V signal
  • Q26 / Q25 provides voltage follower (current source, 0-25V)
  • Q24 provides faster rise time

enter image description here


When the driver circuit drains the gate (connects the gate to ground), the battery voltage spikes high (~25V), and the gate voltage spikes negative (~12V).

  • CH1: 5V MCU signal
  • CH3: Actual gate voltage
  • CH4: BAT

enter image description here

In the following I added a 5ohm between circuit ground and actual ground, as well as 10 ohm between 25V and Q24 (Q24 failed after 10 minutes of operation, presumably due to overcurrent). This has virtually eliminated negative gate voltage, but did not fix positive voltage spikes on BAT.

CH3: Vs

Math (purple): Vg-Vs

enter image description here enter image description here

Vgs is ranging between -4V to 13.6V, which is well within operating margins of max +/- 20V.

Note: frequency measurement is incorrectly shown as 930kHz. When downscaling horizontally, it correctly shows ~19.2kHz.


  • Why am I getting the negative spike on SIGALT and positive spike on BAT? Introducing D21 seems to have reduced the problem, but not eliminated it. Is there a problem with my driver circuit?
  • Is it a problem to have a 25V spike for ~1us? If the frequency is 20kHz, this would mean the voltage is 25V for 20ms per 1 second? That sounds rather undesirable.

  • Can I simulate the problem in LTspice? It doesn't appear in my simulation. I'd like to experiment with various solutions to reduce the problem.

  • \$\begingroup\$ Is it in fact a positive spike on the ground reference? \$\endgroup\$
    – pjc50
    Commented Jan 27, 2017 at 13:20
  • \$\begingroup\$ @pjc50, How would I measure that? The oscilloscope is referenced to the ground. I'm guessing that the gate charge raises the ground voltage. But I don't really understand it. And more importantly, how to avoid it (beyond introducing a resistor which would increase fall time) \$\endgroup\$ Commented Jan 27, 2017 at 13:25
  • 1
    \$\begingroup\$ This is a messy question, you start with questions without explaining what the question is about. 3rd sentence mentioned D21 which is not in the schematic at the top but at the end. Try to get a certain understandable flow so I do not have to scroll up and down all the time. So: 1) describe circuit (including driver) 2) describe measurement 3) ask questions. In that order -1 untill you clean this up. \$\endgroup\$ Commented Jan 27, 2017 at 13:56
  • \$\begingroup\$ @FakeMoustache, Done! \$\endgroup\$ Commented Jan 27, 2017 at 14:06
  • \$\begingroup\$ OK, much better, -1 removed. \$\endgroup\$ Commented Jan 27, 2017 at 14:12

2 Answers 2


Any time you cut off (or turn on) a current quickly you will get voltage spikes due to the inductance of the cables connecting everything. How much of a spike depends on how much inductance there is, how fast you cut off the current, and how much current there is.

Typical power wiring will have several micro-henries of inductance.

  • \$\begingroup\$ Aha, that's interesting! At which point is it a problem? E.g. let's say an Arduino is connected to BAT and it's voltage regulator can't handle more than 19V. When does these voltage spikes become a problem, and is there anything I can do about it? BAT is two lead-acid batteries, so I assume adding a capacitor would make zero difference. \$\endgroup\$ Commented Jan 27, 2017 at 15:06
  • \$\begingroup\$ Btw, my cabling is generally 10-30mm2 and short distance. \$\endgroup\$ Commented Jan 27, 2017 at 15:07
  • 1
    \$\begingroup\$ @user95482301 adding ceramic decoupling capacitors across your batteries (at any point its used, such as a regulator input) is usually a good idea. The impedance of most batteries goes up with frequency so they may momentarily droop when the load changes suddenly \$\endgroup\$
    – user4574
    Commented Jan 27, 2017 at 20:29

The control of your MOSFETs relies on a gate voltage with respect to source. M1's internal diode will never be forward biased by BAT but, M2's internal diode can easily become forward biased when ALT spikes low. I guess it's an alternator that ALT stands for so you can expect a lot of spikey stuff going on. This question was answered before the OP disclosed that: -

The alternator is currently not connected.

If the ALT is not connected then the sources will float and the circuit cannot be expected to do anything sensible. To user95482301 please don't keep editing the question without thought to answers that are already given. If you have to edit-in new information then please do it at the end of the question so that someone doesn't think I'm a moron for not reading the question correctly. Make it clear that new information is seen as new information!

Back to the original answer and it is still valid should the OP decide to connect the alternator: -

So, ALT spikes low and M1's source source follows it. Now, due to capacitance between gate and source (8 nF), that pulse transfers to the gate and maybe your driver can't do anything about that negative going spike because once it happens, there's a chance that Q24 is dead.

BTW I wouldn't use a 30 volt rated MOSFET in an alternator circuit. When that spike arrives from the ALT net, M1 will see +12 V on BAT and -25 V on its source and that exceeds the DS rating by 7 volts. It might survive a while but don't expect it to survive long-term.

  • \$\begingroup\$ The alternator is not connected at this time. Is it a problem that the source pins are not connected to anything but eachother? Would I need to add a 100k resistor between source and drain? The circuit seems to work fine, apart from the spiking. \$\endgroup\$ Commented Jan 27, 2017 at 14:11
  • \$\begingroup\$ I've updated the question with data on Vgs. \$\endgroup\$ Commented Jan 27, 2017 at 15:15
  • \$\begingroup\$ Without the ALT connector, nothing is biasing the sources so you cannot expect sensible operation. The 100k idea sounds sensible but so does 1 kohm. \$\endgroup\$
    – Andy aka
    Commented Jan 27, 2017 at 15:17
  • \$\begingroup\$ I just tested with 2-7A load (motor) and 5-15A car battery charger, adjusting the duty cycle. Vgs has same characteristics as documented above. Vs follows Vg but clipping at BAT. (presumably because the MOSFET starts conducting as soon as Vg is slightly higher than BAT) \$\endgroup\$ Commented Jan 27, 2017 at 15:33
  • \$\begingroup\$ @user95482301 I have no idea what the motor has to do with your circuit. Ditto the car battery charger. Are the goalposts moving again because I don't have neither the time or patience to keep coming back to this question and re-amend my answer to suit your changing observations or forgotten-to-say things. I have given you my answer and amended it once because you forgot to say the Alternator wasn't connected. I am not going to amend any more nor am I going to analyse supposed new information about some motor and a battery charger. \$\endgroup\$
    – Andy aka
    Commented Jan 27, 2017 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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