Go Down

Topic: 5V DC Motor is not getting enough current (Read 285 times) previous topic - next topic

MarcoStb

Jun 13, 2018, 09:16 pm Last Edit: Jun 13, 2018, 09:17 pm by MarcoStb Reason: Adding picture of circuit
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.)

Paul_KD7HB

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

Paul

outsider

#2
Jun 14, 2018, 04:21 am Last Edit: Jun 14, 2018, 04:43 am by outsider
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.
http://www.onsemi.com/pub/Collateral/P2N2222A-D.PDF
https://www.fairchildsemi.com/datasheets/PN/PN2222A.pdf

jremington

#3
Jun 14, 2018, 04:36 am Last Edit: Jun 14, 2018, 04:37 am by jremington
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).

MarcoStb

@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.

morrisonandboyd

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  = 5V*0.07A = 350mWatts ;  4.3V*0.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

Wawa

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..

jremington

#7
Jun 15, 2018, 01:31 am Last Edit: Jun 15, 2018, 01:36 am by jremington
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.

Wawa

#8
Jun 15, 2018, 02:29 am Last Edit: Jun 15, 2018, 02:36 am by Wawa
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..

MarcoStb

#9
Jun 15, 2018, 02:44 pm Last Edit: Jun 15, 2018, 02:55 pm by MarcoStb Reason: Adding pictures
@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!




jremington

#10
Jun 15, 2018, 04:59 pm Last Edit: Jun 15, 2018, 05:03 pm by jremington
Overkill, but cheap. Don't forget the gate resistors.

MarcoStb

#11
Jun 15, 2018, 05:35 pm Last Edit: Jun 15, 2018, 06:00 pm by MarcoStb
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?

jremington

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.

MarcoStb

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.

Go Up