5V DC Motor is not getting enough current

Hi, I want to control a pump using a transistor and my Arduino Mega 2560. I used this tutorial to wire the pump (basically just a 3-5V DC motor in a casing) to the transistor, adding a flyback diode and connecting the base of the transistor to my Arduino. I'm using a PN2222A transistor and a 1N4001 diode. Both the Arduino and the pump are powered by a power source with 5V and up to 12A. The Arduino is powered via the 5V and GND pins.

The wiring works and the pump runs but with much lower current than needed for pumping water to the desired height. If I connect the pump directly to the power source it works just fine. I tried measuring it with my multimeter and got a current of around 70mA when connected directly to the power source and only around 35mA with the above circuit. Both times I measured the current by connecting the multimeter in line between the motor GND pin und the power sources GND.

Do you have any idea why the circuit is reducing the current the motor is drawing? Do I have to use another type of transistor or is the wiring wrong?

(Also, the transistor is getting really hot, too hot to touch. But I read that is to be expected for power transistors switching on and off motors.)

When you looked up the specifications on the PN2222A transistor, what did you find for the amount of current it can pass?

Paul

I don't see a current limit resistor in the transistor base circuit, about 220 Ohms, hope you bought some spares. Also, are you sure the transistor is a P2N2222? The pinout is reversed from a "standard" 2N2222.

https://www.fairchildsemi.com/datasheets/PN/PN2222A.pdf

You will damage the Arduino if you don't have a suitable resistor between the port pin and the transistor base.

Brushed DC motors draw starting current that is up to 10 times higher than the running current. You need a better transistor -- use a logic level N-MOSFET instead (also with a resistor between the gate and the port pin).

@Paul_KD7HB: I got it from ebay, so I'm not sure what the exact specifications are but I read something between 200mA and 600mA on different sources.

@outsider: I added the resistor to the base but how do you know how big it should be? On its back it says CTPN2222A, that's all the information I got. So it should be a simple PN2222 transistor

@jremington: I know MOSFETs are preferred for this kind of task, but I don't have any at hand. But shouldn't it work with a transistor as well?

I added 220 Ohms at the Base but the motor is still not able to draw suitable current.

Hi Marco,

Can you remeasure the motor current and verify that you are pulling 0.070A (70ma)and 0.035A (35ma) and not 700ma and 350ma?

You will get a 0.6-0.7 volt drop through the transistor when fully on. This will reduce the available voltage to your motor from 5V to 4.3 ish.

Since power is a measure of work P=IV = 5V0.07A = 350mWatts ; 4.3V0.035A = 150mWatts

You will only have 1/2 the power available with the transistor that you had without it.

You will need to get a different transistor, up the supply voltage, or modify the circuit.

Circuit works in theory, but you must fix a couple of real world effects if you want it to work well.

Base resistor is to protect Arduino not increase power to motor.

I = V/R Max current on Mega IO pin is 40ma (limit it to ~1/2 )

0.020A = 5/R

R = 5V/0.020A = 250 ohms (in this case 220 ohms is OK)

If you can bump your supply voltage to 7V, you circuit will probably work, if the transistor holds out.

A TIP-120 darlington is a better power transistor.

MB

morrisonandboyd:
You will get a 0.6-0.7 volt drop through the transistor when fully on.

A TIP-120 darlington is a better power transistor.

Make that ~0.1volt for the PN2222 (with the right base current).

A TIP120 has >=0.7volt saturation because of the darlington configuration.
Not a good choice below a few hundred milliamps.

A 220ohm base resistor and a PN2222 should work.
Maybe OP should post a real picture of the setup.
Note the TWO mistakes in the Fritzing picture.
Leo..

According to the PN2222 data sheet (attached), Vce(sat) = 1.6V at 500 mA Ic, 50 mA Ib. The PN2222A is slightly better, with Vce(sat)=1.0V

Both are really terrible choices for a motor driver.

pn2222a.pdf (384 KB)

Was looking at the saturation graph of the ON Semiconductor PN2222 datasheet.
The table lists 0.4volt max with 150mA collector current and 15mA base current.
OP mentions a max load of 70mA. Sounds low for a 5volt 'pump'.
Leo..

@Wawa: Thanks for pointing out I made a mistake in the Fritzing, the picture below should show the corrected one. Inverted the diode and connected the collector to the cathode of the diode.

Below are pictures of the real setup. The circuit is built six times in parallel to power six pumps (should've tested it more rigorously before soldering it all, but just checked if it worked and not the power) but just the first pump is connected to the circuit. The Fritzing is just a breakdown of the problem. When rebuilding the circuit on a breadboard and powering the motor from the Arduino 5V supply I got the same issue. Powering the motor without the circuit from the Arduino 5V supply works fine.

Complete setup:

Soldered parts:

@jremington: What would you recommend as a motor driver? (shouldn't be too expensive)

@morrisonandboyd: Thank you for enlightening me and explaining all the details! Unfortunately I can't change the supply voltage.

Thanks for all the help so far!

Overkill, but cheap. Don't forget the gate resistors.

Thank you! The MOSFET will not reduce the voltage or current flowing through like the transistor?
And what for are the 10k resistor and the capacitor?

Edit: Also I just remember that I've got some L293Ds lying around. Couldn't I use them to run the motors? Or is a MOSFET still safer and a better choice?

MOSFETs have very low internal resistance when on.

The 10K resistor acts as a pull down on the gate, in case the control pin is defined as INPUT.

The capacitor reduces motor noise.

The L293D will be much worse than the PN2222 transistor.

Thank you so much for your help, ordered some comparable MOSFETs, capacitors and resistors on ebay and will try it out next week when they arrive.