Electronic – Voltage regulator ‘hiccups’ when gate pin of MOSFET is touched

power supplyraspberry pivoltagevoltage-regulator

I've been struggling with the following circuit which includes a Raspberry Pi:

enter image description here

That's a 5V voltage regulator (with protective capacitors), and a DC motor over on the right, and an IRF510 N-channel MOSFET toward the bottom.

The 9V supply is actually a plugged in 9V supply, so battery death isn't an issue.

The problem in some way is stemming from the presence of the Raspberry Pi.

A voltmeter is clamped and measuring voltage between A (output of the voltage regulator) and B (ground of the circuit)

This voltage normally sits at about 4.94 ~ 5 volts.

Now, I touch the two wires in the dashed box. This should simply kick the MOSFET over, allowing the motor to run. And it does that. Except there's a small hiccup. The voltage reading (A to B) drops momentarily to about 1.0V, the Raspberry Pi turns off, but then the voltage (A to B) comes back up, the Pi reboots, and the motor is running. I disconnect the wire and the motor stops. Everything is fine.

Replace the raspberry Pi in the picture with a regular resistor and the hiccup doesn't happen.

Now I would say that the most likely cause is some sudden spike in current is happening, overloading the voltage regulator's 1.5A rating. But I can't see what would be causing it. Measuring the current out the regulator when the Pi is idling gives only about 0.35 A. I can't see how touching the other parallel wire there would cause some surge in current.

Furthermore, everything works fine after the hiccup!

So I'd be extremely grateful for any clue as to what might be happening! Thanks for any advice!

EDIT:

Measuring the voltage across the power supply (where it comes INTO my breadboard)'s positive and negative terminal during the touching of the wires ALSO shows a drop from 8.98 V all the way to around 2V and then goes back up. Now I'm even less sure of what's going on!

And just to clarify – this is a AC to 9VDC converter plugged into a wall outlet; the wires go directly into the + and – rails of my breadboard.

Best Answer

Steps to diagnose / eliminate the problem:

  • Add a 10 μF, 6.3 Volts or higher capacitor in parallel with C2 from the 7805 output leg, as close as possible, to ground.
  • Add a 100 uF, 10 Volts or higher capacitor to the 9 volt input, to act as a buffer / reservoir capacitor.
  • Add a 100 Ω resistor on the line from the regulator to the MOSFET gate, and replace the pulldown resistor on the Gate with least 1 kOhms. This will reduce the current spike due to capacitance of the MOSFET gate - I believe this should not be the problem, but it is a simple and useful preventive step nevertheless.

If the above does not resolve the issue:

  • Use a separate 9 volt supply for the motor, your existing supply is unable to cope with the starting load (stall current >> operating current, usually) of the motor.