Arduino and DC motor sharing same power source

Hello,

My motor don’t work after I connect motor and arduino to the same power source.

I measured some voltages but everything looks fine. When I power arduino from USB cable from PC (different power source), all is working fine.

Can someone explain me what part makes this circuit “broken” and if there exists some solution to fix this or to somehow split the power source into two parts.

You have probably assumed incorrectly that the supply can provide the full stall current of the motor, but it can't
so is continually dropping out.

Generally using the same power source for logic and a motor is going to cause problems and is best avoided.
Logic needs a clean and guaranteed stable supply, motors put huge loads on supplies and generate voltage spikes. Very different.

But you've provided no details of the motor, the supply, and your MOSFET circuit is wrong, and your
choice of MOSFET is not-logic level.

The correct MOSFET circuit to use is common-source, the correct MOSFET is logic-level, and inductive loads
need a free-wheel diode across them to prevent inductive kick-back.

Where did you get that awful circuit? Its so wrong in several elementary ways.

Image from Original Post so we don't have to download it. See this Simple Image Posting Guide

...R

Thanks for answer.

MarkT:
You have probably assumed incorrectly that the supply can provide the full stall current of the motor, but it can't
so is continually dropping out.

I use 5V 2A wall power adapter and motor (pump) is running on 0.5A on average. This can't be the issue because when arduino is connected to another power supply, motor has no problems.

MarkT:
But you've provided no details of the motor, the supply, and your MOSFET circuit is wrong, and your
choice of MOSFET is not-logic level.

The correct MOSFET circuit to use is common-source, the correct MOSFET is logic-level, and inductive loads
need a free-wheel diode across them to prevent inductive kick-back.

Thanks for explanation. I will have to buy one from IRL mosfets. I know about that diode but it isn't there just for simplification.

Inaccurate diagrams aren't simpler, they are misleading and waste peoples' time, the information
you give is all we have to go on, so if you want an accurate answer you must give accurate and complete information. Basically it doesn't matter here, the circuit is wrong anyway, its not a low-side common-source switch. MOSFETs are always used as common-source for switching, and n-channel must be low-side switches, p-channel must be high-side switches.

"IRL mosfets" - I think you mean International Rectifier? Many (but not all) of their MOSFET part numbers have an 'L' in them - this is not definitive, you have to read the datasheet.

Other manufacturers of MOSFETs exist, and most have less misleading datasheets than IR in my experience. (For instance this datasheet might lead you to think a TO220 MOSFET can handle 260 amps, when it will actually explode violently: http://www.farnell.com/datasheets/1748058.pdf?_ga=2.243764741.1466984736.1583423572-1355076642.1583074644 - note that somewhere lower down in the footnotes it confesses that the package limitation is 75A, which is pushing it anyway, and it doesn't say anything about the bond-wire limit, the usual point-of-failure for over-current.)

Your gate needs to be about 5 volts or more positive then the source and it will turn on nicely. You can use either N channel or P channel FETs for High Side switching. You typicaly need a charge pump or something to supply the gate of the N channel High Side switch. For years before P-Channel FETs were available with a reasonable low RDSon this is how we did it. This link explains it well. https://www.eetimes.com/a-primer-on-high-side-fet-load-switches-part-1-of-2/#