I've been struggling with the following circuit which includes a Raspberry Pi:
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:
If the above does not resolve the issue: