Does a 5v water pump really needs a transistor when connected to a pin?

Hello,

I am working on a project and I need to use water pumps. I saw on the internet that I have to connect a transistor to it and an external source of electricity. I don't want to control the power of the pump, so do I need to use a transistor?
Water pump was tested on 5v of Arduino and it is satisfying. Do I need to use an external source of power?

so do I need to use a transistor?

Yes. An Arduino pin can only supply 20mA or so and connecting it to a circuit that takes more than 40mA will damage the pin. You also need a diode across the motor to prevent high voltages when you switch it off.

Do I need to use an external source of power?

Probably yes, unless you have tested it properly which I assume you haven’t. Simply connecting it up and seeing it run is not testing it properly. You need to look at the 5V line with an oscilloscope and look at the start up transition on the line.

Yes and Yes
The arduino 5 volt regulator will fail if you try and use it to feed a pump motor
The output pin on an arduino will fail if you try and use it to power any form of motor.
The need for a transistor is to permit a low power source (the arduino output pin) to drive a high power demand (the pump motor)
Providing the power supply feeding the arduino is capable of meeting the pump motor demand plus the arduino demand then a single supply may be used, but the starting current of the pump motor may cause arduino problems.

No if you don't mind burning out a pin then you don't need one. Mind your datasheets, max ratings are there for a reason.

Thanks Max and Jackrae

Others have already replied to your problem that you have to use transistor. I just wanna add here that you should try relay instead of transistor, as it's a mechanical switch and completely separates microcontroller from pump.

But if you are planning on using transistor then use optocoupler/optoisolator e.g. PC817 between microcontroller and transistor.

You still need a transistor to drive a relay, unless you are not talknin about a relay but a relay board.

No need at all for an opto isolator at all.